Ignore:
Timestamp:
12/15/11 17:09:49 (13 years ago)
Author:
fpvanagthoven
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/returnObjectDisplay.php

    r183 r185  
    33require 'classes/master.php';
    44
    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
     11if(isset($_POST['args']) && !empty($_POST['args'])) {
    712    // Get arguments and convert to object
    813    $input = $_POST['args'];
    9     $inputDecoded = json_decode($input);
     14    $requestArray = json_decode($input);
    1015} else {
    1116    die('DOESNT WORK...');
     
    1419$dbi = new DatabaseInterface();
    1520$outputArray = array();
    16 foreach ($inputDecoded as $request) {
    17     $results = $dbi->get($request->type, array("uid" => $request->uid));
     21foreach ($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);
    1834    if (isset($results) && !empty($results)) {
    1935        is_array($results) ? $object = $results[0] : $object = $results;
Note: See TracChangeset for help on using the changeset viewer.