Changeset 5384


Ignore:
Timestamp:
Mar 26, 2010, 4:44:48 PM (14 years ago)
Author:
patdenice
Message:

Fix php5 apache configuration with install.
Fix php5 apache configuration display.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions_install.inc.php

    r5340 r5384  
    139139  }
    140140}
     141
     142function try_db_connection(&$infos, &$errors)
     143{
     144  try
     145  {
     146    $pwg_db_link = pwg_db_connect($_POST['dbhost'], $_POST['dbuser'],
     147                                  $_POST['dbpasswd'], $_POST['dbname']);
     148 
     149    array_push( $infos, l10n('Parameters are correct') );
     150    return true;
     151  }
     152  catch (Exception $e)
     153  {
     154    array_push( $errors, l10n($e->getMessage()));
     155  }
     156  return false;
     157}
    141158?>
  • trunk/install.php

    r5357 r5384  
    2525define('PHPWG_ROOT_PATH','./');
    2626
    27 include(PHPWG_ROOT_PATH . 'admin/include/functions_install.inc.php');
    28 
    2927@set_magic_quotes_runtime(0); // Disable magic_quotes_runtime
    3028//
     
    183181}
    184182
    185 include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$dblayer.'.inc.php');
    186183include(PHPWG_ROOT_PATH . 'include/constants.php');
    187184include(PHPWG_ROOT_PATH . 'include/functions.inc.php');
     
    261258}
    262259//---------------------------------------------------------------- form analyze
     260include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$dblayer.'.inc.php');
     261include(PHPWG_ROOT_PATH . 'admin/include/functions_install.inc.php');
     262
    263263if ( isset( $_POST['install'] ))
    264264{
    265   try
    266   {
    267     $pwg_db_link = pwg_db_connect($_POST['dbhost'], $_POST['dbuser'],
    268                                   $_POST['dbpasswd'], $_POST['dbname']);
    269  
    270     array_push( $infos, l10n('Parameters are correct') );
    271    
     265  if (try_db_connection($infos, $errors))
     266  {
    272267    $required_version = constant('REQUIRED_'.strtoupper($dblayer).'_VERSION');
    273268    if ( version_compare(pwg_get_db_version(), $required_version, '>=') )
     
    296291    }
    297292  }
    298   catch (Exception $e)
    299   {
    300     array_push( $errors, l10n($e->getMessage()));
    301   }
     293
    302294  $webmaster = trim(preg_replace( '/\s{2,}/', ' ', $admin_name ));
    303295  if ( empty($webmaster))
  • trunk/install/php5_apache_configuration.php

    r5196 r5384  
    8080<link rel="stylesheet" type="text/css" href="admin/themes/roma/theme.css">
    8181<style type="text/css">
     82body {
     83  background:url("admin/themes/roma/images/bottom-left-bg.jpg") no-repeat fixed left bottom #111111;
     84}
     85
    8286.content {
    83   width: 800px;
    84   min-height: 0px !important;
    85   margin: auto;
    86   padding: 25px;
    87   text-align: left;
     87 background:url("admin/themes/roma/images/fillet.png") repeat-x scroll left top #222222;
     88 width: 800px;
     89 min-height: 0px !important;
     90 margin: auto;
     91 text-align: left;
     92 padding: 25px;
     93}
     94
     95#headbranch  {
     96  background:url("admin/themes/roma/images/top-left-bg.jpg") no-repeat scroll left top transparent;
     97}
     98
     99#theHeader {
     100  display: block;
     101  background:url("admin/themes/roma/images/piwigo_logo_sombre_214x100.png") no-repeat scroll 245px top transparent;
     102}
     103
     104.content h2 {
     105  display:block;
     106  font-size:28px;
     107  height:104px;
     108  width:54%;
     109  color:#666666;
     110  letter-spacing:-1px;
     111  margin:0 30px 3px 20px;
     112  overflow:hidden;
     113  position:absolute;
     114  right:0;
     115  text-align:right;
     116  top:0;
     117  width:770px;
     118  text-align:right;
     119  text-transform:none;
    88120}
    89121
     
    143175    <td>
    144176      <select name="language" onchange="document.location = \''.$script.'.php?language=\'+this.options[this.selectedIndex].value;">';
    145   foreach (get_languages('utf-8') as $code => $name)
     177  foreach ($languages->fs_languages as $code => $name)
    146178  {
    147179    echo '
Note: See TracChangeset for help on using the changeset viewer.