Xaraya / Postnuke CVS Notices - Message

Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites

View Statistics - Next Notice - Previous Notice

Directory filter : [ all ] / postnuke_official / html / modules / installer [ view in CVS ]


Deprecated: Function gmstrftime() is deprecated in /home/mikespub/www/list.php on line 509
Date Directory [filter] File(s) [view] Author [filter]
04 Aug 2002 04:31:33postnuke_official/html/modules/installerpnadmin.php,1.2,1.3Paul Rosania
 bootstraps successfully

Update of /home/cvsroot/postnuke_official/html/modules/installer
In directory ns7.hostnuke.net:/tmp/cvs-serv24302

Modified Files:
	pnadmin.php 
Log Message:
bootstraps successfully


Index: pnadmin.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/modules/installer/pnadmin.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pnadmin.php	4 Aug 2002 02:38:59 -0000	1.2
--- pnadmin.php	4 Aug 2002 04:31:30 -0000	1.3
***************
*** 26,153 ****
  // entry point for the installer
  
! function installer_adminapi_phase1() {
!     return array('languages' => array('eng' => 'English'));
! }
! 
! function installer_adminapi_phase2() {
!     return array();
! }
! 
! function installer_adminapi_phase3() {
!     global $HTTP_POST_VARS;
!     if ($HTTP_POST_VARS['agree'] != 'agree') {
!         // didn't agree to license, don't install
!         pnRedirect('install.php');
      }
      
      return array();
  }
  
! function installer_adminapi_phase4() {
!     return array('database_host' => 'localhost',
!                  'database_username' => 'root',
!                  'database_password' => '',
!                  'database_name' => 'Ragnarok',
!                  'database_prefix' => 'pn',
!                  'database_types' => array('mysql'    => 'MySQL',
!                                            'postgres' => 'Postgres'));
! }
! 
! function installer_adminapi_phase5() {
!     global $HTTP_POST_VARS;
!     
!     $dbhost = $HTTP_POST_VARS['install_database_host'];
!     $dbname = $HTTP_POST_VARS['install_database_name'];
!     $dbuser = $HTTP_POST_VARS['install_database_username'];
!     $dbpass = $HTTP_POST_VARS['install_database_password'];
!     $prefix = $HTTP_POST_VARS['install_database_prefix'];
!     $dbtype = $HTTP_POST_VARS['install_database_type'];
!     
!     if (isset($HTTP_POST_VARS['install_create_database'])) {
!         $create = true;
!     } else {
!         $create = false;
!     }
!     
!     if (isset($HTTP_POST_VARS['install_intranet'])) {
!         $intranet = true;
!     } else {
!         $intranet = false;
!     }
! 
!     // Save config data
!     installer_adminapi_modifyconfig($dbhost, $dbuser, $dbpass, $dbname, $prefix, $dbtype);
!     
!     // Kick it
!     pnInit(_PNINIT_LOAD_DATABASE);
!     
!     // Initialize *minimal* tableset
!     // Load the installer module, the hard way - file check too
!     $base_init_file = 'modules/base/pninit.php';
! 
!     if (file_exists($base_init_file)) {
!         include_once ($base_init_file);
!     } else {
!         // modules/base/pninit.php not found?!
!         pnExceptionSet(PN_SYSTEM_EXCEPTION, 'MODULE_FILE_NOT_EXIST',
!                        new SystemException(__FILE__."(".__LINE__."): Module file $base_init_file doesn't exist."));return;
!     }
!     
!     // Run the function, check for existence
!     $mod_func = 'base_init';
! 
!     if (function_exists($mod_func)) {
!         $res = $mod_func();
!         // Handle exceptions
!         if (pnExceptionMajor() != PN_NO_EXCEPTION) {
!             return;
!         }
!         if ($res == false) {
!             // exception
!             pnExceptionSet(PN_SYSTEM_EXCEPTION, 'UNKNOWN',
!                            new SystemException(__FILE__.'('.__LINE__.'): core initialization failed!'));return;
!         }
!     } else {
!         // base_init() not found?!
!         pnExceptionSet(PN_SYSTEM_EXCEPTION, 'MODULE_FUNCTION_NOT_EXIST',
!                        new SystemException(__FILE__."(".__LINE__."): Module API function $mod_func doesn't exist."));return;
!     }
!     
!     // log user in
!     
!     pnRedirect('index.php?module=installer&type=admin&func=phase5');
! }
! 
! function installer_admin_phase5()
! {
      return array();
  }
  
  function installer_admin_modifyconfig(){}
- 
- // Update database information in config.php
- // TODO: EXCEPTIONS!!
- function installer_adminapi_modifyconfig($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype)
- {
-     $config_php = join('', file('config.php'));
-     
-     if (isset($HTTP_ENV_VARS['OS']) && strstr($HTTP_ENV_VARS['OS'], 'Win')) {
-         $system = 1;
-     } else {
-         $system = 0;
-     }
- 
-     $config_php = ereg_replace('\[\'dbtype\'\]\s*=\s*(\'|\")(.*)\\1;', "['dbtype'] = '$dbtype';", $config_php);
-     $config_php = ereg_replace('\[\'dbhost\'\]\s*=\s*(\'|\")(.*)\\1;', "['dbhost'] = '$dbhost';", $config_php);
-     $config_php = ereg_replace('\[\'dbuname\'\]\s*=\s*(\'|\")(.*)\\1;', "['dbuname'] = '$dbuname';", $config_php);
-     $config_php = ereg_replace('\[\'dbpass\'\]\s*=\s*(\'|\")(.*)\\1;', "['dbpass'] = '$dbpass';", $config_php);
-     $config_php = ereg_replace('\[\'dbname\'\]\s*=\s*(\'|\")(.*)\\1;', "['dbname'] = '$dbname';", $config_php);
-     $config_php = ereg_replace('\[\'prefix\'\]\s*=\s*(\'|\")(.*)\\1;', "['prefix'] = '$prefix';", $config_php);
-     $config_php = ereg_replace('\[\'system\'\]\s*=\s*(\'|\")(.*)\\1;', "['system'] = '$system';", $config_php);
- 
-     $fp = fopen ('config.php', 'w+');
-     fwrite ($fp, $config_php);
-     fclose ($fp);
- }
  
  ?>
--- 26,46 ----
  // entry point for the installer
  
! function installer_admin_bootstrap()
! {
!     $res = pnUserLogIn('admin', 'password', false);
!     if (!isset($res) && pnExceptionMajor() != PN_NO_EXCEPTION) {
!         return;
      }
      
+     pnRedirect(pnModURL('installer', 'admin', 'create_administrator'));
      return array();
  }
  
! function installer_admin_create_administrator()
! {echo 'logged in? '.pnUserLoggedIn();
      return array();
  }
  
  function installer_admin_modifyconfig(){}
  
  ?>


Directory filter : [ all ] / postnuke_official / html / modules / installer [ view in CVS ]

View Statistics - Next Notice - Previous Notice


Visit Developer Site - Browse CVS Repository Syndicate via backend.rss
(max. once per hour please)
Powered by CVSNotice 0.1.3