remove deprecated constructors

Dieser Commit ist enthalten in:
Oldperl 2017-01-12 23:36:25 +00:00
Ursprung 1360491e94
Commit 4185dc1942
17 geänderte Dateien mit 176 neuen und 471 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* File:
* class.area.php
@ -18,41 +19,30 @@
*
* $Id: class.area.php 352 2015-09-24 12:12:51Z oldperl $
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class cApiAreaCollection extends ItemCollection {
class cApiAreaCollection extends ItemCollection
{
/**
* Constructor
*/
public function __construct()
{
public function __construct() {
global $cfg;
parent::__construct($cfg['tab']['area'], 'idarea');
$this->_setItemClass("cApiArea");
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiAreaCollection()
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct();
}
}
class cApiArea extends Item {
class cApiArea extends Item
{
/**
* Constructor Function
* @param mixed $mId Specifies the ID of item to load
*/
public function __construct($mId = false)
{
public function __construct($mId = false) {
global $cfg;
parent::__construct($cfg['tab']['area'], 'idarea');
$this->setFilters(array("addslashes"), array("stripslashes"));
@ -61,15 +51,7 @@ class cApiArea extends Item
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiArea($mId = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($mId);
}
public function create($name, $parentid = 0, $relevant = 1, $online = 1)
{
public function create($name, $parentid = 0, $relevant = 1, $online = 1) {
$item = parent::createNewItem();
$item->set("name", $name);
@ -82,11 +64,11 @@ class cApiArea extends Item
return ($item);
}
public function createAction($area, $name, $code, $location, $relevant)
{
public function createAction($area, $name, $code, $location, $relevant) {
$ac = new cApiActionCollection();
$a = $ac->create($area, $name, $code, $location, $relevant);
}
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* File:
* class.article.php
@ -18,7 +19,6 @@
*
* $Id: class.article.php 352 2015-09-24 12:12:51Z oldperl $
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
@ -26,10 +26,9 @@ if (!defined('CON_FRAMEWORK')) {
cInclude("includes", "functions.str.php");
class cApiArticleCollection extends ItemCollection
{
public function __construct($select = false)
{
class cApiArticleCollection extends ItemCollection {
public function __construct($select = false) {
global $cfg;
parent::__construct($cfg["tab"]["art"], "idart");
$this->_setItemClass("cApiArticle");
@ -39,23 +38,15 @@ class cApiArticleCollection extends ItemCollection
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiArticleCollection($select = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($select);
}
}
class cApiArticle extends Item {
class cApiArticle extends Item
{
/**
* Constructor Function
* @param mixed $mId Specifies the ID of item to load
*/
public function __construct($mId = false)
{
public function __construct($mId = false) {
global $cfg;
parent::__construct($cfg["tab"]["art"], "idart");
$this->setFilters(array(), array());
@ -64,12 +55,6 @@ class cApiArticle extends Item
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiArticle($mId = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($mId);
}
}
?>

Datei anzeigen

@ -37,13 +37,6 @@ class cApiArticleLanguageCollection extends ItemCollection {
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiArticleLanguageCollection($select = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($select);
}
public function getIdArtLang($iIdart, $iIdlang) {
$this->setWhere('idart', Contenido_Security::toInteger($iIdart));
$this->setWhere('idlang', Contenido_Security::toInteger($iIdlang));
@ -71,13 +64,6 @@ class cApiArticleLanguage extends Item
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiArticleLanguage($mId = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($mId);
}
public function loadByArticleAndLanguageId($idart, $idlang) {
$result = true;
if (!$this->isLoaded()) {

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* File:
* class.category.php
@ -18,16 +19,13 @@
*
* $Id: class.category.php 352 2015-09-24 12:12:51Z oldperl $
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class cApiCategoryCollection extends ItemCollection {
class cApiCategoryCollection extends ItemCollection
{
public function __construct($select = false)
{
public function __construct($select = false) {
global $cfg;
parent::__construct($cfg["tab"]["cat"], "idcat");
$this->_setItemClass("cApiCategory");
@ -36,23 +34,15 @@ class cApiCategoryCollection extends ItemCollection
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiCategoryCollection($select = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($select);
}
}
class cApiCategory extends Item {
class cApiCategory extends Item
{
/**
* Constructor Function
* @param mixed $mId Specifies the ID of item to load
*/
public function __construct($mId = false)
{
public function __construct($mId = false) {
global $cfg;
parent::__construct($cfg["tab"]["cat"], "idcat");
$this->setFilters(array(), array());
@ -62,12 +52,6 @@ class cApiCategory extends Item
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiCategory($mId = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($mId);
}
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* File:
* class.categoryarticle.php
@ -18,16 +19,13 @@
*
* $Id: class.categoryarticle.php 352 2015-09-24 12:12:51Z oldperl $
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class cApiCategoryArticleCollection extends ItemCollection {
class cApiCategoryArticleCollection extends ItemCollection
{
public function __construct($select = false)
{
public function __construct($select = false) {
global $cfg;
parent::__construct($cfg["tab"]["cat_art"], "idcatart");
$this->_setItemClass("cApiCategoryArticle");
@ -38,23 +36,15 @@ class cApiCategoryArticleCollection extends ItemCollection
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiCategoryArticleCollection($select = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($select);
}
}
class cApiCategoryArticle extends Item {
class cApiCategoryArticle extends Item
{
/**
* Constructor Function
* @param mixed $mId Specifies the ID of item to load
*/
public function __construct($mId = false)
{
public function __construct($mId = false) {
global $cfg;
parent::__construct($cfg["tab"]["cat_art"], "idcatart");
$this->setFilters(array(), array());
@ -63,12 +53,6 @@ class cApiCategoryArticle extends Item
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiCategoryArticle($mId = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($mId);
}
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* File:
* class.categorylanguage.php
@ -18,16 +19,13 @@
*
* $Id: class.categorylanguage.php 352 2015-09-24 12:12:51Z oldperl $
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class cApiCategoryLanguageCollection extends ItemCollection {
class cApiCategoryLanguageCollection extends ItemCollection
{
public function __construct($select = false)
{
public function __construct($select = false) {
global $cfg;
parent::__construct($cfg["tab"]["cat_lang"], "idcatlang");
$this->_setItemClass("cApiCategoryLanguage");
@ -36,24 +34,15 @@ class cApiCategoryLanguageCollection extends ItemCollection
$this->select($select);
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiCategoryLanguageCollection($select = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($select);
}
}
class cApiCategoryLanguage extends Item {
class cApiCategoryLanguage extends Item
{
/**
* Constructor Function
* @param mixed $mId Specifies the ID of item to load
*/
public function __construct($mId = false)
{
public function __construct($mId = false) {
global $cfg;
parent::__construct($cfg["tab"]["cat_lang"], "idcatlang");
$this->setFilters(array(), array());
@ -62,15 +51,7 @@ class cApiCategoryLanguage extends Item
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiCategoryLanguage($mId = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($mId);
}
public function setField($field, $value)
{
public function setField($field, $value, $bSafe = true) {
switch ($field) {
case "name":
$this->setField("urlname", $value);
@ -83,8 +64,7 @@ class cApiCategoryLanguage extends Item
parent::setField($field, $value);
}
public function assignTemplate($idtpl)
{
public function assignTemplate($idtpl) {
$c_tplcfg = new cApiTemplateConfigurationCollection();
if ($this->get("idtplcfg") != 0) {
@ -100,17 +80,16 @@ class cApiCategoryLanguage extends Item
return ($tplcfg);
}
public function getTemplate()
{
public function getTemplate() {
$c_tplcfg = new cApiTemplateConfiguration($this->get("idtplcfg"));
return ($c_tplcfg->get("idtpl"));
}
public function hasStartArticle()
{
public function hasStartArticle() {
cInclude("includes", "functions.str.php");
return strHasStartArticle($this->get("idcat"), $this->get("idlang"));
}
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* File:
* class.categorytree.php
@ -18,16 +19,13 @@
*
* $Id: class.categorytree.php 352 2015-09-24 12:12:51Z oldperl $
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class cApiCategoryTreeCollection extends ItemCollection {
class cApiCategoryTreeCollection extends ItemCollection
{
public function __construct($select = false)
{
public function __construct($select = false) {
global $cfg;
parent::__construct($cfg["tab"]["cat_tree"], "idtree");
$this->_setJoinPartner("cApiCategoryCollection");
@ -37,23 +35,15 @@ class cApiCategoryTreeCollection extends ItemCollection
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiCategoryTreeCollection($select = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($select);
}
}
class cApiTree extends Item {
class cApiTree extends Item
{
/**
* Constructor Function
* @param mixed $mId Specifies the ID of item to load
*/
public function __construct($mId = false)
{
public function __construct($mId = false) {
global $cfg;
parent::__construct($cfg["tab"]["cat_tree"], "idtree");
$this->setFilters(array(), array());
@ -61,13 +51,5 @@ class cApiTree extends Item
$this->loadByPrimaryKey($mId);
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiTree($mId = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($mId);
}
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* File:
* class.clients.php
@ -18,39 +19,28 @@
*
* $Id: class.client.php 352 2015-09-24 12:12:51Z oldperl $
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class cApiClientCollection extends ItemCollection {
class cApiClientCollection extends ItemCollection
{
/**
* Constructor
*/
public function __construct()
{
public function __construct() {
global $cfg;
parent::__construct($cfg['tab']['clients'], 'idclient');
$this->_setItemClass("cApiClient");
$this->_setJoinPartner("cApiClientLanguageCollection");
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiClientCollection()
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct();
}
/**
* Returns all clients available in the system
*
* @return array Array with id and name entries
*/
public function getAvailableClients()
{
public function getAvailableClients() {
$aClients = array();
$this->select();
@ -67,8 +57,7 @@ class cApiClientCollection extends ItemCollection
*
* @return array Array with id and name entries
*/
public function getAccessibleClients()
{
public function getAccessibleClients() {
global $perm;
$aClients = array();
$this->select();
@ -88,8 +77,7 @@ class cApiClientCollection extends ItemCollection
* @param int $iIdClient
* @return string Clientname if found, or empty string if not.
*/
public function getClientname($iIdClient)
{
public function getClientname($iIdClient) {
$this->select("idclient='" . (int) $iIdClient . "'");
if ($oItem = $this->next()) {
return $oItem->get('name');
@ -104,8 +92,7 @@ class cApiClientCollection extends ItemCollection
* @param int $iIdClient
* @return bool true if the client has a language
*/
public function hasLanguageAssigned($iIdClient)
{
public function hasLanguageAssigned($iIdClient) {
global $cfg;
$db = new DB_ConLite();
$sql = 'SELECT idlang FROM ' . $cfg['tab']['clients_lang'] . ' WHERE idclient = "' . (int) $iIdClient . '"';
@ -116,8 +103,8 @@ class cApiClientCollection extends ItemCollection
return false;
}
}
}
}
/**
* Class cApiClient
@ -125,8 +112,8 @@ class cApiClientCollection extends ItemCollection
* @version 1.01
* @copyright four for business 2004
*/
class cApiClient extends Item
{
class cApiClient extends Item {
public $idclient;
/**
@ -139,8 +126,7 @@ class cApiClient extends Item
* Constructor Function
* @param mixed $mId Specifies the ID of item to load
*/
public function __construct($mId = false)
{
public function __construct($mId = false) {
global $cfg;
parent::__construct($cfg['tab']['clients'], 'idclient');
if ($mId !== false) {
@ -148,13 +134,6 @@ class cApiClient extends Item
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiClient($mId = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($mId);
}
/**
* Static accessor to the singleton instance.
*
@ -162,8 +141,7 @@ class cApiClient extends Item
* @param int $iClient
* @return cApiClient Reference to the singleton instance.
*/
public static function getInstance($iClient = false)
{
public static function getInstance($iClient = false) {
static $oCurrentInstance = array();
if (!$iClient) {
@ -184,8 +162,7 @@ class cApiClient extends Item
* @param int $iIdKey
* @return bool
*/
public function loadByPrimaryKey($iIdKey)
{
public function loadByPrimaryKey($iIdKey) {
if (parent::loadByPrimaryKey($iIdKey) == true) {
$this->idclient = $iIdKey;
return true;
@ -201,8 +178,7 @@ class cApiClient extends Item
* @param mixed $mValue Value
* @param mixed $mIdproperty
*/
public function setProperty($mType, $mName, $mValue, $mIdproperty = 0)
{
public function setProperty($mType, $mName, $mValue, $mIdproperty = 0) {
$oPropertyColl = $this->_getPropertiesCollectionInstance();
$oPropertyColl->setValue('clientsetting', $this->idclient, $mType, $mName, $mValue, $mIdproperty);
}
@ -214,8 +190,7 @@ class cApiClient extends Item
* @param mixed $mName Entry name
* @return mixed Value
*/
public function getProperty($mType, $mName)
{
public function getProperty($mType, $mName) {
$oPropertyColl = $this->_getPropertiesCollectionInstance();
return $oPropertyColl->getValue('clientsetting', $this->idclient, $mType, $mName);
}
@ -226,8 +201,7 @@ class cApiClient extends Item
* @param int $iIdProp Id of property
* @return void
*/
public function deletePropertyById($iIdProp)
{
public function deletePropertyById($iIdProp) {
$oPropertyColl = $this->_getPropertiesCollectionInstance();
$oPropertyColl->delete($iIdProp);
}
@ -238,8 +212,7 @@ class cApiClient extends Item
* @param mixed $mType Type of the data to get
* @return array Assoziative array
*/
public function getPropertiesByType($mType)
{
public function getPropertiesByType($mType) {
$oPropertyColl = $this->_getPropertiesCollectionInstance();
return $oPropertyColl->getValuesByType('clientsetting', $this->idclient, $mType);
}
@ -251,8 +224,7 @@ class cApiClient extends Item
* @return array|false Assoziative array
* @todo return value should be the same as getPropertiesByType(), e. g. an empty array instead false
*/
public function getProperties()
{
public function getProperties() {
$oPropertyColl = $this->_getPropertiesCollectionInstance();
$oPropertyColl->select("itemid='" . $this->idclient . "' AND itemtype='clientsetting'", "", "type, name, value ASC");
@ -276,8 +248,7 @@ class cApiClient extends Item
*
* @return bool
*/
public function hasLanguages()
{
public function hasLanguages() {
$cApiClientLanguageCollection = new cApiClientLanguageCollection();
$cApiClientLanguageCollection->setWhere("idclient", $this->get("idclient"));
$cApiClientLanguageCollection->query();
@ -294,8 +265,7 @@ class cApiClient extends Item
*
* @return PropertyCollection
*/
protected function _getPropertiesCollectionInstance()
{
protected function _getPropertiesCollectionInstance() {
// Runtime on-demand allocation of the properties object
if (!is_object($this->_oPropertyCollection)) {
$this->_oPropertyCollection = new PropertyCollection();
@ -303,6 +273,6 @@ class cApiClient extends Item
}
return $this->_oPropertyCollection;
}
}
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* File:
* class.container.php
@ -18,16 +19,13 @@
*
* $Id: class.container.php 352 2015-09-24 12:12:51Z oldperl $
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class cApiContainerCollection extends ItemCollection {
class cApiContainerCollection extends ItemCollection
{
public function __construct($select = false)
{
public function __construct($select = false) {
global $cfg;
parent::__construct($cfg["tab"]["container"], "idcontainer");
$this->_setItemClass("cApiContainer");
@ -36,23 +34,14 @@ class cApiContainerCollection extends ItemCollection
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiContainerCollection($select = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($select = false);
}
public function clearAssignments($idtpl)
{
public function clearAssignments($idtpl) {
$this->select("idtpl = '$idtpl'");
while ($item = $this->next()) {
$this->delete($item->get("idcontainer"));
}
}
public function assignModul($idtpl, $number, $module)
{
public function assignModul($idtpl, $number, $module) {
$this->select("idtpl = '$idtpl' AND number = '$number'");
if ($item = $this->next()) {
$item->set("module", $module);
@ -62,25 +51,23 @@ class cApiContainerCollection extends ItemCollection
}
}
public function create($idtpl, $number, $module)
{
public function create($idtpl, $number, $module) {
$item = parent::createNewItem();
$item->set("idtpl", $idtpl);
$item->set("number", $number);
$item->set("module", $module);
$item->store();
}
}
class cApiContainer extends Item {
class cApiContainer extends Item
{
/**
* Constructor Function
* @param mixed $mId Specifies the ID of item to load
*/
public function __construct($mId = false)
{
public function __construct($mId = false) {
global $cfg;
parent::__construct($cfg["tab"]["container"], "idcontainer");
$this->setFilters(array(), array());
@ -89,12 +76,6 @@ class cApiContainer extends Item
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiContainer($mId = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($mId);
}
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* File:
* class.containerconfig.php
@ -18,16 +19,13 @@
*
* $Id: class.containerconfig.php 352 2015-09-24 12:12:51Z oldperl $
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class cApiContainerConfigurationCollection extends ItemCollection {
class cApiContainerConfigurationCollection extends ItemCollection
{
public function __construct($select = false)
{
public function __construct($select = false) {
global $cfg;
parent::__construct($cfg["tab"]["container_conf"], "idcontainerc");
$this->_setItemClass("cApiContainerConfiguration");
@ -36,32 +34,23 @@ class cApiContainerConfigurationCollection extends ItemCollection
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiContainerConfigurationCollection($select = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($select = false);
}
public function create($idtplcfg, $number, $container)
{
public function create($idtplcfg, $number, $container) {
$item = parent::createNewItem();
$item->set("idtplcfg", $idtplcfg);
$item->set("number", $number);
$item->set("container", $container);
$item->store();
}
}
class cApiContainerConfiguration extends Item {
class cApiContainerConfiguration extends Item
{
/**
* Constructor Function
* @param mixed $mId Specifies the ID of item to load
*/
public function __construct($mId = false)
{
public function __construct($mId = false) {
global $cfg;
parent::__construct($cfg["tab"]["container_conf"], "idcontainerc");
$this->setFilters(array(), array());
@ -69,13 +58,5 @@ class cApiContainerConfiguration extends Item
$this->loadByPrimaryKey($mId);
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiContainerConfiguration($mId = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($mId);
}
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* File:
* class.file.php
@ -18,33 +19,22 @@
*
* $Id: class.file.php 352 2015-09-24 12:12:51Z oldperl $
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class cApiFileCollection extends ItemCollection {
class cApiFileCollection extends ItemCollection
{
/**
* Constructor
*/
public function __construct()
{
public function __construct() {
global $cfg;
parent::__construct($cfg['tab']['files'], 'idfile');
$this->_setItemClass("cApiFile");
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiFileCollection()
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct();
}
public function create($area, $filename, $filetype = "main")
{
public function create($area, $filename, $filetype = "main") {
$item = parent::createNewItem();
if (is_string($area)) {
@ -72,17 +62,16 @@ class cApiFileCollection extends ItemCollection
return ($item);
}
}
class cApiFile extends Item {
class cApiFile extends Item
{
/**
* Constructor Function
* @param mixed $mId Specifies the ID of item to load
*/
public function __construct($mId = false)
{
public function __construct($mId = false) {
global $cfg;
parent::__construct($cfg["tab"]["files"], "idfile");
$this->setFilters(array("addslashes"), array("stripslashes"));
@ -91,12 +80,6 @@ class cApiFile extends Item
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiFile($mId = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($mId);
}
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* File:
* class.framfile.php
@ -18,33 +19,22 @@
*
* $Id: class.framefile.php 352 2015-09-24 12:12:51Z oldperl $
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class cApiFrameFileCollection extends ItemCollection {
class cApiFrameFileCollection extends ItemCollection
{
/**
* Constructor
*/
public function __construct()
{
public function __construct() {
global $cfg;
parent::__construct($cfg['tab']['framefiles'], 'idframefile');
$this->_setItemClass("cApiFrameFile");
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiFrameFileCollection()
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct();
}
public function create($area, $idframe, $idfile)
{
public function create($area, $idframe, $idfile) {
$item = parent::createNewItem();
if (is_string($area)) {
@ -67,17 +57,16 @@ class cApiFrameFileCollection extends ItemCollection
return ($item);
}
}
class cApiFrameFile extends Item {
class cApiFrameFile extends Item
{
/**
* Constructor Function
* @param mixed $mId Specifies the ID of item to load
*/
public function __construct($mId = false)
{
public function __construct($mId = false) {
global $cfg;
parent::__construct($cfg["tab"]["framefiles"], "idframefile");
$this->setFilters(array("addslashes"), array("stripslashes"));
@ -86,12 +75,5 @@ class cApiFrameFile extends Item
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiFrameFile($mId = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($mId);
}
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* File:
* class.language.php
@ -18,12 +19,10 @@
*
* $Id: class.language.php 352 2015-09-24 12:12:51Z oldperl $
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class cApiLanguageCollection extends ItemCollection {
/**
@ -36,12 +35,6 @@ class cApiLanguageCollection extends ItemCollection {
$this->_setJoinPartner("cApiClientLanguageCollection");
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiLanguageCollection() {
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct();
}
public function nextAccessible() {
global $perm, $client, $cfg, $lang;
@ -107,8 +100,8 @@ class cApiLanguageCollection extends ItemCollection {
unset($oClientLangCol, $oItem);
return $aList;
}
}
}
class cApiLanguage extends Item {
@ -124,10 +117,6 @@ class cApiLanguage extends Item {
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiLanguage($mId = false) {
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($mId);
}
}
?>

Datei anzeigen

@ -33,12 +33,6 @@ class cApiLayoutCollection extends ItemCollection {
$this->_setItemClass("cApiLayout");
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiLayoutCollection() {
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct();
}
public function create($title) {
global $client;
$item = parent::createNewItem();

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* File:
* class.template.php
@ -18,16 +19,13 @@
*
* $Id: class.template.php 352 2015-09-24 12:12:51Z oldperl $
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class cApiTemplateCollection extends ItemCollection {
class cApiTemplateCollection extends ItemCollection
{
public function __construct($select = false)
{
public function __construct($select = false) {
global $cfg;
parent::__construct($cfg["tab"]["tpl"], "idtpl");
$this->_setItemClass("cApiTemplate");
@ -36,15 +34,7 @@ class cApiTemplateCollection extends ItemCollection
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiTemplateCollection($select = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($select);
}
public function setDefaultTemplate($idtpl)
{
public function setDefaultTemplate($idtpl) {
global $cfg, $client;
$db = new DB_ConLite();
@ -54,17 +44,16 @@ class cApiTemplateCollection extends ItemCollection
$sql = "UPDATE " . $cfg["tab"]["tpl"] . " SET defaulttemplate = 1 WHERE idtpl = '" . Contenido_Security::toInteger($idtpl) . "'";
$db->query($sql);
}
}
class cApiTemplate extends Item {
class cApiTemplate extends Item
{
/**
* Constructor Function
* @param mixed $mId Specifies the ID of item to load
*/
public function __construct($mId = false)
{
public function __construct($mId = false) {
global $cfg;
parent::__construct($cfg["tab"]["tpl"], "idtpl");
$this->setFilters(array(), array());
@ -73,12 +62,6 @@ class cApiTemplate extends Item
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiTemplate($mId = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($mId);
}
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* File:
* class.templateconfig.php
@ -18,16 +19,13 @@
*
* $Id: class.templateconfig.php 352 2015-09-24 12:12:51Z oldperl $
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class cApiTemplateConfigurationCollection extends ItemCollection {
class cApiTemplateConfigurationCollection extends ItemCollection
{
public function __construct($select = false)
{
public function __construct($select = false) {
global $cfg;
parent::__construct($cfg["tab"]["tpl_conf"], "idtplcfg");
$this->_setItemClass("cApiTemplateConfiguration");
@ -36,15 +34,7 @@ class cApiTemplateConfigurationCollection extends ItemCollection
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function FrontendPermission($select = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($select);
}
public function delete($idtplcfg)
{
public function delete($idtplcfg) {
$result = parent::delete($idtplcfg);
$oContainerConfCollection = new cApiContainerConfigurationCollection("idtplcfg = '$idtplcfg'");
$aDelContainerConfIds = array();
@ -57,8 +47,7 @@ class cApiTemplateConfigurationCollection extends ItemCollection
}
}
public function create($idtpl)
{
public function create($idtpl) {
global $auth;
$item = parent::createNewItem();
@ -91,17 +80,16 @@ class cApiTemplateConfigurationCollection extends ItemCollection
return ($item);
}
}
class cApiTemplateConfiguration extends Item {
class cApiTemplateConfiguration extends Item
{
/**
* Constructor Function
* @param mixed $mId Specifies the ID of item to load
*/
public function __construct($mId = false)
{
public function __construct($mId = false) {
global $cfg;
parent::__construct($cfg["tab"]["tpl_conf"], "idtplcfg");
$this->setFilters(array(), array());
@ -110,12 +98,6 @@ class cApiTemplateConfiguration extends Item
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiTemplateConfiguration($mId = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($mId = false);
}
}
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* File:
* class.user.php
@ -18,16 +19,13 @@
*
* $Id: class.user.php 352 2015-09-24 12:12:51Z oldperl $
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class cApiUserCollection extends ItemCollection {
class cApiUserCollection extends ItemCollection
{
public function __construct($select = false)
{
public function __construct($select = false) {
global $cfg;
parent::__construct($cfg["tab"]["phplib_auth_user_md5"], "user_id");
$this->_setItemClass("cApiUser");
@ -36,15 +34,7 @@ class cApiUserCollection extends ItemCollection
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiUserCollection($select = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($select);
}
public function create($username)
{
public function create($username) {
$md5user = md5($username);
$this->resetQuery();
@ -62,17 +52,16 @@ class cApiUserCollection extends ItemCollection
return ($item);
}
}
}
class cApiUser extends Item {
class cApiUser extends Item
{
/**
* Constructor Function
* @param mixed $mId Specifies the ID of item to load
*/
public function __construct($mId = false)
{
public function __construct($mId = false) {
global $cfg;
parent::__construct($cfg["tab"]["phplib_auth_user_md5"], "user_id");
$this->setFilters(array(), array());
@ -81,13 +70,6 @@ class cApiUser extends Item
}
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
public function cApiUser($mId = false)
{
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct($mId);
}
/**
* Stores the modified user object to the database
* @param string type Specifies the type (class, category etc) for the property to retrieve
@ -95,8 +77,7 @@ class cApiUser extends Item
* @param boolean group Specifies if this function should recursively search in groups
* @return string The value of the retrieved property
*/
public function getUserProperty($type, $name, $group = false)
{
public function getUserProperty($type, $name, $group = false) {
global $cfg, $perm;
if (!is_object($perm)) {
@ -147,8 +128,7 @@ class cApiUser extends Item
* @param bool $bGroup Specifies if this function should recursively search in groups
* @return array The value of the retrieved property
* */
public function getUserPropertiesByType($sType, $bGroup = false)
{
public function getUserPropertiesByType($sType, $bGroup = false) {
global $cfg, $perm;
if (!is_object($perm)) {
@ -191,8 +171,7 @@ class cApiUser extends Item
*
* @return array|bool
*/
public function getUserProperties()
{
public function getUserProperties() {
global $cfg;
$sql = "SELECT type, name FROM " . $cfg["tab"]["user_prop"] . "
@ -218,8 +197,7 @@ class cApiUser extends Item
* @param string name Specifies the name of the property to retrieve
* @param string value Specifies the value to insert
*/
public function setUserProperty($type, $name, $value)
{
public function setUserProperty($type, $name, $value) {
global $cfg;
$value = urlencode($value);
@ -248,8 +226,7 @@ class cApiUser extends Item
* @param string type Specifies the type (class, category etc) for the property to retrieve
* @param string name Specifies the name of the property to retrieve
*/
public function deleteUserProperty($type, $name)
{
public function deleteUserProperty($type, $name) {
global $cfg;
// Check if such an entry already exists
@ -259,6 +236,7 @@ class cApiUser extends Item
name = '" . Contenido_Security::escapeDB($name, $this->db) . "'";
$this->db->query($sql);
}
}
?>