changes for mysql 5.7 with strict mode

Dieser Commit ist enthalten in:
Oldperl 2018-05-20 20:23:40 +00:00
Ursprung df3eb1c3cc
Commit f2f468e0bd
8 geänderte Dateien mit 24 neuen und 20 gelöschten Zeilen

Datei anzeigen

@ -112,7 +112,7 @@ class cI18n {
// CON-2165 // CON-2165
// initialise localisation of plugins correctly in frontend // initialise localisation of plugins correctly in frontend
if ($domain === self::i18n_DEFAULT_DOMAIN) { if (!empty($cfg['path']['contenido_locale']) && $domain === self::i18n_DEFAULT_DOMAIN) {
self::init($cfg['path']['contenido_locale'], $belang, $domain); self::init($cfg['path']['contenido_locale'], $belang, $domain);
} else { } else {
if (empty($belang)) { if (empty($belang)) {

Datei anzeigen

@ -54,8 +54,8 @@ class cApiTemplateConfigurationCollection extends ItemCollection {
$item->set("idtpl", $idtpl); $item->set("idtpl", $idtpl);
$item->set("author", $auth->auth['uname']); $item->set("author", $auth->auth['uname']);
$item->set("status", 0); $item->set("status", 0);
$item->set("created", date('YmdHis')); $item->set("created", date("Y-m-d H:i:s"));
$item->set("lastmodified", '0000-00-00 00:00:00'); $item->set("lastmodified", '1000-01-01 00:00:00');
$item->store(); $item->store();
$iNewTplCfgId = $item->get("idtplcfg"); $iNewTplCfgId = $item->get("idtplcfg");

Datei anzeigen

@ -166,7 +166,7 @@ function updateFileInformation($iIdClient, $sFilename, $sType, $sAuthor, $sDescr
'$sType', '$sType',
'$sFilenameNew', '$sFilenameNew',
NOW(), NOW(),
'0000-00-00 00:00:00', '1000-01-01 00:00:00',
'$sAuthor', '$sAuthor',
'', '',
'$sDescription' '$sDescription'

Datei anzeigen

@ -659,7 +659,7 @@ function getPhpModuleInfo($moduleName) {
if (isset($moduleName)) { // if $moduleName is specified if (isset($moduleName)) { // if $moduleName is specified
if (extension_loaded($moduleName)) { //check if specified extension exists or is loaded if (extension_loaded($moduleName)) { //check if specified extension exists or is loaded
if ($sub_key[1] == $moduleName) { //create array only for specified $moduleName if (!empty($sub_key[1]) && $sub_key[1] == $moduleName) { //create array only for specified $moduleName
foreach ($sub[0] as $key => $val) { foreach ($sub[0] as $key => $val) {
$moduleSettings[strip_tags($sub[1][$key])] = array(strip_tags($sub[2][$key])); $moduleSettings[strip_tags($sub[1][$key])] = array(strip_tags($sub[2][$key]));
} }

Datei anzeigen

@ -116,7 +116,7 @@ function statsArchive($yearmonth) {
".Contenido_Security::toInteger($db->f(0)).", ".Contenido_Security::toInteger($db->f(0)).",
".Contenido_Security::toInteger($db->f(2)).", ".Contenido_Security::toInteger($db->f(2)).",
".Contenido_Security::toInteger($db->f(1)).", ".Contenido_Security::toInteger($db->f(1)).",
'0000-00-00 00:00:00')"; '1000-01-01 00:00:00')";
$db2->query($insertSQL); $db2->query($insertSQL);
} }

Datei anzeigen

@ -134,20 +134,20 @@ function isIPv4($strHostAdress)
} }
/** /**
* must be done *
* * @param string $strConUrl contenido fullhtmlPath
* must be done * @param string $strBrowserUrl current browser string
* * @return boolean|string status of path comparement or false
* @param string contenido fullhtmlPath */
* @param string current browser string
*
* @return string status of path comparement
*/
function checkPathInformation($strConUrl, $strBrowserUrl) function checkPathInformation($strConUrl, $strBrowserUrl)
{ {
// parse url // parse url
$arrConUrl = parse_url($strConUrl); $arrConUrl = parse_url($strConUrl);
$arrBrowserUrl = parse_url($strBrowserUrl); $arrBrowserUrl = parse_url($strBrowserUrl);
if($arrConUrl === FALSE || $arrBrowserUrl === FALSE) {
return false;
}
if (isIPv4($arrConUrl['host'])) if (isIPv4($arrConUrl['host']))
{ // is { // is
@ -206,10 +206,13 @@ function checkPathInformation($strConUrl, $strBrowserUrl)
} }
/** /**
* check path informations * checks two path informations against each other to get potential nonconformities
* *
* checks two path informations against each other to get potential nonconformities * @param array $arrConUrl
*/ * @param array $arrBrowserUrl
* @param boolean $isIP not used, don' t know if needed
* @return boolean
*/
function compareUrlStrings($arrConUrl, $arrBrowserUrl, $isIP = false) function compareUrlStrings($arrConUrl, $arrBrowserUrl, $isIP = false)
{ {
// && $isIP == false // && $isIP == false

Datei anzeigen

@ -351,7 +351,7 @@ if ( is_numeric($idcat) && ($idcat >= 0)) {
$locked = $sart["locked"]; $locked = $sart["locked"];
$redirect = $sart["redirect"]; $redirect = $sart["redirect"];
$published = ($published != '0000-00-00 00:00:00') ? date($dateformat,strtotime($published)) : i18n("not yet published"); $published = ($published != '1000-01-01 00:00:00') ? date($dateformat,strtotime($published)) : i18n("not yet published");
$created = date($dateformat,strtotime($created)); $created = date($dateformat,strtotime($created));
$modified = date($dateformat,strtotime($modified)); $modified = date($dateformat,strtotime($modified));
$alttitle = "idart".': '.$idart.' '."idcatart".': '.$idcatart.' '."idartlang".': '.$idartlang; $alttitle = "idart".': '.$idart.' '."idcatart".': '.$idcatart.' '."idartlang".': '.$idartlang;

Datei anzeigen

@ -64,6 +64,7 @@ if(file_exists($sNewErrorLogPath)) {
$bHasLog = true; $bHasLog = true;
} }
if($bHasLog) { if($bHasLog) {
$errorLogBuffer = '';
$errorLogHandle = fopen ($sUseLog, "rb"); $errorLogHandle = fopen ($sUseLog, "rb");
$txtAreaHeight = "200"; $txtAreaHeight = "200";