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

fonctionnalisation des appels de scripts php (encore 69 avant l'autoroute)

parent 0251d253
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -28,14 +28,14 @@ function upgrade_dist()
@copy(_FILE_CONNECT, _FILE_CONNECT_INS);
install_debut_html(_T('titre_page_upgrade'));
echo "<p><b>",_T('texte_nouvelle_version_spip_1'),"</b><p> ";
echo _T('texte_nouvelle_version_spip_2');
echo "<p><div align='right'>";
echo '<form action="upgrade.php3">';
echo "<input type='submit' value=\"",
echo "<p><b>",_T('texte_nouvelle_version_spip_1'),"</b><p> ",
_T('texte_nouvelle_version_spip_2'),
"<p><div align='right'>",
'<form action=', http_php_script("upgrade"), '>',
"<input type='submit' value=\"",
_T('bouton_relancer_installation'),
"\" class='fondl'>";
echo "</form>\n";
"\" class='fondl'>",
"</form>\n";
install_fin_html();
exit;
}
......@@ -110,7 +110,7 @@ function demande_maj_version()
function info_install()
{
// Soit on est dans ecrire/ et on envoie sur l'installation
if (@file_exists("inc_version.php3")) {
if (@file_exists("inc_version" . _EXTENSION_PHP)) {
header("Location: " . 'install' . _EXTENSION_PHP);
exit;
}
......
......@@ -19,12 +19,12 @@ if (!defined("_ECRIRE_INC_VERSION")) return;
$included_files = array();
function include_local($file, $silence=false) {
$nom = preg_replace("/\.php3?$/",'', $file);
$nom = preg_replace("/\.php[3]?$/",'', $file);
# spip_log("$nom $file");
if (@$GLOBALS['included_files'][$nom]++) return;
if (is_readable($f = $nom . '.php'))
include($f);
else if (is_readable($f = $nom . '.php3'))
else if (is_readable($f = $nom . _EXTENSION_PHP))
include($f);
else if (!$silence) spip_log($file . " illisible");
}
......@@ -41,7 +41,7 @@ function include_ecrire($file) {
function include_fonction($nom) {
# Hack pour etre compatible avec les mes_options qui appellent cette fonction
define_once('_DIR_INCLUDE', _DIR_RESTREINT);
$nom = preg_replace("/\.php3?$/",'', basename($nom));
$nom = preg_replace("/\.php[3]?$/",'', basename($nom));
$inc = ('inc_' . $nom);
# spip_log("if $inc");
$f = find_in_path($inc . '.php');
......@@ -52,8 +52,8 @@ function include_fonction($nom) {
if (is_readable($f)) {
if (!$GLOBALS['included_files'][$inc]++) include($f);
} else {
// provisoire avant renommage php/php3
$f = _DIR_INCLUDE . ('inc_' . $nom . '.php3');
// provisoire avant renommage
$f = _DIR_INCLUDE . ('inc_' . $nom . _EXTENSION_PHP);
if (is_readable($f)) {
if (!$GLOBALS['included_files'][$inc]++) include($f);
} else $inc = "";
......@@ -428,7 +428,7 @@ function spip_touch($fichier, $duree=0, $touch=true) {
//
// cron() : execution des taches de fond
// quand il est appele par spip_background.php3, il est gourmand ;
// quand il est appele par spip_background, il est gourmand ;
// quand il est appele par inc-public il n'est pas gourmand
//
function cron($gourmand = false) {
......
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