Geeklog
[ class tree: Geeklog ] [ index: Geeklog ] [ all elements ]

Procedural File: lib-install.php

Source Location: /public_html/admin/install/lib-install.php



Page Details:



Includes:

require_once('language/'.$language.'.php') [line 92]





SUPPORTED_MYSQL_VER [line 68]

SUPPORTED_MYSQL_VER = '4.0.18'

[ Top ]



SUPPORTED_PHP_VER [line 65]

SUPPORTED_PHP_VER = '4.3.0'

[ Top ]



VERSION [line 59]

VERSION = '1.6.2hg'
This constant defines Geeklog's version number. It will be written to siteconfig.php and the database (in the latter case minus any suffix).


[ Top ]




INST_checkPlugins [line 577]

int INST_checkPlugins( )

Check which plugins are actually installed and disable them if needed



Tags:

return:  number of plugins that were disabled


[ Top ]



INST_checkPost150Upgrade [line 640]

string INST_checkPost150Upgrade( string $dbconfig_path, string $siteconfig_path)

Check if we can skip upgrade steps (post-1.5.0)

If we're doing an upgrade from 1.5.0 or later and we have the necessary DB credentials, skip the forms and upgrade directly.

NOTE: Will not return if upgrading from 1.5.0 or later.




Tags:

return:  database version, if possible


Parameters

string   $dbconfig_path   path to db-config.php
string   $siteconfig_path   path to siteconfig.php
[ Top ]



INST_checkTableExists [line 429]

boolean INST_checkTableExists( string $table)

Check if a table exists



Tags:

return:  True if table exists, false if it does not
see:  DB_checkTableExists()


Parameters

string   $table   Table name
[ Top ]



INST_dbConnect [line 441]

mixed INST_dbConnect( array $db)

Can the install script connect to the database?



Tags:

return:  Returns the DB handle if true, false if not


Parameters

array   $db   Database information
[ Top ]



INST_dbExists [line 476]

boolean INST_dbExists( array $db)

Check if a Geeklog database exists



Tags:

return:  True if a database exists, false if not


Parameters

array   $db   Array containing connection info
[ Top ]



INST_fixPathsAndUrls [line 994]

void INST_fixPathsAndUrls( string $path, string $path_html, string $site_url, string $site_admin_url)

Do a sanity check on the paths and URLs

This is somewhat speculative but should provide the user with a working site even if, for example, a site backup was installed elsewhere.




Parameters

string   $path   proper /path/to/Geeklog
string   $path_html   path to public_html
string   $site_url   The site's URL
string   $site_admin_url   URL to the admin directory
[ Top ]



INST_formatSize [line 312]

string INST_formatSize( int $size, [int $dec_places = 0])

Written to aid in install script development

NOTE: This code is a modified copy from PHP.net




Tags:

return:  Filesize string


Parameters

int   $size   Filesize
int   $dec_places   Number of decimal places
[ Top ]



INST_getAdminPath [line 1078]

void INST_getAdminPath( )

Helper function: Derive path of the 'admin' directory from __FILE__



[ Top ]



INST_getAlertMsg [line 605]

string INST_getAlertMsg( $mMessage $mMessage, [$mType $mType = 'notice'])

Nicely formats the alert messages



Tags:

return:  HTML formatted dialog message


Parameters

$mMessage   $mMessage   Message string
$mType   $mType   'error', 'warning', 'success', or 'notice'
[ Top ]



INST_getFooter [line 203]

string INST_getFooter( )

Returns the ending HTML for the installer theme.



Tags:

return:  Footer HTML code


[ Top ]



INST_getHeader [line 133]

string INST_getHeader( $mHeading $mHeading)

Returns the beginning HTML for the installer theme.



Tags:

return:  Header HTML code


Parameters

$mHeading   $mHeading   Heading
[ Top ]



INST_getHtmlPath [line 1061]

void INST_getHtmlPath( )

Helper function: Derive 'path_html' from __FILE__



[ Top ]



INST_getLanguage [line 1133]

string INST_getLanguage( )

Get name of the install language file to use



Tags:

return:  language file name (without the extension)


[ Top ]



INST_getPluginInfo [line 713]

mixed INST_getPluginInfo( string $plugin)

Get information about a plugin

Only works for plugins that have a autoinstall.php file




Tags:

return:  array of plugin info or false: error


Parameters

string   $plugin   plugin's directory name
[ Top ]



INST_getSiteAdminUrl [line 1113]

void INST_getSiteAdminUrl( )

Helper function: Derive 'site_admin_url' from PHP_SELF



[ Top ]



INST_getSiteUrl [line 1095]

void INST_getSiteUrl( )

Helper function: Derive 'site_url' from PHP_SELF



[ Top ]



INST_getUploadError [line 536]

mixed INST_getUploadError( array $mFile)

Check if an error occured while uploading a file



Tags:

return:  Returns the error string if an error occured, returns false if no error occured


Parameters

array   $mFile   $_FILE['uploaded_file']
[ Top ]



INST_helpLink [line 328]

string INST_helpLink( string $var)

Provide a link to the help page for an option



Tags:

return:  HTML for the link


Parameters

string   $var   key of the label, used as an anchor on the help page
[ Top ]



INST_listOfSupportedDBs [line 1228]

void INST_listOfSupportedDBs( string $gl_path, string $selected_dbtype, [boolean $list_innodb = false])

Prepare a dropdown list of all available databases

Checks which driver classes and "tableanddata" files are actually present, so that unwanted dbs can be removed (still requires special code all over the place so you can't simply drop in new files to add support for new dbs).

If support for a database has not been compiled into PHP, the option will be listed as disabled.




Parameters

string   $gl_path   base Geeklog install path
string   $selected_dbtype   currently selected db type
boolean   $list_innodb   whether to list InnoDB option
[ Top ]



INST_mysqlOutOfDate [line 284]

boolean INST_mysqlOutOfDate( array $db)

Check if the user's MySQL version is supported by Geeklog



Tags:

return:  True if supported, falsed if not supported


Parameters

array   $db   Database information
[ Top ]



INST_phpOutOfDate [line 233]

boolean INST_phpOutOfDate( )

Check if the user's PHP version is supported by Geeklog



Tags:

return:  True if supported, falsed if not supported


[ Top ]



INST_pluginAutoinstall [line 747]

boolean INST_pluginAutoinstall( string $plugin, $inst_parms, [boolean $verbose = true], array $inst_parm)

Do the actual plugin auto install



Tags:

return:  true on success, false otherwise


Parameters

string   $plugin   Plugin name
array   $inst_parm   Installation parameters for the plugin
boolean   $verbose   true: enable verbose logging
   $inst_parms  
[ Top ]



INST_prettifyLanguageName [line 345]

string INST_prettifyLanguageName( $filename, string $file)

Make a nice display name from the language filename

NOTE: This code is a straight copy from MBYTE_languageList()




Tags:

return:  language name to display to the user


Parameters

string   $file   filename without the extension
   $filename  
[ Top ]



INST_sanitizePath [line 1204]

string INST_sanitizePath( string $path)

Filter path value for junk and injections



Tags:

return:  filtered path value


Parameters

string   $path   a path on the file system
[ Top ]



INST_setVersion [line 1164]

void INST_setVersion( string $siteconfig_path)

Set Geeklog version number in siteconfig.php and in the database



Parameters

string   $siteconfig_path   path to siteconfig.php
[ Top ]



INST_urlExists [line 510]

boolean INST_urlExists( string $url)

Check if URL exists

NOTE: This code is a modified copy from marufit at gmail dot com




Tags:

return:  True if URL exists, false if not


Parameters

string   $url   URL
[ Top ]



INST_writeConfig [line 379]

boolean INST_writeConfig( string $config_file, array $db)

Modify db-config.php



Tags:

return:  True if successful, false if not


Parameters

string   $config_file   Full path to db-config.php
array   $db   Database information to save
[ Top ]



mysql_v [line 253]

mixed mysql_v( $_DB_host, $_DB_user, $_DB_pass)

Returns the MySQL version



Tags:

return:  array[0..2] of the parts of the version number or false


Parameters

   $_DB_host  
   $_DB_user  
   $_DB_pass  
[ Top ]



php_v [line 220]

array php_v( )

Returns the PHP version

Note: Removes appendices like 'rc1', etc.




Tags:

return:  the 3 separate parts of the PHP version number


[ Top ]



Documentation generated on Wed, 17 Mar 2010 02:07:46 -0400 by phpDocumentor 1.4.3