dépôts
/
lhc
/
web
/
www.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[SPIP] ~v3.2.4-->v3.2.5
[lhc/web/www.git]
/
www
/
ecrire
/
inc
/
utils.php
diff --git
a/www/ecrire/inc/utils.php
b/www/ecrire/inc/utils.php
index
0a5bac2
..
22c0c32
100644
(file)
--- a/
www/ecrire/inc/utils.php
+++ b/
www/ecrire/inc/utils.php
@@
-836,7
+836,7
@@
function _L($text, $args = array(), $options = array()) {
$options = $defaut_options;
}
$options = $defaut_options;
}
- if (is_array($args)) {
+ if (is_array($args)
and count($args)
) {
if (!function_exists('interdire_scripts')) {
include_spip('inc/texte');
}
if (!function_exists('interdire_scripts')) {
include_spip('inc/texte');
}
@@
-1641,14
+1641,24
@@
function find_all_in_path($dir, $pattern, $recurs = false) {
/**
* Prédicat sur les scripts de ecrire qui n'authentifient pas par cookie
/**
* Prédicat sur les scripts de ecrire qui n'authentifient pas par cookie
+ * et beneficient d'une exception
+ *
* @param string $nom
* @param string $nom
+ * @param bool $strict
* @return bool
*/
* @return bool
*/
-function autoriser_sans_cookie($nom) {
+function autoriser_sans_cookie($nom
, $strict = false
) {
static $autsanscookie = array('install', 'base_repair');
static $autsanscookie = array('install', 'base_repair');
- $nom = preg_replace('/.php[3]?$/', '', basename($nom));
- return in_array($nom, $autsanscookie);
+ if (in_array($nom, $autsanscookie)) {
+ if (test_espace_prive()){
+ include_spip('base/connect_sql');
+ if (!$strict or !spip_connect()){
+ return true;
+ }
+ }
+ }
+ return false;
}
/**
}
/**