Class Mvblog_upgrade

Description

Uprade mvblog to the latest version

Located in /common/mvblog_upgrade.php (line 56)

Mvblog_common
   |
   --Mvblog_upgrade
Variable Summary
mixed $lang
mixed $lastpatch
Method Summary
Mvblog_upgrade __construct ()
void apply_dbpatch (int $patch, [ $mode = "release"])
void create_backups ()
array get_patchfiles ([string $mode = "release"])
void set_latest_version ([int $version = 0])
void sql_addslashes ([ $a_string = ''], [ $is_like = FALSE])
bool _mysql_backup_db (string $database, string $backuplocation)
bool _psql_backup_db (string $database, string $backuplocation)
Variables
mixed $lang (line 59)
  • access: public
mixed $lastpatch = 0 (line 58)
  • access: public
Methods
Constructor __construct (line 65)

Class constructor

  • access: public
Mvblog_upgrade __construct ()
apply_dbpatch (line 305)

Apply a specific database patch

  • access: public
void apply_dbpatch (int $patch, [ $mode = "release"])
  • int $patch: The patch to apply
  • $mode
create_backups (line 118)

Create a database backup before running the pathes against it so we can rollback when something goes wrong

  • access: public
void create_backups ()
get_patchfiles (line 76)

Find out what patchfiles we need to commit.

  • return: Patchfiles that should be applied to the database
  • access: public
array get_patchfiles ([string $mode = "release"])
  • string $mode: Can be svn or release and is used to pick the filenameformat.
set_latest_version (line 284)

Update/create dbversion setting in the database

  • access: public
void set_latest_version ([int $version = 0])
  • int $version: The latest patchlevel we applied to the database
sql_addslashes (line 105)

Better addslashes for SQL queries.

Taken from phpMyAdmin and modified by me.

void sql_addslashes ([ $a_string = ''], [ $is_like = FALSE])
  • $a_string
  • $is_like
_mysql_backup_db (line 156)

Create mysql backup

  • return: true on success, false on failure
  • access: private
bool _mysql_backup_db (string $database, string $backuplocation)
  • string $database: The database name to backup
  • string $backuplocation: The directory to store the backup in
_psql_backup_db (line 249)

Create postgresql backup. Code and ideas borrowed from phpPgAdmin.

  • return: true on success, false on failure
  • access: private
bool _psql_backup_db (string $database, string $backuplocation)
  • string $database: The database name to backup
  • string $backuplocation: The directory to store the backup in

Documentation generated on Fri, 28 Dec 2007 13:17:41 +0100 by phpDocumentor 1.4.1