[ Index ]

PHP Cross Reference of Nucleus CMS v3.51 code documentation

title

Body

[close]

/nucleus/libs/ -> backup.php (summary)

(no description)

File Size: 545 lines (14 kb)
Included or required: 2 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Backup:: (13 methods):
  Backup()
  do_backup()
  _backup_dump_table()
  _backup_dump_structure()
  _backup_dump_structure()
  _backup_get_field_names()
  _backup_dump_contents()
  gzip_PrintFourChars()
  do_restore()
  _execute_queries()
  remove_remarks()
  split_sql_file()
  _evenNumberOfQuotes()


Class: Backup  - X-Ref

Scripts to create/restore a backup of the Nucleus database

Based on code in phpBB (http://phpBB.sourceforge.net)

Backup()   X-Ref
Constructor


do_backup($gzip = 0)   X-Ref
This function creates an sql dump of the database and sends it to
the user as a file (can be gzipped if they want)

param: gzip

_backup_dump_table($tablename, $key)   X-Ref
Creates a dump for a single table
($tablename and $key are filled in by array_walk)


_backup_dump_structure($tablename)   X-Ref
Creates a dump of the table structure for one table


_backup_dump_structure($tablename)   X-Ref
Creates a dump of the table structure for one table


_backup_get_field_names($result, $num_fields)   X-Ref
Returns the field named for the given table in the
following format:

(column1, column2, ..., columnn)

_backup_dump_contents($tablename)   X-Ref
Creates a dump of the table content for one table


gzip_PrintFourChars($Val)   X-Ref
copied from phpBB


do_restore()   X-Ref
Restores a database backup


_execute_queries($sql_query)   X-Ref
Executes a SQL query


remove_remarks($sql)   X-Ref
remove_remarks will strip the sql comment lines
out of an uploaded sql file


split_sql_file($sql)   X-Ref
split_sql_file will split an uploaded sql file
into single sql statements.

Note: expects trim() to have already been run on $sql.
taken from phpBB

_evenNumberOfQuotes($text)   X-Ref
sub function of split_sql_file

taken from phpBB



Generated: Sun Aug 1 03:56:06 2010
Open Source related documentation for developers.