use php5-isms
authorx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 1 Oct 2006 10:51:31 +0000 (10:51 +0000)
committerx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 1 Oct 2006 10:51:31 +0000 (10:51 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@931 839d8a87-29fc-0310-9880-83ba4fa771e5

32 files changed:
classes/corelogger.php [moved from classes/CoreLogger.php with 100% similarity]
classes/env.php [moved from classes/Env.php with 100% similarity]
classes/flagset.php [moved from classes/Flagset.php with 100% similarity]
classes/page.php [moved from classes/Page.php with 100% similarity]
classes/platal.php [moved from classes/Platal.php with 100% similarity]
classes/plmodule.php [moved from classes/PLModule.php with 100% similarity]
classes/pltableeditor.php [moved from classes/PLTableEditor.php with 100% similarity]
classes/s.php [new file with mode: 0644]
classes/session.php [moved from classes/Session.php with 99% similarity]
classes/varstream.php [moved from classes/VarStream.php with 100% similarity]
classes/xdb.php [moved from classes/XDB.php with 100% similarity]
classes/xmlrpcclient.php [moved from classes/XmlrpcClient.php with 100% similarity]
classes/xnet.php [moved from classes/Xnet.php with 100% similarity]
htdocs/.htaccess
htdocs/listes_redirect.php
htdocs/webredirect.php
htdocs/xnet.php
htdocs/xorg.php
include/lists.inc.php
include/platal.inc.php
include/validations/photos.inc.php
include/xnet/page.inc.php
include/xnet/session.inc.php
include/xorg.inc.php
include/xorg/session.inc.php
modules/admin.php
modules/auth.php
modules/carnet/contacts.pdf.inc.php
modules/events.php
modules/payment.php
modules/payment/money.inc.php
modules/profile.php

similarity index 100%
rename from classes/Env.php
rename to classes/env.php
similarity index 100%
rename from classes/Flagset.php
rename to classes/flagset.php
similarity index 100%
rename from classes/Page.php
rename to classes/page.php
similarity index 100%
rename from classes/Platal.php
rename to classes/platal.php
similarity index 100%
rename from classes/PLModule.php
rename to classes/plmodule.php
diff --git a/classes/s.php b/classes/s.php
new file mode 100644 (file)
index 0000000..8ad9826
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+/***************************************************************************
+ *  Copyright (C) 2003-2006 Polytechnique.org                              *
+ *  http://opensource.polytechnique.org/                                   *
+ *                                                                         *
+ *  This program is free software; you can redistribute it and/or modify   *
+ *  it under the terms of the GNU General Public License as published by   *
+ *  the Free Software Foundation; either version 2 of the License, or      *
+ *  (at your option) any later version.                                    *
+ *                                                                         *
+ *  This program is distributed in the hope that it will be useful,        *
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
+ *  GNU General Public License for more details.                           *
+ *                                                                         *
+ *  You should have received a copy of the GNU General Public License      *
+ *  along with this program; if not, write to the Free Software            *
+ *  Foundation, Inc.,                                                      *
+ *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
+ ***************************************************************************/
+
+class S extends Session { }
+
+?>
similarity index 99%
rename from classes/Session.php
rename to classes/session.php
index c6d1b34..6052ec6 100644 (file)
@@ -76,8 +76,6 @@ class Session
     }
 }
 
-class S extends Session { }
-
 // {{{ function check_perms()
 
 /** verifie si un utilisateur a les droits pour voir une page
similarity index 100%
rename from classes/VarStream.php
rename to classes/varstream.php
similarity index 100%
rename from classes/XDB.php
rename to classes/xdb.php
similarity index 100%
rename from classes/Xnet.php
rename to classes/xnet.php
index e970218..3753de7 100644 (file)
@@ -1,7 +1,7 @@
 Options +FollowSymLinks
 RewriteEngine on
 
-RewriteBase /~x2002bobillot
+RewriteBase /~x2000habouzit
 
 # Rewrite URLs of the form 'index.php?q=x':
 RewriteCond %{REQUEST_FILENAME} !-f
index 0828d69..35d72f1 100644 (file)
@@ -20,7 +20,6 @@
  ***************************************************************************/
 
 require_once dirname(__FILE__).'/../include/xorg.inc.php';
-require_once dirname(__FILE__).'/../classes/XDB.php';
 
 preg_match('/^\/(moderate|admin|members)\/(.*)_([^_]*)$/', $_SERVER['REQUEST_URI'], $matches);
 
index bd9e5a9..95c478e 100644 (file)
@@ -20,7 +20,6 @@
  ***************************************************************************/
 
 require_once dirname(__FILE__).'/../include/xorg.inc.php';
-require_once dirname(__FILE__).'/../classes/XDB.php';
 
 list($username, $path) = preg_split('/\//', $_SERVER["REQUEST_URI"], 2, PREG_SPLIT_NO_EMPTY);
 $res = XDB::query(
index bb96044..e8fbeef 100644 (file)
 
 $GLOBALS['IS_XNET_SITE'] = true;
 
-require_once dirname(__FILE__).'/../classes/XDB.php';
-require_once dirname(__FILE__).'/../classes/Xnet.php';
-require_once dirname(__FILE__).'/../classes/PLModule.php';
-require_once dirname(__FILE__).'/../classes/CoreLogger.php';
-
 require_once dirname(__FILE__).'/../include/xnet.inc.php';
 
 if (!($path = Env::v('n')) || substr($path, 0, 4) != 'Xnet') {
index c7f9f40..6261a36 100644 (file)
 
 // $GLOBALS['IS_XNET_SITE'] = true;
 
-require_once dirname(__FILE__).'/../classes/XDB.php';
-require_once dirname(__FILE__).'/../classes/Platal.php';
-require_once dirname(__FILE__).'/../classes/PLModule.php';
-require_once dirname(__FILE__).'/../classes/CoreLogger.php';
-
 require_once dirname(__FILE__).'/../include/xorg.inc.php';
 
 if (!($path = Env::v('n')) || ($path{0} < 'A' || $path{0} > 'Z')) {
index 9857d3e..d11c94f 100644 (file)
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-// {{{ import class definitions
-
-require_once dirname(__FILE__).'/../classes/XmlrpcClient.php';
-
-// }}}
 // {{{ function lists_xmlrpc
 
 function &lists_xmlrpc($uid, $pass, $fqdn=null)
@@ -43,7 +38,7 @@ function list_sort_owners(&$members, $tri_promo = true) {
     global $globals;
 
     $membres = Array();
-    
+
     foreach($members as $mem) {
         list($m, $dom) = explode('@',$mem);
         if ($dom == $globals->mail->domain || $dom == $globals->mail->domain2) {
@@ -67,7 +62,7 @@ function list_sort_owners(&$members, $tri_promo = true) {
             }
         }
     }
-    
+
     ksort($membres);
     foreach($membres as $key=>$val) ksort($membres[$key]);
     return $membres;
index 8ad7bf9..7b930cc 100644 (file)
@@ -38,7 +38,12 @@ define('SKINNED', 0);
 define('SIMPLE',  1);
 define('NO_SKIN', 2);
 
-require_once dirname(__FILE__).'/../classes/Env.php';
+require dirname(dirname(__FILE__)).'/classes/env.php';
+
+function __autoload($cls)
+{
+    require dirname(dirname(__FILE__)).'/classes/'.strtolower($cls).'.php';
+}
 
 function pl_url($path, $query = null, $fragment = null)
 {
index 6d8fcc3..3c7c149 100644 (file)
@@ -58,7 +58,7 @@ class PhotoReq extends Validate
         global $page;
 
         // calcul de la taille de l'image
-        require_once dirname(__FILE__).'/../../classes/VarStream.php';
+        require_once dirname(__FILE__).'/../../classes/varstream.php';
         $GLOBALS['photoreq'] = $_data;
         $image_infos = getimagesize('var://photoreq');
         unset ($GLOBALS['photoreq']);
index 5258903..1e66ddb 100644 (file)
@@ -19,7 +19,7 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once dirname(__FILE__).'/../../classes/Page.php';
+require_once dirname(__FILE__).'/../../classes/page.php';
 
 class XnetPage extends PlatalPage
 {
index e8e5160..ffcd6fd 100644 (file)
@@ -19,8 +19,6 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once dirname(__FILE__).'/../../classes/Session.php';
-
 class XnetSession
 {
     // {{{ function init
index e26b20c..deb9a49 100644 (file)
@@ -25,7 +25,7 @@ require_once('xorg/session.inc.php');
 $globals = new PlatalGlobals('XorgSession');
 XorgSession::init();
 
-require_once dirname(__FILE__).'/../classes/Page.php';
+require_once dirname(__FILE__).'/../classes/page.php';
 
 // {{{ class XorgPage
 
index d674fa4..c121ba2 100644 (file)
@@ -19,8 +19,6 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once dirname(__FILE__).'/../../classes/Session.php';
-
 class XorgSession
 {
     // {{{ function init
index 0191b80..f867d95 100644 (file)
@@ -724,7 +724,6 @@ class AdminModule extends PLModule
         $page->assign('vit', new ValidateIterator());
     }
     function handler_validate_answers(&$page, $action = 'list', $id = null) {
-        require_once('../classes/PLTableEditor.php');
         $page->assign('xorg_title','Polytechnique.org - Administration - Réponses automatiques de validation');
         $page->assign('title', 'Gestion des réponses automatiques');
         $table_editor = new PLTableEditor('admin/validate/answers','requests_answers','id');
@@ -734,7 +733,6 @@ class AdminModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }
     function handler_skins(&$page, $action = 'list', $id = null) {
-        require_once('../classes/PLTableEditor.php');
         $page->assign('xorg_title','Polytechnique.org - Administration - Skins');
         $page->assign('title', 'Gestion des skins');
         $table_editor = new PLTableEditor('admin/skins','skins','id');
@@ -747,7 +745,6 @@ class AdminModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }
     function handler_postfix_blacklist(&$page, $action = 'list', $id = null) {
-        require_once('../classes/PLTableEditor.php');
         $page->assign('xorg_title','Polytechnique.org - Administration - Postfix : Blacklist');
         $page->assign('title', 'Blacklist de postfix');
         $table_editor = new PLTableEditor('admin/postfix/blacklist','postfix_blacklist','email', true);
@@ -756,7 +753,6 @@ class AdminModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }
     function handler_postfix_whitelist(&$page, $action = 'list', $id = null) {
-        require_once('../classes/PLTableEditor.php');
         $page->assign('xorg_title','Polytechnique.org - Administration - Postfix : Whitelist');
         $page->assign('title', 'Whitelist de postfix');
         $table_editor = new PLTableEditor('admin/postfix/whitelist','postfix_whitelist','email', true);
@@ -764,7 +760,6 @@ class AdminModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }
     function handler_logger_actions(&$page, $action = 'list', $id = null) {
-        require_once('../classes/PLTableEditor.php');
         $page->assign('xorg_title','Polytechnique.org - Administration - Actions');
         $page->assign('title', 'Gestion des actions de logger');
         $table_editor = new PLTableEditor('admin/logger/actions','logger.actions','id');
@@ -773,7 +768,6 @@ class AdminModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }
     function handler_downtime(&$page, $action = 'list', $id = null) {
-        require_once('../classes/PLTableEditor.php');
         $page->assign('xorg_title','Polytechnique.org - Administration - Coupures');
         $page->assign('title', 'Gestion des coupures');
         $table_editor = new PLTableEditor('admin/downtime','coupures','id');
index 92db93a..8bd9069 100644 (file)
@@ -164,7 +164,6 @@ class AuthModule extends PLModule
         http_redirect('https://www.polytechnique.org/');
     }
     function handler_admin_authgroupesx(&$page, $action = 'list', $id = null) {
-        require_once('../classes/PLTableEditor.php');
         $page->assign('xorg_title','Polytechnique.org - Administration - Auth groupes X');
         $page->assign('title', 'Gestion de l\'authentification centralisée');
         $table_editor = new PLTableEditor('admin/auth-groupes-x','groupesx_auth','id');
index 3529835..03c6d81 100644 (file)
@@ -21,7 +21,7 @@
 
 define ('FPDF_FONTPATH', dirname(__FILE__).'/fonts/');
 require_once '/usr/share/fpdf/fpdf.php';
-require_once dirname(__FILE__).'/../../classes/VarStream.php';
+require_once dirname(__FILE__).'/../../classes/varstream.php';
 
 class ContactsPDF extends FPDF
 {
index 7c96566..a070b57 100644 (file)
@@ -402,7 +402,6 @@ class EventsModule extends PLModule
         $page->assign_by_ref('nl',$nl);
     }
     function handler_admin_nl_cat(&$page, $action = 'list', $id = null) {
-        require_once('../classes/PLTableEditor.php');
         $page->assign('xorg_title','Polytechnique.org - Administration - Newsletter : Catégories');
         $page->assign('title', 'Gestion des catégories de la newsletter');
         $table_editor = new PLTableEditor('admin/newsletter/categories','newsletter_cat','cid');
index dae084c..137bbec 100644 (file)
@@ -316,7 +316,6 @@ class PaymentModule extends PLModule
         $page->assign('erreur', $erreur);
     }
     function handler_admin(&$page, $action = 'list', $id = null) {
-        require_once('../classes/PLTableEditor.php');
         $page->assign('xorg_title','Polytechnique.org - Administration - Paiements');
         $page->assign('title', 'Gestion des télépaiements');
         $table_editor = new PLTableEditor('admin/payments','paiement.paiements','id');
index 862232a..7e2db82 100644 (file)
@@ -19,8 +19,6 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once dirname(__FILE__).'/../../classes/Flagset.php';
-
 class Payment
 {
     // {{{ properties
index 795c99d..429fc09 100644 (file)
@@ -599,7 +599,6 @@ class ProfileModule extends PLModule
 
         require_once 'validations.inc.php';
         require_once 'xorg.misc.inc.php';
-        require_once dirname(__FILE__).'/../classes/Flagset.php';
 
         $res = XDB::query(
                 "SELECT  u.nom, u.nom_usage, u.flags, e.alias
@@ -772,7 +771,6 @@ class ProfileModule extends PLModule
         $page->assign('forlife', $forlife);
     }
     function handler_admin_binets(&$page, $action = 'list', $id = null) {
-        require_once('../classes/PLTableEditor.php');
         $page->assign('xorg_title','Polytechnique.org - Administration - Binets');
         $page->assign('title', 'Gestion des binets');
         $table_editor = new PLTableEditor('admin/binets', 'binets_def', 'id');
@@ -781,7 +779,6 @@ class ProfileModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }
     function handler_admin_formations(&$page, $action = 'list', $id = null) {
-        require_once('../classes/PLTableEditor.php');
         $page->assign('xorg_title','Polytechnique.org - Administration - Formations');
         $page->assign('title', 'Gestion des formations');
         $table_editor = new PLTableEditor('admin/formations','applis_def','id');
@@ -791,7 +788,6 @@ class ProfileModule extends PLModule
         $table_editor->apply($page, $action, $id);
     } 
     function handler_admin_groupesx(&$page, $action = 'list', $id = null) {
-        require_once('../classes/PLTableEditor.php');
         $page->assign('xorg_title','Polytechnique.org - Administration - Groupes X');
         $page->assign('title', 'Gestion des Groupes X');
         $table_editor = new PLTableEditor('admin/groupes-x','groupesx_def','id');
@@ -801,7 +797,6 @@ class ProfileModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }  
     function handler_admin_medals(&$page, $action = 'list', $id = null) {
-        require_once('../classes/PLTableEditor.php');
         $page->assign('xorg_title','Polytechnique.org - Administration - Distinctions');
         $page->assign('title', 'Gestion des Distinctions');
         $table_editor = new PLTableEditor('admin/medals','profile_medals','id');