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





SUPPORTED_MYSQL_VER [line 68]

SUPPORTED_MYSQL_VER = '4.1.3'

[ Top ]



SUPPORTED_PHP_VER [line 65]

SUPPORTED_PHP_VER = '5.2.0'

[ Top ]



VERSION [line 59]

VERSION = '2.1.2'
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_checkCacheDir [line 1406]

void INST_checkCacheDir( $path, $template, $classCounter)



Parameters

   $path  
   $template  
   $classCounter  
[ Top ]



INST_checkPlugins [line 591]

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

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

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_cleanString [line 1365]

string INST_cleanString( string $str)

Returns a cleaned string



Parameters

string   $str  
[ Top ]



INST_clearCache [line 1394]

void INST_clearCache( [ $plugin = ''])



Parameters

   $plugin  
[ Top ]



INST_clearCacheDirectories [line 1373]

void INST_clearCacheDirectories( $path, [ $needle = ''])



Parameters

   $path  
   $needle  
[ Top ]



INST_dbConnect [line 458]

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

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

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

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

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

void INST_getAdminPath( )

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



[ Top ]



INST_getAlertMsg [line 618]

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

string INST_getFooter( )

Returns the ending HTML for the installer theme.



Tags:

return:  Footer HTML code


[ Top ]



INST_getHeader [line 151]

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

void INST_getHtmlPath( )

Helper function: Derive 'path_html' from __FILE__



[ Top ]



INST_getLanguage [line 1153]

string INST_getLanguage( )

Get name of the install language file to use



Tags:

return:  language file name (without the extension)


[ Top ]



INST_getPluginInfo [line 730]

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

void INST_getSiteAdminUrl( )

Helper function: Derive 'site_admin_url' from PHP_SELF



[ Top ]



INST_getSiteUrl [line 1116]

void INST_getSiteUrl( )

Helper function: Derive 'site_url' from PHP_SELF



[ Top ]



INST_getUploadError [line 551]

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_guessCookiePath [line 1340]

string INST_guessCookiePath( string $site_url)

Returns a cookie path for a site URL



Tags:

return:  a cookie path


Parameters

string   $site_url   site URL
[ Top ]



INST_helpLink [line 349]

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

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

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_nl2br [line 1448]

string INST_nl2br( string $string)

Replaces all newlines in a string with
or
, depending on the detected setting. Ported from "lib-common.php"



Tags:

return:  The modified string


Parameters

string   $string   The string to modify
[ Top ]



INST_phpOutOfDate [line 247]

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

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

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

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

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

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

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

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 ]



Documentation generated on Sun, 02 Oct 2016 07:51:26 +0000 by phpDocumentor 1.4.3