Changeset 238 for Dev/branches/jos-branch/getObject.php
- Timestamp:
- 01/18/12 16:39:27 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/jos-branch/getObject.php
r237 r238 14 14 foreach ($requestArray as $request) { 15 15 $type = $request->type; 16 $results = $type::get(array("uid" => $request->uid)); 16 17 if (isset($request->uid)) { 18 $results = $type::get(array("uid" => $request->uid)); 19 } else if (isset($request->title)) { 20 $results = $type::get(array("title" => $request->title)); 21 } 22 17 23 18 24 if (isset($results) && !empty($results) && count($results) > 0) { … … 20 26 $results[0]->objectType = $type; 21 27 $resultArray[] = $results[0]; 22 } 23 else { 24 $resultArray[] = array("uid"=>"Not found!"); 28 } else { 29 $resultArray[] = false; //Insert a false return so that the calling JS code knows when an object is not found 25 30 } 26 31 }
Note: See TracChangeset
for help on using the changeset viewer.