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 79]





SUPPORTED_MYSQL_VER [line 68]

SUPPORTED_MYSQL_VER = '4.0.18'

[ Top ]



SUPPORTED_PHP_VER [line 65]

SUPPORTED_PHP_VER = '5.2.0'

[ Top ]



VERSION [line 59]

VERSION = '1.8.0'
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 572]

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 635]

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 427]

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 439]

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 471]

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_dbPasswordCheck [line 1294]

boolean INST_dbPasswordCheck( string $site_url, array $db)

Check for blank database password in production environment



Tags:

return:  True if password is set or it is a local server


Parameters

array   $db   Database information
string   $site_url   The site's URL
[ Top ]



INST_fixPathsAndUrls [line 989]

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 310]

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 1073]

void INST_getAdminPath( )

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



[ Top ]



INST_getAlertMsg [line 600]

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 201]

string INST_getFooter( )

Returns the ending HTML for the installer theme.



Tags:

return:  Footer HTML code


[ Top ]



INST_getHeader [line 131]

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 1056]

void INST_getHtmlPath( )

Helper function: Derive 'path_html' from __FILE__



[ Top ]



INST_getLanguage [line 1128]

string INST_getLanguage( )

Get name of the install language file to use



Tags:

return:  language file name (without the extension)


[ Top ]



INST_getPluginInfo [line 708]

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 1108]

void INST_getSiteAdminUrl( )

Helper function: Derive 'site_admin_url' from PHP_SELF



[ Top ]



INST_getSiteUrl [line 1090]

void INST_getSiteUrl( )

Helper function: Derive 'site_url' from PHP_SELF



[ Top ]



INST_getUploadError [line 531]

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 326]

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 1223]

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 282]

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 231]

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 742]

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 343]

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 1199]

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 1159]

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 505]

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 377]

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 251]

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 218]

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 Sat, 11 Feb 2012 02:08:20 -0500 by phpDocumentor 1.4.3