[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 202/323: Improve : New DEFINE NOALYSS_URL
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 202/323: Improve : New DEFINE NOALYSS_URL |
Date: |
Wed, 14 Mar 2018 17:38:50 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 98a48dad322e9e158cf89e472a0b57a771dad3da
Author: Dany De Bontridder <address@hidden>
Date: Mon Feb 12 20:16:38 2018 +0100
Improve : New DEFINE NOALYSS_URL
---
html/do.php | 12 ++++++++----
html/user_login.php | 38 ++++++++++++++++++++------------------
include/constant.php | 14 +++++++++++++-
3 files changed, 41 insertions(+), 23 deletions(-)
diff --git a/html/do.php b/html/do.php
index 6714502..2635141 100644
--- a/html/do.php
+++ b/html/do.php
@@ -190,15 +190,19 @@ if ($cn->exist_table('version') == false)
}
if (DBVERSION < dossier::get_version($cn))
{
- echo '<h2 class="error" style="font-size:12px">' . _("Attention: la
version de base de donnée est supérieure à la version du programme, vous
devriez mettre à jour") . '</h2>';
+ $a = _("cliquez ici pour mettre à jour ");
+ $base =NOALYSS_URL."/admin-noalyss.php?action=upgrade&sb=application";
+
+ echo '<h2 class="error" style="font-size:12px">' .
+ _("Attention: la version de base de donnée est supérieure à la
version du programme, vous devriez mettre à jour") ,
+ '<a hreF="' . $base . '">' . $a . '</a></h2>',
+ '</h2>';
}
if (DBVERSION > dossier::get_version($cn))
{
echo '<h2 class="error" style="font-size:12px">' . _("Votre base de
données n'est pas à jour") . ' ';
$a = _("cliquez ici pour appliquer le patch");
- $base = dirname($_SERVER['REQUEST_URI']);
- if ($base == '/') { $base = ''; }
- $base .= '/admin-noalyss.php';
+ $base =NOALYSS_URL.'/admin-noalyss.php?action=upgrade&sb=database';
echo '<a hreF="' . $base . '">' . $a . '</a></h2>';
}
diff --git a/html/user_login.php b/html/user_login.php
index 8eec383..81e6b41 100644
--- a/html/user_login.php
+++ b/html/user_login.php
@@ -68,7 +68,7 @@ $hi=new HttpInput();
if ( $ac->exist_table('version') == false)
{
echo '<h2 class="error" style="font-size:12px">'._("Base de donnée
invalide").'</h2>';
- $base=dirname($_SERVER['REQUEST_URI']);
+ echo '<a hreF="'.NOALYSS_URL.'/user_login.php">'._("Retour").'</a></h2>';
exit();
}
@@ -78,27 +78,30 @@ if ( $version < DBVERSIONREPO )
{
echo '<h2 class="error" style="font-size:12px">'._("Votre base de données
n'est pas à jour").' ';
$a=_("cliquez ici pour appliquer le patch");
- $base = dirname($_SERVER['REQUEST_URI']);
- if ($base == '/') { $base = ''; }
- $base .= '/admin-noalyss.php';
+ $base =NOALYSS_URL.'/admin-noalyss.php';
echo '<a hreF="'.$base.'">'.$a.'</a></h2>';
}
if ( $User->Admin() == 1)
{
- if (SITE_UPDATE !="") {
- address@hidden(SITE_UPDATE);
+ if (SITE_UPDATE !="") {
+ address@hidden(SITE_UPDATE);
if ($update > $version_noalyss ) {
- echo '<div id="version_div" class="inner_box"
style="width:25%;margin-left:10%;margin-top:3px;">';
- echo '<p class="notice">';
- printf ( "Mise à jour disponible de NOALYSS version actuelle :
%s votre version %s ",$update,$version_noalyss);
- echo '</p>';
- echo '<p style="text-align:center"> <a class="button"
onclick="document.body.removeChild(document.getElementById(\'version_div\'))">'.
- _('Fermer').
- "</a></p>";
- echo '</div>';
- }
- }
+ echo '<div id="version_div" class="inner_box"
style="width:25%;margin-left:10%;margin-top:3px;">';
+ echo '<p class="notice">';
+ printf ( "Mise à jour disponible de NOALYSS version actuelle : %s
votre version %s ",$update,$version_noalyss);
+
+ // Link to admin_repo : upgrade application
+ $base
=NOALYSS_URL."/admin-noalyss.php?action=upgrade&sb=application";
+
+ echo '<a hreF="' . $base . '">' . _("Cliquez ici pour mettre à
jour") . '</a>';
+ echo '</p>';
+ echo '<p style="text-align:center"> <a class="button"
onclick="document.body.removeChild(document.getElementById(\'version_div\'))">'.
+ _('Fermer').
+ "</a></p>";
+ echo '</div>';
+ }
+ }
}
include_once NOALYSS_INCLUDE."/lib/user_menu.php";
@@ -144,12 +147,11 @@ if ( $User->admin == 0 || (defined("MULTI")&& MULTI == 0
) )
if ( $folder != null && count($folder) == 1 )
{
- redirect('do.php?gDossier='.$folder[0]['dos_id']);
+ redirect(NOALYSS_URL.'/do.php?gDossier='.$folder[0]['dos_id']);
exit();
}
}
-
$result="";
$result.="<table border=\"0\">";
$result.='<TR>';
diff --git a/include/constant.php b/include/constant.php
index 31b8801..afa6e05 100644
--- a/include/constant.php
+++ b/include/constant.php
@@ -103,7 +103,9 @@ if ( !defined("SITE_UPDATE"))
define ("SITE_UPDATE",'http://www.noalyss.eu/last_version.txt');
if ( !defined("SITE_UPDATE_PLUGIN"))
define
("SITE_UPDATE_PLUGIN",'http://www.noalyss.eu/plugin_last_version.txt');
-
+if ( !defined ("NOALYSS_PACKAGE_REPOSITORY")) {
+ define ("NOALYSS_PACKAGE_REPOSITORY","https://package.noalyss.eu/");
+}
// If you don't want that the system information is accessible
if ( ! defined ("SYSINFO_DISPLAY")) {
define ("SYSINFO_DISPLAY",TRUE);
@@ -311,3 +313,13 @@ define ('EXC_PARAM_TYPE',1006);
define ('EXC_DUPLICATE',1200);
define ("UNPINDG","");
define ("PINDG","");
+
+// Url of NOALYSS (http://...)
+//
+if ( ! defined ("NOALYSS_URL")) {
+ $base=$_SERVER['REQUEST_SCHEME'].'://'.
+ $_SERVER['HTTP_HOST'].
+ ":".$_SERVER['SERVER_PORT'].
+ dirname($_SERVER['PHP_SELF']);
+ define ("NOALYSS_URL",$base);
+}
\ No newline at end of file
- [Noalyss-commit] [noalyss] 253/323: ANCPLAN : fix bug when removing operation, (continued)
- [Noalyss-commit] [noalyss] 253/323: ANCPLAN : fix bug when removing operation, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 285/323: CSS : esthetic div.box (dashboard) width : 98%, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 178/323: User::check_module improve doc, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 180/323: Symbol zoom, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 259/323: fix box search reconcile, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 231/323: Bug : IDate readonly does not contain the ID, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 306/323: Task #0001563: check date paiement VEN, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 300/323: Cosmetic, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 193/323: SQL : fix create extension for account_repository, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 248/323: Install improve message, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 202/323: Improve : New DEFINE NOALYSS_URL,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 218/323: element go_up : fix height, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 235/323: Set version, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 257/323: Tag : box for adding a tag : add a close button, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 283/323: Todo List : fix bug in sort after zooming, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 287/323: Improve favicon.ico, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 182/323: Task #0001535: TVA : réécriture du module , fichier test pour TVA_RATE_MTABLE, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 185/323: Task #0001535: TVA : réécriture du module , missing file, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 229/323: index.css : CSS responsive, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 310/323: Cosmetic : use Icon_Action::trash, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 206/323: install : check the module XML , SimpleXML, ..., Dany De Bontridder, 2018/03/14