Changeset 185 for Dev/trunk/returnObjectDisplay.php
- Timestamp:
- 12/15/11 17:09:49 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/returnObjectDisplay.php
r183 r185 3 3 require 'classes/master.php'; 4 4 5 //var_dump($_POST); 6 if (isset($_POST['args']) && !empty($_POST['args'])) { 5 /* 6 * Note: do not try to implement info panel displays in this file as well, it passes and queries a lot of data that you really do not need. 7 * Since this function will be used so often, adding extra unneeded code to it will slow down the regular operation of the editor (refreshes, etc..) while not offering a significant advantage over the existing getInfo.php 8 */ 9 10 11 if(isset($_POST['args']) && !empty($_POST['args'])) { 7 12 // Get arguments and convert to object 8 13 $input = $_POST['args']; 9 $ inputDecoded= json_decode($input);14 $requestArray = json_decode($input); 10 15 } else { 11 16 die('DOESNT WORK...'); … … 14 19 $dbi = new DatabaseInterface(); 15 20 $outputArray = array(); 16 foreach ($inputDecoded as $request) { 17 $results = $dbi->get($request->type, array("uid" => $request->uid)); 21 foreach ($requestArray as $request) { 22 var_dump($request); 23 $results = $dbi->get(strtolower($request->type), array("uid" => $request->uid)); 24 25 /* 26 * Reden voor deze var dumps is dat de questions niet gevonden kunnen worden. De bovenstaande regel returnet geen question object, ook als deze zeker weten wel bestaat. 27 * Even aan Jos vragen wat hier fout gaat? 28 */ 29 30 31 32 33 var_dump($results); 18 34 if (isset($results) && !empty($results)) { 19 35 is_array($results) ? $object = $results[0] : $object = $results;
Note: See TracChangeset
for help on using the changeset viewer.