fixes PHP 7.3
Dieser Commit ist enthalten in:
Ursprung
7e98507e86
Commit
2e57859f6e
|
@ -160,7 +160,7 @@ class cApiModule extends Item {
|
|||
} catch (Exception $ex) {
|
||||
$oWriter = cLogWriter::factory("File", array('destination' => 'contenido.log'));
|
||||
$oLog = new cLog($oWriter);
|
||||
$log->log($ex->getFile() . " (" . $ex->getLine() . "): " . $ex->getMessage(), cLog::WARN);
|
||||
$oLog->log($ex->getFile() . " (" . $ex->getLine() . "): " . $ex->getMessage(), cLog::WARN);
|
||||
}
|
||||
}
|
||||
if ($this->_aModFileEditConf['use'] == TRUE && is_writable($this->_aModFileEditConf['modPath'])) {
|
||||
|
|
|
@ -246,20 +246,23 @@ function dbUpgradeTable($db, $table, $field, $type, $null, $key, $default, $extr
|
|||
$structure = dbGetColumns($db, $table);
|
||||
|
||||
// Third check: Compare field properties
|
||||
if (($structure[$field]['Type'] != $type) ||
|
||||
($structure[$field]['Null'] != $null) ||
|
||||
($structure[$field]['Key'] != $key) ||
|
||||
($structure[$field]['Default'] != $default) ||
|
||||
($structure[$field]['Extra'] != $extra)) {
|
||||
if (($structure[$field]['Type'] != $type) || ($structure[$field]['Null'] != $null) || ($structure[$field]['Key'] != $key) || ($structure[$field]['Default'] != $default) || ($structure[$field]['Extra'] != $extra)) {
|
||||
|
||||
if ($structure[$field]['Key'] == "PRI") {
|
||||
$alterField = " ALTER TABLE " . Contenido_Security::escapeDB($table, $db) . " ADD PRIMARY KEY ('" . Contenido_Security::escapeDB($field, $db) . "') ";
|
||||
} else {
|
||||
if($type == "datetime" || $type == "date") {
|
||||
$db->query("SET SESSION sql_mode='ALLOW_INVALID_DATES'");
|
||||
}
|
||||
$alterField = " ALTER TABLE " . Contenido_Security::escapeDB($table, $db) . " CHANGE COLUMN $field $field $type " . $parameter['NULL'] . " " . $parameter['DEFAULT'] . " " . $parameter['KEY'];
|
||||
}
|
||||
|
||||
$db->query($alterField);
|
||||
|
||||
if ($bDebug) {
|
||||
$sDebugData = sprintf("%s:ErrorNo. %s:%s\n", $alterField, $db->getErrorNumber(), $db->getErrorMessage());
|
||||
file_put_contents('../data/logs/setup_queries.txt', $sDebugData, FILE_APPEND);
|
||||
echo 'updateField:' . $alterField . '<br />';
|
||||
}
|
||||
$columnCache[$table] = "";
|
||||
}
|
||||
|
||||
|
|
|
@ -459,18 +459,12 @@ function langDuplicateFromFirstLanguage($client, $idlang) {
|
|||
* @copyright four for business AG <www.4fb.de>
|
||||
*/
|
||||
function langDeleteLanguage($idlang, $idclient = "") {
|
||||
global $db, $sess, $client, $cfg, $notification;
|
||||
global $db, $cfg, $notification;
|
||||
|
||||
$deleteok = 1;
|
||||
|
||||
// Bugfix: New idclient parameter introduced, as Administration -> Languages
|
||||
// is used for different clients to delete the language
|
||||
|
||||
// Use global client id, if idclient not specified (former behaviour)
|
||||
// Note, that this check also have been added for the action in the database
|
||||
// - just to be equal to langNewLanguage
|
||||
if (!is_numeric($idclient)) {
|
||||
$idclient = $client;
|
||||
$idclient = cRegistry::getClientId();
|
||||
}
|
||||
|
||||
//************ check if there are still arts online
|
||||
|
|
|
@ -87,7 +87,7 @@ function statsArchive($yearmonth) {
|
|||
".Contenido_Security::toInteger($db->f(1)).",
|
||||
".Contenido_Security::toInteger($db->f(2)).",
|
||||
".Contenido_Security::toInteger($db->f(3)).",
|
||||
'".Contenido_Security::escapeDB($db->f(4), $db2)."')";
|
||||
".Contenido_Security::escapeDB($db->f(4), $db2).")";
|
||||
|
||||
$db2->query($insertSQL);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Project:
|
||||
* Contenido Content Management System
|
||||
|
@ -28,7 +29,6 @@
|
|||
* }}
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('CON_FRAMEWORK')) {
|
||||
die('Illegal call');
|
||||
}
|
||||
|
@ -53,12 +53,10 @@ $sReload = '<script language="javascript">
|
|||
}
|
||||
</script>';
|
||||
|
||||
if ($action == "lang_newlanguage" || $action == "lang_deletelanguage")
|
||||
{
|
||||
if ($action == "lang_newlanguage" || $action == "lang_deletelanguage") {
|
||||
$page = new UI_Page;
|
||||
|
||||
if ($action == "lang_deletelanguage")
|
||||
{
|
||||
if ($action == "lang_deletelanguage") {
|
||||
// finally delete from dropdown in header
|
||||
$newOption = '<script>
|
||||
var langList = top.header.document.getElementById("cLanguageSelect");
|
||||
|
@ -93,10 +91,8 @@ if ($action == "lang_newlanguage" || $action == "lang_deletelanguage")
|
|||
}
|
||||
$page->addScript('reload', $sReload);
|
||||
$page->render();
|
||||
} else
|
||||
{
|
||||
if ($action == "lang_edit")
|
||||
{
|
||||
} else {
|
||||
if ($action == "lang_edit") {
|
||||
callPluginStore("languages");
|
||||
|
||||
$language = new cApiLanguage($idlang);
|
||||
|
@ -122,20 +118,15 @@ if ($action == "lang_newlanguage" || $action == "lang_deletelanguage")
|
|||
</script>';
|
||||
}
|
||||
|
||||
if(!$perm->have_perm_area_action($area, $action))
|
||||
{
|
||||
if (!$perm->have_perm_area_action($area, $action)) {
|
||||
$notification->displayNotification("error", i18n("Permission denied"));
|
||||
|
||||
} else {
|
||||
|
||||
if ( !isset($idlang) && $action != "lang_new")
|
||||
{
|
||||
if (!isset($idlang) && $action != "lang_new") {
|
||||
$notification->displayNotification("error", "no language id given. Usually, this shouldn't happen, except if you played around with your system. if you didn't play around, please report a bug.");
|
||||
|
||||
} else {
|
||||
|
||||
if (($action == "lang_edit") && ($perm->have_perm_area_action($area, $action)))
|
||||
{
|
||||
if (($action == "lang_edit") && ($perm->have_perm_area_action($area, $action))) {
|
||||
langEditLanguage($idlang, $langname, $sencoding, $active, $direction);
|
||||
$noti = $notification->returnNotification("info", i18n("Changes saved")) . "<br>";
|
||||
}
|
||||
|
@ -165,8 +156,7 @@ if ($action == "lang_newlanguage" || $action == "lang_deletelanguage")
|
|||
|
||||
|
||||
$charsets = array();
|
||||
foreach ($cfg['AvailableCharsets'] as $charset)
|
||||
{
|
||||
foreach ($cfg['AvailableCharsets'] as $charset) {
|
||||
$charsets[$charset] = $charset;
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ function cecCreateMetatags($metatags) {
|
|||
if (file_exists($cachefilename)) {
|
||||
$fileexists = true;
|
||||
|
||||
$diff = mktime() - filemtime($cachefilename);
|
||||
$diff = time() - filemtime($cachefilename);
|
||||
|
||||
if ($diff > $cachetime) {
|
||||
$reload = true;
|
||||
|
|
Laden…
In neuem Issue referenzieren