/**
  * Delete an object from the database
  * @see icms_ipf_Handler::delete()
  *
  * @param mod_profile_Regstep $obj
  * @param bool $force
  * @return bool
  */
 public function delete(&$obj, $force = false)
 {
     if (parent::delete($obj, $force)) {
         $field_handler = icms_getModuleHandler('field', basename(dirname(dirname(__FILE__))), 'profile');
         return $field_handler->updateAll('step_id', 0, new icms_db_criteria_Item('step_id', $obj->getVar('step_id')));
     }
     return false;
 }
 /**
  * insert a new object in the database
  *
  * @param object $obj reference to the object
  * @param bool $force whether to force the query execution despite security settings
  * @param bool $checkObject check if the object is dirty and clean the attributes
  * @return bool FALSE if failed, TRUE if already present and unchanged or successful
  */
 public function insert(&$obj, $force = false, $checkObject = true)
 {
     $uservars = $this->getUserVars();
     foreach ($uservars as $var) {
         unset($obj->vars[$var]);
     }
     if (count($obj->vars) == 1) {
         return true;
     }
     return parent::insert($obj, $force, $checkObject);
 }
Example #3
0
	/**
	 * Creates an instance of the mimetype handler
	 * 
	 * @param object $db
	 */
	public function __construct($db) {
		parent::__construct($db, 'mimetype', 'mimetypeid', 'mimetypeid', 'name', 'system');
		$this->addPermission('use_extension', _CO_ICMS_MIMETYPE_PERMISSION_VIEW, _CO_ICMS_MIMETYPE_PERMISSION_VIEW_DSC);
	}
 /**
  * Constructor
  *
  * @param icms_db_legacy_Database $db database connection object
  */
 public function __construct(&$db)
 {
     parent::__construct($db, 'audio', 'audio_id', 'title', '', basename(dirname(dirname(__FILE__))));
     $module = icms::handler("icms_module")->getByDirname(basename(dirname(dirname(__FILE__))), TRUE);
     $this->enableUpload(array("audio/mp3", "audio/x-mp3", "audio/mpeg"), $module->config['maxfilesize_audio']);
 }
Example #5
0
	/**
	 * Constructor
	 * 
	 * @param $db
	 */
	public function __construct(& $db) {
		icms_ipf_Handler::__construct($db, 'pages', 'page_id', 'page_title', '' , 'system');
		$this->table = $db->prefix('icmspage');
	}
Example #6
0
 /**
  * Constructor for the object handler
  *
  * @param object $db A database object
  * @param string $modulename The directory name for the module
  * @return icms_ipf_category_Handler
  */
 public function __construct($db, $modulename)
 {
     parent::__construct($db, 'category', 'categoryid', 'name', 'description', $modulename);
 }
 /**
  * Constructor
  *
  * @param icms_db_legacy_Database $db database connection object
  */
 public function __construct(&$db)
 {
     parent::__construct($db, "slide", "slide_id", "title", "caption", "billboard");
     $this->enableUpload(array("image/gif", "image/jpeg", "image/pjpeg", "image/png"), 512000, 800, 600);
 }
Example #8
0
	public function __construct(& $db) {
		icms_ipf_Handler::__construct($db, 'blocksadmin', 'bid', 'title', 'content', 'system');
		$this->table = $this->db->prefix('newblocks');

		$this->addPermission('block_read', _CO_SYSTEM_BLOCKSADMIN_BLOCKRIGHTS, _CO_SYSTEM_BLOCKSADMIN_BLOCKRIGHTS_DSC);
	}
Example #9
0
	/**
	 * Constructor
	 * @param object $db	Database object
	 */
	public function __construct(&$db) {
		parent::__construct($db, 'adsense', 'adsenseid', 'tag', 'description', 'system');
		$this->buildFormats();
	}
Example #10
0
 /**
  * constrcutor
  *
  * @param object $db database connection
  */
 public function __construct(&$db)
 {
     parent::__construct($db, "data_file", "fileid", "caption", "desc", "icms");
 }
Example #11
0
 public function &get($id, $as_object = true, $debug = false, $criteria = false)
 {
     $obj = parent::get($id, $as_object, $debug, $criteria);
     $sql = "SELECT module_id, page_id FROM " . $this->db->prefix('block_module_link') . " WHERE block_id='" . (int) $obj->getVar('bid') . "'";
     $result = $this->db->query($sql);
     $modules = $bcustomp = array();
     while ($row = $this->db->fetchArray($result)) {
         $modules[] = (int) $row['module_id'] . '-' . (int) $row['page_id'];
     }
     $obj->setVar('visiblein', $modules);
     return $obj;
 }
Example #12
0
 /**
  * delete a profile field from the database
  *
  * @param object $obj reference to the object to delete
  * @param bool $force
  * @return bool FALSE if failed.
  **/
 public function delete(&$obj, $force = false)
 {
     $profile_handler = icms_getmodulehandler('profile', basename(dirname(dirname(__FILE__))), 'profile');
     $sql = "ALTER TABLE " . $profile_handler->table . " DROP " . $obj->getVar('field_name', 'n');
     if ($this->db->query($sql)) {
         if (!parent::delete($obj, $force)) {
             return false;
         }
         if ($obj->getVar('field_show') || $obj->getVar('field_edit')) {
             $profile_module = icms::handler('icms_module')->getByDirname(basename(dirname(dirname(__FILE__))));
             if (is_object($profile_module)) {
                 // Remove group permissions
                 $criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('gperm_modid', $profile_module->getVar('mid')));
                 $criteria->add(new icms_db_criteria_Item('gperm_itemid', $obj->getVar('fieldid')));
                 return icms::handler('icms_member_groupperm')->deleteAll($criteria);
             }
         }
     }
     return false;
 }
Example #13
0
 /**
  * Inserts block position into the database
  *
  * @param object  $obj  the block position object
  * @param bool  $force  force the insertion of the object into the database
  * @param bool  $checkObject  Check the object before insertion
  * @param bool  $debug  turn on debug mode?
  *
  * @return bool  the result of the insert action
  */
 public function insert(&$obj, $force = false, $checkObject = true, $debug = false)
 {
     $obj->setVar('block_default', 0);
     $obj->setVar('block_type', 'L');
     return parent::insert($obj, $force, $checkObject, $debug);
 }
Example #14
0
 /**
  * constrcutor
  *
  * @param object $db database connection
  */
 public function __construct(&$db)
 {
     parent::__construct($db, "data_urllink", "urllinkid", "caption", "desc", "icms");
 }
 /**
  * Constructor
  *
  * @param icms_db_legacy_Database $db database connection object
  */
 public function __construct(&$db)
 {
     parent::__construct($db, 'tribes', 'tribes_id', 'title', '', basename(dirname(dirname(__FILE__))));
     $module = icms::handler("icms_module")->getByDirname(basename(dirname(dirname(__FILE__))), TRUE);
     $this->enableUpload(array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/png'), $module->config['maxfilesize_picture'], $module->config['max_original_width'], $module->config['max_original_height']);
 }
Example #16
0
 /**
  * Create a new instance of the handler
  * 
  * @param object $db
  */
 public function __construct($db)
 {
     global $icmsConfigUser;
     parent::__construct($db, "userrank", "rank_id", "rank_title", "", "system");
     $this->table = $this->db->prefix("ranks");
     $this->enableUpload(array("image/gif", "image/jpeg", "image/pjpeg", "image/x-png", "image/png"), $icmsConfigUser["rank_maxsize"], $icmsConfigUser["rank_width"], $icmsConfigUser["rank_height"]);
 }
Example #17
0
 /**
  * Constructor
  *
  * @param IcmsDatabase $db
  */
 public function __construct(&$db)
 {
     icms_ipf_Handler::__construct($db, 'blockspadmin', 'id', 'title', 'description', 'system');
     $this->table = $this->db->prefix('block_positions');
 }
Example #18
0
	/**
	 * Constructor
	 * 
	 * @param object $db	Database object
	 */
	public function __construct($db) {
		parent::__construct($db, 'autotasks', 'sat_id', 'sat_name', 'sat_code', 'system');
	}
Example #19
0
	/**
	 * Constructor for the ratings handler
	 * 
	 * @param object $db
	 */
	public function __construct($db) {
		parent::__construct($db, 'rating', 'ratingid', 'rate', '', 'system');
		$this->generalSQL = 'SELECT * FROM ' . $this->table . ' AS ' . $this->_itemname . ' INNER JOIN ' . $this->db->prefix('users') . ' AS user ON ' . $this->_itemname . '.uid=user.uid';

		$this->_rateOptions[1] = 1;
		$this->_rateOptions[2] = 2;
		$this->_rateOptions[3] = 3;
		$this->_rateOptions[4] = 4;
		$this->_rateOptions[5] = 5;

		$this->pluginsObject = new icms_plugins_Handler();
	}
 /**
  * Constructor
  *
  * @param icms_db_legacy_Database $db database connection object
  */
 public function __construct(&$db)
 {
     parent::__construct($db, "slideshow", "slideshow_id", "title", "billboard");
 }
 /**
  * Constructor
  *
  * @param icms_db_legacy_Database $db database connection object
  */
 public function __construct(&$db)
 {
     parent::__construct($db, 'friendship', 'friendship_id', 'friend1_uid', '', basename(dirname(dirname(__FILE__))));
 }
 /**
  * Constructor
  *
  * @param icms_db_legacy_Database $db databae object
  */
 public function __construct(&$db)
 {
     parent::__construct($db, 'tribeuser', 'tribeuser_id', 'tribeuser_id', '', basename(dirname(dirname(__FILE__))));
 }
 /**
  * Constructor
  *
  * @param icms_db_legacy_Database $db database connection object
  */
 public function __construct(&$db)
 {
     parent::__construct($db, 'configs', 'configs_id', '', '', basename(dirname(dirname(__FILE__))));
 }
 public function IcmsPersistableObjectHandler(&$db, $itemname, $keyname, $idenfierName, $summaryName, $modulename)
 {
     parent::__construct($db, $itemname, $keyname, $idenfierName, $summaryName, $modulename);
     $this->_deprecated = icms_core_Debug::setDeprecated('icms_ipf_Handler', sprintf(_CORE_REMOVE_IN_VERSION, '1.4'));
 }
 /**
  * Constructor
  *
  * @param icms_db_legacy_Database $db database connection object
  */
 public function __construct(&$db)
 {
     parent::__construct($db, 'category', 'catid', 'cat_title', 'cat_description', basename(dirname(dirname(__FILE__))));
 }
 /**
  * Constructor
  *
  * @param icms_db_legacy_Database $db database object
  */
 public function __construct(&$db)
 {
     parent::__construct($db, 'tribepost', 'post_id', 'title', '', basename(dirname(dirname(__FILE__))));
 }
Example #27
0
	/**
	 * Constructor
	 * @param object $db
	 */
	public function __construct($db) {
		parent::__construct($db, 'customtag', 'customtagid', 'name', 'description', 'system');
		$this->addPermission('view_customtag', _CO_ICMS_CUSTOMTAG_PERMISSION_VIEW, _CO_ICMS_CUSTOMTAG_PERMISSION_VIEW_DSC);
	}
 /**
  * Constructor
  *
  * @param icms_db_legacy_Database $db database object
  */
 public function __construct(&$db)
 {
     parent::__construct($db, 'visibility', array('fieldid', 'user_group', 'profile_group'), '', '', basename(dirname(dirname(__FILE__))));
 }
Example #29
0
 public function __construct(&$db)
 {
     parent::__construct($db, 'page', 'page_id', 'page_title', '', 'icms');
     $this->table = $db->prefix('icmspage');
     $this->className = 'icms_data_page_Object';
 }
 public function __construct(&$db)
 {
     parent::__construct($db, 'content', 'content_id', 'content_title', 'content_body', 'content');
     icms_loadLanguageFile(basename(dirname(dirname(__FILE__))), 'common');
     $this->addPermission('content_read', _CO_CONTENT_CONTENT_READ, _CO_CONTENT_CONTENT_READ_DSC);
 }