$preconfig['show_form'] = $preconfig['show_form'] != '' ? (int) $preconfig['show_form'] : (int) $options->get('show_form', 1); $preconfig['show_list'] = isset($preconfig['show_list']) ? (int) $preconfig['show_list'] : (int) $options->get('show_list', 1); $preconfig['auto_redirect'] = $preconfig['auto_redirect'] != '' ? $preconfig['auto_redirect'] : $options->get('auto_redirect', 0); // ACL if (!in_array($search->access, $user->getAuthorisedViewLevels())) { $config = array('action' => $preconfig['action'], 'core' => true, 'formId' => $preconfig['formId'], 'Itemid' => $itemId, 'javascript' => '', 'location' => '', 'submit' => $preconfig['submit'], 'validation' => array(), 'validation_options' => array()); $no_message = $options->get('message_no_access'); $no_redirect = $options->get('redirection_url_no_access', 'index.php?option=com_users&view=login'); $no_style = $options->get('message_style_no_access', 'error'); $no_action = $options->get('action_no_access', 'redirection'); CCK_List::redirect($no_action, $no_redirect, $no_message, $no_style, $config); return; } // Fields $fields = CCK_List::getFields($search->name, $preconfig['client'], '', true, true); $fields_order = CCK_List::getFields($search->name, 'order', '', true, true); $count = count($fields); $doDebug = (int) $options->get('debug', JCck::getConfig_Param('debug', 0)); $doDebug = $doDebug == 1 || $doDebug == 2 && $user->authorise('core.admin') ? 1 : 0; $options->set('debug', $doDebug); $excluded_stages = explode(',', $options->get('stages_optional', '')); if ($doDebug) { jimport('joomla.error.profiler'); } if (!$count) { $config = array('action' => $preconfig['action'], 'core' => true, 'formId' => $preconfig['formId'], 'Itemid' => $itemId, 'javascript' => '', 'location' => '', 'submit' => $preconfig['submit'], 'validation' => array(), 'validation_options' => array()); $app->enqueueMessage('Oops! Fields not found.. ; (', 'error'); return; } // Init $limitend = (int) $options->get('pagination', JCck::getConfig_Param('pagination', 25));
$options->loadString($search->options); $preconfig['show_form'] = $preconfig['show_form'] != '' ? (int) $preconfig['show_form'] : (int) $options->get('show_form', 1); $preconfig['show_list'] = isset($preconfig['show_list']) ? (int) $preconfig['show_list'] : (int) $options->get('show_list', 1); $preconfig['auto_redirect'] = $preconfig['auto_redirect'] != '' ? $preconfig['auto_redirect'] : $options->get('auto_redirect', 0); // ACL if (!in_array($search->access, $user->getAuthorisedViewLevels())) { $config = array('action' => $preconfig['action'], 'core' => true, 'formId' => $preconfig['formId'], 'Itemid' => $itemId, 'javascript' => '', 'limitend' => 0, 'location' => '', 'submit' => $preconfig['submit'], 'validation' => array(), 'validation_options' => array()); $no_message = $options->get('message_no_access'); $no_redirect = $options->get('redirection_url_no_access', 'index.php?option=com_users&view=login'); $no_style = $options->get('message_style_no_access', 'error'); $no_action = $options->get('action_no_access', 'redirection'); CCK_List::redirect($no_action, $no_redirect, $no_message, $no_style, $config); return; } // Fields $fields = CCK_List::getFields($search->name, array($preconfig['client'], 'order'), '', true, true); $count = count($fields['search']); $doDebug = (int) $options->get('debug', JCck::getConfig_Param('debug', 0)); $doDebug = $doDebug == 1 || $doDebug == 2 && $user->authorise('core.admin') ? 1 : 0; $options->set('debug', $doDebug); $excluded_stages = explode(',', $options->get('stages_optional', '')); if ($doDebug) { jimport('joomla.error.profiler'); } if (!$count) { $config = array('action' => $preconfig['action'], 'core' => true, 'formId' => $preconfig['formId'], 'Itemid' => $itemId, 'javascript' => '', 'limitend' => 0, 'location' => '', 'submit' => $preconfig['submit'], 'validation' => array(), 'validation_options' => array()); if (!($preconfig['task'] == 'no' && !$preconfig['show_form'])) { $app->enqueueMessage('Oops! Fields not found.. ; (', 'error'); } return; }