[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/installation/installer/ -> helper.php (summary)

(no description)

Copyright: Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
License: GNU/GPL, see LICENSE.php
Version: $Id: helper.php 16385 2010-04-23 10:44:15Z ian $
File Size: 1463 lines (43 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

JInstallationHelper:: (27 methods):
  detectDB()
  errors2string()
  createDatabase()
  setDBCharset()
  backupDatabase()
  deleteDatabase()
  populateDatabase()
  splitSql()
  getFilePerms()
  createAdminUser()
  fsPermissionsCheck()
  findFtpRoot()
  FTPVerify()
  setDirPerms()
  findMigration()
  uploadSql()
  unpack()
  return_bytes()
  replaceBuffer()
  appendFile()
  preMigrate()
  postMigrate()
  isValidItem()
  getDBErrors()
  setFTPCfg()
  _chmod()
  let_to_num()


Class: JInstallationHelper  - X-Ref


detectDB()   X-Ref

return: string A guess at the db required

errors2string(& $errors)   X-Ref

param: array
return: string

createDatabase(& $db, $DBname, $DButfSupport)   X-Ref
Creates a new database

param: object Database connector
param: string Database name
param: boolean utf-8 support
param: string Selected collation
return: boolean success

setDBCharset(& $db, $DBname)   X-Ref
Sets character set of the database to utf-8 with selected collation
Used in instances of pre-existing database

param: object Database object
param: string Database name
param: string Selected collation
return: boolean success

backupDatabase(& $db, $DBname, $DBPrefix, & $errors)   X-Ref
Backs up existing tables

param: object Database connector
param: array An array of errors encountered

deleteDatabase(& $db, $DBname, $DBPrefix, & $errors)   X-Ref
Deletes all database tables

param: object Database connector
param: array An array of errors encountered

populateDatabase(& $db, $sqlfile, & $errors, $nexttask='mainconfig')   X-Ref
No description

splitSql($sql)   X-Ref

param: string
return: array

getFilePerms($input, $type = 'file')   X-Ref
Calculates the file/dir permissions mask


createAdminUser(& $vars)   X-Ref
Creates the admin user


fsPermissionsCheck()   X-Ref
No description

findFtpRoot($user, $pass, $host='127.0.0.1', $port='21')   X-Ref
Find the ftp filesystem root for a given user/pass pair

param: string    $user    Username of the ftp user to determine root for
param: string    $pass    Password of the ftp user to determine root for
return: string    Filesystem root for given FTP user

FTPVerify($user, $pass, $root, $host='127.0.0.1', $port='21')   X-Ref
Verify the FTP configuration values are valid

param: string    $user    Username of the ftp user to determine root for
param: string    $pass    Password of the ftp user to determine root for
return: mixed    Boolean true on success or JError object on fail

setDirPerms($dir, &$srv)   X-Ref
Set default folder permissions

param: string $path The full file path
param: string $buffer The buffer to write
return: boolean True on success

findMigration( &$args )   X-Ref
No description

uploadSql( &$args, $migration = false, $preconverted = false )   X-Ref
Uploads a sql script and executes it. Script can be text file or zip/gz packed

param: array The installation variables
param: boolean true if the script is a migration script
return: string Success or error messages

unpack($p_filename, &$vars)   X-Ref
Unpacks a compressed script file either as zip or gz/ Assumes single file in archive

param: string $p_filename The uploaded package filename or install directory
return: unpacked filename on success, False on error

return_bytes($val)   X-Ref
No description

replaceBuffer(&$buffer, $oldPrefix, $newPrefix, $srcEncoding)   X-Ref
No description

appendFile(&$buffer, $filename)   X-Ref
No description

preMigrate( $scriptName, &$args, $db )   X-Ref
Performs pre-populate conversions on a migration script

param: string $scriptName The uploaded / unpacked script file
return: converted filename on success, False on error

postMigrate( $db, & $errors, & $args )   X-Ref
Performs post-populate conversions after importing a migration script
These include constructing an appropriate menu table for core content items
and adding core modules from old site to the modules table

param: JDatabase
param: array errors (by ref)
return: error count

isValidItem( $link, $lookup )   X-Ref
No description

getDBErrors( & $errors, $db )   X-Ref
No description

setFTPCfg( $vars )   X-Ref
Inserts ftp variables to mainframe registry
Needed to activate ftp layer for file operations in safe mode

param: array The post values

_chmod( $path, $mode )   X-Ref
No description

let_to_num($v)   X-Ref
No description



Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1