Overview

Packages

  • Auth
    • Ads
    • Ldap
    • Xoops
  • Autotasks
  • Config
    • Category
    • Item
    • Option
  • Core
    • Filesystem
    • Filters
    • Logger
    • Mail
    • Message
    • Password
    • Security
    • StopSpammer
    • Template
    • Textsanitizer
    • VersionChecker
  • Data
    • Avatar
    • Comment
  • Database
    • Connection
    • Criteria
    • Legacy
    • MySQL
    • PDO
    • Updater
  • Feeds
    • RSS
  • File
  • Form
    • Base
    • Elements
  • ICMS
    • IPF
      • View
  • Image
    • Category
  • Ipf
    • Category
    • Controller
    • Export
    • form
    • Keyhighlighter
    • Member
    • Object
    • Permission
    • richfile
    • Tree
    • urllink
    • View
  • kernel
    • Set
  • Member
    • Group
    • GroupMembership
    • GroupPermission
    • User
  • Messaging
  • Module
  • None
  • Notification
  • Page
  • Plugins
    • Editor
  • Preload
    • Libraries
  • Privmessage
  • Session
  • SmartObject
  • View
    • Block
    • Breadcrumb
    • PageNav
    • PrinterFriendly
    • Template
    • Templates
    • Theme
    • Tree

Classes

  • icms_db_legacy_updater_Handler
  • Overview
  • Package
  • Class

Class icms_db_legacy_updater_Handler

icms_db_legacy_updater_Handler class

Class performing the database update for the module

Package: SmartObject
Copyright: The ImpressCMS Project http://www.impresscms.org/
License: GNU General Public License (GPL)
Author: marcan marcan@smartfactory.ca
Link: The SmartFactory
Located at db/legacy/updater/Handler.php
Methods summary
public
# __construct( )
public boolean
# runQuery( string $query, string $goodmsg, string $badmsg, boolean $force = false )

Use to execute a general query

Use to execute a general query

Parameters

$query
query that will be executed
$goodmsg
message displayed on success
$badmsg
message displayed on error
$force
force the query even in a GET process

Returns

boolean
true if success, false if an error occured
public boolean
# renameTable( string $from, string $to, boolean $force = false )

Use to rename a table

Use to rename a table

Parameters

$from
name of the table to rename
$to
new name of the renamed table
$force
force the query even in a GET process

Returns

boolean
true if success, false if an error occured
public boolean
# updateTable( object $table, boolean $force = false )

Use to update a table

Use to update a table

Parameters

$table
icms_db_legacy_updater_Table that will be updated
$force
force the query even in a GET process

Returns

boolean
true if success, false if an error occured

See

icms_db_legacy_updater_Table
public
# automaticUpgrade( string $dirname, mixed $item )

Upgrade automaticaly an item of a module

Upgrade automaticaly an item of a module

Note that currently, $item needs to represent the name of an object derived from SmartObject, for example, $item == 'invoice' wich will represent $dirnameInvoice for example SmartbillingInvoice which extends SmartObject class

Parameters

$dirname
dirname of the module
$item
name or array of names of the item to upgrade
public string
# getFieldTypeFromVar( array $var )

Get the type of the field based on the info of the var

Get the type of the field based on the info of the var

Parameters

$var
array containing information about the var

Returns

string
type of the field
public string
# getFieldDefaultFromVar( array $var, boolean $key = false )

Get the default value based on the info of the var

Get the default value based on the info of the var

Parameters

$var
array containing information about the var
$key
TRUE if the var is the primary key

Returns

string
default value
public
# upgradeObjectItem( $dirname, $item )
public
# insertConfig( integer $conf_catid, string $conf_name, string $conf_title, mixed $conf_value, string $conf_desc, string $conf_formtype, string $conf_valuetype, integer $conf_order )

Insert a config in System Preferences

Insert a config in System Preferences

Parameters

$conf_catid
$conf_name
$conf_title
$conf_value
$conf_desc
$conf_formtype
$conf_valuetype
$conf_order
public
# moduleUpgrade( & $module, $tables_first = false )
public boolean
# updateModuleDBVersion( integer $newDBVersion, string $dirname )

Update the DBVersion of a module

Update the DBVersion of a module

Parameters

$newDBVersion
$newDVersion new database version
$dirname
dirname of the module

Returns

boolean
TRUE if success FALSE if not
Properties summary
public $_dbTypesArray
#
public @link $_db

xoopsDB database object

xoopsDB database object

#
public $db
#
public array $_messages

of messages

of messages

# array()
API documentation generated by ApiGen