[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 320/323: Bug : Cannot upgrade core
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 320/323: Bug : Cannot upgrade core |
Date: |
Wed, 14 Mar 2018 17:39:15 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 0a54848ec8934d412c8e5a63f5bac3df9cf22492
Author: Dany De Bontridder <address@hidden>
Date: Mon Mar 12 22:26:30 2018 +0100
Bug : Cannot upgrade core
---
include/class/package_core.class.php | 13 +++++++++++--
include/upgrade-core.php | 4 ++--
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/include/class/package_core.class.php
b/include/class/package_core.class.php
index 44b8787..db2a86b 100644
--- a/include/class/package_core.class.php
+++ b/include/class/package_core.class.php
@@ -33,7 +33,12 @@ class Package_Core extends Package_Noalyss
*/
public function can_install()
{
-
+ if (! is_writable(NOALYSS_HOME)) {
+ return 0;
+ }
+ if ( !is_writable(NOALYSS_INCLUDE)) {
+ return 0;
+ }
}
/**
@@ -44,6 +49,10 @@ class Package_Core extends Package_Noalyss
*/
public function install()
{
+ if ( $this->can_install() == 0 )
+ {
+ throw new Exception(sprintf(_("Permission incorrecte : ne peut
écrire dans %s ou %s"),NOALYSS_HOME,NOALYSS_INCLUDE),3);
+ }
$zip=new ZipArchive ();
// open the file
if ($zip->open(NOALYSS_HOME."/tmp/".$this->get_file()))
@@ -51,7 +60,7 @@ class Package_Core extends Package_Noalyss
// try to unzip and overwrite current
if (!$zip->extractTo(NOALYSS_HOME."/../"))
{
- throw new Exception(_("Echec mis à jour"), 1);
+ throw new Exception(_("Echec mise à jour"), 1);
}
}
else
diff --git a/include/upgrade-core.php b/include/upgrade-core.php
index 529bf86..69744b4 100644
--- a/include/upgrade-core.php
+++ b/include/upgrade-core.php
@@ -22,13 +22,13 @@
if (!defined('ALLOWED')) die('Appel direct ne sont pas permis');
if ( ! defined ('ALLOWED_ADMIN')) { die (_('Non autorisé'));}
-
+global $version_noalyss;
require_once NOALYSS_INCLUDE.'/class/package_repository.class.php';
/**
* @file
* @brief
*/
-printf (_(" La version de votre installaiton est %s "),NOALYSS_VERSION);
+printf (_(" La version de votre installation est %s "),$version_noalyss);
$core=new Package_Repository();
$xml=$core->getContent();
- [Noalyss-commit] [noalyss] 255/323: Tag : select list add a close button, (continued)
- [Noalyss-commit] [noalyss] 255/323: Tag : select list add a close button, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 286/323: CSS : selected menu, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 312/323: Task #0001526: Problème navigation - retour en haut de la fenêtre si flèches de navigation, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 305/323: Task #0001563: check date paiement ACH, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 309/323: Limit to event with a reminder, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 280/323: Task : esthetic Follow up , tags, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 221/323: Calc : hightlight result, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 238/323: Icon_Action::trash remove unwanted char, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 304/323: Task #0001563: Achat mémoriser également 3 champs (suite), Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 321/323: Improve upgradeCore, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 320/323: Bug : Cannot upgrade core,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 241/323: HttpInput::extract fix bug, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 297/323: plugin : add explanation, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 284/323: CSS : box_search_card , hidden if width < 804px, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 232/323: Typo, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 242/323: ajax_card : warning if there is no category of cards, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 322/323: Fix : not reliable, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 277/323: Do not propose disable ledger for new operation, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 187/323: SQL : account_repository, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 278/323: New Favicon, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 282/323: CSS : color in selected cell, Dany De Bontridder, 2018/03/14