[Linpha-cvs] SF.net SVN: linpha: [4480] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
From: <bz...@us...> - 2006-04-03 12:34:34
|
Revision: 4480 Author: bzrudi Date: 2006-04-03 05:34:20 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/linpha/?rev=4480&view=rev Log Message: ----------- minor improvements Modified Paths: -------------- trunk/linpha2/ChangeLog trunk/linpha2/install/header.php trunk/linpha2/install/lib.install.php trunk/linpha2/install/step6_selectdatabase.php trunk/linpha2/install/step8_testing.php Modified: trunk/linpha2/ChangeLog =================================================================== --- trunk/linpha2/ChangeLog 2006-04-03 11:31:55 UTC (rev 4479) +++ trunk/linpha2/ChangeLog 2006-04-03 12:34:20 UTC (rev 4480) @@ -1,6 +1,8 @@ 2006-04-03 bzrudi <linpha2_AT_tuxpower_DOT_de> * Installer should work now for all supported databases. -> finished language stuff + -> TODO: allow postgres install without password + : more help entries, better mysql non root install support 2006-04-02 flo * added integrity check (checks album, tmp and cache folder) Modified: trunk/linpha2/install/header.php =================================================================== --- trunk/linpha2/install/header.php 2006-04-03 11:31:55 UTC (rev 4479) +++ trunk/linpha2/install/header.php 2006-04-03 12:34:20 UTC (rev 4480) @@ -54,7 +54,7 @@ * make sure we don't have a include($_POST['language']) !!! */ $array_langs = get_available_language_files(); - $key = array_search( $_POST['language'], $array_langs); + $key = @array_search( $_POST['language'], $array_langs); if( $key === false ) { $include_lang = 'English'; @@ -71,6 +71,7 @@ else { $include_lang = 'English'; + $_SESSION['language'] = "English"; } if(file_exists(LINPHA_DIR."/install/lang/lang.".$include_lang.".php")) { Modified: trunk/linpha2/install/lib.install.php =================================================================== --- trunk/linpha2/install/lib.install.php 2006-04-03 11:31:55 UTC (rev 4479) +++ trunk/linpha2/install/lib.install.php 2006-04-03 12:34:20 UTC (rev 4480) @@ -280,11 +280,11 @@ } /* Sort language files aphabetically */ - if(is_array($options)) + if(@is_array($options)) { asort($options); } - return $options; + return @$options; } function get_http_accept_lang() Modified: trunk/linpha2/install/step6_selectdatabase.php =================================================================== --- trunk/linpha2/install/step6_selectdatabase.php 2006-04-03 11:31:55 UTC (rev 4479) +++ trunk/linpha2/install/step6_selectdatabase.php 2006-04-03 12:34:20 UTC (rev 4480) @@ -78,7 +78,7 @@ $result = mysql_query("CREATE DATABASE linpha_test_".$curtime); if($result) { - $able_to_create_database = true; + $_SESSION['allowed_to_create_db'] = true; mysql_query("DROP DATABASE linpha_test_".$curtime); $db_list = mysql_list_dbs($link); @@ -89,13 +89,13 @@ } else { - $able_to_create_database = false; + $_SESSION['allowed_to_create_db'] = false; } } break; case "postgres": - $able_to_create_database = false; + $_SESSION['allowed_to_create_db'] = false; break; // case "sqlite": sqlite goes directly to stage8 } @@ -116,7 +116,7 @@ <hr> <br /> <?php -if($able_to_create_database) +if($_SESSION['allowed_to_create_db'] == true) { /** * search a valid database name (which doesn't already exists) @@ -181,7 +181,7 @@ ?> <br /> <select name="sql_dbname_installinto"<?php - if($able_to_create_database) + if($_SESSION['allowed_to_create_db'] == true) { echo 'onChange="document.getElementById(\'radio_db2\').checked = true;"'; } @@ -204,13 +204,14 @@ <?php } -if(!$able_to_create_database AND !isset($database)) +if($_SESSION['allowed_to_create_db'] == false AND !isset($database)) { - echo tr("Install Linpha Into").":<br />"; + echo tr("Name Of Database To Use (Must Exist)").":<br />"; ?> <input type="text" name="sql_dbname_installinto" value="<?php echo isset($_SESSION['sql_dbname']) ? $_SESSION['sql_dbname'] : '' ; ?>"> + <?php } Modified: trunk/linpha2/install/step8_testing.php =================================================================== --- trunk/linpha2/install/step8_testing.php 2006-04-03 11:31:55 UTC (rev 4479) +++ trunk/linpha2/install/step8_testing.php 2006-04-03 12:34:20 UTC (rev 4480) @@ -122,7 +122,7 @@ $n_runs = 1; if($_SESSION['sql_dbtype']=="mysql") { - echo tr("Trying To Create New Database User")."... "; + echo tr("Trying To Create New LinPHA Database User")."... "; $random_pass = random_password(8); $random_user = "linpha_".random_password(4); @@ -137,16 +137,18 @@ "IDENTIFIED BY '".$random_pass."' WITH GRANT OPTION") ) { echo warning_msg(); - echo "<br />".tr("Failed To Create New User"); - echo "<br />".tr("Will use the one you specified for all linpha operations..."); + echo "<br />".tr("Failed To Create New LinPHA User"); + echo "<br />".tr("Seems you are not allowed to create new Database users - " . + "using given defaults (NOTE: Installation should still work)")."... "; } else { if(! $linpha->db->Execute("FLUSH PRIVILEGES") ) { echo warning_msg(); - echo "<br />".tr("Failed To Create New User"); - echo "<br />".tr("Will use the one you specified for all linpha operations..."); + echo "<br />".tr("Failed To Create New LinPHA User"); + echo "<br />".tr("Seems you are not allowed to create new Database users - " . + "using given defaults (NOTE: Installation should still work)")."... "; } else { @@ -157,8 +159,9 @@ if(! $test_conn->Connect($_SESSION['sql_hostname'], $random_user, $random_pass, $_SESSION['sql_dbname']) ) { echo warning_msg(); - echo "<br />".tr("Failed To Create New User"); - echo "<br />".tr("Will use the one you specified for all linpha operations..."); + echo "<br />".tr("Failed To Create New LinPHA User"); + echo "<br />".tr("Seems you are not allowed to create new Database users - " . + "using given defaults (NOTE: Installation should still work)")."... "; } else { @@ -178,8 +181,10 @@ */ /** * prevent test running sqlite db - * @todo why?? -flo + * @todo why?? -flo + * @todo - because at least alter will fail ;-) - bzrudi */ + if($_SESSION['sql_dbtype'] != 'sqlite') { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |