[Linpha-cvs] SF.net SVN: linpha: [4478] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
From: <bz...@us...> - 2006-04-03 11:24:20
|
Revision: 4478 Author: bzrudi Date: 2006-04-03 04:23:55 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/linpha/?rev=4478&view=rev Log Message: ----------- Installer should work now for all supported databases. Modified Paths: -------------- trunk/linpha2/ChangeLog trunk/linpha2/install/footer.php trunk/linpha2/install/header.php trunk/linpha2/install/header_html.php trunk/linpha2/install/index.php trunk/linpha2/install/lib.install.php trunk/linpha2/install/lib.requirements.php trunk/linpha2/install/manual_install.php trunk/linpha2/install/sql/sql.data.php trunk/linpha2/install/step10_postsettings.php trunk/linpha2/install/step1_license.php trunk/linpha2/install/step2_requirements.php trunk/linpha2/install/step3_dbtype.php trunk/linpha2/install/step4_selectdirectories.php trunk/linpha2/install/step5_getlogin.php trunk/linpha2/install/step6_selectdatabase.php trunk/linpha2/install/step7_selectprefix.php trunk/linpha2/install/step8_testing.php trunk/linpha2/install/step9_createtables.php Modified: trunk/linpha2/ChangeLog =================================================================== --- trunk/linpha2/ChangeLog 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/ChangeLog 2006-04-03 11:23:55 UTC (rev 4478) @@ -1,3 +1,7 @@ +2006-04-03 bzrudi <linpha2_AT_tuxpower_DOT_de> + * Installer should work now for all supported databases. + -> finished language stuff + 2006-04-02 flo * added integrity check (checks album, tmp and cache folder) * updated documentation, added todo list Modified: trunk/linpha2/install/footer.php =================================================================== --- trunk/linpha2/install/footer.php 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/install/footer.php 2006-04-03 11:23:55 UTC (rev 4478) @@ -21,6 +21,7 @@ /** * linpha installer + * @package Installation */ ?> <br /><br /> Modified: trunk/linpha2/install/header.php =================================================================== --- trunk/linpha2/install/header.php 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/install/header.php 2006-04-03 11:23:55 UTC (rev 4478) @@ -21,6 +21,7 @@ /** * linpha installer + * @package Installation */ include_once(LINPHA_DIR."/install/lib.install.php"); @@ -73,10 +74,7 @@ } if(file_exists(LINPHA_DIR."/install/lang/lang.".$include_lang.".php")) { - include_once(LINPHA_DIR."/install/lang/lang.English.php"); include_once(LINPHA_DIR."/install/lang/lang.".$include_lang.".php"); - } else { - include_once(LINPHA_DIR."/install/lang/lang.English.php"); } @@ -120,6 +118,7 @@ if($key == 0) { $show_back_button = false; + $back_file = $files[$key]; } else { Modified: trunk/linpha2/install/header_html.php =================================================================== --- trunk/linpha2/install/header_html.php 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/install/header_html.php 2006-04-03 11:23:55 UTC (rev 4478) @@ -21,6 +21,7 @@ /** * linpha installer + * @package Installation */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" Modified: trunk/linpha2/install/index.php =================================================================== --- trunk/linpha2/install/index.php 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/install/index.php 2006-04-03 11:23:55 UTC (rev 4478) @@ -19,6 +19,7 @@ /** * linpha installer + * @package Installation */ if(!defined('LINPHA_DIR')) { define('LINPHA_DIR','..'); } @@ -50,15 +51,33 @@ echo "<br /><select name='language' size='1'>"; $options = get_available_language_files(); -foreach($options AS $value) +if(is_array($options)) { - if($value == $lang) { - $checked = ' selected="selected"'; - } else { - $checked = ''; +/** + * always include enable English + */ +echo "<option value='English' selected='selected'>English</option>\n"; + + foreach($options AS $value) + { + if($value == $lang) { + $checked = ' selected="selected"'; + } + else + { + $checked = ''; + } + echo "<option value='".$value."'".$checked.">".$value."</option>\n"; } - echo "<option value='".$value."'".$checked.">".$value."</option>\n"; } +else +{ + /** + * no langauge other than English available + */ + echo "<option value='English' selected='selected'>English</option>\n"; +} + ?> </select> Modified: trunk/linpha2/install/lib.install.php =================================================================== --- trunk/linpha2/install/lib.install.php 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/install/lib.install.php 2006-04-03 11:23:55 UTC (rev 4478) @@ -23,6 +23,7 @@ * This simple method takes care of all translation related stuff. * If option tr_learn is set - all new entries will be autolearned. * @param string $text phrase/word to translate + * @package Installation */ function tr($text) { @@ -265,7 +266,7 @@ $file_handle = opendir($folder); $file = readdir($file_handle); - $options = array(); + //$options = array(); while($file != false) { $explode = explode(".",$file); @@ -279,8 +280,10 @@ } /* Sort language files aphabetically */ - asort($options); - + if(is_array($options)) + { + asort($options); + } return $options; } Modified: trunk/linpha2/install/lib.requirements.php =================================================================== --- trunk/linpha2/install/lib.requirements.php 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/install/lib.requirements.php 2006-04-03 11:23:55 UTC (rev 4478) @@ -1,8 +1,24 @@ <?php +/* +* Copyright (c) 2005 Heiko Rutenbeck <bz...@tu...> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ - /** -* @package requirements +* @package Installation */ function check_convert() { Modified: trunk/linpha2/install/manual_install.php =================================================================== --- trunk/linpha2/install/manual_install.php 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/install/manual_install.php 2006-04-03 11:23:55 UTC (rev 4478) @@ -21,15 +21,16 @@ /** * linpha installer + * @package Installation */ $is_special = true; $key = 9; -include_once(LINPHA_DIR."/install/header.php"); +include_once(LINPHA_DIR.'/install/header.php'); $back_file = "step3_dbtype.php"; -include_once("./header_html.php"); +include_once(LINPHA_DIR.'/install/header_html.php'); /** * initialize variables @@ -82,7 +83,7 @@ /** * get table names and add prefix */ - include_once(LINPHA_DIR."/install/sql/sql.tables.php"); + include_once(LINPHA_DIR.'/install/sql/sql.tables.php'); foreach($linpha_tables AS $key=>$value) { $linpha_tables[$key] = PREFIX.$value; Modified: trunk/linpha2/install/sql/sql.data.php =================================================================== --- trunk/linpha2/install/sql/sql.data.php 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/install/sql/sql.data.php 2006-04-03 11:23:55 UTC (rev 4478) @@ -19,6 +19,7 @@ /** * linpha installer + * @package Installation */ /** Modified: trunk/linpha2/install/step10_postsettings.php =================================================================== --- trunk/linpha2/install/step10_postsettings.php 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/install/step10_postsettings.php 2006-04-03 11:23:55 UTC (rev 4478) @@ -19,6 +19,7 @@ /** * linpha installer + * @package Installation */ if(!defined('LINPHA_DIR')) { define('LINPHA_DIR','..'); } Modified: trunk/linpha2/install/step1_license.php =================================================================== --- trunk/linpha2/install/step1_license.php 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/install/step1_license.php 2006-04-03 11:23:55 UTC (rev 4478) @@ -19,6 +19,7 @@ /** * linpha installer + * @package Installation */ if(!defined('LINPHA_DIR')) { define('LINPHA_DIR','..'); } Modified: trunk/linpha2/install/step2_requirements.php =================================================================== --- trunk/linpha2/install/step2_requirements.php 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/install/step2_requirements.php 2006-04-03 11:23:55 UTC (rev 4478) @@ -21,6 +21,7 @@ /** * linpha installer + * @package Installation */ include_once(LINPHA_DIR.'/install/header.php'); @@ -75,7 +76,7 @@ else { print_line_right(failed_msg()); - print_line_info("PHP Version >= 5.0.0 Required"); + print_line_info("PHP Version >= 5.0.0 is required"); $error = 1; } @@ -98,7 +99,8 @@ { print_line_middle("NONE"); print_line_right(failed_msg()); - print_line_info("Enable at least support for one Database in " . "your PHP configuration (php.ini)"); + print_line_info("Enable at least support for one Database in " . + "your PHP configuration file (php.ini)"); $error = 1; } else @@ -141,7 +143,9 @@ if($convert_version == "6.1.1" OR $convert_version == "6.1.2" OR $convert_version == "6.1.3") { print_line_right(warning_msg()); - print_line_info($convert_unsupported_msg); //TODO language + print_line_info("ImageMagick Versions 6.1.1 to 6.1.3 contain a bug " . + "which makes it unusable. Please consider using another " . + "Version or make use of GD library"); } else { @@ -225,7 +229,8 @@ { print_line_middle("No"); print_line_right(failed_msg()); - print_line_info($gd_jpg_missing_msg."<br />".$inst_linpha_not_work_correctly); //TODO language + print_line_info("Your GD Library lacks JPEG support, " . + "LinPHA will not support JPEG Images")."!"; $error = 1; } @@ -306,7 +311,10 @@ { print_line_middle($limit.' MB'); print_line_right(warning_msg()); - print_line_info($mem_limit_low_msg); + print_line_info("Your PHP memory limit is probably to low. If you " . + "encounter problems with creating thumbnails, try to increase " . + "the memory_limit in php.ini or resize your pictures to a " . + "lower resolution and try again."); } else { @@ -364,7 +372,7 @@ { print_line_middle("No"); print_line_right(failed_msg()); - print_line_info(sprintf($str_make_dir_writable,""<b>linpha/var</b>"")); //TODO language + print_line_info("Please make sure the directory /linpha/var/ is writeable"); $error = 1; } @@ -376,7 +384,7 @@ print_foot(); echo "<br />"; -echo tr("For More Detailed Info - Please Click On The Status Text")."<br />"; +echo tr("For more detailed info - Please click on the status info text above")."<br />"; ?> <a href="#" onclick="show_hide_tables('',<?php echo $table_lines; ?>)"> @@ -398,7 +406,7 @@ if(isset($error)) { echo "<h2>".tr("!!! INSTALLATION ABORTED !!!")."</h2><br />"; - echo "There was at least one serious error - continue at your own risk"; + echo tr("There was at least one serious error - continue at your own risk"); } include_once(LINPHA_DIR.'/install/footer.php'); Modified: trunk/linpha2/install/step3_dbtype.php =================================================================== --- trunk/linpha2/install/step3_dbtype.php 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/install/step3_dbtype.php 2006-04-03 11:23:55 UTC (rev 4478) @@ -21,6 +21,7 @@ /** * linpha installer + * @package Installation */ include_once(LINPHA_DIR.'/install/header.php'); Modified: trunk/linpha2/install/step4_selectdirectories.php =================================================================== --- trunk/linpha2/install/step4_selectdirectories.php 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/install/step4_selectdirectories.php 2006-04-03 11:23:55 UTC (rev 4478) @@ -19,6 +19,7 @@ /** * linpha installer + * @package Installation */ if(!defined('LINPHA_DIR')) { define('LINPHA_DIR','..'); } Modified: trunk/linpha2/install/step5_getlogin.php =================================================================== --- trunk/linpha2/install/step5_getlogin.php 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/install/step5_getlogin.php 2006-04-03 11:23:55 UTC (rev 4478) @@ -21,6 +21,7 @@ /** * linpha installer + * @package Installation */ include_once(LINPHA_DIR.'/install/header.php'); Modified: trunk/linpha2/install/step6_selectdatabase.php =================================================================== --- trunk/linpha2/install/step6_selectdatabase.php 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/install/step6_selectdatabase.php 2006-04-03 11:23:55 UTC (rev 4478) @@ -21,6 +21,7 @@ /** * linpha installer + * @package Installation */ include_once(LINPHA_DIR.'/install/header.php'); Modified: trunk/linpha2/install/step7_selectprefix.php =================================================================== --- trunk/linpha2/install/step7_selectprefix.php 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/install/step7_selectprefix.php 2006-04-03 11:23:55 UTC (rev 4478) @@ -21,6 +21,7 @@ /** * linpha installer + * @package Installation */ include_once(LINPHA_DIR.'/install/header.php'); @@ -31,7 +32,7 @@ */ if($_SESSION['sql_dbtype'] == "sqlite") { - $back_file = "step4_mode.php"; + $back_file = "step4_selectdirectories.php"; } include_once(LINPHA_DIR.'/install/header_html.php'); Modified: trunk/linpha2/install/step8_testing.php =================================================================== --- trunk/linpha2/install/step8_testing.php 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/install/step8_testing.php 2006-04-03 11:23:55 UTC (rev 4478) @@ -21,6 +21,7 @@ /** * linpha installer + * @package Installation */ include_once(LINPHA_DIR.'/install/header.php'); Modified: trunk/linpha2/install/step9_createtables.php =================================================================== --- trunk/linpha2/install/step9_createtables.php 2006-04-02 21:04:36 UTC (rev 4477) +++ trunk/linpha2/install/step9_createtables.php 2006-04-03 11:23:55 UTC (rev 4478) @@ -21,6 +21,7 @@ /** * linpha installer + * @package Installation */ include_once(LINPHA_DIR.'/install/header.php'); @@ -115,20 +116,19 @@ * create cache directories */ echo "<br /><br />".tr("Creating Directories")."... "; - mkdir( get_full_path( $_SESSION['cache_dir'] ), 0700 ); - mkdir(get_full_path( $_SESSION['cache_dir'] ).'img', 0700); - mkdir(get_full_path( $_SESSION['cache_dir'] ).'thumb', 0700); + @mkdir(get_full_path( $_SESSION['cache_dir'] ), 0700 ); + @mkdir(get_full_path( $_SESSION['cache_dir'] ).'img', 0700); + @mkdir(get_full_path( $_SESSION['cache_dir'] ).'thumb', 0700); /** * create tmp dirs */ - mkdir( get_full_path( $_SESSION['tmp_dir'] ), 0700 ); - //mkdir( get_full_path( $_SESSION['tmp_dir'] ).'adocache',0700 ); + @mkdir( get_full_path( $_SESSION['tmp_dir'] ), 0700 ); /** * create sql dir */ - mkdir( get_full_path( $_SESSION['sql_dir'] ), 0700 ); + @mkdir( get_full_path( $_SESSION['sql_dir'] ), 0700 ); echo success_msg(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |