Example #1
0
 function showDelTool($rights)
 {
     global $lll;
     $s = parent::showDelTool($rights);
     if ($this->exportFormat && class_exists("rss")) {
         if ($s) {
             $s .= " | ";
         }
         $ctrl =& new AppController("export/create/{$this->id}");
         $s .= $ctrl->generAnchor($lll["export"]);
     }
     return $s;
 }
 /**
  * Filter the items_browse_sql to return only items that have a non-empty
  * value for the DC:Date field, when using the neatlinetime-json context.
  * Uses the ItemSearch model (models/ItemSearch.php) to add the check for
  * a non-empty DC:Date.
  *
  * @param Omeka_Db_Select $select
  */
 public function hookItemBrowseSql()
 {
     $context = Zend_Controller_Action_HelperBroker::getStaticHelper('ContextSwitch')->getCurrentContext();
     if ($context == 'neatlinetime-json') {
         $search = new ItemSearch($select);
         $newParams[0]['element_id'] = neatlinetime_get_option('item_date');
         $newParams[0]['type'] = 'is not empty';
         $search->advanced($newParams);
     }
 }
Example #3
0
 function delete($includingRelatedCommonFields = TRUE)
 {
     if (load($this)) {
         return;
     }
     // ha mar nem letezik
     parent::delete();
     if ($this->isCommon && $includingRelatedCommonFields) {
         // ha egy common fieldet torlunk, az osszes azonos nevut torolni kell:
         executeQuery("DELETE FROM @customfield WHERE columnIndex=#ci# AND cid!=#cid# AND isCommon=1", $this->columnIndex, $this->cid);
         CacheManager::resetAllCache();
     }
     ItemSearch::deleteColumn($this);
     getDbCount($count, "SELECT COUNT(*) FROM @search WHERE uid=0");
     if ($count) {
         Roll::setInfoText("checkCustomLists");
         $this->nextAction =& new AppController("customlist/list");
     }
 }