diff --git a/conlite/classes/class.ui.php b/conlite/classes/class.ui.php index 4139941..bb09faf 100644 --- a/conlite/classes/class.ui.php +++ b/conlite/classes/class.ui.php @@ -1302,8 +1302,7 @@ class cScrollList { $this->sortkey = $field; $this->sortmode = $order; - - $field = $field + 1; + $field = intval($field) + 1; $this->data = array_csort($this->data, "$field", $order); } diff --git a/conlite/classes/contenido/class.module.php b/conlite/classes/contenido/class.module.php index 3e2cff4..bc1b323 100644 --- a/conlite/classes/contenido/class.module.php +++ b/conlite/classes/contenido/class.module.php @@ -1052,6 +1052,8 @@ class cApiModule extends Item { class cApiModuleTranslationCollection extends ItemCollection { protected $_error; + + protected $f_obj; /** * Constructor Function diff --git a/conlite/external/backendedit/front_content.php b/conlite/external/backendedit/front_content.php index 4555113..aa37f37 100644 --- a/conlite/external/backendedit/front_content.php +++ b/conlite/external/backendedit/front_content.php @@ -421,12 +421,19 @@ if ($contenido) { $col = new InUseCollection; - if ($overrideid != "" && $overridetype != "") { + if (!empty($overrideid) && !empty($overridetype)) { $col->removeItemMarks($overridetype, $overrideid); } /* Remove all own marks */ $col->removeSessionMarks($sess->id); /* If the override flag is set, override a specific InUseItem */ + if(empty($type)) { + $type = ''; + } + if(empty($typenr)) { + $typenr = ''; + } + list ($inUse, $message) = $col->checkAndMark("article", $idartlang, true, i18n("Article is in use by %s (%s)"), true, $cfg['path']['contenido_fullhtml'] . "external/backendedit/front_content.php?changeview=edit&action=con_editart&idartlang=$idartlang&type=$type&typenr=$typenr&idart=$idart&idcat=$idcat&idcatart=$idcatart&client=$client&lang=$lang"); diff --git a/conlite/external/wysiwyg/tinymce3/editorclass.php b/conlite/external/wysiwyg/tinymce3/editorclass.php index d490389..ba47a5b 100644 --- a/conlite/external/wysiwyg/tinymce3/editorclass.php +++ b/conlite/external/wysiwyg/tinymce3/editorclass.php @@ -112,7 +112,7 @@ class cTinyMCEEditor extends cWYSIWYGEditor { } // GZIP - if ($this->_aSettings["contenido_gzip"] == "true") { + if (isset($this->_aSettings["contenido_gzip"]) && $this->_aSettings["contenido_gzip"] == "true") { $this->setGZIPMode(true); } else { $this->setGZIPMode(false); diff --git a/conlite/includes/ajax/include.ajax.con.php b/conlite/includes/ajax/include.ajax.con.php index 00c116f..db9e7bd 100644 --- a/conlite/includes/ajax/include.ajax.con.php +++ b/conlite/includes/ajax/include.ajax.con.php @@ -31,6 +31,8 @@ if (!defined('CON_FRAMEWORK')) { die('Illegal call'); } +$bDebug = false; + if (!$idcat) { $idcat = Contenido_Security::toInteger($_REQUEST['idcat']); } diff --git a/conlite/includes/include.con_art_overview.php b/conlite/includes/include.con_art_overview.php index e0e092d..047728a 100644 --- a/conlite/includes/include.con_art_overview.php +++ b/conlite/includes/include.con_art_overview.php @@ -475,7 +475,7 @@ if (is_numeric($idcat) && ($idcat >= 0)) { } $imgsrc .= '.gif'; - + $tmp_img = ''; if (($perm->have_perm_area_action("con", "con_makestart") || $perm->have_perm_area_action_item("con", "con_makestart", $idcat)) && $idcat != 0) { if ($is_start == false) { $tmp_link = ''; diff --git a/conlite/includes/include.con_edit_form.php b/conlite/includes/include.con_edit_form.php index f4e8a5b..13fb349 100644 --- a/conlite/includes/include.con_edit_form.php +++ b/conlite/includes/include.con_edit_form.php @@ -596,7 +596,8 @@ if ($action == "con_newart" && $newart != true) { '; foreach ($availableTags as $key => $value) { - $tpl->set('d', 'METAINPUT', 'META' . $value); + // @todo seems to be unused, check if we can delete it (op 17.05.2022) + //$tpl->set('d', 'METAINPUT', 'META' . $value); switch ($value["fieldtype"]) { case "text": diff --git a/conlite/includes/include.con_left_top.php b/conlite/includes/include.con_left_top.php index 68aa207..dc1dd54 100644 --- a/conlite/includes/include.con_left_top.php +++ b/conlite/includes/include.con_left_top.php @@ -1,4 +1,5 @@ reset(); global $sess, $frame, $area; -$idcat = ( isset($_GET['idcat']) && is_numeric($_GET['idcat'])) ? $_GET['idcat'] : -1; +$idcat = ( isset($_GET['idcat']) && is_numeric($_GET['idcat'])) ? $_GET['idcat'] : -1; //Get sync options -if (isset($syncoptions)) -{ - $syncfrom = (int) $syncoptions; - $remakeCatTable = true; +if (isset($syncoptions)) { + $syncfrom = (int) $syncoptions; + $remakeCatTable = true; } -if (!isset($syncfrom)) -{ - $syncfrom = -1; +if (!isset($syncfrom)) { + $syncfrom = -1; } $syncoptions = $syncfrom; $oTpl->set('s', 'SYNC_LANG', $syncfrom); - ########################################## # Delete a saved search ########################################## $bShowArticleSearch = false; -if( isset($_GET['delsavedsearch']) ) -{ - if( isset($_GET['itemtype']) && sizeof($_GET['itemtype'])>0 && isset($_GET['itemid']) && sizeof($_GET['itemid'])>0 ) - { - $propertyCollection = new PropertyCollection; - $propertyCollection->deleteProperties($_GET['itemtype'], $_GET['itemid']); - $bShowArticleSearch = true; - } +if (isset($_GET['delsavedsearch'])) { + if (isset($_GET['itemtype']) && sizeof($_GET['itemtype']) > 0 && isset($_GET['itemid']) && sizeof($_GET['itemid']) > 0) { + $propertyCollection = new PropertyCollection; + $propertyCollection->deleteProperties($_GET['itemtype'], $_GET['itemid']); + $bShowArticleSearch = true; + } } -if( isset($_GET['save_search']) && $_GET['save_search'] == 'true') { - $bShowArticleSearch = true; +if (isset($_GET['save_search']) && $_GET['save_search'] == 'true') { + $bShowArticleSearch = true; } @@ -91,22 +86,22 @@ if( isset($_GET['save_search']) && $_GET['save_search'] == 'true') { # modified 20/04/2007 by H. Librenz for backend search $arrDays = array(); -for ($i = 0; $i < 32; $i ++) { - if ($i == 0) { - $arrDays[$i] = '--'; - } else { - $arrDays[$i] = $i; - } +for ($i = 0; $i < 32; $i++) { + if ($i == 0) { + $arrDays[$i] = '--'; + } else { + $arrDays[$i] = $i; + } } $arrMonths = array(); for ($i = 0; $i < 13; $i++) { - if ($i == 0) { - $arrMonths[$i] = '--'; - } else { - $arrMonths[$i] = $i; - } + if ($i == 0) { + $arrMonths[$i] = '--'; + } else { + $arrMonths[$i] = $i; + } } $arrYears = array(); @@ -114,20 +109,20 @@ $arrYears = array(); $arrYears[0] = '-----'; $sActualYear = (int) date("Y"); -for ($i = $sActualYear-10; $i < $sActualYear+30; $i++) { - $arrYears[$i] = $i; +for ($i = $sActualYear - 10; $i < $sActualYear + 30; $i++) { + $arrYears[$i] = $i; } $arrUsers = array(); -$query = "SELECT * FROM ".$cfg['tab']['phplib_auth_user_md5']." ORDER BY realname"; +$query = "SELECT * FROM " . $cfg['tab']['phplib_auth_user_md5'] . " ORDER BY realname"; $arrUsers['n/a'] = '-'; $db->query($query); while ($db->next_record()) { - $arrUsers[$db->f('username')] = $db->f('realname'); + $arrUsers[$db->f('username')] = $db->f('realname'); } $arrDateTypes = array(); @@ -137,16 +132,16 @@ $arrDateTypes['created'] = i18n('Date created'); $arrDateTypes['lastmodified'] = i18n('Date modified'); $arrDateTypes['published'] = i18n('Date published'); -$articleLink="editarticle"; +$articleLink = "editarticle"; $oListOptionRow = new cFoldingRow("3498dbba-ed4a-4618-8e49-3a3635396e22", i18n("Article Search"), $articleLink, $bShowArticleSearch); $oTpl->set('s', 'ARTICLELINK', $articleLink); #Textfeld -$oTextboxArtTitle = new cHTMLTextbox("bs_search_text", (isset($_REQUEST["bs_search_text"])?$_REQUEST["bs_search_text"]:''), 10); +$oTextboxArtTitle = new cHTMLTextbox("bs_search_text", (isset($_REQUEST["bs_search_text"]) ? $_REQUEST["bs_search_text"] : ''), 10); $oTextboxArtTitle->setStyle('width:135px;'); #Artikel_ID-Feld -$oTextboxArtID = new cHTMLTextbox("bs_search_id", (isset($_REQUEST["bs_search_id"])?$_REQUEST["bs_search_id"]:''), 10); +$oTextboxArtID = new cHTMLTextbox("bs_search_id", (isset($_REQUEST["bs_search_id"]) ? $_REQUEST["bs_search_id"] : ''), 10); $oTextboxArtID->setStyle('width:135px;'); #Date type @@ -155,10 +150,10 @@ $oSelectArtDateType->autoFill($arrDateTypes); $oSelectArtDateType->setStyle('width:135px;'); $oSelectArtDateType->setEvent("Change", "toggle_tr_visibility('tr_date_from');toggle_tr_visibility('tr_date_to');"); -if (isset($_REQUEST["bs_search_date_type"]) && $_REQUEST["bs_search_date_type"] !='') { - $oSelectArtDateType->setDefault($_REQUEST["bs_search_date_type"]); +if (isset($_REQUEST["bs_search_date_type"]) && $_REQUEST["bs_search_date_type"] != '') { + $oSelectArtDateType->setDefault($_REQUEST["bs_search_date_type"]); } else { - $oSelectArtDateType->setDefault('n/a'); + $oSelectArtDateType->setDefault('n/a'); } #DateFrom @@ -175,21 +170,21 @@ $oSelectArtDateFromYear->setStyle('width:55px;'); $oSelectArtDateFromYear->autoFill($arrYears); if (isset($_REQUEST["bs_search_date_from_day"]) && $_REQUEST["bs_search_date_from_day"] > 0) { - $oSelectArtDateFromDay->setDefault($_REQUEST["bs_search_date_from_day"]); + $oSelectArtDateFromDay->setDefault($_REQUEST["bs_search_date_from_day"]); } else { - $oSelectArtDateFromDay->setDefault(0); + $oSelectArtDateFromDay->setDefault(0); } if (isset($_REQUEST["bs_search_date_from_month"]) && $_REQUEST["bs_search_date_from_month"] > 0) { - $oSelectArtDateFromMonth->setDefault($_REQUEST["bs_search_date_from_month"]); + $oSelectArtDateFromMonth->setDefault($_REQUEST["bs_search_date_from_month"]); } else { - $oSelectArtDateFromMonth->setDefault(0); + $oSelectArtDateFromMonth->setDefault(0); } if (isset($_REQUEST["bs_search_date_from_year"]) && $_REQUEST["bs_search_date_from_year"] > 0) { - $oSelectArtDateFromYear->setDefault($_REQUEST["bs_search_date_from_year"]); + $oSelectArtDateFromYear->setDefault($_REQUEST["bs_search_date_from_year"]); } else { - $oSelectArtDateFromYear->setDefault(0); + $oSelectArtDateFromYear->setDefault(0); } #DateTo @@ -206,21 +201,21 @@ $oSelectArtDateToYear->setStyle('width:55px;'); $oSelectArtDateToYear->autoFill($arrYears); if (isset($_REQUEST["bs_search_date_to_day"]) && $_REQUEST["bs_search_date_to_day"] > 0) { - $oSelectArtDateToDay->setDefault($_REQUEST["bs_search_date_to_day"]); + $oSelectArtDateToDay->setDefault($_REQUEST["bs_search_date_to_day"]); } else { - $oSelectArtDateToDay->setDefault(0); + $oSelectArtDateToDay->setDefault(0); } if (isset($_REQUEST["bs_search_date_to_month"]) && $_REQUEST["bs_search_date_to_month"] > 0) { - $oSelectArtDateToMonth->setDefault($_REQUEST["bs_search_date_to_month"]); + $oSelectArtDateToMonth->setDefault($_REQUEST["bs_search_date_to_month"]); } else { - $oSelectArtDateToMonth->setDefault(0); + $oSelectArtDateToMonth->setDefault(0); } if (isset($_REQUEST["bs_search_date_to_year"]) && $_REQUEST["bs_search_date_to_year"] > 0) { - $oSelectArtDateToYear->setDefault($_REQUEST["bs_search_date_to_year"]); + $oSelectArtDateToYear->setDefault($_REQUEST["bs_search_date_to_year"]); } else { - $oSelectArtDateToYear->setDefault(0); + $oSelectArtDateToYear->setDefault(0); } #Author @@ -228,57 +223,56 @@ $oSelectArtAuthor = new cHTMLSelectElement("bs_search_author"); $oSelectArtAuthor->setStyle('width:135px;'); $oSelectArtAuthor->autoFill($arrUsers); -if (isset($_REQUEST["bs_search_author"]) && $_REQUEST["bs_search_author"] !='') { - $oSelectArtAuthor->setDefault($_REQUEST["bs_search_author"]); +if (isset($_REQUEST["bs_search_author"]) && $_REQUEST["bs_search_author"] != '') { + $oSelectArtAuthor->setDefault($_REQUEST["bs_search_author"]); } else { - $oSelectArtAuthor->setDefault('n/a'); + $oSelectArtAuthor->setDefault('n/a'); } $oSubmit = new cHTMLButton("submit", i18n("Search")); -$content = '