Skip to content
Extraits de code Groupes Projets
Valider ecb8d804 rédigé par marcimat's avatar marcimat
Parcourir les fichiers

Reports de [15435] [15436] [15437] [15438] [15461] et [15471]

parent 9ac0301a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -22,7 +22,7 @@ include_spip('public/interfaces'); // pour table_jointures ...@@ -22,7 +22,7 @@ include_spip('public/interfaces'); // pour table_jointures
// donc il faut l'inclure "en globals" // donc il faut l'inclure "en globals"
if ($f = find_in_path('mes_fonctions.php')) { if ($f = find_in_path('mes_fonctions.php')) {
global $dossier_squelettes; global $dossier_squelettes;
@include_once ($f); @include_once (_ROOT_CWD . $f);
} }
if (@is_readable(_CACHE_PLUGINS_FCT)){ if (@is_readable(_CACHE_PLUGINS_FCT)){
...@@ -196,4 +196,4 @@ function base_liste_table_for_dump($exclude_tables = array()){ ...@@ -196,4 +196,4 @@ function base_liste_table_for_dump($exclude_tables = array()){
return array($tables_for_dump, $tables_for_link); return array($tables_for_dump, $tables_for_link);
} }
?> ?>
\ No newline at end of file
...@@ -25,6 +25,13 @@ define('_STATUT_AUTEUR_CREATION', '1comite'); ...@@ -25,6 +25,13 @@ define('_STATUT_AUTEUR_CREATION', '1comite');
// statuts associables a des rubriques (separes par des virgules) // statuts associables a des rubriques (separes par des virgules)
define('_STATUT_AUTEUR_RUBRIQUE', _ADMINS_RESTREINTS ? '0minirezo' : ''); define('_STATUT_AUTEUR_RUBRIQUE', _ADMINS_RESTREINTS ? '0minirezo' : '');
// mes_fonctions peut aussi declarer des autorisations, donc il faut donc le charger
if ($f = find_in_path('mes_fonctions.php')) {
global $dossier_squelettes;
include_once(_ROOT_CWD . $f);
}
// surcharge possible de autoriser(), sinon autoriser_dist() // surcharge possible de autoriser(), sinon autoriser_dist()
if (!function_exists('autoriser')) { if (!function_exists('autoriser')) {
// http://doc.spip.org/@autoriser // http://doc.spip.org/@autoriser
......
...@@ -680,4 +680,4 @@ function bouton_spip_rss($op, $args=array(), $lang='') { ...@@ -680,4 +680,4 @@ function bouton_spip_rss($op, $args=array(), $lang='') {
$url = generer_url_public('rss', $args); $url = generer_url_public('rss', $args);
return "<a style='float: $spip_lang_right;' href='$url'>$clic</a>"; return "<a style='float: $spip_lang_right;' href='$url'>$clic</a>";
} }
?> ?>
\ No newline at end of file
...@@ -689,7 +689,6 @@ function chemin_image($icone){ ...@@ -689,7 +689,6 @@ function chemin_image($icone){
// chercher un fichier $file dans le SPIP_PATH // chercher un fichier $file dans le SPIP_PATH
// si on donne un sous-repertoire en 2e arg optionnel, il FAUT le / final // si on donne un sous-repertoire en 2e arg optionnel, il FAUT le / final
// si 3e arg vrai, on inclut si ce n'est fait. // si 3e arg vrai, on inclut si ce n'est fait.
define('_ROOT_CWD', getcwd().'/');
$GLOBALS['path_sig'] = ''; $GLOBALS['path_sig'] = '';
$GLOBALS['path_files'] = null; $GLOBALS['path_files'] = null;
...@@ -1246,7 +1245,7 @@ function spip_initialisation_core($pi=NULL, $pa=NULL, $ti=NULL, $ta=NULL) { ...@@ -1246,7 +1245,7 @@ function spip_initialisation_core($pi=NULL, $pa=NULL, $ti=NULL, $ta=NULL) {
// (non surchargeable en l'etat ; attention si on utilise include_spip() // (non surchargeable en l'etat ; attention si on utilise include_spip()
// pour le rendre surchargeable, on va provoquer un reecriture // pour le rendre surchargeable, on va provoquer un reecriture
// systematique du noyau ou une baisse de perfs => a etudier) // systematique du noyau ou une baisse de perfs => a etudier)
include_once _DIR_RESTREINT . 'inc/flock.php'; include_once _ROOT_RESTREINT . 'inc/flock.php';
// charger tout de suite le path et son cache // charger tout de suite le path et son cache
load_path_cache(); load_path_cache();
......
...@@ -24,8 +24,6 @@ define('_EXTENSION_PHP', '.php3'); ...@@ -24,8 +24,6 @@ define('_EXTENSION_PHP', '.php3');
#mettre a true pour compatibilite PHP3 #mettre a true pour compatibilite PHP3
define('_FEED_GLOBALS', false); define('_FEED_GLOBALS', false);
define('_ROOT_RACINE', dirname(dirname(__FILE__)).'/');
# le nom du repertoire ecrire/ # le nom du repertoire ecrire/
define('_DIR_RESTREINT_ABS', 'ecrire/'); define('_DIR_RESTREINT_ABS', 'ecrire/');
# sommes-nous dans ecrire/ ? # sommes-nous dans ecrire/ ?
...@@ -34,6 +32,11 @@ define('_DIR_RESTREINT', ...@@ -34,6 +32,11 @@ define('_DIR_RESTREINT',
# ou inversement ? # ou inversement ?
define('_DIR_RACINE', _DIR_RESTREINT ? '' : '../'); define('_DIR_RACINE', _DIR_RESTREINT ? '' : '../');
# chemins absolus
define('_ROOT_RACINE', dirname(dirname(__FILE__)).'/');
define('_ROOT_CWD', getcwd().'/');
define('_ROOT_RESTREINT', _ROOT_CWD . _DIR_RESTREINT);
// Icones // Icones
# nom du dossier images # nom du dossier images
define('_NOM_IMG_PACK', 'images/'); define('_NOM_IMG_PACK', 'images/');
...@@ -79,10 +82,9 @@ if (!defined('_IS_BOT')) ...@@ -79,10 +82,9 @@ if (!defined('_IS_BOT'))
define('_NOM_CONFIG', 'mes_options'); define('_NOM_CONFIG', 'mes_options');
// Son emplacement absolu si on le trouve // Son emplacement absolu si on le trouve
if (@file_exists($f = _DIR_RESTREINT . _NOM_CONFIG . '.php') if (@file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . _NOM_CONFIG . '.php')
OR (_EXTENSION_PHP OR (@file_exists($f = _ROOT_RESTREINT . _NOM_CONFIG . '.php'))
AND @file_exists($f = _DIR_RESTREINT . _NOM_CONFIG . _EXTENSION_PHP)) OR (_EXTENSION_PHP AND @file_exists($f = _ROOT_RESTREINT . _NOM_CONFIG . _EXTENSION_PHP))) {
OR (@file_exists($f = _DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES . _NOM_CONFIG . '.php'))) {
define('_FILE_OPTIONS', $f); define('_FILE_OPTIONS', $f);
} else define('_FILE_OPTIONS', ''); } else define('_FILE_OPTIONS', '');
...@@ -91,7 +93,7 @@ OR (@file_exists($f = _DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES . _NOM_CONFIG ...@@ -91,7 +93,7 @@ OR (@file_exists($f = _DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES . _NOM_CONFIG
// Inclure l'ecran de securite // Inclure l'ecran de securite
if (!defined('_ECRAN_SECURITE') if (!defined('_ECRAN_SECURITE')
AND @file_exists($f = _DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES . 'ecran_securite.php')) AND @file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . 'ecran_securite.php'))
include $f; include $f;
...@@ -416,8 +418,8 @@ $meta = $connect_id_rubrique = array(); ...@@ -416,8 +418,8 @@ $meta = $connect_id_rubrique = array();
// //
// Charger les fonctions liees aux serveurs Http et Sql. // Charger les fonctions liees aux serveurs Http et Sql.
// //
require_once _DIR_RESTREINT . 'inc/utils.php'; require_once _ROOT_RESTREINT . 'inc/utils.php';
require_once _DIR_RESTREINT . 'base/connect_sql.php'; require_once _ROOT_RESTREINT . 'base/connect_sql.php';
// Definition personnelles eventuelles // Definition personnelles eventuelles
......
...@@ -25,8 +25,8 @@ if (isset($GLOBALS['_INC_PUBLIC'])) { ...@@ -25,8 +25,8 @@ if (isset($GLOBALS['_INC_PUBLIC'])) {
// Faut-il initialiser SPIP ? (oui dans le cas general) // Faut-il initialiser SPIP ? (oui dans le cas general)
if (!defined('_DIR_RESTREINT_ABS')) if (!defined('_DIR_RESTREINT_ABS'))
if (defined('_DIR_RESTREINT') if (defined('_DIR_RESTREINT')
AND @file_exists(_DIR_RESTREINT.'inc_version.php')) { AND @file_exists(_ROOT_RESTREINT . 'inc_version.php')) {
include_once _DIR_RESTREINT.'inc_version.php'; include_once _ROOT_RESTREINT . 'inc_version.php';
} }
else else
die('inc_version absent ?'); die('inc_version absent ?');
...@@ -247,4 +247,4 @@ if (isset($GLOBALS['_INC_PUBLIC'])) { ...@@ -247,4 +247,4 @@ if (isset($GLOBALS['_INC_PUBLIC'])) {
} }
} }
?> ?>
\ No newline at end of file
...@@ -19,7 +19,7 @@ include_spip('public/quete'); // pour quete_chapo et ses dependances ...@@ -19,7 +19,7 @@ include_spip('public/quete'); // pour quete_chapo et ses dependances
// donc il faut l'inclure "en globals" // donc il faut l'inclure "en globals"
if ($f = find_in_path('mes_fonctions.php')) { if ($f = find_in_path('mes_fonctions.php')) {
global $dossier_squelettes; global $dossier_squelettes;
include ($f); include (_ROOT_CWD . $f);
} }
if (@is_readable(_CACHE_PLUGINS_FCT)) { if (@is_readable(_CACHE_PLUGINS_FCT)) {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter