private function queueUnIndexRow($pa_row_values)
 {
     foreach ($pa_row_values as $vs_fld => &$vm_val) {
         if (!$this->opo_search_indexing_queue->hasField($vs_fld)) {
             return false;
         }
         if (is_null($vm_val)) {
             $vm_val = array();
         }
         if (is_array($vm_val)) {
             $vm_val = caSerializeForDatabase($vm_val);
         }
     }
     self::$s_search_unindexing_queue_inserts[] = array('table_num' => $pa_row_values['table_num'], 'row_id' => $pa_row_values['row_id'], 'is_unindex' => 1, 'dependencies' => $pa_row_values['dependencies']);
     return true;
 }
Exemple #2
0
 //
 // do a sanity check on application and server configuration before servicing a request
 //
 require_once __CA_APP_DIR__ . '/lib/ca/ConfigurationCheck.php';
 ConfigurationCheck::performQuick();
 if (ConfigurationCheck::foundErrors()) {
     if (defined('__CA_ALLOW_AUTOMATIC_UPDATE_OF_DATABASE__') && __CA_ALLOW_AUTOMATIC_UPDATE_OF_DATABASE__ && $_REQUEST['updateSchema']) {
         ConfigurationCheck::updateDatabaseSchema();
     } else {
         ConfigurationCheck::renderErrorsAsHTMLOutput();
     }
     exit;
 }
 if (isset($_REQUEST['processIndexingQueue']) && $_REQUEST['processIndexingQueue']) {
     require_once __CA_MODELS_DIR__ . '/ca_search_indexing_queue.php';
     ca_search_indexing_queue::process();
     exit;
 }
 // run garbage collector
 GarbageCollection::gc();
 $app = AppController::getInstance();
 $g_request = $req = $app->getRequest();
 $g_response = $resp = $app->getResponse();
 // Prevent caching
 $resp->addHeader("Cache-Control", "no-cache, must-revalidate");
 $resp->addHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT");
 //
 // Don't try to authenticate when doing a login attempt or trying to access the 'forgot password' feature
 //
 if (!preg_match("/^\\/system\\/auth\\/(dologin|login|forgot|requestpassword|initreset|doreset)/i", $req->getPathInfo())) {
     $vb_auth_success = $req->doAuthentication(array('noPublicUsers' => true));
Exemple #3
0
 /**
  *
  */
 public static function process_indexing_queue($po_opts = null)
 {
     require_once __CA_MODELS_DIR__ . '/ca_search_indexing_queue.php';
     ca_search_indexing_queue::process();
 }
 public static function lockRelease()
 {
     if (function_exists('sem_get') && caGetOSFamily() == OS_POSIX) {
         if (!self::$s_lock_resource) {
             self::$s_lock_resource = sem_get(ftok(__FILE__, 'CASearchIndexingQueue'));
         }
         sem_release(self::$s_lock_resource);
     } else {
         if (is_resource(self::$s_lock_resource)) {
             @fclose(self::$s_lock_resource);
         }
         @unlink(caGetTempDirPath() . DIRECTORY_SEPARATOR . 'search_indexing_queue.lock');
     }
 }