Revision 1990
Added by darkviper about 12 years ago
| upgrade.php | ||
|---|---|---|
| 179 | 179 |
} |
| 180 | 180 |
// ************************************************ |
| 181 | 181 |
// Check the validity of 'create-file-timestamp' and balance against 'posted-timestamp' |
| 182 |
$sql = 'UPDATE `'.$database->TablePrefix.'mod_news_posts` ';
|
|
| 183 |
$sql .= 'SET `created_when`=`published_when` ';
|
|
| 184 |
$sql .= 'WHERE `published_when`<`created_when`';
|
|
| 182 |
$sql = 'UPDATE `'.$database->TablePrefix.'mod_news_posts` '
|
|
| 183 |
. 'SET `created_when`=`published_when` '
|
|
| 184 |
. 'WHERE `published_when`<`created_when`';
|
|
| 185 | 185 |
$database->query($sql); |
| 186 |
$sql = 'UPDATE `'.$database->TablePrefix.'mod_news_posts` ';
|
|
| 187 |
$sql .= 'SET `created_when`=`posted_when` ';
|
|
| 188 |
$sql .= 'WHERE `published_when`=0 OR `published_when`>`posted_when`';
|
|
| 186 |
$sql = 'UPDATE `'.$database->TablePrefix.'mod_news_posts` '
|
|
| 187 |
. 'SET `created_when`=`posted_when` '
|
|
| 188 |
. 'WHERE `published_when`=0 OR `published_when`>`posted_when`';
|
|
| 189 | 189 |
$database->query($sql); |
| 190 | 190 |
// ************************************************ |
| 191 |
// rebuild all access files |
|
| 191 | 192 |
$aReport = array('FilesDeleted'=>0,'FilesCreated'=>0,);
|
| 192 |
$sModulReorg = 'm_news_Reorg'; |
|
| 193 |
if( !$globalStarted && class_exists($sModulReorg) ) {
|
|
| 194 |
$oReorg = new $sModulReorg($sModulReorg::LOG_EXTENDED); |
|
| 195 |
$aReturnMsg = $oReorg->execute(); // show details |
|
| 193 |
if( !$globalStarted && class_exists('m_news_Reorg') ) {
|
|
| 194 |
$oReorg = new m_news_Reorg(ModuleReorgAbstract::LOG_EXTENDED); |
|
| 195 |
$oReorg->execute(); // show details |
|
| 196 | 196 |
$aReport = $oReorg->getReport(); |
| 197 | 197 |
unset($oReorg); |
| 198 | 198 |
} |
| 199 |
|
|
| 199 |
// ************************************************ |
|
| 200 | 200 |
// only for upgrade-script |
| 201 | 201 |
if($globalStarted) {
|
| 202 | 202 |
if($bDebug) {
|
Also available in: Unified diff
added /framework/ModuleReorgAbstract provides the basics for modul depending reorganisation classes
update /modules/news/Reorg now extends ModuleReorgAbstract
fixed problem with empty directories fixed
update /modules/news/upgrade.php // rebuild all access files fixed