Browse Source

Report de [16012] [16013] [16014]

svn/root/tags/spip-3.0.0-alpha1
Cerdic 11 years ago
parent
commit
89b38f33cc
  1. 11
      ecrire/inc/flock.php
  2. 25
      ecrire/inc/traduire.php
  3. 2
      ecrire/public/quete.php

11
ecrire/inc/flock.php

@ -290,7 +290,14 @@ function sous_repertoire($base, $subdir='', $nobase = false, $tantpis=false) {
static $dirs = array();
$base = str_replace("//", "/", $base);
if (preg_match(',[/_]$,', $base)) $base = substr($base,0,-1);
# suppr le dernier caractere si c'est un / ou un _
switch(substr($base,-1)) {
case '/':
case '_':
$base = substr($base,0,-1);
}
if (!strlen($subdir)) {
$n = strrpos($base, "/");
if ($n === false) return $nobase ? '' : ($base .'/');
@ -298,7 +305,7 @@ function sous_repertoire($base, $subdir='', $nobase = false, $tantpis=false) {
$base = substr($base, 0, $n+1);
} else {
$base .= '/';
$subdir = str_replace("/", "", "$subdir");
$subdir = str_replace("/", "", $subdir);
}
$baseaff = $nobase ? '' : $base;

25
ecrire/inc/traduire.php

@ -87,24 +87,27 @@ function charger_langue($lang, $module = 'spip') {
//
// http://doc.spip.org/@surcharger_langue
function surcharger_langue($fichiers) {
static $surcharges = array();
if (!isset($GLOBALS['idx_lang'])) return;
if (!is_array($fichiers)) $fichiers = array($fichiers);
if (!count($fichiers)) return;
$idx_lang_normal = $GLOBALS['idx_lang'];
$idx_lang_surcharge = $GLOBALS['idx_lang'].'_temporaire';
$GLOBALS['idx_lang'] = $idx_lang_surcharge;
foreach($fichiers as $fichier){
include($fichier);
if (is_array($GLOBALS[$idx_lang_surcharge])) {
$GLOBALS[$idx_lang_normal] = array_merge(
$GLOBALS[$idx_lang_normal],
$GLOBALS[$idx_lang_surcharge]
if (!isset($surcharges[$fichier])) {
$idx_lang_normal = $GLOBALS['idx_lang'];
$GLOBALS['idx_lang'] = $GLOBALS['idx_lang'].'@temporaire';
include($fichier);
$surcharges[$fichier] = $GLOBALS[$GLOBALS['idx_lang']];
unset ($GLOBALS[$GLOBALS['idx_lang']]);
$GLOBALS['idx_lang'] = $idx_lang_normal;
}
if (is_array($surcharges[$fichier])) {
$GLOBALS[$GLOBALS['idx_lang']] = array_merge(
$GLOBALS[$GLOBALS['idx_lang']],
$surcharges[$fichier]
);
}
unset ($GLOBALS[$idx_lang_surcharge]);
}
$GLOBALS['idx_lang'] = $idx_lang_normal;
}
//

2
ecrire/public/quete.php

@ -79,7 +79,7 @@ function quete_date_postdates() {
date('Y-m-d H:i:s',
($GLOBALS['meta']['date_prochain_postdate'] > time())
? $GLOBALS['meta']['date_prochain_postdate']
: (time()+(3600*24*10000))) ;
: (time()+(3600*24*365*2))) ;
}

Loading…
Cancel
Save