aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2010-03-26 15:44:48 +0000
committerpatdenice <patdenice@piwigo.org>2010-03-26 15:44:48 +0000
commit29a08d54e79a49661ab17184b40c4ae872e1976e (patch)
tree1a723bb711b0d4fc62e13dce17cbea7677458ba3
parent502689a319bacf98637d46a0d138f7722cdd000a (diff)
Fix php5 apache configuration with install.
Fix php5 apache configuration display. git-svn-id: http://piwigo.org/svn/trunk@5384 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/functions_install.inc.php17
-rw-r--r--install.php18
-rw-r--r--install/php5_apache_configuration.php44
-rw-r--r--language/cs_CZ/iso.txt2
-rw-r--r--language/es_AR/iso.txt2
5 files changed, 62 insertions, 21 deletions
diff --git a/admin/include/functions_install.inc.php b/admin/include/functions_install.inc.php
index 8d00a4d36..d55f4e057 100644
--- a/admin/include/functions_install.inc.php
+++ b/admin/include/functions_install.inc.php
@@ -138,4 +138,21 @@ function activate_all_themes()
$themes->perform_action('activate', $theme_id);
}
}
+
+function try_db_connection(&$infos, &$errors)
+{
+ try
+ {
+ $pwg_db_link = pwg_db_connect($_POST['dbhost'], $_POST['dbuser'],
+ $_POST['dbpasswd'], $_POST['dbname']);
+
+ array_push( $infos, l10n('Parameters are correct') );
+ return true;
+ }
+ catch (Exception $e)
+ {
+ array_push( $errors, l10n($e->getMessage()));
+ }
+ return false;
+}
?> \ No newline at end of file
diff --git a/install.php b/install.php
index 926dddc67..9314253ef 100644
--- a/install.php
+++ b/install.php
@@ -24,8 +24,6 @@
//----------------------------------------------------------- include
define('PHPWG_ROOT_PATH','./');
-include(PHPWG_ROOT_PATH . 'admin/include/functions_install.inc.php');
-
@set_magic_quotes_runtime(0); // Disable magic_quotes_runtime
//
// addslashes to vars if magic_quotes_gpc is off this is a security
@@ -182,7 +180,6 @@ elseif (@file_exists($config_file))
}
}
-include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$dblayer.'.inc.php');
include(PHPWG_ROOT_PATH . 'include/constants.php');
include(PHPWG_ROOT_PATH . 'include/functions.inc.php');
include(PHPWG_ROOT_PATH . 'admin/include/functions.php');
@@ -260,15 +257,13 @@ if (!isset($step))
$step = 1;
}
//---------------------------------------------------------------- form analyze
+include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$dblayer.'.inc.php');
+include(PHPWG_ROOT_PATH . 'admin/include/functions_install.inc.php');
+
if ( isset( $_POST['install'] ))
{
- try
+ if (try_db_connection($infos, $errors))
{
- $pwg_db_link = pwg_db_connect($_POST['dbhost'], $_POST['dbuser'],
- $_POST['dbpasswd'], $_POST['dbname']);
-
- array_push( $infos, l10n('Parameters are correct') );
-
$required_version = constant('REQUIRED_'.strtoupper($dblayer).'_VERSION');
if ( version_compare(pwg_get_db_version(), $required_version, '>=') )
{
@@ -295,10 +290,7 @@ if ( isset( $_POST['install'] ))
}
}
}
- catch (Exception $e)
- {
- array_push( $errors, l10n($e->getMessage()));
- }
+
$webmaster = trim(preg_replace( '/\s{2,}/', ' ', $admin_name ));
if ( empty($webmaster))
array_push( $errors, l10n('enter a login for webmaster') );
diff --git a/install/php5_apache_configuration.php b/install/php5_apache_configuration.php
index 6e8e284e6..3c117b0c6 100644
--- a/install/php5_apache_configuration.php
+++ b/install/php5_apache_configuration.php
@@ -79,12 +79,44 @@ function openPage()
<link rel="stylesheet" type="text/css" href="admin/themes/roma/default-colors.css">
<link rel="stylesheet" type="text/css" href="admin/themes/roma/theme.css">
<style type="text/css">
+body {
+ background:url("admin/themes/roma/images/bottom-left-bg.jpg") no-repeat fixed left bottom #111111;
+}
+
.content {
- width: 800px;
- min-height: 0px !important;
- margin: auto;
- padding: 25px;
- text-align: left;
+ background:url("admin/themes/roma/images/fillet.png") repeat-x scroll left top #222222;
+ width: 800px;
+ min-height: 0px !important;
+ margin: auto;
+ text-align: left;
+ padding: 25px;
+}
+
+#headbranch {
+ background:url("admin/themes/roma/images/top-left-bg.jpg") no-repeat scroll left top transparent;
+}
+
+#theHeader {
+ display: block;
+ background:url("admin/themes/roma/images/piwigo_logo_sombre_214x100.png") no-repeat scroll 245px top transparent;
+}
+
+.content h2 {
+ display:block;
+ font-size:28px;
+ height:104px;
+ width:54%;
+ color:#666666;
+ letter-spacing:-1px;
+ margin:0 30px 3px 20px;
+ overflow:hidden;
+ position:absolute;
+ right:0;
+ text-align:right;
+ top:0;
+ width:770px;
+ text-align:right;
+ text-transform:none;
}
table { margin: 0 0 15px 0; }
@@ -142,7 +174,7 @@ else
<td>'.l10n('Language').'</td>
<td>
<select name="language" onchange="document.location = \''.$script.'.php?language=\'+this.options[this.selectedIndex].value;">';
- foreach (get_languages('utf-8') as $code => $name)
+ foreach ($languages->fs_languages as $code => $name)
{
echo '
<option label="'.$name.'" value="'.$code.'" '.($code == $language ? 'selected="selected"' : '') .'>'.$name.'</option>';
diff --git a/language/cs_CZ/iso.txt b/language/cs_CZ/iso.txt
index f62ab3fb0..4b3dd8e80 100644
--- a/language/cs_CZ/iso.txt
+++ b/language/cs_CZ/iso.txt
@@ -1 +1 @@
-Česky [CZ]
+Česky [CZ] \ No newline at end of file
diff --git a/language/es_AR/iso.txt b/language/es_AR/iso.txt
index 6a4c7be24..1d7b38c82 100644
--- a/language/es_AR/iso.txt
+++ b/language/es_AR/iso.txt
@@ -1 +1 @@
-Español [AR]
+Español [AR] \ No newline at end of file