mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 21:57:51 +02:00
Forum update fixes (duplicate SEF & logging)
This commit is contained in:
@@ -474,7 +474,8 @@ function step5()
|
||||
$counts = array(
|
||||
'parents' => 0,
|
||||
'forums' => 0,
|
||||
'subs' => 0
|
||||
'subs' => 0,
|
||||
'sefs' => 1, // start on 1, so that a duplicate sef gets "-2" as suffix
|
||||
);
|
||||
//XXX Typo on 'parents' ?
|
||||
|
||||
@@ -505,7 +506,8 @@ function step5()
|
||||
|
||||
if(isset($sefs[$forum_sef]))
|
||||
{
|
||||
$forum_sef .= "-2";
|
||||
$counts['sefs']++;
|
||||
$forum_sef .= "-".$counts['sefs']; // adds "-2", "-3", etc.. when duplicate sef is found.
|
||||
}
|
||||
|
||||
$tmp['forum_sef'] = $forum_sef;
|
||||
@@ -1328,7 +1330,7 @@ class forumUpgrade
|
||||
// echo "logf = ".$this->logf."<br />";
|
||||
$txt = sprintf("%s - %s\n", date('m/d/Y H:i:s'), $msg);
|
||||
// echo $txt."<br />";
|
||||
$flag = ($append ? FILE_APPEND : '');
|
||||
$flag = ($append ? FILE_APPEND : 0);
|
||||
file_put_contents($this->logf, $txt, $flag);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user