install/install_utils.php

Show: inherited
    Table of Contents

    Functions

    functionaddDefaultRoles(  $defaultRoles = array() ) : void

    Parameters
    Name Type Description
    $defaultRoles
    functionadd_digits(  $quantity,  $string,  $min = 0,  $max = 9 ) : void

    Parameters
    Name Type Description
    $quantity
    $string
    $min
    $max
    functioncommitLanguagePack( bool $uninstall = false ) : array

    copies the temporary unzip'd files to their final destination removes unzip'd files from system if $uninstall=true

    Parameters
    Name Type Description
    $uninstall bool

    uninstall true if uninstalling a language pack

    Returns
    Type Description
    array sugar_config
    functioncommitModules(  $unlink = false,  $type = 'module' ) : void

    Parameters
    Name Type Description
    $unlink
    $type
    functioncommitPatch(  $unlink = false,  $type = 'patch' ) : void

    Parameters
    Name Type Description
    $unlink
    $type
    functioncopyFromArray( \intput_array $input_array, \needles $needles, \output_array $output_array ) : void

    given an array it will check to determine if the key exists in the array, if so it will addd to the return array

    Parameters
    Name Type Description
    $input_array \intput_array

    haystack to check

    $needles \needles

    list of needles to search for

    $output_array \output_array

    the array to add the keys to

    functioncreateEmailAddress( ) : string

    creates a random email address

    Returns
    Type Description
    string
    functioncreateWebAddress( ) : void

    creates a random, DNS-clean webaddress

    functioncreate_current_date_time( ) : void

    functioncreate_date(  $year = null,  $mnth = null,  $day = null ) : void

    Parameters
    Name Type Description
    $year
    $mnth
    $day
    functioncreate_db_user_creds(  $numChars = 10 ) : void

    Parameters
    Name Type Description
    $numChars
    functioncreate_default_users( ) : void

    functioncreate_past_date( ) : void

    functioncreate_phone_number( ) : void

    functioncreate_table_if_not_exist(  $focus ) : void

    Parameters
    Name Type Description
    $focus
    functioncreate_time(  $hr = null,  $min = null,  $sec = null ) : void

    Parameters
    Name Type Description
    $hr
    $min
    $sec
    functioncreate_writable_dir(  $dirname ) : void

    Parameters
    Name Type Description
    $dirname
    functiondrop_table_install(  $focus ) : void

    Drop old tables if table exists and told to drop it

    Parameters
    Name Type Description
    $focus
    functionenableInsideViewConnector( ) : void

    Enable the InsideView connector for the four default modules.

    functionenableSugarFeeds( ) : void

    Fully enable SugarFeeds, enabling the user feed and all available modules that have SugarFeed data.

    functionextractFile(  $zip_file,  $file_in_zip,  $base_tmp_upgrade_dir ) : void

    Parameters
    Name Type Description
    $zip_file
    $file_in_zip
    $base_tmp_upgrade_dir
    functionextractManifest(  $zip_file,  $base_tmp_upgrade_dir ) : void

    Parameters
    Name Type Description
    $zip_file
    $base_tmp_upgrade_dir
    functiongetDbConnection( ) : void

    functiongetHostPortFromString(  $hostname = '' ) : void

    Parameters
    Name Type Description
    $hostname
    functiongetInstallDbInstance( ) : void

    functiongetInstallType(  $type_string ) : void

    Parameters
    Name Type Description
    $type_string
    functiongetInstalledLangPacks(  $showButtons = true ) : void

    Parameters
    Name Type Description
    $showButtons
    functiongetInstalledLanguages( ) : array

    finds all installed languages and returns an array with the names

    Returns
    Type Description
    array langs array of installed languages
    functiongetLangPacks(  $display_commit = true,  $types = array('langpack'),  $notice_text = '' ) : string

    searches upgrade dir for lang pack files.

    Parameters
    Name Type Description
    $display_commit
    $types
    $notice_text
    Returns
    Type Description
    string HTML of available lang packs
    functiongetLanguagePackName(  $the_file ) : void

    Parameters
    Name Type Description
    $the_file
    functiongetLicenseContents(  $filename ) : void

    Parameters
    Name Type Description
    $filename
    functiongetLicenseDisplay(  $type,  $manifest,  $zipFile,  $next_step,  $license_file,  $clean_file ) : void

    Parameters
    Name Type Description
    $type
    $manifest
    $zipFile
    $next_step
    $license_file
    $clean_file
    functiongetPackButton( string $type, string $manifest, string $zipFile, int $next_step,  $uninstallable = 'Yes',  $showButtons = true ) : string

    creates the remove/delete form for langpack page

    Parameters
    Name Type Description
    $type string

    type commit/remove

    $manifest string

    manifest path to manifest file

    $zipFile string

    zipFile path to uploaded zip file

    $next_step int

    nextstep current step

    $uninstallable
    $showButtons
    Returns
    Type Description
    string ret <form> for this package
    functiongetSugarConfigLanguageArray(  $langZip ) : void

    Parameters
    Name Type Description
    $langZip
    functionget_boolean_from_request(  $field ) : void

    Parameters
    Name Type Description
    $field
    functionget_help_button_url( ) : void

    functionhandleDbCharsetCollation( ) : void

    ensures that the charset and collation for a given database is set MYSQL ONLY

    functionhandleDbCreateDatabase( ) : void

    creates the new database

    functionhandleDbCreateSugarUser( ) : void

    creates the Sugar DB user (if not admin)

    functionhandleHtaccess( ) : void

    (re)write the .htaccess file to prevent browser access to the log file

    functionhandleLog4Php( ) : void

    handles creation of Log4PHP properties file This function has been deprecated. Use SugarLogger.

    functionhandleSugarConfig( ) : array

    takes session vars and creates config.php

    Returns
    Type Description
    array bottle collection of error messages
    functionhandleWebConfig( ) : void

    (re)write the web.config file to prevent browser access to the log file

    functioninsert_default_settings( ) : void

    functioninstallLog(  $entry ) : void

    Parameters
    Name Type Description
    $entry
    functioninstallerHook( string $function_name,  $options = array() ) : mixed

    Calls a custom function (if it exists) based on the first parameter, and returns result of function call, or 'undefined' if the function doesn't exist

    Parameters
    Name Type Description
    $function_name string

    function name to call in custom install hooks

    $options
    Returns
    Type Description
    mixed function call result, or 'undefined'
    functionlangPackFinalMove( object $file ) : bool

    handles language pack uploads - code based off of upload_file->final_move() puts it into the cache/upload dir to be handed off to langPackUnpack();

    Parameters
    Name Type Description
    $file object

    file UploadFile object

    Returns
    Type Description
    bool true if successful
    functionlangPackUnpack(  $unpack_type,  $full_file ) : void

    Parameters
    Name Type Description
    $unpack_type
    $full_file
    functionmake_writable(  $file ) : void

    Parameters
    Name Type Description
    $file
    functionparseAcceptLanguage( ) : string

    returns lowercase lang encoding

    Returns
    Type Description
    string encoding or blank on false
    functionpost_install_modules( ) : void

    This method will look for a file modules_post_install.php in the root directory and based on the contents of this file, it will silently install any modules as specified in this array.

    functionprint_debug_array(  $name,  $debug_array ) : void

    Parameters
    Name Type Description
    $name
    $debug_array
    functionprint_debug_comment( ) : void

    functionpullSilentInstallVarsIntoSession( ) : void

    functionrecursive_is_writable(  $start_file ) : void

    Parameters
    Name Type Description
    $start_file
    functionrecursive_make_writable(  $start_file ) : void

    Parameters
    Name Type Description
    $start_file
    functionremoveConfig_SIFile( ) : void

    functionremoveLanguagePack( ) : void

    removes the installed language pack, but the zip is still in the cache dir

    functionset_admin_password(  $password ) : void

    Parameters
    Name Type Description
    $password
    functionstripslashes_checkstrings(  $value ) : void

    Parameters
    Name Type Description
    $value
    functionuninstallLangPack( ) : void

    uninstalls the Language pack

    functionuninstallLanguagePack( ) : void

    functionunlinkTempFiles(  $manifest = '',  $zipFile = '' ) : void

    Parameters
    Name Type Description
    $manifest
    $zipFile
    functionupdateUpgradeHistory( ) : void

    creates UpgradeHistory entries

    functionupdate_license_settings(  $users,  $expire_date,  $key,  $num_lic_oc ) : void

    Parameters
    Name Type Description
    $users
    $expire_date
    $key
    $num_lic_oc
    functionvalidate_dbConfig( ) : void

    functionvalidate_manifest(  $manifest ) : void

    Parameters
    Name Type Description
    $manifest
    functionvalidate_offlineClientConfig( ) : void

    functionvalidate_siteConfig(  $type ) : void

    Parameters
    Name Type Description
    $type
    functionvalidate_systemOptions( ) : void

    functionwriteSugarConfig( array $sugar_config ) : void

    takes the current value of $sugar_config and writes it out to config.php (sorta the same as the final step)

    Parameters
    Name Type Description
    $sugar_config array

    sugar_config

    Documentation was generated by DocBlox 0.18.1.