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
// 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);
} else {
if (empty($belang)) {

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -659,7 +659,7 @@ function getPhpModuleInfo($moduleName) {
if (isset($moduleName)) { // if $moduleName is specified
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) {
$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(2)).",
".Contenido_Security::toInteger($db->f(1)).",
'0000-00-00 00:00:00')";
'1000-01-01 00:00:00')";
$db2->query($insertSQL);
}

Datei anzeigen

@ -134,20 +134,20 @@ function isIPv4($strHostAdress)
}
/**
* must be done
*
* must be done
*
* @param string contenido fullhtmlPath
* @param string current browser string
*
* @return string status of path comparement
*/
*
* @param string $strConUrl contenido fullhtmlPath
* @param string $strBrowserUrl current browser string
* @return boolean|string status of path comparement or false
*/
function checkPathInformation($strConUrl, $strBrowserUrl)
{
// parse url
$arrConUrl = parse_url($strConUrl);
$arrBrowserUrl = parse_url($strBrowserUrl);
if($arrConUrl === FALSE || $arrBrowserUrl === FALSE) {
return false;
}
if (isIPv4($arrConUrl['host']))
{ // 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)
{
// && $isIP == false

Datei anzeigen

@ -351,7 +351,7 @@ if ( is_numeric($idcat) && ($idcat >= 0)) {
$locked = $sart["locked"];
$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));
$modified = date($dateformat,strtotime($modified));
$alttitle = "idart".': '.$idart.' '."idcatart".': '.$idcatart.' '."idartlang".': '.$idartlang;

Datei anzeigen

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