Rename PlatalPage to PlPage
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sat, 21 Jun 2008 13:31:41 +0000 (15:31 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sat, 21 Jun 2008 13:31:41 +0000 (15:31 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
22 files changed:
classes/csvimporter.php
classes/platal.php
classes/plpage.php [moved from classes/platalpage.php with 99% similarity]
classes/plset.php
classes/pltableeditor.php
classes/plwizard.php
classes/session.php
include/banana/hooks.inc.php
include/marketing.inc.php
include/userset.inc.php
include/xnet/page.inc.php
include/xorg.inc.php
modules/events.php
modules/platal/review.inc.php
modules/profile/decos.inc.php
modules/profile/general.inc.php
modules/profile/groups.inc.php
modules/profile/jobs.inc.php
modules/profile/mentor.inc.php
modules/profile/page.inc.php
modules/profile/skills.inc.php
modules/xnetgrp.php

index 571d227..0f576a0 100644 (file)
@@ -239,7 +239,7 @@ class CSVImporter
     }
 
     /** Handle insertion form
-     * @param $page  PlatalPage to process
+     * @param $page  PlPage to process
      * @param $url   URI of the page
      * @param $field Editable fields
      */
index 4c1f60a..cbcca66 100644 (file)
@@ -231,7 +231,7 @@ class Platal
         return $s_perms->hasFlagCombination($perms);
     }
 
-    private function call_hook(PlatalPage &$page)
+    private function call_hook(PlPage &$page)
     {
         $hook = $this->find_hook();
         if (empty($hook)) {
@@ -269,7 +269,7 @@ class Platal
         return $val;
     }
 
-    public function force_login(PlatalPage &$page)
+    public function force_login(PlPage &$page)
     {
         header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
         if (S::logged()) {
similarity index 99%
rename from classes/platalpage.php
rename to classes/plpage.php
index f3bb2fa..da24f3d 100644 (file)
@@ -21,7 +21,7 @@
 
 require_once 'smarty/libs/Smarty.class.php';
 
-abstract class PlatalPage extends Smarty
+abstract class PlPage extends Smarty
 {
     private $_page_type;
     private $_tpl;
@@ -29,7 +29,7 @@ abstract class PlatalPage extends Smarty
     private $_failure;
     private $_jsonVars;
 
-    // {{{ function PlatalPage()
+    // {{{ function PlPage()
 
     public function __construct($tpl, $type = SKINNED)
     {
index 648d814..7c6168b 100644 (file)
@@ -153,7 +153,7 @@ class PlSet
         return $view;
     }
 
-    public function apply($baseurl, PlatalPage &$page, $view = null, $data = null)
+    public function apply($baseurl, PlPage &$page, $view = null, $data = null)
     {
         $view =& $this->buildView($view, $data);
         if (is_null($view)) {
@@ -181,7 +181,7 @@ class PlSet
 interface PlView
 {
     public function __construct(PlSet &$set, $data, array $params);
-    public function apply(PlatalPage &$page);
+    public function apply(PlPage &$page);
     public function args();
 }
 
@@ -253,7 +253,7 @@ abstract class MultipageView implements PlView
 
     abstract public function templateName();
 
-    public function apply(PlatalPage &$page)
+    public function apply(PlPage &$page)
     {
         $page->assign('order', Env::v('order', $this->defaultkey));
         $page->assign('orders', $this->sortkeys);
index d42d6b8..d364d0e 100644 (file)
@@ -188,7 +188,7 @@ class PLTableEditor
     }
 
     // call when done
-    public function apply(PlatalPage &$page, $action, $id = false)
+    public function apply(PlPage &$page, $action, $id = false)
     {
         $page->changeTpl('core/table-editor.tpl');
         $list = true;
index 3667268..48117d5 100644 (file)
@@ -37,7 +37,7 @@ interface PlWizardPage
 
     /** Prepare the page by assigning to it any useful value.
      */
-    public function prepare(PlatalPage &$page, $id);
+    public function prepare(PlPage &$page, $id);
 
     /** Process information resulting of the application of the page.
      * This function must return a clue indicating the next page to show.
@@ -138,7 +138,7 @@ class PlWizard
         return new $page($this);
     }
 
-    public function apply(PlatalPage &$smarty, $baseurl, $pgid = null, $mode = 'normal')
+    public function apply(PlPage &$smarty, $baseurl, $pgid = null, $mode = 'normal')
     {
         if ($this->stateless && (isset($this->lookup[$pgid]) || isset($this->pages[$pgid]))) { 
             $curpage = is_numeric($pgid) ? $pgid : $this->lookup[$pgid]; 
index e78d597..99a404c 100644 (file)
@@ -98,7 +98,7 @@ class Session
     {
         if (!Session::has_xsrf_token()) {
             global $page;
-            if ($page instanceof PlatalPage) {
+            if ($page instanceof PlPage) {
                 $page->kill("L'opĂ©ration n'a pas pu aboutir, merci de rĂ©essayer.");
             }
         }
index f0a2362..987de13 100644 (file)
@@ -311,7 +311,7 @@ class BananaHandler
         return 'banana/index.tpl';
     }
 
-    public function prepare(PlatalPage &$page, $id)
+    public function prepare(PlPage &$page, $id)
     {
     }
 
index f6dd15d..88eac61 100644 (file)
@@ -276,7 +276,7 @@ class AnnuaireMarketing implements MarketingEngine
         return $this->signature;
     }
 
-    protected function prepareText(PlatalPage &$page, array $user)
+    protected function prepareText(PlPage &$page, array $user)
     {
         $page->assign('intro', $this->getIntro());
         $page->assign('u', $user);
index a35cded..7efd5c1 100644 (file)
@@ -270,7 +270,7 @@ class TrombiView extends MultipageView
         return 'include/plview.trombi.tpl';
     }
 
-    public function apply(PlatalPage &$page)
+    public function apply(PlPage &$page)
     {
         if (!empty($GLOBALS['IS_XNET_SITE'])) {
             global $globals;
@@ -307,7 +307,7 @@ class GeolocView implements PlView
         return $args;
     }
 
-    public function apply(PlatalPage &$page)
+    public function apply(PlPage &$page)
     {
         require_once 'geoloc.inc.php';
         require_once '../modules/search/search.inc.php';
@@ -405,7 +405,7 @@ class GadgetView implements PlView
                  : "");
     }
 
-    public function apply(PlatalPage &$page)
+    public function apply(PlPage &$page)
     {
         $page->assign_by_ref('set',
           $this->set->get($this->fields(), $this->joins(), null, null, null, 5, 0));
index c9ec661..7d47777 100644 (file)
@@ -19,7 +19,7 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-class XnetPage extends PlatalPage
+class XnetPage extends PlPage
 {
     public $nomenu = false;
 
index 0d4274c..ca92d7c 100644 (file)
@@ -28,7 +28,7 @@ $globals->bootstrap(array('NbValid'), 'update_NbValid');
 
 // {{{ class XorgPage
 
-class XorgPage extends PlatalPage
+class XorgPage extends PlPage
 {
     public function __construct($tpl, $type = SKINNED)
     {
index 75ef0b2..bf02c22 100644 (file)
@@ -81,7 +81,7 @@ class EventsModule extends PLModule
         return $res->fetchOneAssoc();
     }
 
-    private function upload_image(PlatalPage &$page, PlUpload &$upload)
+    private function upload_image(PlPage &$page, PlUpload &$upload)
     {
         if (@!$_FILES['image']['tmp_name'] && !Env::v('image_url')) {
             return true;
index 96e6aab..6111253 100644 (file)
@@ -27,7 +27,7 @@ class ReviewPage implements PlWizardPage
     public function template() { return 'platal/review.tpl'; }
     public function process() { }
 
-    public function prepare(PlatalPage &$page, $id)
+    public function prepare(PlPage &$page, $id)
     {
         require_once 'wiki.inc.php';
         $dom = (@$GLOBALS['IS_XNET_SITE'] ? 'ReviewXnet' : 'Review') . '.' . ucfirst($id);
index 0753966..df97147 100644 (file)
@@ -114,7 +114,7 @@ class ProfileDecos extends ProfilePage
         }
     }
 
-    public function _prepare(PlatalPage &$page, $id)
+    public function _prepare(PlPage &$page, $id)
     {
         $res    = XDB::iterator("SELECT  *, FIND_IN_SET('validation', flags) AS validate
                                    FROM  profile_medals
index 1382658..b00542e 100644 (file)
@@ -197,7 +197,7 @@ class ProfileGeneral extends ProfilePage
         }
     }
 
-    public function _prepare(PlatalPage &$page, $id)
+    public function _prepare(PlPage &$page, $id)
     {
         require_once "applis.func.inc.php";
     }
index cd2b705..cd2c447 100644 (file)
@@ -106,7 +106,7 @@ class ProfileGroups extends ProfilePage
         $this->watched['section'] = $this->watched['binets'] = true;
     }
 
-    public function _prepare(PlatalPage &$page, $id)
+    public function _prepare(PlPage &$page, $id)
     {
         $page->assign('mygroups', XDB::iterator("SELECT  a.nom, a.site, a.diminutif, a.unsub_url, a.pub, m.perms
                                                    FROM  groupex.asso    AS a
index 33690c4..ad1e921 100644 (file)
@@ -202,7 +202,7 @@ class ProfileJobs extends ProfilePage
         }
     }
 
-    public function _prepare(PlatalPage &$page, $id)
+    public function _prepare(PlPage &$page, $id)
     {
         $page->assign('secteurs', XDB::iterator("SELECT  id, label
                                                    FROM  emploi_secteur"));
index cbe6a23..673c3b9 100644 (file)
@@ -151,7 +151,7 @@ class ProfileMentor extends ProfilePage
         }
     }
 
-    public function _prepare(PlatalPage &$page, $id)
+    public function _prepare(PlPage &$page, $id)
     {
         $page->assign('secteurs_sel', XDB::iterator("SELECT  id, label
                                                        FROM  emploi_secteur"));
index 139178e..19ff56a 100644 (file)
@@ -290,11 +290,11 @@ abstract class ProfilePage implements PlWizardPage
         return 'profile/base.tpl';
     }
 
-    protected function _prepare(PlatalPage &$page, $id)
+    protected function _prepare(PlPage &$page, $id)
     {
     }
 
-    public function prepare(PlatalPage &$page, $id)
+    public function prepare(PlPage &$page, $id)
     {
         if (count($this->values) == 0) {
             $this->fetchData();
index 8f0ec5e..c3da4f9 100644 (file)
@@ -89,7 +89,7 @@ class ProfileSkills extends ProfilePage
         $this->settings['langues'] = new ProfileSkill('langues', 'lid', 'langue_fr');
     }
 
-    public function _prepare(PlatalPage &$page, $id)
+    public function _prepare(PlPage &$page, $id)
     {
         $page->assign('comp_list', XDB::iterator("SELECT  id, text_fr, FIND_IN_SET('titre',flags) AS title
                                                     FROM  competences_def"));
index e727443..d851442 100644 (file)
@@ -871,7 +871,7 @@ class XnetGrpModule extends PLModule
         }
     }
 
-    private function changeLogin(PlatalPage &$page, array &$user, MMList &$mmlist, $login)
+    private function changeLogin(PlPage &$page, array &$user, MMList &$mmlist, $login)
     {
         require_once 'user.func.inc.php';
         // Search the uid of the user...
@@ -1080,7 +1080,7 @@ class XnetGrpModule extends PLModule
         $page->assign('rss', $rss);
     }
 
-    private function upload_image(PlatalPage &$page, PlUpload &$upload)
+    private function upload_image(PlPage &$page, PlUpload &$upload)
     {
         if (@!$_FILES['image']['tmp_name'] && !Env::v('image_url')) {
             return true;