{site}.inc.php is the base for all jobs.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sat, 21 Jun 2008 17:19:45 +0000 (19:19 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sat, 21 Jun 2008 17:19:45 +0000 (19:19 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
13 files changed:
bin/connect.db.inc.php
bin/emails.broken.helper.php
bin/emails.broken.php
bin/lists.create_promo.php
classes/plpage.php
htdocs/listes_redirect.php
htdocs/webredirect.php
include/platal.inc.php
include/synchro_ax.inc.php
include/xnet.inc.php
include/xnet/session.inc.php
include/xorg.inc.php
include/xorg/session.inc.php

index f13dfa1..0370d31 100644 (file)
@@ -22,9 +22,9 @@
 ini_set('include_path',dirname(__FILE__).'/../include:' . dirname(__FILE__).'/../classes:/usr/share/php');
 
 require_once('xorg.inc.php');
-require_once('xorg.misc.inc.php');
-
 require_once 'xdb.php';
 
+new Platal('core');
+
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>
index c88db0b..9534e0e 100755 (executable)
@@ -23,7 +23,6 @@
 ini_set('include_path', '.:../include:/usr/share/php');
 
 require_once('connect.db.inc.php');
-require_once('xorg.inc.php');
 require_once('emails.inc.php');
 
 $opts = getopt('o:');
index 358fe0a..d371854 100755 (executable)
@@ -23,7 +23,6 @@
 ini_set('include_path', '.:../include:/usr/share/php');
 
 require_once('connect.db.inc.php');
-require_once('xorg.inc.php');
 require_once('emails.inc.php');
 require_once('../classes/plmailer.php');
 
index 7296798..34eb213 100755 (executable)
@@ -1,6 +1,7 @@
 #!/usr/bin/php5 -q
 <?php
-require_once("xorg.inc.php");
+
+require_once(dirname(__FILE__) . '/connect.db.inc.php');
 require_once('validations.inc.php');
 
 global $globals;
index 30a29b3..ac34aba 100644 (file)
@@ -96,7 +96,7 @@ abstract class PlPage extends Smarty
         $this->assign('xorg_triggers', $this->_errors);
         $this->assign('xorg_errors', $this->nb_errs());
         $this->assign('xorg_failure', $this->_failure);
-        $this->assign('globals', $globals);
+        $this->assign_by_ref('globals', $globals);
 
         if (Env::has('json') && count($this->_jsonVars)) {
             return $this->jsonDisplay();
index 739c58d..432ca6f 100644 (file)
@@ -19,7 +19,7 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once dirname(__FILE__).'/../include/xorg.inc.php';
+require_once 'xorg.inc.php';
 
 preg_match('!^/(moderate|admin|members|archives)/(.*)_([^_]*)(/.*)?$!', $_SERVER['REQUEST_URI'], $matches);
 
index cca10b1..0de8baa 100644 (file)
@@ -19,7 +19,9 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once dirname(__FILE__).'/../include/xorg.inc.php';
+require_once 'xorg.inc.php';
+
+new Platal('core');
 
 global $globals;
 list($username, $path) = preg_split('/\//', $_SERVER["REQUEST_URI"], 2, PREG_SPLIT_NO_EMPTY);
@@ -53,5 +55,7 @@ header("HTTP/1.0 404 Not Found");
     <hr>
     <address>Apache Server at www.carva.org Port 80</address>
   </body>
+</html>
+<?php
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>
index 6bfd24f..afeef62 100644 (file)
@@ -41,7 +41,7 @@ define('DEBUG_BT', 1);
 define('DEBUG_VALID', 2);
 define('DEBUG_SMARTY', 4);
 
-function __autoload($cls)
+function pl_autoload($cls)
 {
     $cls  = strtolower($cls);
     $path = dirname(dirname(__FILE__));
@@ -57,7 +57,7 @@ function __autoload($cls)
         @include "$cls.inc.php";
     }
 }
-__autoload('Env');
+pl_autoload('Env');
 
 function pl_error_handler($errno, $errstr, $errfile, $errline)
 {
index 208272f..6b06c12 100644 (file)
@@ -19,9 +19,6 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-
-require_once("xorg.inc.php");
-
 require_once('user.func.inc.php');
 
 function is_ax_key_missing() {
index 58d9ffd..ce22b5d 100644 (file)
@@ -24,9 +24,15 @@ define('PL_SESSION_CLASS', 'XnetSession');
 define('PL_PAGE_CLASS', 'XnetPage');
 
 require_once('platal.inc.php');
+require_once('xorg.misc.inc.php');
 require_once('globals.inc.php');
 require_once('xnet/session.inc.php');
 require_once('xnet/page.inc.php');
 
+function __autoload($cls)
+{
+    pl_autoload($cls);
+}
+
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>
index 2251662..e3e544e 100644 (file)
@@ -115,14 +115,11 @@ class XnetSession
 
     public static function doAuthX()
     {
-        global $globals, $page;
+        global $globals;
 
         if (md5('1'.S::v('challenge').$globals->xnet->secret.Get::i('uid').'1') != Get::v('auth')) {
             Get::kill('auth');
-            if (!$page) {
-                require_once 'xnet.inc.php';
-                new_skinned_page('platal/index.tpl');
-            }
+            $page =& Platal::page();
             $page->kill("Erreur d'authentification avec polytechnique.org !");
         }
 
index 5f7af96..ed60c7f 100644 (file)
@@ -24,9 +24,15 @@ define('PL_SESSION_CLASS', 'XorgSession');
 define('PL_PAGE_CLASS', 'XorgPage');
 
 require_once('platal.inc.php');
+require_once('xorg.misc.inc.php');
 require_once('globals.inc.php');
 require_once('xorg/session.inc.php');
 
+function __autoload($cls)
+{
+    pl_autoload($cls);
+}
+
 // {{{ class XorgPage
 
 class XorgPage extends PlPage
@@ -42,7 +48,6 @@ class XorgPage extends PlPage
     public function run()
     {
         global $globals, $platal;
-        $this->assign_by_ref('globals', $globals);
         if (isset($platal) && $platal->path == 'register') {
             $skin = $globals->register_skin . ".tpl";
         } else {
index 8d86e93..e9b98b7 100644 (file)
@@ -294,8 +294,7 @@ function start_connexion ($uid, $identified)
             global $page;
             $newpage = false;
             if (!$page) {
-                require_once 'xorg.inc.php';
-                new_skinned_page('platal/index.tpl');
+                $page =& Platal::page();
                 $newpage = true;
             }
             $page->trigError("Une erreur est survenue lors de la procédure d'authentification. "