Ejemplo n.º 1
0
 protected function _entryDelete($entryId)
 {
     $row = $this->_iaDb->row(array('name', 'item'), iaDb::convertIds($entryId));
     $result = parent::_entryDelete($entryId);
     if ($result && $row) {
         $stmt = iaDb::printf("`key` = 'fieldgroup_:name' OR `key` = 'fieldgroup_description_:item_:name'", $row);
         $this->_iaDb->delete($stmt, iaLanguage::getTable());
     }
     return $result;
 }
Ejemplo n.º 2
0
 protected function _entryDelete($entryId)
 {
     $this->_iaCore->startHook('phpAdminBeforePlanDelete', array('entryId' => $entryId));
     $result = parent::_entryDelete($entryId);
     if ($result) {
         // here we should drop the "for_plan" column of fields
         // if there are no more plans exist
         if (0 === (int) $this->_iaDb->one(iaDb::STMT_COUNT_ROWS)) {
             $this->_iaDb->update(array('for_plan' => 0), iaDb::convertIds(1, 'for_plan'), null, iaField::getTable());
         }
         iaLanguage::delete(self::PATTERN_TITLE . $entryId);
         iaLanguage::delete(self::PATTERN_DESCRIPTION . $entryId);
     }
     return $result;
 }
 protected function _delete(array $entryId)
 {
     return parent::_entryDelete($entryId);
 }
Ejemplo n.º 4
0
 protected function _entryDelete($entryId)
 {
     $result = false;
     if ($row = $this->getById($entryId)) {
         $result = parent::_entryDelete($entryId);
         if ($result) {
             $pageName = $row['name'];
             // remove associated entries as well
             $this->_iaDb->delete("`key` IN ('page_title_{$pageName}', 'page_content_{$pageName}')", iaLanguage::getTable());
             $this->_iaCore->factory('block', iaCore::ADMIN);
             $this->_iaDb->delete('`page_name` = :page', iaBlock::getMenusTable(), array('page' => $pageName));
             //
             $this->_iaCore->factory('log')->write(iaLog::ACTION_DELETE, array('item' => 'page', 'name' => iaLanguage::get('page_title_' . $pageName), 'id' => (int) $entryId));
         }
     }
     return $result;
 }