fixed warning and deprecated errors

Dieser Commit ist enthalten in:
o.pinke 2022-04-03 15:17:52 +02:00
Ursprung f0aaecbded
Commit 885eec3df0
17 geänderte Dateien mit 293 neuen und 305 gelöschten Zeilen

Datei anzeigen

@ -525,7 +525,8 @@ abstract class cHTML5Common implements ArrayAccess
* @return boolean Returns true on success or false on failure.
* @link http://php.net/manual/en/arrayaccess.offsetexists.php
*/
public function offsetExists(mixed $offset): bool
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->attributes[strtolower($offset)]);
}

Datei anzeigen

@ -174,10 +174,10 @@ class UI_Menu {
foreach ($this->link as $key => $value) {
if ($value != NULL) {
if ($this->imagewidth[$key] != 0) {
if (!empty($this->imagewidth[$key]) && !empty ($this->image[$key])) {
$value->setContent('<img border="0" src="' . $this->image[$key] . '" width="' . $this->imagewidth[$key] . '">');
$img = $value->render();
} else {
} else if(!empty ($this->image[$key])) {
$value->setContent('<img border="0" src="' . $this->image[$key] . '">');
$img = $value->render();
}
@ -186,14 +186,12 @@ class UI_Menu {
} else {
$link = $this->title[$key];
if ($this->image[$key] != "") {
if (!empty($this->image[$key])) {
if ($this->imagewidth[$key] != 0) {
$img = '<img border="0" src="' . $this->image[$key] . '" width="' . $this->imagewidth[$key] . '">';
} else {
$img = '<img border="0" src="' . $this->image[$key] . '">';
}
} else {
$img = "&nbsp;";
}
}
@ -212,21 +210,24 @@ class UI_Menu {
$bgColor = $cfg["color"]["table_light_active"];
}
if ($this->extra[$key] == 'id="marked" ') {
if (!empty($this->extra[$key]) && $this->extra[$key] == 'id="marked" ') {
$bgColor = $cfg["color"]["table_light_active"];
}
}
$tpl->set('d', 'NAME', $link);
if ($this->image[$key] == "") {
if (empty($this->image[$key])) {
$tpl->set('d', 'ICON', '');
} else {
$tpl->set('d', 'ICON', $img);
}
if ($this->extra[$key] != "" || $this->rowmark == true) {
if (!empty($this->extra[$key]) || $this->rowmark == true) {
$extraadd = "";
if(empty($this->extra[$key])) {
$this->extra[$key] = '';
}
if ($this->rowmark == true) {
$extraadd = 'onmouseover="row.over(this)" onmouseout="row.out(this)" onclick="row.click(this)"';
@ -439,7 +440,7 @@ class UI_Table_Form {
if (is_array($this->items)) {
foreach ($this->items as $key => $value) {
if ($this->itemType[$key] == 'subheader') {
if (isset($this->itemType[$key]) && $this->itemType[$key] == 'subheader') {
$subheader = '<tr class="text_medium" style="background-color: ' . $cfg["color"]["table_header"] . ';">';
$subheader .= '<td colspan="2" valign="top" style="border: 0px;border-top: 0px; border-bottom:0px; border-right:1px;border-color: ' . $cfg["color"]["table_border"] . '; border-style: solid;">' . $this->captions[$key] . '</td></tr>';
@ -703,6 +704,7 @@ class UI_Page {
class Link {
var $alt = '';
var $link;
var $title;
var $targetarea;
@ -770,7 +772,8 @@ class Link {
function render() {
global $sess, $cfg;
$custom = '';
$attributes = '';
if ($this->alt != "") {
$alt = 'alt="' . $this->alt . '" title="' . $this->alt . '" ';
} else {
@ -819,7 +822,7 @@ class Link {
break;
}
if ($this->images == '') {
if (empty($this->images)) {
return ($link . $this->content . "</a>");
} else {
list($this->img_width, $this->img_height, $this->img_type, $this->img_attr) = getimagesize($cfg['path']['contenido'] . $this->images);
@ -910,6 +913,7 @@ class UI_List {
$colcount = 0;
if (is_array($this->cells)) {
$dark = true;
foreach ($this->cells as $row => $cells) {
$thefont = '';
$unne = '';
@ -928,7 +932,7 @@ class UI_List {
$bgColor = $cfg["color"]["table_light"];
}
if ($this->bgcolor[$row] != "") {
if (!empty($this->bgcolor[$row])) {
$bgColor = $this->bgcolor[$row];
}
@ -936,7 +940,7 @@ class UI_List {
$count = 0;
foreach ($cells as $key => $value) {
$thefontDispl = $thefont . $this->extra[$row][$key];
$thefontDispl = $thefont . (empty($this->extra[$row][$key]))?'':$this->extra[$row][$key];
$count++;
$tpl2->reset();
@ -966,7 +970,7 @@ class UI_List {
$tpl2->set('s', 'ALIGN', 'left');
}
if ($this->cellvalignment[$row][$key] != "") {
if (!empty($this->cellvalignment[$row][$key])) {
$tpl2->set('s', 'VALIGN', $this->cellvalignment[$row][$key]);
} else {
$tpl2->set('s', 'VALIGN', 'top');

Datei anzeigen

@ -378,6 +378,10 @@ class User {
function getUserProperty($type, $name, $group = false) {
global $cfg, $perm;
if(empty($this->values)) {
return false;
}
if (!is_object($perm)) {
$perm = new Contenido_Perm();
}

Datei anzeigen

@ -58,7 +58,7 @@ class cRegistry {
public static function getFrontendPath() {
$cfgClient = self::getClientConfig();
$client = self::getClientId();
return $cfgClient[$client]['path']['frontend'];
return (empty($cfgClient))?'':$cfgClient[$client]['path']['frontend'];
}
/**

Datei anzeigen

@ -69,7 +69,7 @@ class cApiLayout extends Item {
* @param mixed $mId Specifies the ID of item to load
*/
public function __construct($mId = false) {
global $cfg;
$cfg = cRegistry::getConfig();
parent::__construct($cfg["tab"]["lay"], "idlay");
$this->setFilters(array(), array());
@ -78,7 +78,7 @@ class cApiLayout extends Item {
$this->_setLayPath();
}
$oClient = new cApiClient($client);
$oClient = new cApiClient(cRegistry::getClientId());
$aClientProp = $oClient->getPropertiesByType('layfileedit');
if(count($aClientProp) > 0) {
$this->_aLayFileEditConf = array_merge($this->_aLayFileEditConf, $aClientProp);

Datei anzeigen

@ -912,7 +912,7 @@ class cApiModule extends Item {
}
private function _displayNoteFromFile($bIsOldPath = FALSE) {
if ($this->_bNoted === true) {
if (isset($this->_bNoted) && $this->_bNoted === true) {
return;
}
global $frame, $area;

Datei anzeigen

@ -264,11 +264,10 @@ function conGenerateCode($idcat, $idart, $lang, $client, $layout = false) {
$template = $db->f("template");
$a_c[$value] = preg_replace("/(&\$)/", "", $a_c[$value]);
$tmp1 = preg_split("/&/", $a_c[$value]);
$varstring = array();
if (!empty($a_c[$value])) {
$a_c[$value] = preg_replace("/(&\$)/", "", $a_c[$value]);
$tmp1 = preg_split("/&/", $a_c[$value]);
foreach ($tmp1 as $key1 => $value1) {
@ -277,7 +276,7 @@ function conGenerateCode($idcat, $idart, $lang, $client, $layout = false) {
$varstring["$tmp2[0]"] = $tmp2[1];
}
}
}
$CiCMS_Var = '$C' . $value . 'CMS_VALUE';
$CiCMS_VALUE = '';
@ -305,7 +304,7 @@ function conGenerateCode($idcat, $idart, $lang, $client, $layout = false) {
$output = '<?php $modstart' . $value . ' = getmicrotime(); ?' . '>' . $output . '<?php $modend' . $value . ' = getmicrotime()+0.001; $modtime' . $value . ' = $modend' . $value . ' - $modstart' . $value . '; ?' . '>';
}
if ($fedebug != "") {
if (!empty($fedebug)) {
$output = addslashes('<?php echo \'<img onclick="javascript:showmod' . $value . '();" src="' . $cfg['path']['contenido_fullhtml'] . 'images/but_preview.gif">\'; ?' . '>' . "<br>") . $output;
$output = $output . addslashes('<?php echo \'<script language="javascript">function showmod' . $value . ' () { window.alert(\\\'\'. "' . addslashes($fedebug) . '".\'\\\');} </script>\'; ?' . '>');
}
@ -471,7 +470,7 @@ function conGenerateCode($idcat, $idart, $lang, $client, $layout = false) {
}
//add system meta tag if there is no user meta tag
if ($bExists == false && strlen($aAutValue['content']) > 0) {
if ($bExists == false && isset($aAutValue['content']) && strlen($aAutValue['content']) > 0) {
array_push($metatags, $aAutValue);
}
}
@ -481,7 +480,7 @@ function conGenerateCode($idcat, $idart, $lang, $client, $layout = false) {
foreach ($metatags as $value) {
if (getEffectiveSetting('generator', 'html5', "false") == "true") {
if ($value['name'] == 'date')
if (isset($value['name']) && $value['name'] == 'date')
continue;
}
if (!empty($value['content'])) {
@ -497,7 +496,7 @@ function conGenerateCode($idcat, $idart, $lang, $client, $layout = false) {
$oMetaTagGen->removeAttribute("id");
/* Check if metatag already exists */
if (preg_match('/(<meta(?:\s+)name(?:\s*)=(?:\s*)(?:\\\\"|\\\\\')(?:\s*)' . $value["name"] . '(?:\s*)(?:\\\\"|\\\\\')(?:[^>]+)>\r?\n?)/i', $code, $aTmetatagfound)) {
if (isset($value["name"]) && preg_match('/(<meta(?:\s+)name(?:\s*)=(?:\s*)(?:\\\\"|\\\\\')(?:\s*)' . $value["name"] . '(?:\s*)(?:\\\\"|\\\\\')(?:[^>]+)>\r?\n?)/i', $code, $aTmetatagfound)) {
$code = str_replace($aTmetatagfound[1], $oMetaTagGen->render() . "\n", $code);
} else if (array_key_exists("charset", $value)
&& preg_match('/(<meta(?:\s+)charset(?:\s*)=(?:\s*)(?:\\\\"|\\\\\')(?:\s*)(.*)(?:\s*)(?:\\\\"|\\\\\')(?:\s*)(?:\s*|\/)(?:[\^\>]+)\r?\n?)/i', $code, $aTmetatagfound)) {

Datei anzeigen

@ -208,7 +208,7 @@ function tplBrowseLayoutForContainers($idlay, $raw_code = NULL) {
preg_match_all("/CMS_CONTAINER\[([0-9]*)\]/", $code, $a_container);
$iPosBody = stripos($code, '<body>');
$sCodeBeforeHeader = substr($code, 0, $iPosBody);
if (!empty($a_container)) {
foreach ($a_container[1] as $value) {
if (preg_match("/CMS_CONTAINER\[$value\]/", $sCodeBeforeHeader)) {
$containerinf[$idlay][$value]["is_body"] = false;
@ -216,6 +216,7 @@ function tplBrowseLayoutForContainers($idlay, $raw_code = NULL) {
$containerinf[$idlay][$value]["is_body"] = true;
}
}
}
if (is_array($containerinf[$idlay])) {
foreach ($containerinf[$idlay] as $key => $value) {
@ -233,8 +234,10 @@ function tplBrowseLayoutForContainers($idlay, $raw_code = NULL) {
asort($container);
if (is_array($container)) {
if (is_array($container) && !empty($container)) {
$tmp_returnstring = implode("&", $container);
} else {
$tmp_returnstring = "";
}
return $tmp_returnstring;
}
@ -359,16 +362,14 @@ function tplPreparseLayout($idlay, $raw_code = NULL) {
if ($parser->iNodeName == "container" && $parser->iNodeType == NODE_TYPE_ELEMENT) {
$idcontainer = $parser->iNodeAttributes["id"];
$mode = $parser->iNodeAttributes["mode"];
if ($mode == "") {
$mode = "optional";
}
$sMode = (isset($parser->iNodeAttributes["mode"]))?$parser->iNodeAttributes["mode"]:'optional';
$sDefault = (isset($parser->iNodeAttributes["default"]))?$parser->iNodeAttributes["default"]:'';
$sTypes = (isset($parser->iNodeAttributes["types"]))?$parser->iNodeAttributes["types"]:'';
$containerinf[$idlay][$idcontainer]["name"] = $parser->iNodeAttributes["name"];
$containerinf[$idlay][$idcontainer]["mode"] = $mode;
$containerinf[$idlay][$idcontainer]["default"] = $parser->iNodeAttributes["default"];
$containerinf[$idlay][$idcontainer]["types"] = $parser->iNodeAttributes["types"];
$containerinf[$idlay][$idcontainer]["mode"] = $sMode;
$containerinf[$idlay][$idcontainer]["default"] = $sDefault;
$containerinf[$idlay][$idcontainer]["types"] = $sTypes;
$containerinf[$idlay][$idcontainer]["is_body"] = $bIsBody;
}
}
@ -726,7 +727,6 @@ function tplAutoFillModules($idtpl) {
if ($db_autofill->next_record()) {
$idmod = $db_autofill->f("idmod");
$sql = "SELECT idcontainer FROM " . $cfg["tab"]["container"] . " WHERE idtpl = '" . Contenido_Security::toInteger($idtpl) . "' AND number = '" . Contenido_Security::toInteger($container) . "'";
$db_autofill->query($sql);
@ -760,7 +760,6 @@ function tplAutoFillModules($idtpl) {
if ($db_autofill->next_record()) {
$idmod = $db_autofill->f("idmod");
$sql = "SELECT idcontainer, idmod FROM " . $cfg["tab"]["container"]
. " WHERE idtpl = '" . Contenido_Security::toInteger($idtpl) . "' AND number = '" . Contenido_Security::toInteger($container) . "'";

Datei anzeigen

@ -805,7 +805,7 @@ function uplCreateFriendlyName($filename, $spacer = "_") {
$newfilename = "";
if (!is_array($cfg['upl']['allow_additional_chars'])) {
if (!isset($cfg['upl']['allow_additional_chars']) || !is_array($cfg['upl']['allow_additional_chars'])) {
$filename = str_replace(" ", $spacer, $filename);
} elseif (in_array(' ', $cfg['upl']['allow_additional_chars']) === FALSE) {
$filename = str_replace(" ", $spacer, $filename);
@ -826,7 +826,7 @@ function uplCreateFriendlyName($filename, $spacer = "_") {
}
#Check for additionally allowed charcaters in $cfg['upl']['allow_additional_chars'] (must be array of chars allowed)
if (is_array($cfg['upl']['allow_additional_chars']) && !$bFound) {
if (isset($cfg['upl']['allow_additional_chars']) && is_array($cfg['upl']['allow_additional_chars']) && !$bFound) {
if (in_array($atom, $cfg['upl']['allow_additional_chars'])) {
$newfilename .= $atom;
}

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* Project:
* Contenido Content Management System
@ -27,7 +28,6 @@
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
@ -42,7 +42,6 @@ $tpl->set('s', 'SID', $sess->id);
$clients = $classclient->getAccessibleClients();
$tpl2 = new Template;
$tpl2->set('s', 'ID', 'editclient');
$tpl2->set('s', 'NAME', 'editclient');
@ -53,15 +52,13 @@ $iClientcount = count($clients);
foreach ($clients as $key => $value) {
if ($client == $key)
{
if ($client == $key) {
$selected = "selected";
} else {
$selected = "";
}
if (strlen($value['name']) > 15)
{
if (strlen($value['name']) > 15) {
$value['name'] = substr($value['name'], 0, 12) . "...";
}
@ -69,7 +66,6 @@ foreach ($clients as $key => $value) {
$tpl2->set('d', 'CAPTION', $value['name']);
$tpl2->set('d', 'SELECTED', $selected);
$tpl2->next();
}
$select = $tpl2->generate($cfg["path"]["templates"] . $cfg['templates']['generic_select'], true);
@ -85,5 +81,3 @@ if ($perm->have_perm_area_action($area, "lang_newlanguage") && $iClientcount > 0
}
$tpl->generate($cfg['path']['templates'] . $cfg['templates']['lang_left_top']);
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* Project:
* Contenido Content Management System
@ -27,15 +28,17 @@
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
// check request
$_REQUEST["sortby"] = (empty($_REQUEST["sortby"]))?'': htmlspecialchars($_REQUEST["sortby"]);
$_REQUEST["sortorder"] = (empty($_REQUEST["sortorder"]))?'': htmlspecialchars($_REQUEST["sortorder"]);
$_REQUEST["filter"] = (empty($_REQUEST["filter"]))?'': htmlspecialchars($_REQUEST["filter"]);
$oUser = new cApiUser($auth->auth["uid"]);
if (!isset($elemperpage) || !is_numeric($elemperpage) || $elemperpage < 0)
{
if (!isset($elemperpage) || !is_numeric($elemperpage) || $elemperpage < 0) {
$elemperpage = $oUser->getProperty("itemsperpage", $area);
$_REQUEST['elemperpage'] = $elemperpage;
if ((int) $elemperpage <= 0) {
@ -66,7 +69,6 @@ $tpl->set('s', 'OPTIONS', '');
$tpl->set('s', 'SID', $sess->id);
$tpl->set('s', 'SESSID', $sess->id);
$tpl2 = new Template;
$tpl2->set('s', 'NAME', 'restrict');
$tpl2->set('s', 'CLASS', 'text_medium');
@ -79,8 +81,7 @@ $limit = array(
foreach ($limit as $key => $value) {
if ($restrict == $key)
{
if (!empty($restrict) && $restrict == $key) {
$selected = "selected";
} else {
$selected = "";
@ -90,7 +91,6 @@ foreach ($limit as $key => $value) {
$tpl2->set('d', 'CAPTION', $value);
$tpl2->set('d', 'SELECTED', $selected);
$tpl2->next();
}
$select = $tpl2->generate($cfg["path"]["templates"] . $cfg['templates']['generic_select'], true);
@ -189,11 +189,11 @@ $oPagerLink->enableAutomaticParameterAppend();
$oPagerLink->setCustom("contenido", $sess->id);
$pagerID = "pager";
$page = (isset($page))?$page:1;
$oPager = new cObjectPager("44b41691-0dd4-443c-a594-66a8164e25fd", $iItemCount, $elemperpage, $page, $oPagerLink, "page", $pagerID);
$oPager->setExpanded('true');
$tpl->set('s', 'PAGINGLINK', $pagerID);
$tpl->set('s', 'PAGING', $oPager->render());
$tpl->generate($cfg['path']['templates'] . $cfg['templates']['rights_left_top']);
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* Project:
* Contenido Content Management System
@ -28,7 +29,6 @@
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
@ -40,15 +40,15 @@ $cApiUserCollection = new cApiUserCollection;
$cApiUserCollection->query();
$iSumUsers = $cApiUserCollection->count();
if (isset($_REQUEST["sortby"]) && $_REQUEST["sortby"] != "")
{
$cApiUserCollection->setOrder($_REQUEST["sortby"]. " ". $_REQUEST["sortorder"]);
} else {
if (empty($_REQUEST["sortby"])) {
$_REQUEST["sortby"] = 'username';
$_REQUEST["sortorder"] = 'asc';
$cApiUserCollection->setOrder("username asc");
}
if (isset($_REQUEST["filter"]) && $_REQUEST["filter"] != "")
{
$cApiUserCollection->setOrder($_REQUEST["sortby"] . " " . $_REQUEST["sortorder"]);
if (!empty($_REQUEST["filter"])) {
$cApiUserCollection->setWhereGroup("default", "username", "%" . $_REQUEST["filter"] . "%", "LIKE");
$cApiUserCollection->setWhereGroup("default", "realname", "%" . $_REQUEST["filter"] . "%", "LIKE");
$cApiUserCollection->setWhereGroup("default", "email", "%" . $_REQUEST["filter"] . "%", "LIKE");
@ -59,6 +59,8 @@ if (isset($_REQUEST["filter"]) && $_REQUEST["filter"] != "")
$cApiUserCollection->setWhereGroup("default", "address_country", "%" . $_REQUEST["filter"] . "%", "LIKE");
$cApiUserCollection->setInnerGroupCondition("default", "OR");
} else {
$_REQUEST["filter"] = '';
}
$cApiUserCollection->query();
@ -67,54 +69,37 @@ $aCurrentUserAccessibleClients = $classclient->getAccessibleClients();
$iMenu = 0;
$iItemCount = 0;
$mPage = $_REQUEST["page"];
$mPage = (isset($_REQUEST["page"])) ? (int) $_REQUEST["page"] : 1;
if ($mPage == 0)
{
$mPage = 1;
}
$elemperpage = $_REQUEST["elemperpage"];
if ($elemperpage == 0)
{
$elemperpage = 25;
}
$elemperpage = (isset($_REQUEST["elemperpage"])) ? (int) $_REQUEST["elemperpage"] : 25;
$mlist = new UI_Menu;
$sToday = date('Y-m-d');
if (($elemperpage * $mPage) >= $iSumUsers + $elemperpage && $mPage != 1) {
$_REQUEST["page"]--;
$mPage--;
}
while ($cApiUser = $cApiUserCollection->next())
{
while ($cApiUser = $cApiUserCollection->next()) {
$userid = $cApiUser->get("user_id");
$aUserPermissions = explode(',', $cApiUser->get('perms'));
$bDisplayUser = false;
if (in_array("sysadmin", $aCurrentUserPermissions))
{
if (in_array("sysadmin", $aCurrentUserPermissions)) {
$bDisplayUser = true;
}
foreach ($aCurrentUserAccessibleClients as $key => $value)
{
if (in_array("client[$key]", $aUserPermissions))
{
foreach ($aCurrentUserAccessibleClients as $key => $value) {
if (in_array("client[$key]", $aUserPermissions)) {
$bDisplayUser = true;
}
}
foreach ($aUserPermissions as $sLocalPermission)
{
if (in_array($sLocalPermission, $aCurrentUserPermissions))
{
foreach ($aUserPermissions as $sLocalPermission) {
if (in_array($sLocalPermission, $aCurrentUserPermissions)) {
$bDisplayUser = true;
}
}
@ -123,18 +108,15 @@ while ($cApiUser = $cApiUserCollection->next())
$link->setMultiLink("user", "", "user_overview", "");
$link->setCustom("userid", $cApiUser->get("user_id"));
if ($bDisplayUser == true)
{
if ($bDisplayUser == true) {
$iItemCount++;
if ($iItemCount > ($elemperpage * ($mPage - 1)) && $iItemCount < (($elemperpage * $mPage) + 1))
{
if ($iItemCount > ($elemperpage * ($mPage - 1)) && $iItemCount < (($elemperpage * $mPage) + 1)) {
if ($perm->have_perm_area_action('user', "user_delete")) {
$message = sprintf(i18n("Do you really want to delete the user %s?"), $cApiUser->get("username"));
$delTitle = i18n("Delete user");
$deletebutton = '<a title="' . $delTitle . '" href="javascript://" onclick="box.confirm(\'' . $delTitle . '\', \'' . $message . '\', \'deleteBackenduser(\\\'' . $userid . '\\\')\')"><img src="' . $cfg['path']['images'] . 'delete.gif" border="0" title="' . $delTitle . '" alt="' . $delTitle . '"></a>';
} else {
$deletebutton = "";
}
@ -157,12 +139,11 @@ while ($cApiUser = $cApiUserCollection->next())
$mlist->setLink($iMenu, $link);
$mlist->setActions($iMenu, "delete", $deletebutton);
if ($_GET['userid'] == $cApiUser->get("user_id")) {
if (!empty($_GET['userid']) && $_GET['userid'] == $cApiUser->get("user_id")) {
$mlist->setExtra($iMenu, 'id="marked" ');
}
}
}
}
$deleteScript = '<script type="text/javascript">
@ -226,9 +207,9 @@ $oPagerLink->enableAutomaticParameterAppend();
$oPagerLink->setCustom("contenido", $sess->id);
$pagerID = "pager";
$page = (empty($page))?1:(int)$page;
$oPager = new cObjectPager("44b41691-0dd4-443c-a594-66a8164e25fd", $iItemCount, $elemperpage, $page, $oPagerLink, "page", $pagerID);
//add slashes, to insert in javascript
$sPagerContent = $oPager->render(1);
$sPagerContent = str_replace('\\', '\\\\', $sPagerContent);
@ -252,5 +233,3 @@ $sRefreshPager = '
$oPage->addScript('refreshpager', $sRefreshPager);
$oPage->render();
?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* Project:
* Contenido Content Management System
@ -35,7 +36,6 @@
* TODO error handling!!!
* TODO export functions to new ConUser object!
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
@ -43,7 +43,6 @@ if(!defined('CON_FRAMEWORK')) {
cInclude('includes', 'functions.rights.php');
if (!($perm->have_perm_area_action($area, $action) || $perm->have_perm_area_action('user', $action))) {
// access denied
$notification->displayNotification("error", i18n("Permission denied"));
@ -158,13 +157,19 @@ $oUser = new User();
$oUser->loadUserByUserID(Contenido_Security::escapeDB($userid, $db));
// delete user property
if (is_string($del_userprop_type) && is_string($del_userprop_name)) {
if (!empty($del_userprop_type)
&& !empty($del_userprop_name)
&& is_string($del_userprop_type)
&& is_string($del_userprop_name)) {
$oUser->deleteUserProperty($del_userprop_type, $del_userprop_name);
}
// edit user property
if (is_string($userprop_type) && is_string($userprop_name) && is_string($userprop_value)
&& !empty($userprop_type) && !empty($userprop_name)) {
if (!empty($userprop_type)
&& !empty($userprop_name)
&& is_string($userprop_type)
&& is_string($userprop_name)
&& is_string($userprop_value)) {
$oUser->setUserProperty($userprop_type, $userprop_name, $userprop_value);
}
@ -193,7 +198,6 @@ $tpl->set('s', 'SUBMITTEXT', i18n("Save changes"));
$tpl->set('s', 'CANCELTEXT', i18n("Discard changes"));
$tpl->set('s', 'CANCELLINK', $sess->url("main.php?area=$area&frame=4&userid=$userid"));
$tpl->set('d', 'CATNAME', i18n("Property"));
$tpl->set('d', 'BGCOLOR', $cfg["color"]["table_header"]);
$tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]);
@ -213,7 +217,7 @@ $tpl->set('d', 'CATFIELD', formGenerateField("text", "realname", $oUser->getFiel
$tpl->next();
// @since 2006-07-04 Display password fields only if not authenticated via LDAP/AD
if ($msysadmin || $oUser->getField('password') != 'active_directory_auth') {
if ((isset($msysadmin) && $msysadmin) || $oUser->getField('password') != 'active_directory_auth') {
$tpl->set('d', 'CATNAME', i18n("New password"));
$tpl->set('d', 'BGCOLOR', $cfg["color"]["table_light"]);
$tpl->set('d', 'BORDERCOLOR', $cfg["color"]["table_border"]);
@ -465,5 +469,4 @@ $tpl->next();
// Generate template
$tpl->generate($cfg['path']['templates'] . $cfg['templates']['rights_overview']);
?>

Datei anzeigen

@ -111,6 +111,7 @@ $aManagedProperties = array(
);
$aSettings = getSystemProperties(1);
$sNotification = '';
if (isset($_POST['action']) && $_POST['action'] == 'edit_sysconf' && $perm->have_perm_area_action($area, 'edit_sysconf')) {
$bStored = false;
@ -193,4 +194,3 @@ if ($perm->have_perm_area_action($area, 'edit_sysconf')) {
}
$oPage->addScript('setMenu', $sJs);
$oPage->render();
?>

Datei anzeigen

@ -38,6 +38,7 @@ $aManagedValues = array('versioning_prune_limit', 'update_check', 'update_news_f
'system_mail_sender_name', 'pw_request_enable', 'maintenance_mode', 'edit_area_activated',
'backend_preferred_idclient', 'generator_basehref', 'generator_xhtml', 'imagemagick_available',
'system_insight_editing_activated');
$sWarning = '';
if ($action == "systemsettings_save_item") {
if (!in_array($systype . '_' . $sysname, $aManagedValues)) {

Datei anzeigen

@ -153,7 +153,6 @@ if (($action == "tpl_new") && (!$perm->have_perm_area_action_anyitem($area, $act
$descr = new cHTMLTextarea("description", $description);
$form->add(i18n("Description"), $descr->render());
$standardcb = new cHTMLCheckbox("vdefault", 1, "", $vdefault);
$form->add(i18n("Default"), $standardcb->toHTML(false));
@ -165,7 +164,13 @@ if (($action == "tpl_new") && (!$perm->have_perm_area_action_anyitem($area, $act
$raw_code = ($oLayout->virgin) ? "" : $oLayout->getLayout();
tplPreparseLayout($idlay, $raw_code);
$tmp_returnstring = tplBrowseLayoutForContainers($idlay, $raw_code);
var_dump($tmp_returnstring);
if(empty($tmp_returnstring)) {
$a_container = [];
} else {
$a_container = explode("&", $tmp_returnstring);
}
foreach ($a_container as $key => $value) {
if ($value != 0) {
// Loop through containers ****************
@ -251,4 +256,3 @@ if (($action == "tpl_new") && (!$perm->have_perm_area_action_anyitem($area, $act
$page->render();
}
?>

@ -1 +1 @@
Subproject commit 3217b73d08e1b76193f02d2d912134320ef40bfe
Subproject commit 06cc337092ed649df1ec738816ba6a3e59a8af0b