Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/install/upgrades.php
Show First 20 Lines • Show All 2353 Lines • ▼ Show 20 Line(s) | |||||
if ( $mode != 'after' ) { | if ( $mode != 'after' ) { | ||||
return; | return; | ||||
} | } | ||||
$this->deleteThumbnails(); | $this->deleteThumbnails(); | ||||
} | } | ||||
/** | /** | ||||
* Update to 5.2.2-B3 | |||||
* | |||||
* @param string $mode When called mode {before, after). | |||||
* | |||||
* @return void | |||||
*/ | |||||
public function Upgrade_5_2_2_B3($mode) | |||||
{ | |||||
if ( $mode != 'before' ) { | |||||
return; | |||||
} | |||||
/** @var kMultiLanguageHelper $ml_helper */ | |||||
$ml_helper = $this->Application->recallObject('kMultiLanguageHelper'); | |||||
$ml_helper->createFields('page-revision'); | |||||
/** @var PageHelper $page_helper */ | |||||
$page_helper = $this->Application->recallObject('PageHelper'); | |||||
$table_name = TABLE_PREFIX . 'PageRevisions'; | |||||
$sql = 'SELECT RevisionId | |||||
FROM ' . $table_name; | |||||
$ids = $this->Conn->GetColIterator($sql); | |||||
foreach ( $ids as $id ) { | |||||
$this->Conn->doUpdate($page_helper->getRevisionContent($id), $table_name, 'RevisionId = ' . $id); | |||||
} | |||||
} | |||||
/** | |||||
* Deletes folders, containing thumbnails recursively. | * Deletes folders, containing thumbnails recursively. | ||||
* | * | ||||
* @param string $folder Folder. | * @param string $folder Folder. | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
protected function deleteThumbnails($folder = WRITEABLE) | protected function deleteThumbnails($folder = WRITEABLE) | ||||
{ | { | ||||
Show All 16 Lines |