diff --git a/html/admin/setup.php b/html/admin/setup.php index 80b873e29..12d895ab3 100644 --- a/html/admin/setup.php +++ b/html/admin/setup.php @@ -466,7 +466,7 @@ if ( $flag == 0 ) { if ( ! isset($_POST['go']) ) { ?> -
+ ">
@@ -618,7 +618,7 @@ for ($e=0;$e < $MaxDossier;$e++) { //---------------------------------------------------------------------- // Upgrade the account_repository //---------------------------------------------------------------------- - echo "

"._("Mise à Repository")."

"; + echo "

"._("Mise à jour de la base de données Paramètrage")."

"; $cn=new Database(); if ( DEBUG == false ) ob_start(); $MaxVersion=DBVERSIONREPO-1; diff --git a/html/do.php b/html/do.php index 566188797..9fd0617ba 100644 --- a/html/do.php +++ b/html/do.php @@ -146,7 +146,7 @@ if (DBVERSION > dossier::get_version($cn)) $a = _("cliquez ici pour appliquer le patch"); $base = dirname($_SERVER['REQUEST_URI']); if ($base == '/') { $base = ''; } - $base .= '/admin/setup.php'; + $base .= '/admin-noalyss.php'; echo '' . $a . ''; } diff --git a/html/index.php b/html/index.php index 5eb72b2ab..dc0c14be6 100644 --- a/html/index.php +++ b/html/index.php @@ -134,7 +134,7 @@ if ( ! file_exists('..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'config.inc.php')) { - header("Location: admin/setup.php",true, 307); + header("Location: setup.php",true, 307); exit(0); } diff --git a/html/login.php b/html/login.php index 4d765b6ec..f2ce714ed 100644 --- a/html/login.php +++ b/html/login.php @@ -51,7 +51,7 @@ if ( isset ($_POST["p_user"] ) ) if ($version != DBVERSIONREPO) { echo alert(_('Version de base de données incorrectes, vous devez mettre à jour')); - echo ""; + echo ""; exit(); } include_once NOALYSS_INCLUDE."/class/class_user.php"; @@ -88,7 +88,7 @@ else if ( $version != DBVERSIONREPO) { echo alert(_('Version de base de données incorrectes, vous devez mettre à jour')); - echo ""; + echo ""; exit(); } diff --git a/html/user_login.php b/html/user_login.php index 026c5c9ce..79720929a 100644 --- a/html/user_login.php +++ b/html/user_login.php @@ -77,7 +77,7 @@ if ( $version < DBVERSIONREPO ) $a=_("cliquez ici pour appliquer le patch"); $base = dirname($_SERVER['REQUEST_URI']); if ($base == '/') { $base = ''; } - $base .= '/admin/setup.php'; + $base .= 'admin-noalyss.php'; echo ''.$a.''; } @@ -152,7 +152,7 @@ $result.=""; $result.=''; if ( $User->Admin() == 1 ) { - $result.=""; + $result.=""; } $result.='
"._("Administration")." "._("Administration")." '; $result.=''._('Préférence').''; diff --git a/include/admin_repo.inc.php b/include/admin_repo.inc.php index 7ca886193..175b8c4f4 100644 --- a/include/admin_repo.inc.php +++ b/include/admin_repo.inc.php @@ -28,74 +28,75 @@ require_once NOALYSS_INCLUDE."/lib/user_common.php"; include_once NOALYSS_INCLUDE."/lib/ac_common.php"; require_once NOALYSS_INCLUDE.'/lib/class_database.php'; require_once NOALYSS_INCLUDE."/lib/user_menu.php"; +$action = HtmlInput::default_value_request("action", ""); $rep=new Database(); $User=new User($rep); $User->Check(); -html_page_start($User->theme); if ($User->admin != 1) { + html_page_start($User->theme); echo "

"; echo _("Vous n'êtes pas administateur"); echo "

"; html_page_stop(); return; } +// For a backup , we must avoid to send anything before the +// dump file +if ( $action== 'backup') { + /* take backup */ + require_once NOALYSS_INCLUDE."/backup.inc.php"; + exit(); +} +html_page_start(); load_all_script(); echo '

'._('Administration').'

'; echo '
'; echo MenuAdmin()."
"; -define('ALLOWED',true); - - ?>
exist_table('version')) { echo _('Base de donnée vide'); @@ -412,7 +411,6 @@ class Database $MaxVersion=DBVERSION-1; $succeed=""; echo '
    '; - $add=($from_setup==0)?'admin/':''; for ($i=4; $i<=$MaxVersion; $i++) { $to=$i+1; @@ -431,7 +429,7 @@ class Database echo "
  • Patching ".$p_name. " from the version ".$this->get_version()." to $to "; - $this->execute_script($add.'sql/patch/upgrade'.$i.'.sql'); + $this->execute_script (NOALYSS_INCLUDE.'/sql/patch/upgrade'.$i.'.sql'); echo $succeed; if (!DEBUG) @@ -467,7 +465,7 @@ class Database // specific to version 17 if ($i==17) { - $this->execute_script($add.'sql/patch/upgrade17.sql'); + $this->execute_script(NOALYSS_INCLUDE.'/sql/patch/upgrade17.sql'); $max=$this->get_value('select last_value from s_jnt_fic_att_value'); $this->alter_seq($p_cn, 's_jnt_fic_att_value', $max+1); } // version @@ -497,7 +495,7 @@ class Database /* check the country and apply the path */ $res=$this->exec_sql("select pr_value from parameter where pr_id='MY_COUNTRY'"); $country=pg_fetch_result($res, 0, 0); - $this->execute_script($add."sql/patch/upgrade36.".$country.".sql"); + $this->execute_script(NOALYSS_INCLUDE."/sql/patch/upgrade36.".$country.".sql"); $this->exec_sql('update tmp_pcmn set pcm_type=find_pcm_type(pcm_val)'); } if ($i==59) @@ -512,7 +510,7 @@ class Database if ($i==61) { $country=$this->get_value("select pr_value from parameter where pr_id='MY_COUNTRY'"); - $this->execute_script($add."sql/patch/upgrade61.".$country.".sql"); + $this->execute_script(NOALYSS_INCLUDE."/sql/patch/upgrade61.".$country.".sql"); } if (!DEBUG)