Definition at line 15 of file UpgradeService.php.
Elgg\UpgradeService::__construct |
( |
| ) |
|
Elgg\UpgradeService::bootstrap17to18 |
( |
| ) |
|
|
protected |
Boot straps into 1.8 upgrade system from 1.7.
This runs all the 1.7 upgrades, then sets the processed_upgrades to all existing 1.7 upgrades. Control is then passed back to the main upgrade function which detects and runs the 1.8 upgrades, regardless of filename convention.
- Returns
- bool
Definition at line 308 of file UpgradeService.php.
Elgg\UpgradeService::dbUpgrade |
( |
|
$version, |
|
|
|
$fromdir = "" , |
|
|
|
$quiet = false |
|
) |
| |
|
protected |
NOTE: If this is ever removed from Elgg, sites lose the ability to upgrade from 1.7.x and earlier to the latest version of Elgg without upgrading to 1.8 first.
Upgrade the database schema in an ordered sequence.
Executes all upgrade files in elgg/engine/schema/upgrades/ in sequential order. Upgrade files must be in the standard Elgg release format of YYYYMMDDII.sql where II is an incrementor starting from 01.
Files that are < $version will be ignored.
- Parameters
-
int | $version | The version you are upgrading from in the format YYYYMMDDII. |
string | $fromdir | Optional directory to load upgrades from. default: engine/schema/upgrades/ |
bool | $quiet | If true, suppress all error messages. Only use for the upgrade from <=1.6. |
- Returns
- int The number of upgrades run.
Definition at line 404 of file UpgradeService.php.
Elgg\UpgradeService::getProcessedUpgrades |
( |
| ) |
|
|
protected |
Gets a list of processes upgrades.
- Returns
- mixed Array of processed upgrade filenames or false
Definition at line 181 of file UpgradeService.php.
Elgg\UpgradeService::getUnprocessedUpgrades |
( |
|
$upgrade_files = null , |
|
|
|
$processed_upgrades = null |
|
) |
| |
|
protected |
Checks if any upgrades need to be run.
- Parameters
-
null | array | $upgrade_files | Optional upgrade files |
null | array | $processed_upgrades | Optional processed upgrades |
- Returns
- array
Definition at line 248 of file UpgradeService.php.
Elgg\UpgradeService::getUpgradeFiles |
( |
|
$upgrade_path = null | ) |
|
|
protected |
Returns a list of upgrade files relative to the $upgrade_path dir.
- Parameters
-
string | $upgrade_path | The up |
- Returns
- array|false
Definition at line 210 of file UpgradeService.php.
Elgg\UpgradeService::getUpgradeFileVersion |
( |
|
$filename | ) |
|
|
protected |
Returns the version of the upgrade filename.
- Parameters
-
string | $filename | The upgrade filename. No full path. |
- Returns
- int|false
- Since
- 1.8.0
Definition at line 194 of file UpgradeService.php.
Elgg\UpgradeService::getUpgradeMutex |
( |
| ) |
|
|
protected |
Creates a table {prefix}upgrade_lock that is used as a mutex for upgrades.
- Returns
- bool
Definition at line 344 of file UpgradeService.php.
static Elgg\UpgradeService::includeCode |
( |
|
$file | ) |
|
|
staticprotected |
PHP include a file with a very limited scope.
- Parameters
-
string | $file | File path to include |
- Returns
- mixed
Definition at line 155 of file UpgradeService.php.
Elgg\UpgradeService::isUpgradeLocked |
( |
| ) |
|
Elgg\UpgradeService::processUpgrades |
( |
| ) |
|
|
protected |
Elgg\UpgradeService::releaseUpgradeMutex |
( |
| ) |
|
Elgg\UpgradeService::run |
( |
| ) |
|
Elgg\UpgradeService::setProcessedUpgrade |
( |
|
$upgrade | ) |
|
|
protected |
Saves a processed upgrade to a dataset.
- Parameters
-
string | $upgrade | Filename of the processed upgrade (not the path, just the file) |
- Returns
- bool
Definition at line 169 of file UpgradeService.php.
Elgg\UpgradeService::upgradeCode |
( |
|
$version, |
|
|
|
$quiet = false |
|
) |
| |
|
protected |
Run any php upgrade scripts which are required.
- Parameters
-
int | $version | Version upgrading from. |
bool | $quiet | Suppress errors. Don't use this. |
- Returns
- bool
Definition at line 78 of file UpgradeService.php.
The documentation for this class was generated from the following file: