function insert() { //Update publication date if it hasn't been set already. if (!isset($this->pubDate)) { $this->pubDate = time(); } $ret = parent::insert(); return $ret; }
function insert() { $ret = parent::insert(); //Load the person this is for, and update solr if ($this->personId) { require_once ROOT_DIR . '/sys/Genealogy/Person.php'; $person = Person::staticGet('personId', $this->personId); $person->saveToSolr(); } return $ret; }
function insertDetailed($insertInSolr = true) { $result = parent::insert($insertInSolr); if (!$insertInSolr) { return $result; } else { if ($result !== 0) { if (!$this->saveToSolr()) { //Could not save to solr return false; } } else { return false; } return true; } }
function insert() { if (!isset($this->source) || $this->source == '') { $this->source = 'VuFind'; } parent::insert(); }
function insert() { $result = parent::insert(); return $result; }
/** * Override the update functionality to save the associated lists * * @see DB/DB_DataObject::insert() */ public function insert() { $ret = parent::insert(); if ($ret === FALSE) { return $ret; } else { $this->saveLists(); } return true; }
/** * Override the update functionality to save the related objects * * @see DB/DB_DataObject::insert() */ public function insert() { $ret = parent::insert(); if ($ret !== FALSE) { $this->saveSubBrowseCategories(); } return $ret; }
function insert() { parent::insert(); global $memCache; $memCache->delete('loan_rule_determiners'); }
function insert() { $this->calcIpRange(); return parent::insert(); }
function insert() { $this->created = time(); $this->dateUpdated = time(); parent::insert(); }
function insert() { $result = $this->trigger('insert'); switch (true) { case $result === 'bypass': return true; break; case $result === 'fail': return false; break; default: if (parent::insert()) { DB_DataObject_Pluggable::storeToRegistry($this); $this->trigger('postinsert'); return true; } return false; } }
public function insert() { // avoid those annoying PEAR::DB strict standards warnings it causes $old = error_reporting(); error_reporting(error_reporting() & ~E_STRICT); $res = parent::insert(); // reset error_reporting($old); return $res; }
/** * Override the update functionality to save the related objects * * @see DB/DB_DataObject::insert() */ public function insert() { $ret = parent::insert(); if ($ret === FALSE) { return $ret; } else { $this->saveHolidays(); $this->saveNearbyBookStores(); $this->saveFacets(); $this->saveSearchSources(); return $ret; } }
function insert() { //set default values as needed if (!isset($this->homeLocationId)) { $this->homeLocationId = 0; } if (!isset($this->myLocation1Id)) { $this->myLocation1Id = 0; } if (!isset($this->myLocation2Id)) { $this->myLocation2Id = 0; } if (!isset($this->bypassAutoLogout)) { $this->bypassAutoLogout = 0; } parent::insert(); $this->saveRoles(); }
/** * Override the update functionality to save the related objects * * @see DB/DB_DataObject::insert() */ public function insert() { if (isset($this->showInMainDetails) && is_array($this->showInMainDetails)) { // convert array to string before storing in database $this->showInMainDetails = serialize($this->showInMainDetails); } $ret = parent::insert(); if ($ret !== FALSE) { $this->saveHolidays(); $this->saveNearbyBookStores(); $this->saveFacets(); $this->saveSearchSources(); $this->saveLibraryLinks(); $this->saveLibraryTopLinks(); $this->saveBrowseCategories(); $this->saveMoreDetailsOptions(); } return $ret; }
/** * Could automatically handle updating "updated" datetime field * before calling parent insert() * * @see DB_DataObject::insert() * @param object $dataObject * @return mixed * @access public */ function insert() { $this->_refreshUpdated(); $result = parent::insert(); $this->audit(1); return $result; }
/** * Override the update functionality to save the hours * * @see DB/DB_DataObject::insert() */ public function insert() { $ret = parent::insert(); if ($ret !== FALSE) { $this->saveHours(); $this->saveFacets(); } return $ret; }
function insert() { if ($this->reviewStatus == 0) { $this->reviewStatus = 'Not Reviewed'; } //If the file should be protected with the ACS server, submit the file //to the ACS server for protection. require_once ROOT_DIR . '/sys/AdobeContentServer.php'; global $configArray; global $user; $fileUploaded = false; $this->date_added = time(); $this->addedBy = $user->id; $this->date_updated = time(); //Save the item to the database $ret = parent::insert(); if ($ret) { //Package the file as needed if ($this->getAccessType() == 'acs' && ($this->item_type == 'epub' || $this->item_type == 'pdf')) { $uploadResults = AdobeContentServer::packageFile($configArray['EContent']['library'] . '/' . $this->filename, $this->recordId, $this->id, false, $this->getAvailableCopies()); if ($uploadResults['success']) { $this->acsId = $uploadResults['acsId']; parent::update(); } else { return 0; } } } //Make sure to also update the record this is attached to so the full text can be generated //Do not update parent for now, it will be indexed the next time the index runs. /*if ($this->item_type == 'epub' || $this->item_type == 'pdf'){ $record = new EContentRecord(); $record->id = $this->recordId; $record->find(true); $record->update(); }*/ return $ret; }
/** * Insert a record * * @return mixed */ public function insert() { $this->created = date('Y-m-d H:i:s'); return parent::insert(); }
function insert() { //Update Solr only on insert since if we are inserting it needs to be in the index to view it again. $ret = parent::insert(); if ($ret) { $this->clearCachedCover(); } return $ret; }
/** * Override the update functionality to save the hours * * @see DB/DB_DataObject::insert() */ public function insert() { $ret = parent::insert(); if ($ret !== FALSE) { $this->saveHours(); $this->saveFacets(); $this->saveBrowseCategories(); $this->saveMoreDetailsOptions(); } return $ret; }