Functions

Automatically go through full upgrade for current site.

automate_upgrade() 
package core_upgrader

Automatically go through a partial upgrade for current site.

automate_upgrade__safe() 
package core_upgrader

Refresh a MySQL database's character set.

change_mysql_database_charset(\ID_TEXT $new_charset, object $db, boolean $reencode = false
package core_upgrader

Parameters

$new_charset

\ID_TEXT

Character set

$db

object

Database

$reencode

boolean

Whether to let MySQL do a reencoding of the characters (if this is set to false we actually are adjusting the interpretation whilst leaving the disk data the same)

Check for alien files.

check_alien(array $addon_files, array $old_files, array $files, \SHORT_TEXT $dir, \SHORT_TEXT $rela = '', boolean $raw = false) : array
package core_upgrader

Parameters

$addon_files

array

List of files from non-bundled addons (a map: relative file paths as keys of map)

$old_files

array

List of files from old version

$files

array

List of verbatim files

$dir

\SHORT_TEXT

The directory we are scanning relative to

$rela

\SHORT_TEXT

The directory (relative) we are scanning

$raw

boolean

Whether to give raw output (no UI)

Returns

arrayA pair: HTML list of alien files, HTML list of addon files

Find any excess permissions

check_excess_perms(array $array, string $rel = '') : string
package core_upgrader

Parameters

$array

array

Permissions that DO need to be set

$rel

string

Where we are searching under

Returns

stringMessages

Check for out-dated files.

check_outdated__handle_overrides(\SHORT_TEXT $dir, \SHORT_TEXT $rela, array $master_data, array $hook_files, boolean $allow_merging) : array
package core_upgrader

Parameters

$dir

\SHORT_TEXT

The directory we are scanning relative to

$rela

\SHORT_TEXT

The directory (relative) we are scanning

$master_data

array

Unserialised data/files.dat

$hook_files

array

A list of the contents of our addon registry hook files

$allow_merging

boolean

Whether merging of CSS changes is allowed

Returns

arrayTuple of various kinds of outdated/missing files

Do permission checking

check_perms() : string
package core_upgrader

Returns

stringOutput messages

Clear many caches.

clear_caches_1() 
package core_upgrader

Clear more caches. This is intentionally done after db upgrading.

clear_caches_2() 
package core_upgrader

Upgrade Conversr if appropriate.

cns_upgrade() : boolean
package core_upgrader

Returns

booleanWhether anything was done

Make sure the site database has the correct character set internally. Composr already ensures the communication charset makes sense for what Composr is using, this makes sure it stores sanely too.

fix_mysql_database_charset() 
package core_upgrader

Do permission setting

fix_perms() : string
package core_upgrader

Returns

stringOutput messages

Rename a zone in the database and move any custom pages in it.

fu_rename_zone(\ID_TEXT $zone, \ID_TEXT $new_zone, boolean $dont_bother_with_main_row = false
package core_upgrader

Parameters

$zone

\ID_TEXT

The old name of the zone

$new_zone

\ID_TEXT

The new name of the zone

$dont_bother_with_main_row

boolean

Whether to assume the main zone row has already been renamed as part of a wider editing operation

Find extra directories to chmod

get_chmod_array_2() : array
package core_upgrader

Returns

arrayExtra directories to chmod

Tell the user about any modules that need moving again (because the cms ones haven't moved).

move_modules() : array
package core_upgrader

Returns

arrayPair: HTML list of moved files, raw list

Get hidden form fields for relaying POST information.

post_fields_relay() : string
package core_upgrader

Returns

stringThe hidden form fields for relaying POST information.

Do an integrity check. This does not include an alien check in basic mode; otherwise check_alien() is called within this function.

run_integrity_check(boolean $basic = false, boolean $allow_merging = true, boolean $unix_help = false) : string
package core_upgrader

Parameters

$basic

boolean

Whether to just do the minimum basic scan.

$allow_merging

boolean

Whether merging of CSS changes is allowed.

$unix_help

boolean

Whether to give some help to unix people.

Returns

stringResults.

Output the upgrader page header.

up_do_header() 
package core_upgrader

Upgrade all modules.

upgrade_modules() : string
package core_upgrader

Returns

stringList of upgraded/installed modules/blocks

The upgrader.php script handler.

upgrade_script() 
package core_upgrader

Upgrade shared installs.

upgrade_sharedinstall_sites(integer $from = 0
package core_upgrader

Parameters

$from

integer

Position to proceed from

Upgrade a theme automatically, using hand-coded migration arrays.

upgrade_theme(\ID_TEXT $theme, float $from_version, float $to_version, boolean $test_run = true) : array
package core_upgrader

Parameters

$theme

\ID_TEXT

Theme to be upgraded

$from_version

float

From version

$to_version

float

Target version

$test_run

boolean

Whether executing a test run (i.e. not do anything)

Returns

arrayA pair: List of errors, List of successes

Upgrade all themes.

upgrade_themes() : string
package core_upgrader

Returns

stringHTML output

Version specific upgrading. These are things that are relatively major structural changes and therefore will get done outside the module upgrade system.

version_specific() : boolean
package core_upgrader

Returns

booleanWhether anything was done