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

Source for file install_bit_settings.php

Documentation is available at install_bit_settings.php

  1. <?php
  2. /**
  3.  * @version $Header$
  4.  * @package install
  5.  * @subpackage functions
  6.  */
  7.  
  8. // Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
  9. // All Rights Reserved. See below for details and a complete list of authors.
  10. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
  11.  
  12. /**
  13.  * assign next step in installation process
  14.  */ 
  15. $gBitSmarty->assign'next_step',$step );
  16.  
  17. /**
  18.  * simple_set_value
  19.  */
  20. function simple_set_value$package$feature {
  21.     global $_REQUEST$gBitSystem$gBitSmarty;
  22.     ifisset$_REQUEST[$feature) ) {
  23.         $gBitSystem->storeConfig$feature$_REQUEST[$feature]$package );
  24.         $gBitSmarty->assign$feature$_REQUEST[$feature);
  25.     }
  26. }
  27.  
  28. // pass all package data to template
  29. $gBitSmarty->assign_by_ref'schema'$gBitInstaller->mPackages );
  30.  
  31. // settings that aren't just toggles
  32. $formInstallValues array(
  33.     'bit_index'          => 'kernel',
  34.     'kernel_server_name' => 'kernel',
  35.     'site_title'         => 'kernel',
  36.     'site_slogan'        => 'kernel',
  37.     'bitlanguage'        => 'languages',
  38. );
  39.  
  40. $processors array();
  41. ifextension_loaded'gd' ) ) {
  42.     $processors['gd''<strong>GD Library</strong> [php-gd]';
  43. }
  44. ifextension_loaded'imagick' ) ) {
  45.     $processors['imagick''<strong>Image Magick</strong> [php-imagick] - recommended';
  46. }
  47. ifextension_loaded'magickwand' ) ) {
  48.     $processors['magickwand''<strong>MagickWand</strong> [php-magickwand] - highly recommended';
  49. }
  50. ifcount$processors {
  51.     $gBitSmarty->assign'processors'$processors );
  52.     $formInstallValues['image_processor''liberty';
  53. }
  54.  
  55. // list of available site styles
  56. $subDirs array'style_info''alternate' );
  57. $stylesList $gBitThemes->getStylesListNULLNULL$subDirs );
  58. $gBitSmarty->assign_by_ref"stylesList"$stylesList );
  59.  
  60. // get list of available languages
  61. $languages array();
  62. $languages $gBitLanguage->listLanguages();
  63. $gBitSmarty->assign_by_ref("languages",$languages );
  64.  
  65. // process form
  66. ifisset$_REQUEST['bit_settings') ) {
  67.     foreach$formInstallValues as $item => $package{
  68.         simple_set_value$package$item );
  69.     }
  70.  
  71.     ifempty$_REQUEST['bitlanguage') ) {
  72.         $_REQUEST['bitlanguage''en';
  73.     }
  74.  
  75.     if!empty$_REQUEST["site_style") ) {
  76.         $gBitSystem->storeConfig'style'$_REQUEST["site_style"]THEMES_PKG_NAME );
  77.     };
  78.  
  79.     if!array_key_exists$_REQUEST['bitlanguage']$languages ) ) {
  80.         $languages[$_REQUEST['bitlanguage']] '';
  81.     }
  82.  
  83.     $gBitLanguage->setLanguage$_REQUEST['bitlanguage');
  84.     $gBitSmarty->assign"siteLanguage",$languages[$_REQUEST['bitlanguage']] );
  85.     // advance a step in the installer
  86.     $app '_done';
  87.     $gBitSmarty->assign'next_step',$step );
  88. elseifisset$_REQUEST['skip') ) {
  89.     $goto $step 1;
  90.     header"Location: ".INSTALL_PKG_URL."install.php?step=$goto);
  91. }
  92.  
  93. // get list of foreign packages that are ready to be installed
  94. // @TODO this isn't working yet, since the info stuff isn't read from schema_inc.php on this page
  95. $foreign_packages array();
  96. foreach$gBitSystem->mPackages as $package {
  97.     ifisset$package['info']['install') ) {
  98.         $foreign_packages[$package;
  99.     }
  100. }
  101. if defined'ROLE_MODEL' ) ) {
  102.     $gBitSmarty->assign"role_model"TRUE );
  103. }
  104. $gBitSmarty->assign"foreign_packages"$foreign_packages );
  105. ?>

Documentation generated on Wed, 29 Jul 2015 13:56:42 +0000 by phpDocumentor 1.5.0-lsces