Skip to content

Commit

Permalink
BUG tableau PLX_MYMULTILINGUE non géré avec php 5.x+
Browse files Browse the repository at this point in the history
BUG Suppression fichier plugin update impossible (droit fichier)
  • Loading branch information
Stephane authored and Stephane committed Apr 10, 2017
1 parent 2e2fd95 commit 70bfeb1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
6 changes: 5 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
version 0.8 (27/03/2017)
version 0.8.1 (10/04/2017)
BUG tableau PLX_MYMULTILINGUE non géré avec php 5.x+
BUG Suppression fichier plugin update impossible (droit fichier)

version 0.8 (27/03/2017)
[+] Compatibilité PluCSS 1.2
[+] Gestion des dépendances entre articles rédigés dans des langues différentes
[+] Gestion des dépendances entre les pages statiques rédigées dans des langues différentes
Expand Down
17 changes: 16 additions & 1 deletion plxMyMultiLingue.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function __construct($default_lang) {
$this->setConfigProfil(PROFIL_ADMIN);

# PLX_MYMULTILINGUE contient la liste des langues et la langue courante - pour être utilisé par d'autres plugins
define('PLX_MYMULTILINGUE', array('langs' => $this->getParam('flags'), 'lang' => $this->lang));
define('PLX_MYMULTILINGUE', serialize(array('langs' => $this->getParam('flags'), 'lang' => $this->lang)));

if(!defined('PLX_ADMIN')) $_SESSION['lang'] = $this->lang;

Expand Down Expand Up @@ -166,6 +166,20 @@ public function __construct($default_lang) {

}
}

public static function _Lang() {
$def = unserialize(PLX_MYMULTILINGUE);
if(isset($def['lang'])) {
return $def['lang'];
}
}

public static function _Langs() {
$def = unserialize(PLX_MYMULTILINGUE);
if(isset($def['langs'])) {
return $def['langs'];
}
}

/*************************************/
/* gestion active/deactive/update */
Expand All @@ -177,6 +191,7 @@ public function __construct($default_lang) {
* @author Stephane F
**/
public function onActivate() {
if(file_exists(PLX_PLUGINS.'plxMyMultiLingue/update')) chmod(PLX_PLUGINS.'plxMyMultiLingue/update',0644); # en attendant la modif en natif dans class.plx.plugins.php
# Mise en cache du css partie administration
$src_cssfile = PLX_PLUGINS.'plxMyMultiLingue/css/admin.css';
$dst_cssfile = PLX_ROOT.PLX_CONFIG_PATH.'plugins/plxMyMultiLingue.admin.css';
Expand Down

0 comments on commit 70bfeb1

Please sign in to comment.