Esempio n. 1
0
     for ($stage = 1; $stage <= $countStages; $stage++) {
         if (!$error) {
             // Search
             $current['stage'] = $stage;
             $items = CCK_List::getList($ordering, $areas, $fields, $fields_order, $config, $current, $options, $user);
             if (!$items && $stages[$stage] == 0 && in_array($stage, $excluded_stages) === false) {
                 $error = 1;
                 break;
             }
             $current['stages'][$stage] = implode(',', $items);
         }
     }
 }
 if (!$error) {
     $current['stage'] = 0;
     $items = CCK_List::getList($ordering, $areas, $fields, $fields_order, $config, $current, $options, $user);
 }
 $total = count($items);
 if (isset($config['total']) && $config['total'] > 0) {
     $limitstart = -1;
     $limitend = 0;
     $total = $config['total'];
 } else {
     $config['total'] = $total;
 }
 $total_items = $total;
 // IDs & PKs
 if (isset($config['process']['beforeRenderForm']) && count($config['process']['beforeRenderForm'])) {
     $ids = '';
     $pks = '';
     if ($config['doQuery']) {
Esempio n. 2
0
     for ($stage = 1; $stage <= $countStages; $stage++) {
         if (!$error) {
             // Search
             $current['stage'] = $stage;
             $items = CCK_List::getList($ordering, $areas, $fields['search'], @$fields['order'], $config, $current, $options, $user);
             if (!$items && $stages[$stage] == 0 && in_array($stage, $excluded_stages) === false) {
                 $error = 1;
                 break;
             }
             $current['stages'][$stage] = implode(',', $items);
         }
     }
 }
 if (!$error) {
     $current['stage'] = 0;
     $items = CCK_List::getList($ordering, $areas, $fields['search'], @$fields['order'], $config, $current, $options, $user);
 }
 $total = count($items);
 // IDs & PKs
 if (isset($config['process']['beforeRenderForm']) && count($config['process']['beforeRenderForm'])) {
     $ids = '';
     $pks = '';
     if ($config['doQuery']) {
         for ($i = 0; $i < $total; $i++) {
             $ids .= (int) $items[$i]->pid . ',';
             $pks .= (int) $items[$i]->pk . ',';
         }
         $ids = substr($ids, 0, -1);
         $pks = substr($pks, 0, -1);
     }
     $config['ids'] = $ids;