Exemplo n.º 1
0
        $service = new $action();
        $timer->logTime('Start launch of action');
        $service->launch();
        $timer->logTime('Finish launch of action');
    } elseif (class_exists($moduleActionClass, false)) {
        /** @var Action $service */
        $service = new $moduleActionClass();
        $timer->logTime('Start launch of action');
        $service->launch();
        $timer->logTime('Finish launch of action');
    } else {
        PEAR_Singleton::raiseError(new PEAR_Error('Unknown Action'));
    }
} else {
    $requestURI = $_SERVER['REQUEST_URI'];
    PEAR_Singleton::RaiseError(new PEAR_Error("Cannot Load Action '{$action}' for Module '{$module}' request '{$requestURI}'"));
}
$timer->logTime('Finished Index');
$timer->writeTimings();
//$analytics->finish();
function processFollowup()
{
    global $configArray;
    switch ($_REQUEST['followup']) {
        case 'SaveSearch':
            header("Location: {$configArray['Site']['path']}/" . $_REQUEST['followupModule'] . "/" . $_REQUEST['followupAction'] . "?" . $_REQUEST['recordId']);
            die;
            break;
    }
}
/**
Exemplo n.º 2
0
 /**
  * Initialize the object's search settings for a basic search found in the
  * $_REQUEST superglobal.
  *
  * @access  protected
  * @return  boolean  True if search settings were found, false if not.
  */
 protected function initBasicSearch()
 {
     // If no lookfor parameter was found, we have no search terms to
     // add to our array!
     if (!isset($_REQUEST['lookfor'])) {
         return false;
     }
     // If lookfor is an array, we may be dealing with a legacy Advanced
     // Search URL.  If there's only one parameter, we can flatten it,
     // but otherwise we should treat it as an error -- no point in going
     // to great lengths for compatibility.
     if (is_array($_REQUEST['lookfor'])) {
         if (count($_REQUEST['lookfor']) == 1) {
             $_REQUEST['lookfor'] = strip_tags($_REQUEST['lookfor'][0]);
         } else {
             PEAR_Singleton::RaiseError(new PEAR_Error("Unsupported search URL."));
             die;
         }
     }
     // If no type defined use default
     if (isset($_REQUEST['type']) && $_REQUEST['type'] != '') {
         $type = $_REQUEST['type'];
         // Flatten type arrays for backward compatibility:
         if (is_array($type)) {
             $type = strip_tags($type[0]);
         } else {
             $type = strip_tags($type);
         }
     } else {
         $type = $this->defaultIndex;
     }
     $this->searchTerms[] = array('index' => $type, 'lookfor' => $_REQUEST['lookfor']);
     return true;
 }