Fixes deprecated features in PHP 5.3.x.
authorStéphane Jacob <sj@m4x.org>
Wed, 16 Feb 2011 14:13:44 +0000 (15:13 +0100)
committerStéphane Jacob <sj@m4x.org>
Wed, 16 Feb 2011 21:14:19 +0000 (22:14 +0100)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
110 files changed:
classes/address.php
classes/geocoder.php
classes/gmapsgeocoder.php
classes/jobterms.php
classes/user.php
classes/userfilter.php
classes/userfilter/conditions.inc.php
classes/xnet.php
classes/xorg.php
core
include/banana/forum.inc.php
include/banana/hooks.inc.php
include/banana/ml.inc.php
include/banana/moderate.inc.php
include/emails.inc.php
include/googleapps.inc.php
include/marketing.inc.php
include/newsletter.inc.php
include/notifs.inc.php
include/profilefields.inc.php
include/reminder.inc.php
include/reminder/ax_letter.inc.php
include/reminder/email_backup.inc.php
include/reminder/email_warning.inc.php
include/reminder/gapps.inc.php
include/reminder/ml.inc.php
include/reminder/nl.inc.php
include/reminder/no_redirection.inc.php
include/reminder/profile_update.inc.php
include/reminder/promotion_ml.inc.php
include/ufbuilder.inc.php
include/userset.inc.php
include/validations.inc.php
include/validations/aliases.inc.php
include/validations/broken.inc.php
include/validations/entreprises.inc.php
include/validations/evts.inc.php
include/validations/googleapps.inc.php
include/validations/homonymes.inc.php
include/validations/listes.inc.php
include/validations/marketing.inc.php
include/validations/medals.inc.php
include/validations/names.inc.php
include/validations/nl.inc.php
include/validations/orange.inc.php
include/validations/paiements.inc.php
include/validations/photos.inc.php
include/validations/surveys.inc.php
include/webservices/ax/client.inc
include/wiki/e-protect.php
modules/admin.php
modules/admin/homonyms.inc.php
modules/auth.php
modules/axletter.php
modules/bandeau.php
modules/carnet.php
modules/carnet/contacts.pdf.inc.php
modules/carnet/feed.inc.php
modules/carnet/outlook.inc.php
modules/email.php
modules/epletter.php
modules/events.php
modules/events/feed.inc.php
modules/forums.php
modules/fusionax.php
modules/gadgets.php
modules/gadgets/gadgets.inc.php
modules/googleapps.php
modules/lists.php
modules/marketing.php
modules/newsletter.php
modules/openid.php
modules/openid/openid.inc.php
modules/payment.php
modules/payment/money.inc.php
modules/payment/money/bplccyberplus.inc.php
modules/payment/money/cyberpaiement.inc.php
modules/payment/money/paypal.inc.php
modules/platal.php
modules/platal/review.inc.php
modules/poison.php
modules/profile.php
modules/profile/addresses.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/register.php
modules/register/register.inc.php
modules/reminder.php
modules/search.php
modules/stats.php
modules/survey.php
modules/xnet.php
modules/xnetevents.php
modules/xnetevents/xnetevents.inc.php
modules/xnetgrp.php
modules/xnetgrp/feed.inc.php
modules/xnetgrp/mail.inc.php
modules/xnetlists.php
plugins/function.display_address.php
plugins/function.display_education.php
plugins/function.display_phones.php
plugins/function.poison.php
plugins/function.profile.php
plugins/function.select_nat.php
plugins/function.test_email.php

index ba09823..a834a1d 100644 (file)
@@ -364,7 +364,7 @@ class Address
         return $this->phones;
     }
 
-    public function addPhone(Phone &$phone)
+    public function addPhone(Phone $phone)
     {
         if ($phone->linkType() == Phone::LINK_ADDRESS && $phone->pid() == $this->pid) {
             $this->phones[$phone->uniqueId()] = $phone;
index fea1be1..825b920 100644 (file)
 abstract class Geocoder {
     // Geocodes @p the address, and returns the corresponding updated address.
     // Unknown key-value pairs available in the input map are retained as-is.
-    abstract public function getGeocodedAddress(Address &$address);
+    abstract public function getGeocodedAddress(Address $address);
 
     // Cleans the address from its geocoded data
-    abstract public function stripGeocodingFromAddress(Address &$address);
+    abstract public function stripGeocodingFromAddress(Address $address);
 
     // Updates geoloc_administrativeareas, geoloc_subadministrativeareas and
     // geoloc_localities databases with new geocoded data and returns the
     // corresponding id.
-    static public function getAreaId(Address &$address, $area)
+    static public function getAreaId(Address $address, $area)
     {
         static $databases = array(
             'administrativeArea'    => 'geoloc_administrativeareas',
index 3bc8e83..ec42adf 100644 (file)
@@ -36,7 +36,7 @@ class GMapsGeocoder extends Geocoder {
     // Maximum levenshtein distance authorized between input and geocoded text in the whole text.
     const MAX_TOTAL_DISTANCE = 6;
 
-    public function getGeocodedAddress(Address &$address, $defaultLanguage = null, $forceLanguage = false) {
+    public function getGeocodedAddress(Address $address, $defaultLanguage = null, $forceLanguage = false) {
         $this->prepareAddress($address);
         $textAddress = $this->getTextToGeocode($address->text);
         if (is_null($defaultLanguage)) {
@@ -65,7 +65,7 @@ class GMapsGeocoder extends Geocoder {
         }
     }
 
-    public function stripGeocodingFromAddress(Address &$address) {
+    public function stripGeocodingFromAddress(Address $address) {
         $address->geocodedText = null;
         $address->geoloc_choice = null;
         $address->countryId = null;
@@ -80,7 +80,7 @@ class GMapsGeocoder extends Geocoder {
 
     // Updates the address with the geocoded information from Google Maps. Also
     // cleans up the final informations.
-    private function getUpdatedAddress(Address &$address, array $geocodedData, $extraLines, $forceLanguage) {
+    private function getUpdatedAddress(Address $address, array $geocodedData, $extraLines, $forceLanguage) {
         $this->fillAddressWithGeocoding($address, $geocodedData, false);
         $this->formatAddress($address, $extraLines, $forceLanguage);
     }
@@ -96,7 +96,7 @@ class GMapsGeocoder extends Geocoder {
     }
 
     // Prepares address to be geocoded
-    private function prepareAddress(Address &$address) {
+    private function prepareAddress(Address $address) {
         $address->text = preg_replace('/\s*\n\s*/m', "\n", trim($address->text));
     }
 
@@ -181,7 +181,7 @@ class GMapsGeocoder extends Geocoder {
     }
 
     // Fills the address with the geocoded data
-    private function fillAddressWithGeocoding(Address &$address, $geocodedData, $isLocal) {
+    private function fillAddressWithGeocoding(Address $address, $geocodedData, $isLocal) {
         // The geocoded address three is
         // Country -> AdministrativeArea -> SubAdministrativeArea -> Locality -> Thoroughfare
         // with all the possible shortcuts
@@ -282,7 +282,7 @@ class GMapsGeocoder extends Geocoder {
     // Formats the text of the geocoded address using the unused data and
     // compares it to the given address. If they are too different, the user
     // will be asked to choose between them.
-    private function formatAddress(Address &$address, $extraLines, $forceLanguage)
+    private function formatAddress(Address $address, $extraLines, $forceLanguage)
     {
         if ($extraLines) {
             $address->geocodedText = $extraLines . "\n" . $address->geocodedText;
index ae5c758..194a702 100644 (file)
@@ -94,7 +94,7 @@ class JobTerms {
      * subbranches, keeping only the one containing this text in its title or in the title of one of
      * its subbranches.
      */
-    static public function ajaxGetBranch(&$page, $filter = self::ALL) {
+    static public function ajaxGetBranch($page, $filter = self::ALL) {
         pl_content_headers('application/json');
         $page->changeTpl('include/jobterms.branch.tpl', NO_SKIN);
         $subTerms = self::getSubTerms(Env::v('jtid'), $filter, Env::v('text_filter'));
index a0a7b3a..c6a4639 100644 (file)
@@ -587,13 +587,13 @@ class User extends PlUser
         return Profile::getBulkProfilesWithPIDs(array_keys($this->contacts));
     }
 
-    public function isContact(Profile &$profile)
+    public function isContact(Profile $profile)
     {
         $this->fetchContacts();
         return isset($this->contacts[$profile->id()]);
     }
 
-    public function isWatchedUser(Profile &$profile)
+    public function isWatchedUser(Profile $profile)
     {
         return in_array($profile->id(), $this->watchUsers());
     }
@@ -733,7 +733,7 @@ class User extends PlUser
     }
 
     // Merge all infos in other user and then clean this one
-    public function mergeIn(User &$newuser) {
+    public function mergeIn(User $newuser) {
         if ($this->profile()) {
             // Don't disable user with profile in this way.
             global $globals;
index c900cfd..bef41c4 100644 (file)
@@ -214,7 +214,7 @@ class UserFilter extends PlFilter
         return $groups;
     }
 
-    private function getUIDList($uids = null, PlLimit &$limit)
+    private function getUIDList($uids = null, PlLimit $limit)
     {
         $this->requireAccounts();
         $this->buildQuery();
@@ -232,7 +232,7 @@ class UserFilter extends PlFilter
         return $fetched;
     }
 
-    private function getPIDList($pids = null, PlLimit &$limit)
+    private function getPIDList($pids = null, PlLimit $limit)
     {
         $this->requireProfiles();
         $this->buildQuery();
@@ -260,7 +260,7 @@ class UserFilter extends PlFilter
 
     /** Check that the user match the given rule.
      */
-    public function checkUser(PlUser &$user)
+    public function checkUser(PlUser $user)
     {
         $this->requireAccounts();
         $this->buildQuery();
@@ -272,7 +272,7 @@ class UserFilter extends PlFilter
 
     /** Check that the profile match the given rule.
      */
-    public function checkProfile(Profile &$profile)
+    public function checkProfile(Profile $profile)
     {
         $this->requireProfiles();
         $this->buildQuery();
index 766ee0c..7a2ded5 100644 (file)
@@ -1525,7 +1525,7 @@ class UFC_Mentor_Terms extends UserFilterCondition
 abstract class UFC_UserRelated extends UserFilterCondition
 {
     protected $user;
-    public function __construct(PlUser &$user)
+    public function __construct(PlUser $user)
     {
         $this->user =& $user;
     }
@@ -1570,7 +1570,7 @@ class UFC_WatchRegistration extends UFC_UserRelated
 class UFC_WatchPromo extends UFC_UserRelated
 {
     private $grade;
-    public function __construct(PlUser &$user, $grade = UserFilter::GRADE_ING)
+    public function __construct(PlUser $user, $grade = UserFilter::GRADE_ING)
     {
         parent::__construct($user);
         $this->grade = $grade;
index fe5f421..8df2ae3 100644 (file)
@@ -45,7 +45,7 @@ class Xnet extends Platal
         return $ans;
     }
 
-    public function force_login(PlPage &$page)
+    public function force_login(PlPage $page)
     {
         $redirect = S::v('loginX');
         if (!$redirect) {
index 593af76..df9cac9 100644 (file)
@@ -39,7 +39,7 @@ class Xorg extends Platal
         return parent::find_hook();
     }
 
-    public function force_login(PlPage &$page)
+    public function force_login(PlPage $page)
     {
         header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
         if (S::logged()) {
diff --git a/core b/core
index 9261ede..ed4f7de 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 9261ede012d3edda638f614494df31e876e8d758
+Subproject commit ed4f7de016bb136fae9f72256c827ef09d4ea863
index 74bd27f..b17c247 100644 (file)
@@ -30,7 +30,7 @@ class ForumsBanana extends Banana
 {
     private $user;
 
-    public function __construct(User &$user, $params = null)
+    public function __construct(User $user, $params = null)
     {
         $this->user = &$user;
 
index 8e90432..db23f72 100644 (file)
@@ -307,7 +307,7 @@ class PlatalBananaPage extends BananaPage
 
 class BananaHandler
 {
-    public function __construct(PlWizard &$wiz)
+    public function __construct(PlWizard $wiz)
     {
     }
 
@@ -316,7 +316,7 @@ class BananaHandler
         return 'banana/index.tpl';
     }
 
-    public function prepare(PlPage &$page, $id)
+    public function prepare(PlPage $page, $id)
     {
     }
 
@@ -328,7 +328,7 @@ class BananaHandler
     }
 }
 
-function run_banana(&$page, $class, array $args)
+function run_banana($page, $class, array $args)
 {
     $user = S::user();
     $banana = new $class($user, $args);
index 087cfda..6c703cf 100644 (file)
@@ -46,7 +46,7 @@ class MLBanana extends Banana
     static public $domain;
     private $user;
 
-    function __construct(User &$user, $params = null)
+    function __construct(User $user, $params = null)
     {
         global $globals;
         $this->user = &$user;
index 6979d41..d59b2e9 100644 (file)
@@ -55,7 +55,7 @@ class ModerationBanana extends Banana
     static public $domain;
     static public $client;
 
-    function __construct(User &$user, $params = null)
+    function __construct(User $user, $params = null)
     {
         ini_set('memory_limit', '128M');
 
@@ -212,12 +212,12 @@ class BananaMLInterface implements BananaProtocoleInterface
         return array();
     }
 
-    public function send(BananaMessage &$message)
+    public function send(BananaMessage $message)
     {
         return true;
     }
 
-    public function cancel(BananaMessage &$message)
+    public function cancel(BananaMessage $message)
     {
         return true;
     }
index bb7bf1a..a68f1f0 100644 (file)
@@ -27,7 +27,7 @@ define("ERROR_LOOP_EMAIL", 4);
 // function fix_bestalias() {{{1
 // Checks for an existing 'bestalias' among the the current user's aliases, and
 // eventually selects a new bestalias when required.
-function fix_bestalias(User &$user)
+function fix_bestalias(User $user)
 {
     $res = XDB::query("SELECT  COUNT(*)
                          FROM  aliases
@@ -180,7 +180,7 @@ class Bogo
 
     // constructor {{{2
 
-    public function __construct(User &$user)
+    public function __construct(User $user)
     {
         if (!$user) {
             return;
@@ -272,7 +272,7 @@ class EmailRedirection extends Email
 {
     // constructor {{{2
 
-    public function __construct(User &$user, $row)
+    public function __construct(User $user, $row)
     {
         $this->user = &$user;
         $this->sufficient = true;
@@ -408,7 +408,7 @@ class EmailStorage extends Email
     }
 
     // Returns the list of allowed storages for the @p user.
-    static public function get_allowed_storages(User &$user)
+    static public function get_allowed_storages(User $user)
     {
         global $globals;
         $storages = array();
@@ -430,7 +430,7 @@ class EmailStorage extends Email
     }
 
 
-    public function __construct(User &$user, $name)
+    public function __construct(User $user, $name)
     {
         $this->user = &$user;
         $this->email = $name;
@@ -494,7 +494,7 @@ class Redirect
 
     // constructor {{{2
 
-    public function __construct(User &$user)
+    public function __construct(User $user)
     {
         $this->user = &$user;
         $this->bogo = new Bogo($user);
index f4cc69c..a1ae96f 100644 (file)
@@ -124,7 +124,7 @@ class GoogleAppsAccount
 
     // Constructs the account object, by retrieving all informations from the
     // GApps account table, from GApps job queue, and from plat/al validation queue.
-    public function __construct(User &$user)
+    public function __construct(User $user)
     {
         $this->user = &$user;
         if (!$this->user || !$this->user->login()) {
index 9943499..28fc7e6 100644 (file)
@@ -186,7 +186,7 @@ class Marketing
         }
     }
 
-    static public function relance(PlUser &$user, $nbx = -1)
+    static public function relance(PlUser $user, $nbx = -1)
     {
         global $globals;
 
@@ -282,7 +282,7 @@ class AnnuaireMarketing implements MarketingEngine
         return $this->personal_notes;
     }
 
-    protected function prepareText(PlPage &$page, array $user)
+    protected function prepareText(PlPage $page, array $user)
     {
         $page->assign('intro', $this->getIntro());
         $page->assign('u', $user);
index da97493..6e03646 100644 (file)
@@ -174,7 +174,7 @@ class NewsLetter
             }
         }
 
-        return new NLIssue($id, &$this);
+        return new NLIssue($id, $this);
     }
 
     /** Create a new, empty, pending newsletter issue
@@ -831,9 +831,9 @@ class NLIssue
     }
 
     /** Save an article
-     * @p &$a A reference to a NLArticle object (will be modified once saved)
+     * @p $a A reference to a NLArticle object (will be modified once saved)
      */
-    public function saveArticle(&$a)
+    public function saveArticle($a)
     {
         $this->fetchArticles();
 
@@ -927,7 +927,7 @@ class NLIssue
      * @p $page Smarty object
      * @return Either 'true' (if CSS was added to a page) or the raw CSS to add (when $page is null)
      */
-    public function css(&$page = null)
+    public function css($page = null)
     {
         if (!is_null($page)) {
             $page->addCssLink($this->nl->cssFile());
@@ -942,7 +942,7 @@ class NLIssue
      * @p $page Smarty object (using the $this->nl->tplFile() template)
      * @p $user User to use when rendering the template
      */
-    public function toText(&$page, $user)
+    public function toText($page, $user)
     {
         $this->fetchArticles();
 
@@ -959,7 +959,7 @@ class NLIssue
      * @p $page Smarty object (using the $this->nl->tplFile() template)
      * @p $user User to use when rendering the template
      */
-    public function toHtml(&$page, $user)
+    public function toHtml($page, $user)
     {
         $this->fetchArticles();
 
@@ -975,7 +975,7 @@ class NLIssue
     /** Set all 'common' data for the page (those which are required for both web and email rendering)
      * @p $smarty Smarty object (e.g page) which should be filled
      */
-    protected function assignData(&$smarty)
+    protected function assignData($smarty)
     {
         $this->fetchArticles();
 
index a47e27f..4d8013c 100644 (file)
@@ -46,19 +46,19 @@ abstract class WatchOperation
 
     abstract protected function buildCondition(Watch $watch);
     abstract public function getOrder();
-    abstract public function getDate(PlUser &$user);
+    abstract public function getDate(PlUser $user);
 
-    public function publicationDate(PlUser &$user)
+    public function publicationDate(PlUser $user)
     {
         return $this->getDate($user);
     }
 
-    public function seen(PlUser &$user, $last)
+    public function seen(PlUser $user, $last)
     {
         return strtotime($this->getDate($user)) > $last;
     }
 
-    public function getData(PlUser &$user)
+    public function getData(PlUser $user)
     {
         return null;
     }
@@ -72,7 +72,7 @@ class WatchProfileUpdate extends WatchOperation
     public $title = 'Mise$s à jour de fiche';
     private $date = null;
 
-    public static function register(Profile &$profile, $field)
+    public static function register(Profile $profile, $field)
     {
         XDB::execute('INSERT INTO  watch_profile (pid, ts, field)
                            VALUES  ({?}, NOW(), {?})
@@ -95,12 +95,12 @@ class WatchProfileUpdate extends WatchOperation
         return self::$order;
     }
 
-    public function getDate(PlUser &$user)
+    public function getDate(PlUser $user)
     {
         return $user->profile()->last_change;
     }
 
-    public function getData(PlUser &$user)
+    public function getData(PlUser $user)
     {
         $data = XDB::fetchColumn("SELECT  field
                                     FROM  watch_profile
@@ -141,7 +141,7 @@ class WatchRegistration extends WatchOperation
         return self::$order;
     }
 
-    public function getDate(PlUser &$user)
+    public function getDate(PlUser $user)
     {
         return $user->registration_date;
     }
@@ -169,17 +169,17 @@ class WatchDeath extends WatchOperation
         return self::$order;
     }
 
-    public function getDate(PlUser &$user)
+    public function getDate(PlUser $user)
     {
         return $user->profile()->deathdate;
     }
 
-    public function publicationDate(PlUser &$user)
+    public function publicationDate(PlUser $user)
     {
         return $user->profile()->deathdate_rec;
     }
 
-    public function seen(PlUser &$user, $last)
+    public function seen(PlUser $user, $last)
     {
         return strtotime($user->profile()->deathdate_rec) > $last;
     }
@@ -218,17 +218,17 @@ class WatchBirthday extends WatchOperation
         return self::$order;
     }
 
-    public function getDate(PlUser &$user)
+    public function getDate(PlUser $user)
     {
         return $user->profile()->next_birthday;
     }
 
-    public function publicationDate(PlUser &$user)
+    public function publicationDate(PlUser $user)
     {
         return date('Y-m-d', strtotime($user->profile()->next_birthday) - self::WATCH_LIMIT);
     }
 
-    public function seen(PlUser &$user, $last)
+    public function seen(PlUser $user, $last)
     {
         $birthday = strtotime($user->profile()->next_birthday);
         return $birthday >  $last + self::WATCH_LIMIT
@@ -346,7 +346,7 @@ class Watch
     }
 
 
-    private static function getDate(PlUser &$user, $date)
+    private static function getDate(PlUser $user, $date)
     {
         if (is_null($date)) {
             $date = $user->watchLast();
@@ -358,13 +358,13 @@ class Watch
         return $date;
     }
 
-    public static function getCount(PlUser &$user, $date = null)
+    public static function getCount(PlUser $user, $date = null)
     {
         $watch = new Watch($user, $date);
         return $watch->count();
     }
 
-    public static function getEvents(PlUser &$user, $date = null)
+    public static function getEvents(PlUser $user, $date = null)
     {
         $watch = new Watch($user, $date);
         return $watch->events();
index a3c26fd..08e831d 100644 (file)
@@ -148,14 +148,14 @@ class Company
         }
     }
 
-    public function setPhone(Phone &$phone)
+    public function setPhone(Phone $phone)
     {
         if ($phone->linkType() == Phone::LINK_COMPANY && $phone->linkId() == $this->id) {
             $this->phone = $phone;
         }
     }
 
-    public function setAddress(Address &$address)
+    public function setAddress(Address $address)
     {
         if ($address->type == Address::LINK_COMPANY && $address->jobid == $this->id) {
             $this->address = $address;
@@ -221,7 +221,7 @@ class Job
         return $this->address;
     }
 
-    public function addPhone(Phone &$phone)
+    public function addPhone(Phone $phone)
     {
         if ($phone->linkType() == Phone::LINK_JOB && $phone->linkId() == $this->id && $phone->pid() == $this->pid) {
             $this->phones[$phone->uniqueId()] = $phone;
@@ -235,7 +235,7 @@ class Job
         }
     }
 
-    public function addTerm(JobTerm &$term)
+    public function addTerm(JobTerm $term)
     {
         $this->terms[$term->jtid] = $term;
     }
@@ -662,7 +662,7 @@ class ProfileJobs extends ProfileField
         $terms = $jobterms->get();
         foreach ($terms as $term) {
             if ($this->pid == $term->pid && array_key_exists($term->jid, $this->jobs)) {
-                $this->jobs[$term->jid]->addTerm(&$term);
+                $this->jobs[$term->jid]->addTerm($term);
             }
         }
     }
index e11711a..72b987d 100644 (file)
@@ -22,7 +22,7 @@
 // Base class for a reminder; it offers the factory for creating valid reminders
 // tailored for a given user, as well as base methods for reminder impls.
 // Sub-classes should define at least the abstract methods, and the static
-// IsCandidate method (prototype: (User &$user)).
+// IsCandidate method (prototype: (User $user)).
 //
 // Usage:
 //   // Instantiates and returns a valid Reminder object for the user.
@@ -47,7 +47,7 @@ abstract class Reminder
 
     // Constructs the Reminder object from a mandatory User instance, a list of
     // key-value pairs from the `reminder_type` and `reminder` tables.
-    function __construct(User &$user, array $type)
+    function __construct(User $user, array $type)
     {
         $this->user = &$user;
 
@@ -103,7 +103,7 @@ abstract class Reminder
 
     // Displays a reduced version of the reminder and notifies that the action
     // has been taken into account.
-    public function NotifiesAction(&$page)
+    public function NotifiesAction($page)
     {
         pl_content_headers("text/html");
         $page->changeTpl('reminder/notification.tpl', NO_SKIN);
@@ -112,7 +112,7 @@ abstract class Reminder
 
     // Displays the reminder as a standalone html snippet. It should be used
     // when the reminder is the only output of a page.
-    public function DisplayStandalone(&$page, $previous_reminder = null)
+    public function DisplayStandalone($page, $previous_reminder = null)
     {
         pl_content_headers("text/html");
         $page->changeTpl('reminder/base.tpl', NO_SKIN);
@@ -123,7 +123,7 @@ abstract class Reminder
     }
 
     // Prepares the display by assigning template variables.
-    public function Prepare(&$page)
+    public function Prepare($page)
     {
         $page->assign_by_ref('reminder', $this);
     }
@@ -165,7 +165,7 @@ abstract class Reminder
     // Static factories -------------------------------------------------------
 
     // Returns a chosen class using the user data from |user|, and from the database.
-    public static function GetCandidateReminder(User &$user)
+    public static function GetCandidateReminder(User $user)
     {
         $res = XDB::query('SELECT  rt.*, r.status, r.remind_last
                              FROM  reminder_type AS rt
@@ -194,7 +194,7 @@ abstract class Reminder
 
     // Returns an instantiation of the reminder class which name is |name|, using
     // user data from |user|, and from the database.
-    public static function GetByName(User &$user, $name)
+    public static function GetByName(User $user, $name)
     {
         if (!($class = self::GetClassName($name))) {
             return null;
index e742d30..29c1330 100644 (file)
@@ -52,7 +52,7 @@ class ReminderAxLetter extends Reminder
         return 'Xorg/MailsAX';
     }
 
-    public static function IsCandidate(User &$user, $candidate)
+    public static function IsCandidate(User $user, $candidate)
     {
         require_once 'newsletter.inc.php';
         $isSubscribed = NewsLetter::forGroup(NewsLetter::GROUP_AX)->subscriptionState();
index 8c09a50..45984c4 100644 (file)
@@ -55,7 +55,7 @@ class ReminderEmailBackup extends Reminder
         return 'Xorg/IMAP';
     }
 
-    public static function IsCandidate(User &$user, $candidate)
+    public static function IsCandidate(User $user, $candidate)
     {
         if (!$user->checkPerms(User::PERM_MAIL)) {
             return false;
index 881a3e5..6fc5c40 100644 (file)
@@ -41,7 +41,7 @@ class ReminderEmailWarning extends Reminder
         return true;
     }
 
-    public static function IsCandidate(User &$user, $candidate)
+    public static function IsCandidate(User $user, $candidate)
     {
         if (!$user->checkPerms(User::PERM_MAIL)) {
             return false;
index e7f3ee7..f82a407 100644 (file)
@@ -52,7 +52,7 @@ class ReminderGapps extends Reminder
         return 'Xorg/GoogleApps';
     }
 
-    public static function IsCandidate(User &$user, $candidate)
+    public static function IsCandidate(User $user, $candidate)
     {
         if (!$user->checkPerms(User::PERM_MAIL)) {
             return false;
index 0561e98..8244654 100644 (file)
@@ -58,7 +58,7 @@ class ReminderMl extends Reminder
         }
     }
 
-    public function Prepare(&$page)
+    public function Prepare($page)
     {
         parent::Prepare($page);
 
@@ -89,7 +89,7 @@ class ReminderMl extends Reminder
         return "Inscription aux listes de diffusion";
     }
 
-    public static function IsCandidate(User &$user, $candidate)
+    public static function IsCandidate(User $user, $candidate)
     {
         $res = XDB::query("SELECT  COUNT(*) AS lists
                              FROM  register_subs
index 73f1cd8..d03c428 100644 (file)
@@ -49,7 +49,7 @@ class ReminderNl extends Reminder
         return "Inscription à la lettre mensuelle";
     }
 
-    public static function IsCandidate(User &$user, $candidate)
+    public static function IsCandidate(User $user, $candidate)
     {
         require_once 'newsletter.inc.php';
         $isSubscribed = NewsLetter::forGroup(NewsLetter::GROUP_XORG)->subscriptionState();
index 7147edb..4b86a79 100644 (file)
@@ -45,7 +45,7 @@ class ReminderNoRedirection extends Reminder
         return 'Xorg/MesAdressesDeRedirection';
     }
 
-    public static function IsCandidate(User &$user, $candidate)
+    public static function IsCandidate(User $user, $candidate)
     {
         if (!$user->checkPerms(User::PERM_MAIL)) {
             return false;
index f61ce9c..c1ab4df 100644 (file)
@@ -57,7 +57,7 @@ class ReminderProfileUpdate extends Reminder
         }
     }
 
-    public function Prepare(&$page)
+    public function Prepare($page)
     {
         parent::Prepare($page);
         $profile = $this->user->profile();
@@ -96,7 +96,7 @@ class ReminderProfileUpdate extends Reminder
         return new PlFlagSet($flags);
     }
 
-    public static function IsCandidate(User &$user, $candidate)
+    public static function IsCandidate(User $user, $candidate)
     {
         $profile = $user->profile();
         if (!$profile) {
index 5900a00..c311e13 100644 (file)
@@ -60,7 +60,7 @@ class ReminderPromotionMl extends Reminder
         return "Inscription à la liste de diffusion de ta promotion";
     }
 
-    public static function IsCandidate(User &$user, $candidate)
+    public static function IsCandidate(User $user, $candidate)
     {
         $profile = $user->profile();
         if (!$profile) {
index c4b8797..0a5e2ff 100644 (file)
@@ -29,7 +29,7 @@ class StoredUserFilterBuilder
     protected $env;
     protected $ufc;
 
-    public function __construct(UserFilterBuilder &$ufb, PlFilterCondition &$ufc = null, array $env = array())
+    public function __construct(UserFilterBuilder $ufb, PlFilterCondition $ufc = null, array $env = array())
     {
         $this->ufb = $ufb;
         $this->ufc = $ufc;
@@ -142,19 +142,19 @@ class UserFilterBuilder
         $this->ufc = new PFC_And();
 
         foreach ($this->fields as $field) {
-            $this->valid = $field->apply(&$this);
+            $this->valid = $field->apply($this);
             if (!$this->valid) {
                 return;
             }
         }
     }
 
-    public function addCond(PlFilterCondition &$cond)
+    public function addCond(PlFilterCondition $cond)
     {
         $this->ufc->addChild($cond);
     }
 
-    public function addOrder(PlFilterOrder &$order)
+    public function addOrder(PlFilterOrder $order)
     {
         $this->order[] = $order;
     }
@@ -452,7 +452,7 @@ abstract class UFB_Field
         return false;
     }
 
-    public function apply(UserFilterBuilder &$ufb) {
+    public function apply(UserFilterBuilder $ufb) {
         if (!$this->check($ufb)) {
             return false;
         }
@@ -473,15 +473,15 @@ abstract class UFB_Field
 
     /** Create the UFC associated to the field; won't be called
      * if the field is "empty"
-     * @param &$ufb UFB to which fields must be added
+     * @param $ufb UFB to which fields must be added
      * @return UFC
      */
-    abstract protected function buildUFC(UserFilterBuilder &$ufb);
+    abstract protected function buildUFC(UserFilterBuilder $ufb);
 
     /** This function is intended to run consistency checks on the value
      * @return boolean Whether the input is valid
      */
-    abstract protected function check(UserFilterBuilder &$ufb);
+    abstract protected function check(UserFilterBuilder $ufb);
 
     // Simple form interface
 
@@ -509,7 +509,7 @@ abstract class UFBF_Text extends UFB_Field
         $this->maxlength      = $maxlength;
     }
 
-    protected function check(UserFilterBuilder &$ufb)
+    protected function check(UserFilterBuilder $ufb)
     {
         if ($ufb->blank($this->envfield)) {
             $this->empty = true;
@@ -546,7 +546,7 @@ abstract class UFBF_Range extends UFB_Field
         $this->max = $max;
     }
 
-    protected function check(UserFilterBuilder &$ufb)
+    protected function check(UserFilterBuilder $ufb)
     {
         if ($ufb->blank($this->envfield)) {
             $this->empty = true;
@@ -569,7 +569,7 @@ abstract class UFBF_Range extends UFB_Field
  */
 abstract class UFBF_Index extends UFB_Field
 {
-    protected function check(UserFilterBuilder &$ufb)
+    protected function check(UserFilterBuilder $ufb)
     {
         if ($ufb->blank($this->envfield)) {
             $this->empty = true;
@@ -594,7 +594,7 @@ abstract class UFBF_Enum extends UFB_Field
         $this->strict = $strict;
     }
 
-    protected function check(UserFilterBuilder &$ufb)
+    protected function check(UserFilterBuilder $ufb)
     {
         if ($ufb->blank($this->envfield)) {
             $this->empty = true;
@@ -617,7 +617,7 @@ abstract class UFBF_Enum extends UFB_Field
 // {{{ class UFBF_Bool
 abstract class UFBF_Bool extends UFB_Field
 {
-    protected function check(UserFilterBuilder &$ufb)
+    protected function check(UserFilterBuilder $ufb)
     {
         if ($ufb->blank($this->envfield)) {
             $this->empty = true;
@@ -647,7 +647,7 @@ abstract class UFBF_Mixed extends UFB_Field
         $this->envfieldindex = $envfieldindex;
     }
 
-    protected function check(UserFilterBuilder &$ufb)
+    protected function check(UserFilterBuilder $ufb)
     {
         if ($ufb->blank($this->envfieldindex) && !$ufb->hasAlnum($this->envfield)) {
             $this->empty = true;
@@ -683,7 +683,7 @@ abstract class UFBF_Mixed extends UFB_Field
 // {{{ class UFBF_Quick
 class UFBF_Quick extends UFB_Field
 {
-    protected function check(UserFilterBuilder &$ufb)
+    protected function check(UserFilterBuilder $ufb)
     {
         if ($ufb->blank($this->envfield)) {
             $this->empty = true;
@@ -695,7 +695,7 @@ class UFBF_Quick extends UFB_Field
         return true;
     }
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
 
         $r = $s = $this->val;
@@ -786,7 +786,7 @@ class UFBF_SchoolIds extends UFB_Field
         $this->reversed_envfield = $reversed_envfield;
     }
 
-    protected function check(UserFilterBuilder &$ufb)
+    protected function check(UserFilterBuilder $ufb)
     {
         if ($ufb->blank($this->envfield)) {
             $this->empty = true;
@@ -810,7 +810,7 @@ class UFBF_SchoolIds extends UFB_Field
         return true;
     }
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         $ufc = new UFC_SchoolId($this->type, $this->val);
         if ($this->reversed) {
@@ -825,7 +825,7 @@ class UFBF_SchoolIds extends UFB_Field
 // {{{ class UFBF_Name
 class UFBF_Name extends UFBF_Text
 {
-    protected function check(UserFilterBuilder &$ufb)
+    protected function check(UserFilterBuilder $ufb)
     {
         if (!parent::check($ufb)) {
             return false;
@@ -838,7 +838,7 @@ class UFBF_Name extends UFBF_Text
         return true;
     }
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         return new UFC_NameTokens($this->val, array(), $ufb->b('with_soundex'), $ufb->b('exact'));
     }
@@ -858,7 +858,7 @@ class UFBF_Promo extends UFB_Field
         $this->envfieldcomp = $envfieldcomp;
     }
 
-    protected function check(UserFilterBuilder &$ufb)
+    protected function check(UserFilterBuilder $ufb)
     {
         if ($ufb->blank($this->envfield) || $ufb->blank($this->envfieldcomp)) {
             $this->empty = true;
@@ -881,7 +881,7 @@ class UFBF_Promo extends UFB_Field
         return true;
     }
 
-    protected function buildUFC(UserFilterBuilder &$ufb) {
+    protected function buildUFC(UserFilterBuilder $ufb) {
         return new UFC_Promo($this->comp, UserFilter::GRADE_ING, $this->val);
     }
 
@@ -912,7 +912,7 @@ class UFBF_Sex extends UFBF_Enum
         }
     }
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         return new UFC_Sex(self::getVal($this->val));
     }
@@ -923,7 +923,7 @@ class UFBF_Sex extends UFBF_Enum
 // Simple field for selecting only alive, not registered users (for quick search)
 class UFBF_NotRegistered extends UFBF_Bool
 {
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         if ($this->val) {
             return new PFC_And(
@@ -943,7 +943,7 @@ class UFBF_Registered extends UFBF_Enum
         parent::__construct($envfield, $formtext, array(1, 2));
     }
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         if ($this->val == 1) {
             return new UFC_Registered();
@@ -962,7 +962,7 @@ class UFBF_Dead extends UFBF_Enum
         parent::__construct($envfield, $formtext, array(1, 2));
     }
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         if ($this->val == 1) {
             return new PFC_Not(new UFC_Dead());
@@ -992,7 +992,7 @@ class UFBF_Town extends UFBF_Text
         parent::__construct($envfield, $formtext, 2, 30);
     }
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         if ($ufb->isOn($this->onlycurrentfield)) {
             $flags = UFC_Address::FLAG_CURRENT;
@@ -1038,7 +1038,7 @@ class UFBF_Country extends UFBF_Mixed
         $this->onlycurrentfield = $onlycurrentfield;
     }
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         if ($ufb->isOn($this->onlycurrentfield)) {
             $flags = UFC_Address::FLAG_CURRENT;
@@ -1069,7 +1069,7 @@ class UFBF_AdminArea extends UFBF_Index
     }
 
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         if ($ufb->isOn($this->onlycurrentfield)) {
             $flags = UFC_Address::FLAG_CURRENT;
@@ -1100,7 +1100,7 @@ class UFBF_SubAdminArea extends UFBF_Index
     }
 
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         if ($ufb->isOn($this->onlycurrentfield)) {
             $flags = UFC_Address::FLAG_CURRENT;
@@ -1129,7 +1129,7 @@ class UFBF_JobCompany extends UFBF_Text
         $this->onlymentorfield = $onlymentorfield;
     }
 
-    public function check(UserFilterBuilder &$ufb) {
+    public function check(UserFilterBuilder $ufb) {
         if (parent::check($ufb)) {
             # No company check for mentors
            if ($ufb->isOn($this->onlymentorfield)) {
@@ -1141,7 +1141,7 @@ class UFBF_JobCompany extends UFBF_Text
         }
     }
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         return new UFC_Job_Company(UFC_Job_Company::JOBNAME, $this->val);
     }
@@ -1156,7 +1156,7 @@ class UFBF_JobCompany extends UFBF_Text
 // {{{ class UFBF_JobTerms
 class UFBF_JobTerms extends UFBF_Index
 {
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         return new UFC_Job_Terms($this->val);
     }
@@ -1174,7 +1174,7 @@ class UFBF_JobDescription extends UFBF_Text
         $this->onlymentorfield = $onlymentorfield;
     }
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         if ($ufb->isOn($this->onlymentorfield)) {
             return new UFC_Mentor_Expertise($this->val);
@@ -1201,7 +1201,7 @@ class UFBF_JobCv extends UFBF_Text
         $this->onlymentorfield = $onlymentorfield;
     }
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         if ($ufb->isOn($this->onlymentorfield)) {
             return new UFC_Mentor_Expertise($this->val);
@@ -1222,7 +1222,7 @@ class UFBF_Nationality extends UFBF_Mixed
 {
     protected $direnum = DirEnum::NATIONALITIES;
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         return new UFC_Nationality($this->val);
     }
@@ -1234,7 +1234,7 @@ class UFBF_Binet extends UFBF_Mixed
 {
     protected $direnum = DirEnum::BINETS;
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         return new UFC_Binet($this->val);
     }
@@ -1246,7 +1246,7 @@ class UFBF_Group extends UFBF_Mixed
 {
     protected $direnum = DirEnum::GROUPESX;
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         if (count($this->val) == 1) {
             return new UFC_Group($this->val[0]);
@@ -1266,7 +1266,7 @@ class UFBF_Section extends UFBF_Mixed
 {
     protected $direnum = DirEnum::SECTIONS;
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         return new UFC_Section($this->val);
     }
@@ -1278,7 +1278,7 @@ class UFBF_EducationSchool extends UFBF_Mixed
 {
     protected $direnum = DirEnum::EDUSCHOOLS;
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         return new UFC_EducationSchool($this->val);
     }
@@ -1290,7 +1290,7 @@ class UFBF_EducationDegree extends UFBF_Mixed
 {
     protected $direnum = DirEnum::EDUDEGREES;
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         return new UFC_EducationDegree($this->val);
     }
@@ -1302,7 +1302,7 @@ class UFBF_EducationField extends UFBF_Mixed
 {
     protected $direnum = DirEnum::EDUFIELDS;
 
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         return new UFC_EducationField($this->val);
     }
@@ -1312,7 +1312,7 @@ class UFBF_EducationField extends UFBF_Mixed
 // {{{ class UFBF_Comment
 class UFBF_Comment extends UFBF_Text
 {
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         return new UFC_Comment($this->val);
     }
@@ -1322,7 +1322,7 @@ class UFBF_Comment extends UFBF_Text
 // {{{ class UFBF_Phone
 class UFBF_Phone extends UFBF_Text
 {
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         return new UFC_Phone($this->val);
     }
@@ -1341,7 +1341,7 @@ class UFBF_Networking extends UFBF_Text
         $this->networktypefield  = $networktypefield;
     }
 
-    public function check(UserFilterBuilder &$ufb)
+    public function check(UserFilterBuilder $ufb)
     {
         if (parent::check($ufb)) {
             $this->nwtype = $ufb->i($this->networktypefield);
@@ -1356,7 +1356,7 @@ class UFBF_Networking extends UFBF_Text
         return parent::isEmpty() || $this->nwtype == 0;
     }
 
-    public function buildUFC(UserFilterBuilder &$ufb)
+    public function buildUFC(UserFilterBuilder $ufb)
     {
         return new UFC_Networking($this->nwtype, $this->val);
     }
@@ -1371,7 +1371,7 @@ class UFBF_Networking extends UFBF_Text
 // {{{ class UFBF_Mentor
 class UFBF_Mentor extends UFBF_Bool
 {
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         return new UFC_Mentor();
     }
@@ -1381,7 +1381,7 @@ class UFBF_Mentor extends UFBF_Bool
 // {{{ class UFBF_MentorCountry
 class UFBF_MentorCountry extends UFBF_Text
 {
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         return new UFC_Mentor_Country($this->val);
     }
@@ -1391,7 +1391,7 @@ class UFBF_MentorCountry extends UFBF_Text
 // {{{ class UFBF_Mentorterm
 class UFBF_MentorTerm extends UFBF_Index
 {
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         return new UFC_Mentor_Terms($this->val);
     }
@@ -1401,7 +1401,7 @@ class UFBF_MentorTerm extends UFBF_Index
 // {{{ class UFBF_MentorExpertise
 class UFBF_MentorExpertise extends UFBF_Text
 {
-    protected function buildUFC(UserFilterBuilder &$ufb)
+    protected function buildUFC(UserFilterBuilder $ufb)
     {
         return new UFC_Mentor_Expertise($this->val);
     }
index f99faf2..bafddd3 100644 (file)
 
 class UserSet extends PlSet
 {
-    public function __construct(PlFilterCondition &$cond, $orders = null)
+    public function __construct(PlFilterCondition $cond, $orders = null)
     {
         parent::__construct($cond, $orders);
     }
 
-    protected function buildFilter(PlFilterCondition &$cond, $orders)
+    protected function buildFilter(PlFilterCondition $cond, $orders)
     {
         return new UserFilter($cond, $orders);
     }
@@ -34,12 +34,12 @@ class UserSet extends PlSet
 
 class ProfileSet extends PlSet
 {
-    public function __construct(PlFilterCondition &$cond, $orders = null)
+    public function __construct(PlFilterCondition $cond, $orders = null)
     {
         parent::__construct($cond, $orders);
     }
 
-    protected function buildFilter(PlFilterCondition &$cond, $orders)
+    protected function buildFilter(PlFilterCondition $cond, $orders)
     {
         return new ProfileFilter($cond, $orders);
     }
@@ -52,7 +52,7 @@ class SearchSet extends ProfileSet
     protected $score    = null;
     protected $valid    = true;
 
-    public function __construct(UserFilterBuilder &$ufb, PlFilterCondition $cond = null)
+    public function __construct(UserFilterBuilder $ufb, PlFilterCondition $cond = null)
     {
         if (is_null($cond)) {
             $conds = new PFC_And();
@@ -92,7 +92,7 @@ class SearchSet extends ProfileSet
         return $args;
     }
 
-    protected function &getFilterResults(PlFilter &$pf, PlLimit $limit)
+    protected function &getFilterResults(PlFilter $pf, PlLimit $limit)
     {
         $profiles = $pf->getProfiles($limit, Profile::FETCH_MINIFICHES);
         return $profiles;
@@ -191,7 +191,7 @@ abstract class ProfileView extends MultipageView
  */
 class MinificheView extends ProfileView
 {
-    public function __construct(PlSet &$set, array $params)
+    public function __construct(PlSet $set, array $params)
     {
         global $globals;
         $this->entriesPerPage = $globals->search->per_page;
@@ -219,7 +219,7 @@ class MinificheView extends ProfileView
         parent::__construct($set, $params);
     }
 
-    public function apply(PlPage &$page)
+    public function apply(PlPage $page)
     {
         if (array_key_exists('starts_with', $this->params)
             && $this->params['starts_with'] != ""
@@ -241,7 +241,7 @@ class MinificheView extends ProfileView
 
 class MentorView extends ProfileView
 {
-    public function __construct(PlSet &$set, array $params)
+    public function __construct(PlSet $set, array $params)
     {
         $this->entriesPerPage = 10;
         $this->addSort(new PlViewOrder('rand', array(new PFO_Random(S::i('uid'))), 'aléatoirement'));
@@ -266,7 +266,7 @@ class MentorView extends ProfileView
 
 class TrombiView extends ProfileView
 {
-    public function __construct(PlSet &$set, array $params)
+    public function __construct(PlSet $set, array $params)
     {
         $this->entriesPerPage = 24;
         $this->defaultkey = 'name';
@@ -292,7 +292,7 @@ class TrombiView extends ProfileView
         return 'include/plview.trombi.tpl';
     }
 
-    public function apply(PlPage &$page)
+    public function apply(PlPage $page)
     {
         if (!empty($GLOBALS['IS_XNET_SITE'])) {
             global $globals;
@@ -304,12 +304,12 @@ class TrombiView extends ProfileView
 
 class GadgetView implements PlView
 {
-    public function __construct(PlSet &$set, array $params)
+    public function __construct(PlSet $set, array $params)
     {
         $this->set =& $set;
     }
 
-    public function apply(PlPage &$page)
+    public function apply(PlPage $page)
     {
         $page->assign_by_ref('set', $this->set->get(new PlLimit(5, 0)));
     }
@@ -324,12 +324,12 @@ class AddressesView implements PlView
 {
     private $set;
 
-    public function __construct(PlSet &$set, array $params)
+    public function __construct(PlSet $set, array $params)
     {
         $this->set =& $set;
     }
 
-    public function apply(PlPage &$page)
+    public function apply(PlPage $page)
     {
         $pids = $this->set->getIds(new PlLimit());
         $visibility = new ProfileVisibility(ProfileVisibility::VIS_AX);
index ab91cc5..7c87d4c 100644 (file)
@@ -53,7 +53,7 @@ abstract class Validate
      * @param $_unique: set to false if a profile can have multiple requests of this type.
      * @param $_type: request's type.
      */
-    public function __construct(User &$_user, $_unique, $_type)
+    public function __construct(User $_user, $_unique, $_type)
     {
         $this->user   = &$_user;
         $this->stamp  = date('YmdHis');
@@ -463,7 +463,7 @@ abstract class ProfileValidate extends Validate
      * @param $_unique: set to false if a profile can have multiple requests of this type.
      * @param $_type: request's type.
      */
-    public function __construct(User &$_user, Profile &$_profile, $_unique, $_type)
+    public function __construct(User $_user, Profile $_profile, $_unique, $_type)
     {
         parent::__construct($_user, $_unique, $_type);
         $this->profile = &$_profile;
index eb0c2d7..e47e001 100644 (file)
@@ -35,7 +35,7 @@ class AliasReq extends Validate
                   Pas de contrainte pour les tirets ou les points, en revanche le souligné (_) est interdit.";
 
     // constructor {{{2
-    public function __construct(User &$_user, $_alias, $_raison, $_public, $_stamp=0)
+    public function __construct(User $_user, $_alias, $_raison, $_public, $_stamp=0)
     {
         global $globals;
         parent::__construct($_user, true, 'alias', $_stamp);
index 2864547..8e793f9 100644 (file)
@@ -37,7 +37,7 @@ class BrokenReq extends Validate
     // }}}
     // {{{ constructor
 
-    public function __construct(User &$sender, User &$user, $email, $comment = null)
+    public function __construct(User $sender, User $user, $email, $comment = null)
     {
         parent::__construct($sender, false, 'broken');
         $this->m_user      = &$user;
index 318c526..b503abb 100644 (file)
@@ -46,7 +46,7 @@ class EntrReq extends ProfileValidate
     // }}}
     // {{{ constructor
 
-    public function __construct(User &$_user, Profile &$_profile, $_id, $_name, $_acronym, $_url, $_email, $_tel, $_fax, $_address, $_stamp = 0)
+    public function __construct(User $_user, Profile $_profile, $_id, $_name, $_acronym, $_url, $_email, $_tel, $_fax, $_address, $_stamp = 0)
     {
         parent::__construct($_user, $_profile, false, 'entreprise', $_stamp);
         $this->id       = $_id;
index 13a506a..67076a0 100644 (file)
@@ -41,7 +41,7 @@ class EvtReq extends Validate
     // }}}
     // {{{ constructor
 
-    public function __construct($_titre, $_texte, $_pmin, $_pmax, $_expiration, $_comment, User &$_user, PlUpload &$upload = null)
+    public function __construct($_titre, $_texte, $_pmin, $_pmax, $_expiration, $_comment, User $_user, PlUpload $upload = null)
     {
         parent::__construct($_user, false, 'evts');
         $this->titre      = $_titre;
@@ -58,7 +58,7 @@ class EvtReq extends Validate
     // }}}
     // {{{ function readImage()
 
-    private function readImage(PlUpload &$upload)
+    private function readImage(PlUpload $upload)
     {
         if ($upload->exists() && $upload->isType('image')) {
             list($this->imgx, $this->imgy, $this->imgtype) = $upload->imageInfo();
index 3377bf9..fd07a91 100644 (file)
@@ -26,7 +26,7 @@ class GoogleAppsUnsuspendReq extends Validate
                   alors la raison s'affichera (mais seulement 24-48h après la suspension).
                   Si l'utilisateur a désactivé lui-même son compte, la raison sera toujours vierge.";
 
-    public function __construct(User &$_user)
+    public function __construct(User $_user)
     {
         parent::__construct($_user, true, 'gapps-unsuspend');
     }
index 684ef29..f39209e 100644 (file)
@@ -36,7 +36,7 @@ class HomonymeReq extends Validate
     // }}}
     // {{{ constructor
 
-    public function __construct(User &$_user, $_loginbis, $_homonymes_hruid, $warning=true)
+    public function __construct(User $_user, $_loginbis, $_homonymes_hruid, $warning=true)
     {
         $this->warning = $warning;
 
index e7b2b4d..a32ad10 100644 (file)
@@ -42,7 +42,7 @@ class ListeReq extends Validate
     // }}}
     // {{{ constructor
 
-    public function __construct(User &$_user, $_asso, $_liste, $_domain, $_desc, $_advertise,
+    public function __construct(User $_user, $_asso, $_liste, $_domain, $_desc, $_advertise,
                                 $_modlevel, $_inslevel, $_owners, $_members, $_stamp=0)
     {
         parent::__construct($_user, false, 'liste', $_stamp);
index 9261174..9154526 100644 (file)
@@ -40,7 +40,7 @@ class MarkReq extends Validate
     // }}}
     // {{{ constructor
 
-    public function __construct(User &$sender, User &$mark, $email, $perso, $type, $data, $personal_notes)
+    public function __construct(User $sender, User $mark, $email, $perso, $type, $data, $personal_notes)
     {
         parent::__construct($sender, false, 'marketing');
         $this->m_user  = &$mark;
index 9147806..92b821d 100644 (file)
@@ -31,7 +31,7 @@ class MedalReq extends ProfileValidate
     // }}}
     // {{{ constructor
 
-    public function __construct(User &$_user, Profile &$_profile, $_idmedal, $_subidmedal, $_stamp = 0)
+    public function __construct(User $_user, Profile $_profile, $_idmedal, $_subidmedal, $_stamp = 0)
     {
         parent::__construct($_user, $_profile, false, 'medal', $_stamp);
         $this->mid = $_idmedal;
index f39f139..b924b1f 100644 (file)
@@ -39,7 +39,7 @@ class NamesReq extends ProfileValidate
     // }}}
     // {{{ constructor
 
-    public function __construct(User &$_user, Profile &$_profile, $_search_names, $_private_name_end)
+    public function __construct(User $_user, Profile $_profile, $_search_names, $_private_name_end)
     {
         parent::__construct($_user, $_profile, true, 'usage');
         require_once 'name.func.inc.php';
index 2c17f2b..8361cc6 100644 (file)
@@ -33,7 +33,7 @@ class NLReq extends Validate
     // }}}
     // {{{ constructor
 
-    public function __construct(User &$_user, $_title, $_body, $_append)
+    public function __construct(User $_user, $_title, $_body, $_append)
     {
         parent::__construct($_user, false, 'nl');
         $this->art = new NLArticle($_title, $_body, $_append);
index 61883ed..fe51f66 100644 (file)
@@ -38,7 +38,7 @@ class OrangeReq extends ProfileValidate
     // }}}
     // {{{ constructor
 
-    public function __construct(User &$_user, Profile &$_profile, $_newGradYear)
+    public function __construct(User $_user, Profile $_profile, $_newGradYear)
     {
         parent::__construct($_user, $_profile, true, 'orange');
         $this->newGradYear  = $_newGradYear;
index aab352e..a7c4fbd 100644 (file)
@@ -44,7 +44,7 @@ Si le télépaiement n'est pas lié à un groupe ou supérieur à 51 euros, lais
     // }}}
     // {{{ constructor
 
-    public function __construct(User &$_user, $_intitule, $_site, $_montant, $_msg,
+    public function __construct(User $_user, $_intitule, $_site, $_montant, $_msg,
                                 $_montantmin=0, $_montantmax=999, $_asso_id = 0,
                                 $_evt = 0, $_stamp=0)
     {
index 897a077..f187307 100644 (file)
@@ -43,7 +43,7 @@ class PhotoReq extends ProfileValidate
     // }}}
     // {{{ constructor
 
-    public function __construct(User &$_user, Profile &$_profile, PlUpload &$upload, $_stamp = 0)
+    public function __construct(User $_user, Profile $_profile, PlUpload $upload, $_stamp = 0)
     {
         parent::__construct($_user, $_profile, true, 'photo', $_stamp);
         $this->read($upload);
@@ -52,7 +52,7 @@ class PhotoReq extends ProfileValidate
     // }}}
     // {{{ function read
 
-    private function read(PlUpload &$upload)
+    private function read(PlUpload $upload)
     {
         $this->valid = $upload->resizeImage(240, 300, 160, 0, SIZE_MAX);
         if (!$this->valid) {
index b77c92e..e4f7d8e 100644 (file)
@@ -33,7 +33,7 @@ class SurveyReq extends Validate
     // }}}
     // {{{ constructor
 
-    public function __construct($_title, $_description, $_end, $_mode, $_promos, $_questions, User &$_user)
+    public function __construct($_title, $_description, $_end, $_mode, $_promos, $_questions, User $_user)
     {
         parent::__construct($_user, false, 'surveys');
         $this->title       = $_title;
index ebc9163..a662552 100755 (executable)
@@ -1,6 +1,6 @@
 <?php
 
-function ax_load_object(&$obj, $from)
+function ax_load_object($obj, $from)
 {
     foreach ($from as $k=>$v) {
         if (property_exists($obj, $k)) {
index c6144c6..fa01e9b 100644 (file)
@@ -119,7 +119,7 @@ function eProtectDecode ($CompressedEmailAddress,$AlternateText) {
 }\r
 \r
 //----------------------------------------------------------------------\r
-function eProtectEncode ($pagename,&$page,&$new) {\r
+function eProtectEncode ($pagename,$page,&$new) {\r
 //----------------------------------------------------------------------\r
   global $KeepToken, $KPV, $UrlExcludeChars;\r
   if (!@$_POST['post']) return; // only Encode, when posting\r
index ac2b4ed..d82b6d5 100644 (file)
@@ -55,13 +55,13 @@ class AdminModule extends PLModule
         );
     }
 
-    function handler_phpinfo(&$page)
+    function handler_phpinfo($page)
     {
         phpinfo();
         exit;
     }
 
-    function handler_get_rights(&$page)
+    function handler_get_rights($page)
     {
         if (S::suid()) {
             $page->kill('Déjà en SUID');
@@ -85,7 +85,7 @@ class AdminModule extends PLModule
         }
     }
 
-    function handler_set_skin(&$page)
+    function handler_set_skin($page)
     {
         S::assert_xsrf_token();
         S::set('skin', Post::s('change_skin'));
@@ -96,13 +96,13 @@ class AdminModule extends PLModule
         }
     }
 
-    function handler_default(&$page)
+    function handler_default($page)
     {
         $page->changeTpl('admin/index.tpl');
         $page->setTitle('Administration');
     }
 
-    function handler_postfix_delayed(&$page)
+    function handler_postfix_delayed($page)
     {
         $page->changeTpl('admin/postfix_delayed.tpl');
         $page->setTitle('Administration - Postfix : Retardés');
@@ -128,7 +128,7 @@ class AdminModule extends PLModule
         $page->assign_by_ref('mails', $sql);
     }
 
-    function handler_postfix_regexpsbounces(&$page, $new = null) {
+    function handler_postfix_regexpsbounces($page, $new = null) {
         $page->changeTpl('admin/emails_bounces_re.tpl');
         $page->setTitle('Administration - Postfix : Regexps Bounces');
         $page->assign('new', $new);
@@ -294,7 +294,7 @@ class AdminModule extends PLModule
 
     // }}}
 
-    function handler_logger(&$page, $action = null, $arg = null) {
+    function handler_logger($page, $action = null, $arg = null) {
         if ($action == 'session') {
 
             // we are viewing a session
@@ -396,7 +396,7 @@ class AdminModule extends PLModule
         $page->setTitle('Administration - Logs des sessions');
     }
 
-    function handler_user(&$page, $login = false)
+    function handler_user($page, $login = false)
     {
         global $globals;
         $page->changeTpl('admin/user.tpl');
@@ -750,7 +750,7 @@ class AdminModule extends PLModule
         return null;
     }
 
-    private static function formatNewUser(&$page, $infosLine, $separator, $promo, $size)
+    private static function formatNewUser($page, $infosLine, $separator, $promo, $size)
     {
         $infos = explode($separator, $infosLine);
         if (sizeof($infos) > $size || sizeof($infos) < 2) {
@@ -774,7 +774,7 @@ class AdminModule extends PLModule
         return $infos;
     }
 
-    private static function formatSex(&$page, $sex, $line)
+    private static function formatSex($page, $sex, $line)
     {
         switch ($sex) {
           case 'F':
@@ -794,7 +794,7 @@ class AdminModule extends PLModule
         return date("Y-m-d", strtotime(str_replace('/', '-', $birthDate)));
     }
 
-    function handler_add_accounts(&$page, $action = null, $promo = null)
+    function handler_add_accounts($page, $action = null, $promo = null)
     {
         $page->changeTpl('admin/add_accounts.tpl');
 
@@ -936,7 +936,7 @@ class AdminModule extends PLModule
         }
     }
 
-    function handler_homonyms(&$page, $op = 'list', $target = null)
+    function handler_homonyms($page, $op = 'list', $target = null)
     {
         $page->changeTpl('admin/homonymes.tpl');
         $page->setTitle('Administration - Homonymes');
@@ -1003,7 +1003,7 @@ class AdminModule extends PLModule
         }
     }
 
-    function handler_deaths(&$page, $promo = 0, $validate = false)
+    function handler_deaths($page, $promo = 0, $validate = false)
     {
         $page->changeTpl('admin/deces_promo.tpl');
         $page->setTitle('Administration - Deces');
@@ -1053,7 +1053,7 @@ class AdminModule extends PLModule
         $page->assign('profileList', $res);
     }
 
-    function handler_dead_but_active(&$page)
+    function handler_dead_but_active($page)
     {
         $page->changeTpl('admin/dead_but_active.tpl');
         $page->setTitle('Administration - Décédés');
@@ -1071,7 +1071,7 @@ class AdminModule extends PLModule
         $page->assign('dead', $res);
     }
 
-    function handler_validate(&$page, $action = 'list', $id = null)
+    function handler_validate($page, $action = 'list', $id = null)
     {
         $page->changeTpl('admin/validation.tpl');
         $page->setTitle('Administration - Valider une demande');
@@ -1129,7 +1129,7 @@ class AdminModule extends PLModule
         $page->assign('isAdmin', S::admin());
     }
 
-    function handler_validate_answers(&$page, $action = 'list', $id = null)
+    function handler_validate_answers($page, $action = 'list', $id = null)
     {
         $page->setTitle('Administration - Réponses automatiques de validation');
         $page->assign('title', 'Gestion des réponses automatiques');
@@ -1140,7 +1140,7 @@ class AdminModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }
 
-    function handler_skins(&$page, $action = 'list', $id = null)
+    function handler_skins($page, $action = 'list', $id = null)
     {
         $page->setTitle('Administration - Skins');
         $page->assign('title', 'Gestion des skins');
@@ -1154,7 +1154,7 @@ class AdminModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }
 
-    function handler_postfix_blacklist(&$page, $action = 'list', $id = null)
+    function handler_postfix_blacklist($page, $action = 'list', $id = null)
     {
         $page->setTitle('Administration - Postfix : Blacklist');
         $page->assign('title', 'Blacklist de postfix');
@@ -1164,7 +1164,7 @@ class AdminModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }
 
-    function handler_postfix_whitelist(&$page, $action = 'list', $id = null)
+    function handler_postfix_whitelist($page, $action = 'list', $id = null)
     {
         $page->setTitle('Administration - Postfix : Whitelist');
         $page->assign('title', 'Whitelist de postfix');
@@ -1173,7 +1173,7 @@ class AdminModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }
 
-    function handler_mx_broken(&$page, $action = 'list', $id = null)
+    function handler_mx_broken($page, $action = 'list', $id = null)
     {
         $page->setTitle('Administration - MX Défaillants');
         $page->assign('title', 'MX Défaillant');
@@ -1184,7 +1184,7 @@ class AdminModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }
 
-    function handler_logger_actions(&$page, $action = 'list', $id = null)
+    function handler_logger_actions($page, $action = 'list', $id = null)
     {
         $page->setTitle('Administration - Actions');
         $page->assign('title', 'Gestion des actions de logger');
@@ -1194,7 +1194,7 @@ class AdminModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }
 
-    function handler_downtime(&$page, $action = 'list', $id = null)
+    function handler_downtime($page, $action = 'list', $id = null)
     {
         $page->setTitle('Administration - Coupures');
         $page->assign('title', 'Gestion des coupures');
@@ -1242,7 +1242,7 @@ class AdminModule extends PLModule
 
     }
 
-    function handler_account_types(&$page, $action = 'list', $id = null)
+    function handler_account_types($page, $action = 'list', $id = null)
     {
         $page->setTitle('Administration - Types de comptes');
         $page->assign('title', 'Gestion des types de comptes');
@@ -1252,7 +1252,7 @@ class AdminModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }
 
-    function handler_wiki(&$page, $action = 'list', $wikipage = null, $wikipage2 = null)
+    function handler_wiki($page, $action = 'list', $wikipage = null, $wikipage2 = null)
     {
         if (S::hasAuthToken()) {
            $page->setRssLink('Changement Récents',
@@ -1320,7 +1320,7 @@ class AdminModule extends PLModule
         $page->assign('perms_opts', $perms);
     }
 
-    function handler_ipwatch(&$page, $action = 'list', $ip = null)
+    function handler_ipwatch($page, $action = 'list', $ip = null)
     {
         $page->changeTpl('admin/ipwatcher.tpl');
 
@@ -1428,7 +1428,7 @@ class AdminModule extends PLModule
         }
     }
 
-    function handler_icons(&$page)
+    function handler_icons($page)
     {
         $page->changeTpl('admin/icons.tpl');
         $dh = opendir('../htdocs/images/icons');
@@ -1445,7 +1445,7 @@ class AdminModule extends PLModule
         $page->assign('icons', $icons);
     }
 
-    function handler_account_watch(&$page)
+    function handler_account_watch($page)
     {
         $page->changeTpl('admin/accounts.tpl');
         $page->assign('disabled', XDB::iterator('SELECT  a.hruid, FIND_IN_SET(\'watch\', a.flags) AS watch,
@@ -1459,7 +1459,7 @@ class AdminModule extends PLModule
                                              ORDER BY  a.hruid'));
     }
 
-    function handler_jobs(&$page, $id = -1)
+    function handler_jobs($page, $id = -1)
     {
         $page->changeTpl('admin/jobs.tpl');
 
@@ -1542,7 +1542,7 @@ class AdminModule extends PLModule
         }
     }
 
-    function handler_profile(&$page)
+    function handler_profile($page)
     {
         $page->changeTpl('admin/profile.tpl');
 
index 1a2ff45..0d22b94 100644 (file)
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-function select_if_homonyme(PlUser &$user) {
+function select_if_homonyme(PlUser $user) {
     return XDB::fetchOneCell("SELECT  a.alias
                                 FROM  aliases AS a
                                WHERE  a.uid = {?} AND a.expire != ''",
                              $user->id());
 }
 
-function send_warning_homonyme(PlUser &$user, $loginbis) {
+function send_warning_homonyme(PlUser $user, $loginbis) {
     global $globals;
     $cc = "support+homonyme@" . $globals->mail->domain;
     $FROM = "\"Support Polytechnique.org\" <$cc>";
@@ -38,7 +38,7 @@ function send_warning_homonyme(PlUser &$user, $loginbis) {
     $mymail->sendTo($user);
 }
 
-function send_robot_homonyme(PlUser &$user, $loginbis) {
+function send_robot_homonyme(PlUser $user, $loginbis) {
     global $globals;
     $cc = "support+homonyme@" . $globals->mail->domain;
     $FROM = "\"Support Polytechnique.org\" <$cc>";
@@ -50,7 +50,7 @@ function send_robot_homonyme(PlUser &$user, $loginbis) {
     $mymail->sendTo($user);
 }
 
-function switch_bestalias(PlUser &$user, $loginbis) {
+function switch_bestalias(PlUser $user, $loginbis) {
     // check if loginbis was the bestalias
     $bestailas = XDB::fetchOneCell("SELECT  alias
                                       FROM  aliases
index 2c39af9..6d9eae3 100644 (file)
@@ -36,14 +36,14 @@ class AuthModule extends PLModule
         );
     }
 
-    function handler_chall(&$page)
+    function handler_chall($page)
     {
         $_SESSION["chall"] = uniqid(rand(), 1);
         echo $_SESSION["chall"] . "\n" . session_id();
         exit;
     }
 
-    function handler_econf(&$page)
+    function handler_econf($page)
     {
         global $globals;
 
@@ -76,7 +76,7 @@ class AuthModule extends PLModule
         exit;
     }
 
-    function handler_manageurs(&$page)
+    function handler_manageurs($page)
     {
         global $globals;
 
@@ -99,17 +99,17 @@ class AuthModule extends PLModule
         exit;
     }
 
-    function handler_redirect(&$page)
+    function handler_redirect($page)
     {
         http_redirect(Env::v('dest', '/'));
     }
 
-    function handler_groupex_old(&$page)
+    function handler_groupex_old($page)
     {
         return $this->handler_groupex($page, 'iso-8859-1');
     }
 
-    function handler_groupex(&$page, $charset = 'utf8')
+    function handler_groupex($page, $charset = 'utf8')
     {
         $this->load('auth.inc.php');
         $page->assign('referer', true);
@@ -157,7 +157,7 @@ class AuthModule extends PLModule
         pl_redirect('/');
     }
 
-    function handler_admin_authgroupesx(&$page, $action = 'list', $id = null)
+    function handler_admin_authgroupesx($page, $action = 'list', $id = null)
     {
         $page->setTitle('Administration - Auth groupes X');
         $page->assign('title', 'Gestion de l\'authentification centralisée');
index 9467dd0..9ffb0e3 100644 (file)
@@ -43,7 +43,7 @@ class AXLetterModule extends NewsletterModule
         return NewsLetter::forGroup(NewsLetter::GROUP_AX);
     }
 
-    function handler_out(&$page, $hash = null)
+    function handler_out($page, $hash = null)
     {
         if (!$hash) {
             if (!S::logged()) {
index 09d0ad6..77b4fcb 100644 (file)
@@ -30,14 +30,14 @@ class BandeauModule extends PLModule
         );
     }
 
-    function handler_icone(&$page)
+    function handler_icone($page)
     {
         pl_cached_content_headers("image/png");
         readfile('../htdocs/images/x.png');
         exit();
     }
 
-    function handler_html(&$page, $login = '')
+    function handler_html($page, $login = '')
     {
         pl_cached_content_headers("text/html");
         $page->changeTpl('skin/common.bandeau.tpl', NO_SKIN);
@@ -45,7 +45,7 @@ class BandeauModule extends PLModule
         $page->assign('seed', $login);
     }
 
-    function handler_css(&$page)
+    function handler_css($page)
     {
         pl_cached_content_headers("text/css");
         readfile('../htdocs/css/bandeau.css');
index 2c9f629..944b8a8 100644 (file)
@@ -39,7 +39,7 @@ class CarnetModule extends PLModule
         );
     }
 
-    function _add_rss_link(&$page)
+    function _add_rss_link($page)
     {
         if (!S::hasAuthToken()) {
             return;
@@ -48,14 +48,14 @@ class CarnetModule extends PLModule
                           '/carnet/rss/' . S::v('hruid') . '/' . S::user()->token . '/rss.xml');
     }
 
-    function handler_index(&$page)
+    function handler_index($page)
     {
         $page->changeTpl('carnet/index.tpl');
         $page->setTitle('Mon carnet');
         $this->_add_rss_link($page);
     }
 
-    function handler_panel(&$page)
+    function handler_panel($page)
     {
         $page->changeTpl('carnet/panel.tpl');
 
@@ -79,7 +79,7 @@ class CarnetModule extends PLModule
         $this->_add_rss_link($page);
     }
 
-    private function getSinglePromotion(PlPage &$page, $promo)
+    private function getSinglePromotion(PlPage $page, $promo)
     {
         if (!(is_int($promo) || ctype_digit($promo)) || $promo < 1920 || $promo > date('Y')) {
             $page->trigError('Promotion invalide&nbsp;: ' . $promo . '.');
@@ -88,7 +88,7 @@ class CarnetModule extends PLModule
         return (int)$promo;
     }
 
-    private function getPromo(PlPage &$page, $promo)
+    private function getPromo(PlPage $page, $promo)
     {
         if (strpos($promo, '-') === false) {
             $promo = $this->getSinglePromotion($page, $promo);
@@ -119,7 +119,7 @@ class CarnetModule extends PLModule
         return $array;
     }
 
-    private function addPromo(PlPage &$page, $promo)
+    private function addPromo(PlPage $page, $promo)
     {
         $promos = $this->getPromo($page, $promo);
         if (!$promos || count($promos) == 0) {
@@ -135,7 +135,7 @@ class CarnetModule extends PLModule
         Platal::session()->updateNbNotifs();
     }
 
-    private function delPromo(PlPage &$page, $promo)
+    private function delPromo(PlPage $page, $promo)
     {
         $promos = $this->getPromo($page, $promo);
         if (!$promos || count($promos) == 0) {
@@ -152,7 +152,7 @@ class CarnetModule extends PLModule
         Platal::session()->updateNbNotifs();
     }
 
-    public function addNonRegistered(PlPage &$page, PlUser &$user)
+    public function addNonRegistered(PlPage $page, PlUser $user)
     {
         XDB::execute('INSERT IGNORE INTO  watch_nonins (uid, ni_id)
                                   VALUES  ({?}, {?})', S::i('uid'), $user->id());
@@ -160,7 +160,7 @@ class CarnetModule extends PLModule
         Platal::session()->updateNbNotifs();
     }
 
-    public function delNonRegistered(PlPage &$page, PlUser &$user)
+    public function delNonRegistered(PlPage $page, PlUser $user)
     {
         XDB::execute('DELETE FROM  watch_nonins
                             WHERE  uid = {?} AND ni_id = {?}',
@@ -169,7 +169,7 @@ class CarnetModule extends PLModule
         Platal::session()->updateNbNotifs();
     }
 
-    public function handler_notifs(&$page, $action = null, $arg = null)
+    public function handler_notifs($page, $action = null, $arg = null)
     {
         $page->changeTpl('carnet/notifs.tpl');
 
@@ -265,7 +265,7 @@ class CarnetModule extends PLModule
         $page->assign('actions', $actions);
     }
 
-    function handler_contacts(&$page, $action = null, $subaction = null, $ssaction = null)
+    function handler_contacts($page, $action = null, $subaction = null, $ssaction = null)
     {
         $page->setTitle('Mes contacts');
         $this->_add_rss_link($page);
@@ -332,7 +332,7 @@ class CarnetModule extends PLModule
         //}
     }
 
-    function handler_pdf(&$page, $arg0 = null, $arg1 = null)
+    function handler_pdf($page, $arg0 = null, $arg1 = null)
     {
         $this->load('contacts.pdf.inc.php');
         $user = S::user();
@@ -358,7 +358,7 @@ class CarnetModule extends PLModule
         exit;
     }
 
-    function handler_rss(&$page, $user = null, $hash = null)
+    function handler_rss($page, $user = null, $hash = null)
     {
         $this->load('feed.inc.php');
         $feed = new CarnetFeed();
@@ -378,7 +378,7 @@ class CarnetModule extends PLModule
         );
     }
 
-    function handler_csv_birthday(&$page, $alias = null, $hash = null)
+    function handler_csv_birthday($page, $alias = null, $hash = null)
     {
         $user = Platal::session()->tokenAuth($alias, $hash);
         if (is_null($user)) {
@@ -411,7 +411,7 @@ class CarnetModule extends PLModule
         pl_content_headers("text/comma-separated-values;charset=".$encoding);
     }
 
-    function handler_ical(&$page, $alias = null, $hash = null)
+    function handler_ical($page, $alias = null, $hash = null)
     {
         $user = Platal::session()->tokenAuth($alias, $hash);
         if (is_null($user)) {
@@ -433,7 +433,7 @@ class CarnetModule extends PLModule
         pl_content_headers("text/calendar");
     }
 
-    function handler_vcard(&$page, $photos = null)
+    function handler_vcard($page, $photos = null)
     {
         $pf = new ProfileFilter(new UFC_Contact(S::user()));
         $vcard = new VCard($photos == 'photos');
@@ -441,7 +441,7 @@ class CarnetModule extends PLModule
         $vcard->show();
     }
 
-    function handler_csv(&$page, $alias = null, $hash = null)
+    function handler_csv($page, $alias = null, $hash = null)
     {
         $user = Platal::session()->tokenAuth($alias, $hash);
         if (is_null($user)) {
index fa284fc..65bed6b 100644 (file)
@@ -244,7 +244,7 @@ class ContactsPDF extends FPDF
         return $count;
     }
 
-    public static function AddContact(ContactsPDF $self, Profile &$profile, $wp = true)
+    public static function AddContact(ContactsPDF $self, Profile $profile, $wp = true)
     {
         /* infamous hack :
            1- we store the current state.
index 96f45f9..0351dc7 100644 (file)
@@ -27,7 +27,7 @@ class CarnetFeedIterator implements PlIterator
     private $notifs;
     private $it;
 
-    public function __construct(PlUser &$owner)
+    public function __construct(PlUser $owner)
     {
         $notifs = Watch::getEvents($owner);
         $infos  = array();
@@ -90,7 +90,7 @@ class CarnetFeed extends PlFeed
                             'carnet/rss.tpl');
     }
 
-    protected function fetch(PlUser &$user)
+    protected function fetch(PlUser $user)
     {
         return new CarnetFeedIterator($user);
     }
index 66520a9..e7eb413 100644 (file)
@@ -25,7 +25,7 @@ class Outlook {
         'fr' => array("Nom","Titre","Prénom","Deuxième prénom","Nom","Suffixe","Surnom","Société ","Service ","Titre","Rue (bureau)","Rue (bureau) 2","Rue (bureau) 3","Ville (bureau)","Dép/Région (bureau)","Code postal (bureau)","Pays (bureau)","Rue (domicile)","Rue (domicile) 2","Rue (domicile) 3","Ville (domicile)","Dép/Région (domicile)","Code postal (domicile)","Pays (domicile)","Rue (autre)","Rue (autre) 2","Rue (autre) 3","Ville (autre)","Dép/Région (autre)","Code postal (autre)","Pays (autre)","Téléphone de l'assistant(e)","Télécopie (bureau)","Téléphone (bureau)","Téléphone 2 (bureau)","Rappel","Téléphone (voiture)","Téléphone société","Télécopie (domicile)","Téléphone (domicile)","Téléphone 2 (domicile)","RNIS","Tél. mobile","Télécopie (autre)","Téléphone (autre)","Récepteur de radiomessagerie","Téléphone principal","Radio téléphone","Téléphone TDD/TTY","Télex","Adresse de messagerie","Type de messagerie","Nom complet de l'adresse de messagerie","Adresse de messagerie 2","Type de messagerie 2","Nom complet de l'adresse de messagerie 2","Adresse de messagerie 3","Type de messagerie 3","Nom complet de l'adresse de messagerie 3","Anniversaire","Anniversaire de mariage ou fête","Autre boîte postale","B.P. professionnelle","Boîte postale du domicile","Bureau","Catégories","Code gouvernement","Compte","Conjoint(e)","Critère de diffusion","Disponibilité Internet","Emplacement","Enfants","Informations facturation","Initiales","Kilométrage","Langue","Mots clés","Nom de l'assistant(e)","Notes","Numéro d'identification de l'organisation","Page Web","Passe-temps","Priorité","Privé","Profession","Recommandé par","Responsable","Serveur d'annuaire","Sexe","Utilisateur 1","Utilisateur 2","Utilisateur 3","Utilisateur 4"),
         );
 
-    private static function add_address(&$adr, &$contact, $adr_type = 'autre') {
+    private static function add_address($adr, $contact, $adr_type = 'autre') {
         $contact['Rue ('.$adr_type.')'] = $adr->text;
         $contact['Code postal ('.$adr_type.')'] = $adr->postalCode;
         $contact['Ville ('.$adr_type.')'] = $adr->locality;
@@ -42,7 +42,7 @@ class Outlook {
         }
     }
 
-    private static function profile_to_contact(&$p) {
+    private static function profile_to_contact($p) {
         $contact = array(
             'Prénom' => $p->firstName(),
             'Nom' => $p->lastName(),
@@ -54,15 +54,15 @@ class Outlook {
         // Homes
         $adrs = $p->iterAddresses(Profile::ADDRESS_PERSO);
         if ($adr = $adrs->next()) {
-            Outlook::add_address(&$adr, &$contact, 'domicile');
+            Outlook::add_address($adr, $contact, 'domicile');
         }
         if ($adr = $adrs->next()) {
-            Outlook::add_address(&$adr, &$contact, 'autre');
+            Outlook::add_address($adr, $contact, 'autre');
         }
         // Pro
         $adrs = $p->iterAddresses(Profile::ADDRESS_PRO);
         if ($adr = $adrs->next()) {
-            Outlook::add_address(&$adr, &$contact, 'bureau');
+            Outlook::add_address($adr, $contact, 'bureau');
         }
         $mainjob = $p->getMainJob();
         if ($mainjob && $mainjob->company) {
@@ -131,7 +131,7 @@ class Outlook {
         }
         echo "\r\n";
         foreach ($profiles as &$p) {
-            $values = Outlook::profile_to_contact(&$p);
+            $values = Outlook::profile_to_contact($p);
             foreach ($fields as $i => $k) {
                 if ($i != 0) {
                     echo ',';
index cf06908..c0473f7 100644 (file)
@@ -45,7 +45,7 @@ class EmailModule extends PLModule
         );
     }
 
-    function handler_emails(&$page, $action = null, $email = null)
+    function handler_emails($page, $action = null, $email = null)
     {
         global $globals;
         require_once 'emails.inc.php';
@@ -104,7 +104,7 @@ class EmailModule extends PLModule
         $page->assign('melix', $res->fetchOneCell());
     }
 
-    function handler_alias(&$page, $action = null, $value = null)
+    function handler_alias($page, $action = null, $value = null)
     {
         global $globals;
 
@@ -204,7 +204,7 @@ class EmailModule extends PLModule
         $page->assign('mail_public', $visibility);
     }
 
-    function handler_redirect(&$page, $action = null, $email = null)
+    function handler_redirect($page, $action = null, $email = null)
     {
         global $globals;
 
@@ -316,7 +316,7 @@ class EmailModule extends PLModule
         fill_email_combobox($page);
     }
 
-    function handler_antispam(&$page, $statut_filtre = null)
+    function handler_antispam($page, $statut_filtre = null)
     {
         require_once 'emails.inc.php';
         $wp = new PlWikiPage('Xorg.Antispam');
@@ -332,7 +332,7 @@ class EmailModule extends PLModule
         $page->assign('filtre', $bogo->level());
     }
 
-    function handler_submit(&$page)
+    function handler_submit($page)
     {
         $wp = new PlWikiPage('Xorg.Mails');
         $wp->buildCache();
@@ -367,7 +367,7 @@ class EmailModule extends PLModule
         }
     }
 
-    function handler_send(&$page)
+    function handler_send($page)
     {
         $page->changeTpl('emails/send.tpl');
 
@@ -495,7 +495,7 @@ class EmailModule extends PLModule
         $page->assign('user', S::user());
     }
 
-    function handler_test(&$page, $hruid = null)
+    function handler_test($page, $hruid = null)
     {
         require_once 'emails.inc.php';
 
@@ -525,7 +525,7 @@ class EmailModule extends PLModule
         exit;
     }
 
-    function handler_rewrite_in(&$page, $mail, $hash)
+    function handler_rewrite_in($page, $mail, $hash)
     {
         $page->changeTpl('emails/rewrite.tpl');
         $page->assign('option', 'in');
@@ -553,7 +553,7 @@ class EmailModule extends PLModule
         return PL_NOT_FOUND;
     }
 
-    function handler_rewrite_out(&$page, $mail, $hash)
+    function handler_rewrite_out($page, $mail, $hash)
     {
         $page->changeTpl('emails/rewrite.tpl');
         $page->assign('option', 'out');
@@ -594,7 +594,7 @@ class EmailModule extends PLModule
         return PL_NOT_FOUND;
     }
 
-    function handler_imap_in(&$page, $hash = null, $login = null)
+    function handler_imap_in($page, $hash = null, $login = null)
     {
         $page->changeTpl('emails/imap_register.tpl');
         $user = null;
@@ -628,7 +628,7 @@ class EmailModule extends PLModule
         }
     }
 
-    function handler_broken(&$page, $warn = null, $email = null)
+    function handler_broken($page, $warn = null, $email = null)
     {
         require_once 'emails.inc.php';
         $wp = new PlWikiPage('Xorg.PatteCassée');
@@ -694,7 +694,7 @@ class EmailModule extends PLModule
         }
     }
 
-    function handler_duplicated(&$page, $action = 'list', $email = null)
+    function handler_duplicated($page, $action = 'list', $email = null)
     {
         $page->changeTpl('emails/duplicated.tpl');
 
@@ -788,7 +788,7 @@ class EmailModule extends PLModule
         }
     }
 
-    function handler_lost(&$page, $action = 'list', $email = null)
+    function handler_lost($page, $action = 'list', $email = null)
     {
         $page->changeTpl('emails/lost.tpl');
 
@@ -804,7 +804,7 @@ class EmailModule extends PLModule
                                    ORDER BY  pd.promo, a.hruid'));
     }
 
-    function handler_broken_addr(&$page)
+    function handler_broken_addr($page)
     {
         require_once 'emails.inc.php';
         $page->changeTpl('emails/broken_addr.tpl');
index 9907260..285242e 100644 (file)
@@ -43,7 +43,7 @@ class EPLetterModule extends NewsletterModule
         return NewsLetter::forGroup(NewsLetter::GROUP_EP);
     }
 
-    function handler_out(&$page, $hash = null)
+    function handler_out($page, $hash = null)
     {
         if (!$hash) {
             if (!S::logged()) {
index 95b7c2a..989377d 100644 (file)
@@ -81,7 +81,7 @@ class EventsModule extends PLModule
         return $res->fetchOneAssoc();
     }
 
-    private function upload_image(PlPage &$page, PlUpload &$upload)
+    private function upload_image(PlPage $page, PlUpload $upload)
     {
         if (@!$_FILES['image']['tmp_name'] && !Env::v('image_url')) {
             return true;
@@ -100,7 +100,7 @@ class EventsModule extends PLModule
         return true;
     }
 
-    function handler_ev(&$page, $action = 'list', $eid = null, $pound = null)
+    function handler_ev($page, $action = 'list', $eid = null, $pound = null)
     {
         $page->changeTpl('events/index.tpl');
 
@@ -197,7 +197,7 @@ class EventsModule extends PLModule
         $page->assign_by_ref('events', $array);
     }
 
-    function handler_photo(&$page, $eid = null, $valid = null)
+    function handler_photo($page, $eid = null, $valid = null)
     {
         if ($eid && $eid != 'valid') {
             $res = XDB::query("SELECT * FROM announce_photos WHERE eid = {?}", $eid);
@@ -228,14 +228,14 @@ class EventsModule extends PLModule
         exit;
     }
 
-    function handler_rss(&$page, $user = null, $hash = null)
+    function handler_rss($page, $user = null, $hash = null)
     {
         $this->load('feed.inc.php');
         $feed = new EventFeed();
         return $feed->run($page, $user, $hash);
     }
 
-    function handler_preview(&$page)
+    function handler_preview($page)
     {
         $page->changeTpl('events/preview.tpl', NO_SKIN);
         $texte = Get::v('texte');
@@ -251,7 +251,7 @@ class EventsModule extends PLModule
         pl_content_headers("text/html");
     }
 
-    function handler_ev_submit(&$page)
+    function handler_ev_submit($page)
     {
         $page->changeTpl('events/submit.tpl');
 
@@ -302,14 +302,14 @@ class EventsModule extends PLModule
         }
     }
 
-    function handler_tips(&$page, $tips = null)
+    function handler_tips($page, $tips = null)
     {
         pl_content_headers("text/html");
         $page->changeTpl('include/tips.tpl', NO_SKIN);
         $page->assign('tips', $this->get_tips($tips));
     }
 
-    function handler_admin_tips(&$page, $action = 'list', $id = null)
+    function handler_admin_tips($page, $action = 'list', $id = null)
     {
         $page->setTitle('Administration - Astuces');
         $page->assign('title', 'Gestion des Astuces');
@@ -328,7 +328,7 @@ class EventsModule extends PLModule
         }
     }
 
-    function handler_admin_events(&$page, $action = 'list', $eid = null)
+    function handler_admin_events($page, $action = 'list', $eid = null)
     {
         $page->changeTpl('events/admin.tpl');
         $page->setTitle('Administration - Evenements');
index bc93fde..63ced8d 100644 (file)
@@ -31,7 +31,7 @@ class EventFeed extends PlFeed
                             'events/rss.tpl');
     }
 
-    public static function nextEvent(PlIterator &$it, PlUser &$user)
+    public static function nextEvent(PlIterator $it, PlUser $user)
     {
         while ($body = $it->next()) {
             $uf = UserFilter::getLegacy($body['promo_min'], $body['promo_max']);
@@ -42,7 +42,7 @@ class EventFeed extends PlFeed
         return null;
     }
 
-    protected function fetch(PlUser &$user)
+    protected function fetch(PlUser $user)
     {
         global $globals;
         $events = XDB::iterator('SELECT  e.id, e.titre AS title, e.texte, e.creation_date AS publication, e.post_id,
index 1dfbd18..7d197df 100644 (file)
@@ -30,7 +30,7 @@ class ForumsModule extends PLModule
         );
     }
 
-    function handler_banana(&$page, $group = null, $action = null, $artid = null)
+    function handler_banana($page, $group = null, $action = null, $artid = null)
     {
         $page->changeTpl('banana/index.tpl');
         $page->setTitle('Forums & PA');
@@ -44,7 +44,7 @@ class ForumsModule extends PLModule
         run_banana($page, 'ForumsBanana', $get);
     }
 
-    function handler_rss(&$page, $group, $alias, $hash, $file = null)
+    function handler_rss($page, $group, $alias, $hash, $file = null)
     {
         if (is_null($file)) {
             if (is_null($hash)) {
@@ -63,7 +63,7 @@ class ForumsModule extends PLModule
         exit;
     }
 
-    function handler_forums_bans(&$page, $action = 'list', $id = null)
+    function handler_forums_bans($page, $action = 'list', $id = null)
     {
         $page->setTitle('Administration - Bannissements des forums');
         $page->assign('title', 'Gestion des mises au ban');
@@ -77,7 +77,7 @@ class ForumsModule extends PLModule
         $page->changeTpl('forums/admin.tpl');
     }
 
-    static function run_banana(&$page, $params = null)
+    static function run_banana($page, $params = null)
     {
         $page->changeTpl('banana/index.tpl');
         $page->setTitle('Forums & PA');
index ecd1eec..b4846da 100644 (file)
@@ -56,7 +56,7 @@ class FusionAxModule extends PLModule
     }
 
 
-    function handler_index(&$page)
+    function handler_index($page)
     {
         if (Platal::globals()->merge->state == 'pending') {
             $page->changeTpl('fusionax/index.tpl');
@@ -87,7 +87,7 @@ class FusionAxModule extends PLModule
     }
 
     /** Import de l'annuaire de l'AX depuis l'export situé dans le home de jacou */
-    function handler_import(&$page, $action = 'index', $file = '')
+    function handler_import($page, $action = 'index', $file = '')
     {
         if ($action == 'index') {
             $page->changeTpl('fusionax/import.tpl');
@@ -252,7 +252,7 @@ class FusionAxModule extends PLModule
         exit;
     }
 
-    function handler_view(&$page, $action = '')
+    function handler_view($page, $action = '')
     {
         $page->changeTpl('fusionax/view.tpl');
         if ($action == 'create') {
@@ -364,7 +364,7 @@ class FusionAxModule extends PLModule
     }
 
     /** Module de mise en correspondance les ids */
-    function handler_ids(&$page, $part = 'main', $pid = null, $ax_id = null)
+    function handler_ids($page, $part = 'main', $pid = null, $ax_id = null)
     {
         $nbToLink = 100;
         $page->assign('xorg_title', 'Polytechnique.org - Fusion - Mise en correspondance simple');
@@ -451,7 +451,7 @@ class FusionAxModule extends PLModule
         }
     }
 
-    function handler_deceased(&$page, $action = '')
+    function handler_deceased($page, $action = '')
     {
         if ($action == 'updateXorg') {
             XDB::execute('UPDATE  fusionax_deceased
@@ -494,7 +494,7 @@ class FusionAxModule extends PLModule
         $page->assign('deceasedDifferent', $res);
     }
 
-    function handler_promo(&$page, $action = '')
+    function handler_promo($page, $action = '')
     {
         $page->changeTpl('fusionax/promo.tpl');
         $res = XDB::iterator('SELECT  pid, private_name, promo_etude_xorg, promo_sortie_xorg, promo_etude_ax, promo
@@ -534,7 +534,7 @@ class FusionAxModule extends PLModule
         $page->assign('nbMissmatchingPromosTotal', $nbMissmatchingPromos);
     }
 
-    function handler_names(&$page, $action = '')
+    function handler_names($page, $action = '')
     {
         $page->changeTpl('fusionax/names.tpl');
 
@@ -578,7 +578,7 @@ class FusionAxModule extends PLModule
 
     }
 
-    function handler_edu(&$page, $action = '')
+    function handler_edu($page, $action = '')
     {
         $page->changeTpl('fusionax/education.tpl');
 
@@ -609,7 +609,7 @@ class FusionAxModule extends PLModule
         $page->assign('missingCoupleCount', $missingCouple->total());
     }
 
-    function handler_corps(&$page)
+    function handler_corps($page)
     {
         $page->changeTpl('fusionax/corps.tpl');
 
@@ -630,7 +630,7 @@ class FusionAxModule extends PLModule
         $page->assign('missingGradeCount', $missingGrade->total());
     }
 
-    function handler_issues_deathdate(&$page, $action = '')
+    function handler_issues_deathdate($page, $action = '')
     {
         $page->changeTpl('fusionax/deathdate_issues.tpl');
         if ($action == 'edit') {
@@ -672,7 +672,7 @@ class FusionAxModule extends PLModule
         $page->assign('total', count($issues));
     }
 
-    function handler_issues_promo(&$page, $action = '')
+    function handler_issues_promo($page, $action = '')
     {
         $page->changeTpl('fusionax/promo_issues.tpl');
         if ($action == 'edit') {
@@ -719,7 +719,7 @@ class FusionAxModule extends PLModule
         $page->assign('total', count($issues));
     }
 
-    function handler_issues(&$page, $action = '')
+    function handler_issues($page, $action = '')
     {
         static $issueList = array(
             'name'      => 'noms',
index 5ed8d00..746ea3e 100644 (file)
@@ -31,13 +31,13 @@ class GadgetsModule extends PLModule
         );
     }
 
-    function handler_ig_events_xml(&$page)
+    function handler_ig_events_xml($page)
     {
         require_once 'gadgets/gadgets.inc.php';
         init_igoogle_xml('gadgets/ig-events.xml.tpl');
     }
 
-    function handler_ig_events(&$page)
+    function handler_ig_events($page)
     {
         require_once 'gadgets/gadgets.inc.php';
         init_igoogle_html('gadgets/ig-events.tpl', AUTH_COOKIE);
@@ -63,12 +63,12 @@ class GadgetsModule extends PLModule
         $page->assign('events', $data);
     }
 
-    function handler_ig_search_xml(&$page) {
+    function handler_ig_search_xml($page) {
         require_once 'gadgets/gadgets.inc.php';
         init_igoogle_xml('gadgets/ig-search.xml.tpl');
     }
 
-    function handler_ig_search(&$page)
+    function handler_ig_search($page)
     {
         if (Env::has('quick') && Env::s('quick') != '') {
             global $globals;
index cb3da7e..3a9a8f1 100644 (file)
@@ -36,7 +36,7 @@ function init_igoogle_html($template, $auth = AUTH_PUBLIC)
 
     // Adds external JavaScript libraries provided by iGoogle to the page.
     if (Env::has('libs')) {
-        $libs = split(',', Env::s('libs'));
+        $libs = preg_split('/,/', Env::s('libs'), -1, PREG_SPLIT_NO_EMPTY);
         foreach ($libs as $lib) {
             if (preg_match('@^[a-z0-9/._-]+$@i', $lib) && !preg_match('@([.][.])|([.]/)|(//)@', $lib)) {
                 $page->append('gadget_js', 'https://www.google.com/ig/f/' . $lib);
index 6964887..cb38a20 100644 (file)
@@ -36,7 +36,7 @@ class GoogleAppsModule extends PLModule
         );
     }
 
-    function handler_index(&$page, $action = null)
+    function handler_index($page, $action = null)
     {
         require_once("emails.inc.php");
         require_once("googleapps.inc.php");
@@ -115,7 +115,7 @@ class GoogleAppsModule extends PLModule
         $page->assign('account', $account);
     }
 
-    function handler_admin(&$page, $action = null) {
+    function handler_admin($page, $action = null) {
         require_once("googleapps.inc.php");
         $page->changeTpl('googleapps/admin.tpl');
         $page->setTitle('Administration Google Apps');
@@ -161,7 +161,7 @@ class GoogleAppsModule extends PLModule
         $page->assign('failed_requests', $res);
     }
 
-    function handler_admin_job(&$page, $job = null) {
+    function handler_admin_job($page, $job = null) {
         require_once("googleapps.inc.php");
         $page->changeTpl('googleapps/admin.job.tpl');
         $page->setTitle('Administration Google Apps');
@@ -180,7 +180,7 @@ class GoogleAppsModule extends PLModule
         }
     }
 
-    function handler_admin_user(&$page, $user = null) {
+    function handler_admin_user($page, $user = null) {
         require_once("emails.inc.php");
         require_once("googleapps.inc.php");
         $page->changeTpl('googleapps/admin.user.tpl');
index 55fe39b..60ca0ee 100644 (file)
@@ -47,7 +47,7 @@ class ListsModule extends PLModule
         );
     }
 
-    function prepare_client(&$page, $user = null)
+    function prepare_client($page, $user = null)
     {
         global $globals;
 
@@ -76,7 +76,7 @@ class ListsModule extends PLModule
         return array($subs, $mails);
     }
 
-    function handler_lists(&$page)
+    function handler_lists($page)
     {
         function filter_owner($list)
         {
@@ -132,7 +132,7 @@ class ListsModule extends PLModule
         }
     }
 
-    function handler_ajax(&$page, $list = null)
+    function handler_ajax($page, $list = null)
     {
         pl_content_headers("text/html");
         $domain = $this->prepare_client($page);
@@ -162,7 +162,7 @@ class ListsModule extends PLModule
         $page->assign_by_ref('liste', $liste);
     }
 
-    function handler_create(&$page)
+    function handler_create($page)
     {
         global $globals;
 
@@ -308,7 +308,7 @@ class ListsModule extends PLModule
         }
     }
 
-    function handler_members(&$page, $liste = null)
+    function handler_members($page, $liste = null)
     {
         if (is_null($liste)) {
             return PL_NOT_FOUND;
@@ -347,7 +347,7 @@ class ListsModule extends PLModule
         }
     }
 
-    function handler_csv(PlPage &$page, $liste = null)
+    function handler_csv(PlPage $page, $liste = null)
     {
         if (is_null($liste)) {
             return PL_NOT_FOUND;
@@ -362,7 +362,7 @@ class ListsModule extends PLModule
         exit;
     }
 
-    function handler_annu(&$page, $liste = null, $action = null, $subaction = null)
+    function handler_annu($page, $liste = null, $action = null, $subaction = null)
     {
         if (is_null($liste)) {
             return PL_NOT_FOUND;
@@ -411,7 +411,7 @@ class ListsModule extends PLModule
         $page->assign_by_ref('owners',  $moderos);
     }
 
-    function handler_archives(&$page, $liste = null, $action = null, $artid = null)
+    function handler_archives($page, $liste = null, $action = null, $artid = null)
     {
         global $globals;
 
@@ -440,7 +440,7 @@ class ListsModule extends PLModule
         }
     }
 
-    function handler_rss(&$page, $liste = null, $alias = null, $hash = null)
+    function handler_rss($page, $liste = null, $alias = null, $hash = null)
     {
         if (!$liste) {
             return PL_NOT_FOUND;
@@ -480,7 +480,7 @@ class ListsModule extends PLModule
                             $liste, $domain, $mid, S::i('uid'), $action, Post::v('reason'));
     }
 
-    function handler_moderate(&$page, $liste = null)
+    function handler_moderate($page, $liste = null)
     {
         if (is_null($liste)) {
              return PL_NOT_FOUND;
@@ -597,7 +597,7 @@ class ListsModule extends PLModule
         }
     }
 
-    function handler_admin(&$page, $liste = null)
+    function handler_admin($page, $liste = null)
     {
         global $globals;
 
@@ -730,7 +730,7 @@ class ListsModule extends PLModule
         }
     }
 
-    function handler_options(&$page, $liste = null)
+    function handler_options($page, $liste = null)
     {
         if (is_null($liste)) {
             return PL_NOT_FOUND;
@@ -797,7 +797,7 @@ class ListsModule extends PLModule
         }
     }
 
-    function handler_delete(&$page, $liste = null)
+    function handler_delete($page, $liste = null)
     {
         global $globals;
         if (is_null($liste)) {
@@ -844,7 +844,7 @@ class ListsModule extends PLModule
         }
     }
 
-    function handler_soptions(&$page, $liste = null)
+    function handler_soptions($page, $liste = null)
     {
         if (is_null($liste)) {
             return PL_NOT_FOUND;
@@ -873,7 +873,7 @@ class ListsModule extends PLModule
         }
     }
 
-    function handler_check(&$page, $liste = null)
+    function handler_check($page, $liste = null)
     {
         if (is_null($liste)) {
             return PL_NOT_FOUND;
@@ -896,7 +896,7 @@ class ListsModule extends PLModule
         }
     }
 
-    function handler_admin_all(&$page)
+    function handler_admin_all($page)
     {
         $page->changeTpl('lists/admin_all.tpl');
         $page->setTitle('Administration - Mailing lists');
index 2840f78..ea6ee2f 100644 (file)
@@ -36,7 +36,7 @@ class MarketingModule extends PLModule
         );
     }
 
-    function handler_marketing(&$page)
+    function handler_marketing($page)
     {
         $page->changeTpl('marketing/index.tpl');
         $page->setTitle('Marketing');
@@ -97,7 +97,7 @@ class MarketingModule extends PLModule
         $page->assign('marketings', $marketings);
     }
 
-    function handler_private(&$page, $hruid = null,
+    function handler_private($page, $hruid = null,
                              $action = null, $value = null)
     {
         global $globals;
@@ -191,7 +191,7 @@ class MarketingModule extends PLModule
         $page->assign('path', 'marketing/private/' . $user->login());
     }
 
-    function handler_broken(&$page, $uid = null)
+    function handler_broken($page, $uid = null)
     {
         $page->changeTpl('marketing/broken.tpl');
 
@@ -252,7 +252,7 @@ class MarketingModule extends PLModule
         }
     }
 
-    function handler_promo(&$page, $promo = null)
+    function handler_promo($page, $promo = null)
     {
         $page->changeTpl('marketing/promo.tpl');
 
@@ -268,7 +268,7 @@ class MarketingModule extends PLModule
         $page->assign('nonins', $users);
     }
 
-    function handler_public(&$page, $hruid = null)
+    function handler_public($page, $hruid = null)
     {
         $page->changeTpl('marketing/public.tpl');
 
@@ -329,7 +329,7 @@ class MarketingModule extends PLModule
         }
     }
 
-    function handler_week(&$page, $sorting = 'per_promo')
+    function handler_week($page, $sorting = 'per_promo')
     {
         $page->changeTpl('marketing/this_week.tpl');
 
@@ -339,7 +339,7 @@ class MarketingModule extends PLModule
         $page->assign('users', $uf->getUsers());
     }
 
-    function handler_volontaire(&$page, $promo = null)
+    function handler_volontaire($page, $promo = null)
     {
         $page->changeTpl('marketing/volontaire.tpl');
 
@@ -364,7 +364,7 @@ class MarketingModule extends PLModule
         }
     }
 
-    function handler_relance(&$page)
+    function handler_relance($page)
     {
         $page->changeTpl('marketing/relance.tpl');
 
index 0b84a38..f827c71 100644 (file)
@@ -46,7 +46,7 @@ class NewsletterModule extends PLModule
         return NewsLetter::forGroup(NewsLetter::GROUP_XORG);
     }
 
-    function handler_nl(&$page, $action = null, $hash = null)
+    function handler_nl($page, $action = null, $hash = null)
     {
         $nl = $this->getNl();
         if (!$nl) {
@@ -67,7 +67,7 @@ class NewsletterModule extends PLModule
         $page->assign('nl_list', $nl->listSentIssues(true));
     }
 
-    function handler_nl_show(&$page, $nid = 'last')
+    function handler_nl_show($page, $nid = 'last')
     {
         $page->changeTpl('newsletter/show.tpl');
         $nl = $this->getNl();
@@ -91,7 +91,7 @@ class NewsletterModule extends PLModule
         }
     }
 
-    function handler_nl_submit(&$page)
+    function handler_nl_submit($page)
     {
         $page->changeTpl('newsletter/submit.tpl');
 
@@ -118,7 +118,7 @@ class NewsletterModule extends PLModule
         $page->addCssLink($nl->cssFile());
     }
 
-    function handler_admin_nl(&$page, $new = false) {
+    function handler_admin_nl($page, $new = false) {
         $page->changeTpl('newsletter/admin.tpl');
         $page->setTitle('Administration - Newsletter : liste');
 
@@ -136,7 +136,7 @@ class NewsletterModule extends PLModule
         $page->assign('nl_list', $nl->listAllIssues());
     }
 
-    function handler_admin_nl_groups(&$page)
+    function handler_admin_nl_groups($page)
     {
         require_once 'newsletter.inc.php';
 
@@ -146,7 +146,7 @@ class NewsletterModule extends PLModule
         $page->assign('nls', Newsletter::getAll());
     }
 
-    function handler_admin_nl_edit(&$page, $nid = 'last', $aid = null, $action = 'edit') {
+    function handler_admin_nl_edit($page, $nid = 'last', $aid = null, $action = 'edit') {
         $page->changeTpl('newsletter/edit.tpl');
         $page->addCssLink('nl.Polytechnique.org.css');
         $page->setTitle('Administration - Newsletter : Édition');
@@ -264,7 +264,7 @@ class NewsletterModule extends PLModule
     /** This handler will cancel the sending of the currently pending issue
      * It is disabled for X.org mailings.
      */
-    function handler_admin_nl_cancel(&$page, $nid, $force = null)
+    function handler_admin_nl_cancel($page, $nid, $force = null)
     {
         $nl = $this->getNl();
         if (!$nl) {
@@ -293,7 +293,7 @@ class NewsletterModule extends PLModule
     /** This handler will enable the sending of the currently pending issue
      * It is disabled for X.org mailings.
      */
-    function handler_admin_nl_valid(&$page, $nid, $force = null)
+    function handler_admin_nl_valid($page, $nid, $force = null)
     {
         $nl = $this->getNl();
         if (!$nl) {
@@ -321,7 +321,7 @@ class NewsletterModule extends PLModule
 
     /** This handler will remove the given issue.
      */
-    function handler_admin_nl_delete(&$page, $nid, $force = null)
+    function handler_admin_nl_delete($page, $nid, $force = null)
     {
         $nl = $this->getNl();
         if (!$nl) {
@@ -350,7 +350,7 @@ class NewsletterModule extends PLModule
         $page->trigSuccessRedirect("La lettre a bien été supprimée.", $nl->adminPrefix());
     }
 
-    function handler_admin_nl_cat(&$page, $action = 'list', $id = null) {
+    function handler_admin_nl_cat($page, $action = 'list', $id = null) {
         $page->setTitle('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 e010c82..15e7565 100644 (file)
@@ -70,7 +70,7 @@ class OpenidModule extends PLModule
         );
     }
 
-    function handler_openid(&$page, $login = null)
+    function handler_openid($page, $login = null)
     {
         $this->load('openid.inc.php');
         $requested_user = User::getSilent($login);
@@ -133,7 +133,7 @@ class OpenidModule extends PLModule
         pl_redirect('');
     }
 
-    function handler_melix(&$page, $login = null)
+    function handler_melix($page, $login = null)
     {
         $this->load('openid.inc.php');
 
@@ -148,7 +148,7 @@ class OpenidModule extends PLModule
         }
     }
 
-    function handler_xrds(&$page, $login = null)
+    function handler_xrds($page, $login = null)
     {
         $this->load('openid.inc.php');
         $requested_user = User::getSilent($login);
@@ -163,7 +163,7 @@ class OpenidModule extends PLModule
         }
     }
 
-    function handler_trust(&$page)
+    function handler_trust($page)
     {
         $this->load('openid.inc.php');
         $server = new OpenId();
@@ -203,7 +203,7 @@ class OpenidModule extends PLModule
         }
     }
 
-    function handler_trusted(&$page, $action = 'list', $id = null)
+    function handler_trusted($page, $action = 'list', $id = null)
     {
         $page->setTitle('Sites tiers de confiance');
         $page->assign('title', 'Mes sites tiers de confiance pour OpenId');
@@ -215,7 +215,7 @@ class OpenidModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }
 
-    function handler_admin_trusted(&$page, $action = 'list', $id = null)
+    function handler_admin_trusted($page, $action = 'list', $id = null)
     {
         $page->setTitle('Sites tiers de confiance');
         $page->assign('title', 'Sites tiers de confiance globaux pour OpenId');
index f0137a5..0b7dc63 100644 (file)
@@ -87,7 +87,7 @@ class OpenId
     // SimpleRegistration helpers ----------------------------------------------
 
     // Determines which SREG data are requested by the endpoint, and returns them.
-    public function GetSRegDataForRequest(User &$user)
+    public function GetSRegDataForRequest(User $user)
     {
         require_once 'Auth/OpenID/SReg.php';
 
@@ -147,7 +147,7 @@ class OpenId
     // Updates the trust level for the given endpoint, based on the value pf
     // |trusted| and |permanent_trust| (the latter is ignored when the former
     // value is false). Returns true iff the current endpoint is trusted.
-    public function UpdateEndpointTrust(User &$user, $trusted, $permanent_trust) {
+    public function UpdateEndpointTrust(User $user, $trusted, $permanent_trust) {
         $initial_trust = $this->IsEndpointTrusted($user);
         if (!$initial_trust && $trusted && $permanent_trust) {
             XDB::execute(
@@ -162,7 +162,7 @@ class OpenId
     // Page renderers ----------------------------------------------------------
 
     // Renders the OpenId discovery page for |user|.
-    public function RenderDiscoveryPage(&$page, User &$user)
+    public function RenderDiscoveryPage($page, User $user)
     {
         $page->changeTpl('openid/openid.tpl');
         $page->setTitle($user->fullName());
@@ -175,7 +175,7 @@ class OpenId
     }
 
     // Renders the main XRDS page.
-    public function RenderMainXrdsPage(&$page)
+    public function RenderMainXrdsPage($page)
     {
         pl_content_headers("application/xrds+xml");
         $page->changeTpl('openid/idp_xrds.tpl', NO_SKIN);
@@ -185,7 +185,7 @@ class OpenId
     }
 
     // Renders the XRDS page of |user|.
-    public function RenderUserXrdsPage(&$page, User &$user)
+    public function RenderUserXrdsPage($page, User $user)
     {
         pl_content_headers("application/xrds+xml");
         $page->changeTpl('openid/user_xrds.tpl', NO_SKIN);
@@ -221,13 +221,13 @@ class OpenId
     // URL providers -----------------------------------------------------------
 
     // Returns the OpenId identity URL of the requested user.
-    private function GetUserUrl(User &$user)
+    private function GetUserUrl(User $user)
     {
         return $this->base_url . '/' . $user->login();
     }
 
     // Returns the private XRDS page of a user.
-    private function GetUserXrdsUrl(User &$user)
+    private function GetUserXrdsUrl(User $user)
     {
         return $this->base_url . '/xrds/' . $user->login();
     }
index c5477e7..ef19de2 100644 (file)
@@ -124,7 +124,7 @@ class PaymentModule extends PLModule
         );
     }
 
-    function handler_payment(&$page, $ref = -1)
+    function handler_payment($page, $ref = -1)
     {
         global $globals;
 
@@ -183,7 +183,7 @@ class PaymentModule extends PLModule
         $page->assign('sex', S::user()->isFemale());
     }
 
-    function handler_cyber_return(&$page, $uid = null)
+    function handler_cyber_return($page, $uid = null)
     {
         /* reference banque (numero de transaction) */
         $champ901 = Env::s('CHAMP901');
@@ -281,7 +281,7 @@ class PaymentModule extends PLModule
         exit;
     }
 
-    function handler_cyber2_return(&$page, $uid = null)
+    function handler_cyber2_return($page, $uid = null)
     {
         global $globals, $platal;
 
@@ -378,7 +378,7 @@ class PaymentModule extends PLModule
         exit;
     }
 
-    function handler_paypal_return(&$page, $uid = null)
+    function handler_paypal_return($page, $uid = null)
     {
         $page->changeTpl('payment/retour_paypal.tpl');
 
@@ -473,7 +473,7 @@ class PaymentModule extends PLModule
         $page->assign('erreur', $erreur);
     }
 
-    function handler_xnet_payment(&$page, $pid = null)
+    function handler_xnet_payment($page, $pid = null)
     {
         global $globals;
 
@@ -558,7 +558,7 @@ class PaymentModule extends PLModule
         $page->assign('event', $event);
     }
 
-    function handler_admin(&$page, $action = 'list', $id = null) {
+    function handler_admin($page, $action = 'list', $id = null) {
         $page->setTitle('Administration - Paiements');
         $page->assign('title', 'Gestion des télépaiements');
         $table_editor = new PLTableEditor('admin/payments','payments','id');
@@ -581,7 +581,7 @@ class PaymentModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }
     
-    function handler_adm_transactions(&$page, $payment_id = null, $action = "list", $id = null) {
+    function handler_adm_transactions($page, $payment_id = null, $action = "list", $id = null) {
         // show transactions. FIXME: should not be modifiable
         $page->setTitle('Administration - Paiements - Transactions');
         $page->assign('title', "Liste des transactions pour le paiement {$payment_id}");
@@ -595,7 +595,7 @@ class PaymentModule extends PLModule
         $page->assign("readonly","readonly");     // don't show modification features
     }
     
-    function handler_adm_bankaccounts(&$page, $action = "list", $id = null) {
+    function handler_adm_bankaccounts($page, $action = "list", $id = null) {
         // managment of bank account used for money transfert
         $page->setTitle('Administration - Paiements - RIBs');
         $page->assign('title', "Liste des RIBs");
@@ -616,7 +616,7 @@ class PaymentModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }
     
-    function handler_adm_methods(&$page, $action = "list", $id = null) {
+    function handler_adm_methods($page, $action = "list", $id = null) {
         // show and edit payment methods
         $page->setTitle('Administration - Paiements - Méthodes');
         $page->assign('title', "Méthodes de paiement");
@@ -624,7 +624,7 @@ class PaymentModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }
 
-    function handler_adm_reconcile(&$page, $step = 'list', $param = null) {
+    function handler_adm_reconcile($page, $step = 'list', $param = null) {
         // reconciles logs with transactions
         // FIXME: the admin is considered to be fair => he doesn't hack the $step value, nor other params
         $page->setTitle('Administration - Paiements - Réconciliations');
@@ -691,7 +691,7 @@ class PaymentModule extends PLModule
         }
     }
     
-    function handler_adm_importlogs(&$page, $step, $param = null) {
+    function handler_adm_importlogs($page, $step, $param = null) {
         $page->setTitle('Administration - Paiements - Réconciliations');
         $page->changeTpl('payment/reconcile.tpl');
         $page->assign('step', $step);
@@ -862,7 +862,7 @@ class PaymentModule extends PLModule
         }
     }
     
-    function handler_adm_transfers(&$page, $action = null, $id = null) {
+    function handler_adm_transfers($page, $action = null, $id = null) {
         // list/log all bank transfers and link them to individual transactions
         
         if (Post::has('generate')) {
index 93c69cb..83b21db 100644 (file)
@@ -70,7 +70,7 @@ class Payment
     // }}}
     // {{{ function init()
 
-    function init($val, &$meth)
+    function init($val, $meth)
     {
         require_once dirname(__FILE__).'/money/'.$meth->inc;
         $this->api = new $api($val);
index 3f40979..8968c99 100644 (file)
@@ -56,7 +56,7 @@ class BPLCCyberPlus
     // }}}
     // {{{ function form()
 
-    function prepareform(&$pay)
+    function prepareform($pay)
     {
         global $globals, $platal;
         $log = S::v('log');
index b7577d8..2752299 100644 (file)
@@ -40,7 +40,7 @@ class CyberPayment
     // }}}
     // {{{ function form()
 
-    function prepareform(&$pay)
+    function prepareform($pay)
     {
         // toute la doc se trouve sur
         // http://www.cyberpaiement.tm.fr/donnees.htm
index 6ae107a..639f64e 100644 (file)
@@ -33,7 +33,7 @@ class PayPal
         $this->val_number = $val;
     }
 
-    function prepareform(&$pay)
+    function prepareform($pay)
     {
         // Documentation:
         // https://www.paypal.com/developer
index 03883d4..940f13b 100644 (file)
@@ -21,7 +21,7 @@
 
 function bugize($list)
 {
-    $list = split(',', $list);
+    $list = preg_split('/,/', Env::s('libs'), -1, PREG_SPLIT_NO_EMPTY);
     $ans  = array();
 
     foreach ($list as $bug) {
@@ -59,7 +59,7 @@ class PlatalModule extends PLModule
         );
     }
 
-    function handler_index(&$page)
+    function handler_index($page)
     {
         // Include X-XRDS-Location response-header for Yadis discovery
         global $globals;
@@ -73,14 +73,14 @@ class PlatalModule extends PLModule
         }
     }
 
-    function handler_cacert(&$page)
+    function handler_cacert($page)
     {
         pl_cached_content_headers("application/x-x509-ca-cert");
         readfile("/etc/ssl/xorgCA/cacert.pem");
         exit;
     }
 
-    function handler_changelog(&$page, $core = null)
+    function handler_changelog($page, $core = null)
     {
         $page->changeTpl('platal/changeLog.tpl');
 
@@ -129,7 +129,7 @@ class PlatalModule extends PLModule
         }
     }
 
-    function handler_prefs(&$page)
+    function handler_prefs($page)
     {
         $page->changeTpl('platal/preferences.tpl');
         $page->setTitle('Mes préférences');
@@ -146,7 +146,7 @@ class PlatalModule extends PLModule
         }
     }
 
-    function handler_webredir(&$page)
+    function handler_webredir($page)
     {
         $page->changeTpl('platal/webredirect.tpl');
         $page->setTitle('Redirection de page WEB');
@@ -185,7 +185,7 @@ class PlatalModule extends PLModule
         $page->assign('bestalias', $res->fetchOneCell());
     }
 
-    function handler_prefs_rss(&$page)
+    function handler_prefs_rss($page)
     {
         $page->changeTpl('platal/filrss.tpl');
 
@@ -197,7 +197,7 @@ class PlatalModule extends PLModule
         }
     }
 
-    function handler_password(&$page)
+    function handler_password($page)
     {
         global $globals;
 
@@ -232,7 +232,7 @@ class PlatalModule extends PLModule
         $page->setTitle('Mon mot de passe');
     }
 
-    function handler_smtppass(&$page)
+    function handler_smtppass($page)
     {
         $page->changeTpl('platal/acces_smtp.tpl');
         $page->setTitle('Acces SMTP/NNTP');
@@ -266,7 +266,7 @@ class PlatalModule extends PLModule
         $page->assign('actif', $res->fetchOneCell());
     }
 
-    function handler_recovery(&$page)
+    function handler_recovery($page)
     {
         global $globals;
 
@@ -348,7 +348,7 @@ Adresse de secours : " . Post::v('email') : ""));
         S::logger($user->id())->log('recovery', $mails);
     }
 
-    function handler_tmpPWD(&$page, $certif = null)
+    function handler_tmpPWD($page, $certif = null)
     {
         global $globals;
         // XXX: recovery requires data from the profile
@@ -391,7 +391,7 @@ Adresse de secours : " . Post::v('email') : ""));
         }
     }
 
-    function handler_skin(&$page)
+    function handler_skin($page)
     {
         global $globals;
 
@@ -420,7 +420,7 @@ Adresse de secours : " . Post::v('email') : ""));
         $page->assign('skins', XDB::iterator($sql));
     }
 
-    function handler_exit(&$page, $level = null)
+    function handler_exit($page, $level = null)
     {
         if (S::suid()) {
             $old = S::user()->login();
@@ -454,7 +454,7 @@ Adresse de secours : " . Post::v('email') : ""));
         }
     }
 
-    function handler_review(&$page, $action = null, $mode = null)
+    function handler_review($page, $action = null, $mode = null)
     {
         // Include X-XRDS-Location response-header for Yadis discovery
         global $globals;
index e4627e8..cf4112a 100644 (file)
@@ -23,12 +23,12 @@ __autoload('PlWizard');
 
 class ReviewPage implements PlWizardPage
 {
-    public function __construct(PlWizard &$wiz) { }
+    public function __construct(PlWizard $wiz) { }
     public function template() { return 'platal/review.tpl'; }
     public function process(&$success) { }
     public function success() { }
 
-    public function prepare(PlPage &$page, $id)
+    public function prepare(PlPage $page, $id)
     {
         $wp = new PlWikiPage((@$GLOBALS['IS_XNET_SITE'] ? 'ReviewXnet' : 'Review') . '.' . ucfirst($id));
         $wp->buildCache();
index 30fe082..27dae4c 100644 (file)
@@ -33,7 +33,7 @@ class PoisonModule extends PLModule
         );
     }
 
-    function handler_poison(&$page, $seed = null, $count = 20)
+    function handler_poison($page, $seed = null, $count = 20)
     {
         $this->load('poison.inc.php');
         if ($seed == null) {
@@ -47,7 +47,7 @@ class PoisonModule extends PLModule
         exit;
     }
 
-    function handler_tags(&$page, $seed = null, $count = 20)
+    function handler_tags($page, $seed = null, $count = 20)
     {
         global $globals;
 
@@ -64,7 +64,7 @@ class PoisonModule extends PLModule
         exit;
     }
 
-    function handler_mailto(&$page, $seed = null, $count = 20)
+    function handler_mailto($page, $seed = null, $count = 20)
     {
         global $globals;
 
@@ -82,7 +82,7 @@ class PoisonModule extends PLModule
         exit;
     }
 
-    function handler_rand(&$page) {
+    function handler_rand($page) {
         $this->load('poison.inc.php');
         randomize_poison_file();
         exit;
index 5617b7c..3ba8612 100644 (file)
@@ -74,12 +74,12 @@ class ProfileModule extends PLModule
     /* Function needed for compatibility reasons.
      * TODO: removes calls to fiche.php?user=blah.machin.2083 and then removes this.
      */
-    function handler_fiche(&$page)
+    function handler_fiche($page)
     {
         return $this->handler_profile($page, Env::v('user'));
     }
 
-    function handler_photo(&$page, $x = null, $req = null)
+    function handler_photo($page, $x = null, $req = null)
     {
         if (!$x || !($profile = Profile::get($x))) {
             return PL_NOT_FOUND;
@@ -97,7 +97,7 @@ class ProfileModule extends PLModule
         $photo->send();
     }
 
-    function handler_medal(&$page, $mid)
+    function handler_medal($page, $mid)
     {
         $thumb = ($mid == 'thumb');
         $mid = $thumb ? @func_get_arg(2) : $mid;
@@ -114,7 +114,7 @@ class ProfileModule extends PLModule
         exit;
     }
 
-    function handler_name_info(&$page)
+    function handler_name_info($page)
     {
         pl_content_headers("text/html");
         $page->changeTpl('profile/name_info.tpl', SIMPLE);
@@ -127,7 +127,7 @@ class ProfileModule extends PLModule
         $page->assign('types', $res);
     }
 
-    function handler_networking(&$page, $mid)
+    function handler_networking($page, $mid)
     {
         $res = XDB::query("SELECT  icon
                              FROM  profile_networking_enum
@@ -162,7 +162,7 @@ class ProfileModule extends PLModule
         return $profile;
     }
 
-    function handler_photo_change(&$page, $hrpid = null)
+    function handler_photo_change($page, $hrpid = null)
     {
         global $globals;
         $profile = $this->findProfile($hrpid);
@@ -228,7 +228,7 @@ class ProfileModule extends PLModule
         $page->assign('has_trombi_x', file_exists($trombi_x));
     }
 
-    function handler_profile(&$page, $id = null)
+    function handler_profile($page, $id = null)
     {
         // Checks if the identifier corresponds to an actual profile. Numeric
         // identifiers canonly be user by logged users.
@@ -297,7 +297,7 @@ class ProfileModule extends PLModule
         header('Last-Modified: ' . date('r', strtotime($profile->last_change)));
     }
 
-    function handler_ax(&$page, $user = null)
+    function handler_ax($page, $user = null)
     {
         $user = Profile::get($user);
         if (!$user) {
@@ -309,7 +309,7 @@ class ProfileModule extends PLModule
         http_redirect("http://www.polytechniciens.com/?page=AX_FICHE_ANCIEN&ancc_id=" . $user->ax_id);
     }
 
-    function handler_p_edit(&$page, $hrpid = null, $opened_tab = null, $mode = null, $success = null)
+    function handler_p_edit($page, $hrpid = null, $opened_tab = null, $mode = null, $success = null)
     {
         global $globals;
 
@@ -362,14 +362,14 @@ class ProfileModule extends PLModule
        }
     }
 
-    function handler_education_js(&$page)
+    function handler_education_js($page)
     {
         pl_cached_content_headers("text/javascript", "utf-8");
         $page->changeTpl('profile/education.js.tpl', NO_SKIN);
         require_once 'education.func.inc.php';
     }
 
-    function handler_grades_js(&$page)
+    function handler_grades_js($page)
     {
         pl_cached_content_headers("text/javascript", "utf-8");
         $page->changeTpl('profile/grades.js.tpl', NO_SKIN);
@@ -392,7 +392,7 @@ class ProfileModule extends PLModule
         $page->assign('medal_list', $mlist);
     }
 
-    function handler_ajax_address(&$page, $id)
+    function handler_ajax_address($page, $id)
     {
         pl_content_headers("text/html");
         $page->changeTpl('profile/adresses.address.tpl', NO_SKIN);
@@ -400,7 +400,7 @@ class ProfileModule extends PLModule
         $page->assign('address', array());
     }
 
-    function handler_ajax_tel(&$page, $prefid, $prefname, $telid, $subField, $mainField, $mainId)
+    function handler_ajax_tel($page, $prefid, $prefname, $telid, $subField, $mainField, $mainId)
     {
         pl_content_headers("text/html");
         $page->changeTpl('profile/phone.tpl', NO_SKIN);
@@ -416,7 +416,7 @@ class ProfileModule extends PLModule
         }
     }
 
-    function handler_ajax_edu(&$page, $eduid, $class)
+    function handler_ajax_edu($page, $eduid, $class)
     {
         pl_content_headers("text/html");
         $page->changeTpl('profile/general.edu.tpl', NO_SKIN);
@@ -429,7 +429,7 @@ class ProfileModule extends PLModule
         require_once "education.func.inc.php";
     }
 
-    function handler_ajax_medal(&$page, $id)
+    function handler_ajax_medal($page, $id)
     {
         pl_content_headers("text/html");
         $page->changeTpl('profile/deco.medal.tpl', NO_SKIN);
@@ -437,7 +437,7 @@ class ProfileModule extends PLModule
         $page->assign('medal', array('valid' => 0, 'grade' => 0));
     }
 
-    function handler_ajax_job(&$page, $id)
+    function handler_ajax_job($page, $id)
     {
         pl_content_headers("text/html");
         $page->changeTpl('profile/jobs.job.tpl', NO_SKIN);
@@ -460,12 +460,12 @@ class ProfileModule extends PLModule
      * @param Env::v('treeid') tree id that will be given as first argument of attrfunc function
      * the second argument will be the chosen job term id and the third one the chosen job full name.
      */
-    function handler_ajax_tree_job_terms(&$page, $filter = JobTerms::ALL)
+    function handler_ajax_tree_job_terms($page, $filter = JobTerms::ALL)
     {
-        JobTerms::ajaxGetBranch(&$page, $filter);
+        JobTerms::ajaxGetBranch($page, $filter);
     }
 
-    function handler_ajax_skill(&$page, $cat, $id)
+    function handler_ajax_skill($page, $cat, $id)
     {
         pl_content_headers("text/html");
         $page->changeTpl('profile/skill.skill.tpl', NO_SKIN);
@@ -485,7 +485,7 @@ class ProfileModule extends PLModule
         }
     }
 
-    function handler_ajax_searchname(&$page, $id, $isFemale)
+    function handler_ajax_searchname($page, $id, $isFemale)
     {
         pl_content_headers("text/html");
         $page->changeTpl('profile/general.searchname.tpl', NO_SKIN);
@@ -498,7 +498,7 @@ class ProfileModule extends PLModule
         $page->assign('i', $id);
     }
 
-    function handler_ajax_buildnames(&$page, $data, $isFemale)
+    function handler_ajax_buildnames($page, $data, $isFemale)
     {
         pl_content_headers("text/html");
         $page->changeTpl('profile/general.buildnames.tpl', NO_SKIN);
@@ -506,7 +506,7 @@ class ProfileModule extends PLModule
         $page->assign('names', build_javascript_names($data, $isFemale));
     }
 
-    function handler_referent(&$page, $pf)
+    function handler_referent($page, $pf)
     {
         $page->changeTpl('profile/fiche_referent.tpl', SIMPLE);
 
@@ -528,7 +528,7 @@ class ProfileModule extends PLModule
         $page->addJsLink('close_on_esc.js');
     }
 
-    function handler_ref_country(&$page)
+    function handler_ref_country($page)
     {
         pl_content_headers("text/html");
         $page->changeTpl('include/field.select.tpl', NO_SKIN);
@@ -546,9 +546,9 @@ class ProfileModule extends PLModule
      * separated by "|" chars) for jobterms in referent (mentor) search.
      * @see handler_jobterms
      */
-    function handler_ref_autocomplete(&$page)
+    function handler_ref_autocomplete($page)
     {
-        $this->handler_jobterms(&$page, 'mentor');
+        $this->handler_jobterms($page, 'mentor');
     }
 
     /**
@@ -561,7 +561,7 @@ class ProfileModule extends PLModule
      *
      * @param Env::v('q') the text that has been typed and to complete automatically
      */
-    function handler_jobterms(&$page, $type = 'nomentor')
+    function handler_jobterms($page, $type = 'nomentor')
     {
         pl_content_headers("text/plain");
 
@@ -621,7 +621,7 @@ class ProfileModule extends PLModule
         exit();
     }
 
-    function handler_xnet(&$page)
+    function handler_xnet($page)
     {
         $page->changeTpl('profile/groupesx.tpl');
         $page->setTitle('Promo, Groupes X, Binets');
@@ -636,7 +636,7 @@ class ProfileModule extends PLModule
         $page->assign('assos', $req->fetchAllAssoc());
     }
 
-    function handler_xnetlogo(&$page, $id)
+    function handler_xnetlogo($page, $id)
     {
         if (is_null($id)) {
             return PL_NOT_FOUND;
@@ -658,7 +658,7 @@ class ProfileModule extends PLModule
         exit;
     }
 
-    function handler_vcard(&$page, $x = null)
+    function handler_vcard($page, $x = null)
     {
         if (is_null($x)) {
             return PL_NOT_FOUND;
@@ -675,7 +675,7 @@ class ProfileModule extends PLModule
         $vcard->show();
     }
 
-    function handler_admin_trombino(&$page, $login = null, $action = null) {
+    function handler_admin_trombino($page, $login = null, $action = null) {
         $page->changeTpl('profile/admin_trombino.tpl');
         $page->setTitle('Administration - Trombino');
 
@@ -710,7 +710,7 @@ class ProfileModule extends PLModule
                 break;
         }
     }
-    function handler_admin_names(&$page, $action = 'list', $id = null) {
+    function handler_admin_names($page, $action = 'list', $id = null) {
         $page->setTitle('Administration - Types de noms');
         $page->assign('title', 'Gestion des types de noms');
         $table_editor = new PLTableEditor('admin/names', 'profile_name_enum', 'id', true);
@@ -721,7 +721,7 @@ class ProfileModule extends PLModule
         $table_editor->describe('score', 'Score', true);
         $table_editor->apply($page, $action, $id);
     }
-    function handler_admin_binets(&$page, $action = 'list', $id = null) {
+    function handler_admin_binets($page, $action = 'list', $id = null) {
         $page->setTitle('Administration - Binets');
         $page->assign('title', 'Gestion des binets');
         $table_editor = new PLTableEditor('admin/binets', 'profile_binet_enum', 'id');
@@ -729,7 +729,7 @@ class ProfileModule extends PLModule
         $table_editor->describe('text','intitulé',true);
         $table_editor->apply($page, $action, $id);
     }
-    function handler_admin_education(&$page, $action = 'list', $id = null) {
+    function handler_admin_education($page, $action = 'list', $id = null) {
         $page->setTitle('Administration - Formations');
         $page->assign('title', 'Gestion des formations');
         $table_editor = new PLTableEditor('admin/education', 'profile_education_enum', 'id');
@@ -739,7 +739,7 @@ class ProfileModule extends PLModule
         $table_editor->describe('url', 'site web', false);
         $table_editor->apply($page, $action, $id);
     }
-    function handler_admin_education_field(&$page, $action = 'list', $id = null) {
+    function handler_admin_education_field($page, $action = 'list', $id = null) {
         $page->setTitle('Administration - Domaines de formation');
         $page->assign('title', 'Gestion des domaines de formation');
         $table_editor = new PLTableEditor('admin/education_field', 'profile_education_field_enum', 'id', true);
@@ -747,7 +747,7 @@ class ProfileModule extends PLModule
         $table_editor->describe('field', 'domaine', true);
         $table_editor->apply($page, $action, $id);
     }
-    function handler_admin_education_degree(&$page, $action = 'list', $id = null) {
+    function handler_admin_education_degree($page, $action = 'list', $id = null) {
         $page->setTitle('Administration - Niveau de formation');
         $page->assign('title', 'Gestion des niveau de formation');
         $table_editor = new PLTableEditor('admin/education_degree', 'profile_education_degree_enum', 'id');
@@ -756,7 +756,7 @@ class ProfileModule extends PLModule
         $table_editor->describe('degree', 'niveau', true);
         $table_editor->apply($page, $action, $id);
     }
-    function handler_admin_education_degree_set(&$page, $action = 'list', $id = null, $id2 = null) {
+    function handler_admin_education_degree_set($page, $action = 'list', $id = null, $id2 = null) {
         $page->setTitle('Administration - Correspondances formations - niveau de formation');
         $page->assign('title', 'Gestion des correspondances formations - niveau de formation');
         $table_editor = new PLTableEditor('admin/education_degree_set', 'profile_education_degree', 'eduid', true, 'degreeid');
@@ -772,14 +772,14 @@ class ProfileModule extends PLModule
 
         $table_editor->apply($page, $action, $id, $id2);
     }
-    function handler_admin_sections(&$page, $action = 'list', $id = null) {
+    function handler_admin_sections($page, $action = 'list', $id = null) {
         $page->setTitle('Administration - Sections');
         $page->assign('title', 'Gestion des sections');
         $table_editor = new PLTableEditor('admin/sections','profile_section_enum','id');
         $table_editor->describe('text','intitulé',true);
         $table_editor->apply($page, $action, $id);
     }
-    function handler_admin_networking(&$page, $action = 'list', $id = null) {
+    function handler_admin_networking($page, $action = 'list', $id = null) {
         $page->assign('xorg_title', 'Polytechnique.org - Administration - Networking');
         $page->assign('title', 'Gestion des types de networking');
         $table_editor = new PLTableEditor('admin/networking', 'profile_networking_enum', 'nwid');
@@ -789,7 +789,7 @@ class ProfileModule extends PLModule
         $table_editor->describe('link', 'lien web', true);
         $table_editor->apply($page, $action, $id);
     }
-    function handler_admin_corps_enum(&$page, $action = 'list', $id = null) {
+    function handler_admin_corps_enum($page, $action = 'list', $id = null) {
         $page->setTitle('Administration - Corps');
         $page->assign('title', 'Gestion des Corps');
         $table_editor = new PLTableEditor('admin/corps_enum', 'profile_corps_enum', 'id');
@@ -798,7 +798,7 @@ class ProfileModule extends PLModule
         $table_editor->describe('still_exists', 'existe encore ?', true);
         $table_editor->apply($page, $action, $id);
     }
-    function handler_admin_corps_rank(&$page, $action = 'list', $id = null) {
+    function handler_admin_corps_rank($page, $action = 'list', $id = null) {
         $page->setTitle('Administration - Grade dans les Corps');
         $page->assign('title', 'Gestion des grade dans les Corps');
         $table_editor = new PLTableEditor('admin/corps_rank', 'profile_corps_rank_enum', 'id');
@@ -806,7 +806,7 @@ class ProfileModule extends PLModule
         $table_editor->describe('abbreviation', 'abbréviation', true);
         $table_editor->apply($page, $action, $id);
     }
-    function handler_admin_medals(&$page, $action = 'list', $id = null) {
+    function handler_admin_medals($page, $action = 'list', $id = null) {
         $page->setTitle('Administration - Distinctions');
         $page->assign('title', 'Gestion des Distinctions');
         $table_editor = new PLTableEditor('admin/medals','profile_medal_enum','id');
index ca02810..c563c7e 100644 (file)
@@ -21,7 +21,7 @@
 
 class ProfileSettingAddresses implements ProfileSetting
 {
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         $success = true;
         $addresses = array();
@@ -41,7 +41,7 @@ class ProfileSettingAddresses implements ProfileSetting
         return Address::formatFormArray($value, $success);
     }
 
-    public function save(ProfilePage &$page, $field, $value)
+    public function save(ProfilePage $page, $field, $value)
     {
         $deletePrivate = S::user()->isMe($page->owner) || S::admin();
 
@@ -63,7 +63,7 @@ class ProfilePageAddresses extends ProfilePage
 {
     protected $pg_template = 'profile/adresses.tpl';
 
-    public function __construct(PlWizard &$wiz)
+    public function __construct(PlWizard $wiz)
     {
         parent::__construct($wiz);
         $this->settings['addresses'] = new ProfileSettingAddresses();
index 1c914b5..e96e519 100644 (file)
@@ -21,7 +21,7 @@
 
 class ProfileSettingDeco implements ProfileSetting
 {
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         $success = true;
         if (is_null($value)) {
@@ -50,7 +50,7 @@ class ProfileSettingDeco implements ProfileSetting
         return $value;
     }
 
-    public function save(ProfilePage &$page, $field, $value)
+    public function save(ProfilePage $page, $field, $value)
     {
         $orig =& $page->orig[$field];
 
@@ -94,7 +94,7 @@ class ProfilePageDecos extends ProfilePage
 {
     protected $pg_template = 'profile/deco.tpl';
 
-    public function __construct(PlWizard &$wiz)
+    public function __construct(PlWizard $wiz)
     {
         parent::__construct($wiz);
         $this->settings['medals'] = new ProfileSettingDeco();
@@ -121,7 +121,7 @@ class ProfilePageDecos extends ProfilePage
         }
     }
 
-    public function _prepare(PlPage &$page, $id)
+    public function _prepare(PlPage $page, $id)
     {
         $res = XDB::iterator('SELECT  *, FIND_IN_SET(\'validation\', flags) AS validate
                                 FROM  profile_medal_enum
index 4171fe4..8a03a47 100644 (file)
@@ -41,7 +41,7 @@ class ProfileSettingSearchNames implements ProfileSetting
         return name_to_basename($value);
     }
 
-    private function prepare(ProfilePage &$page, $field, $value, $init, &$success)
+    private function prepare(ProfilePage $page, $field, $value, $init, &$success)
     {
         $success = true;
         $ini     = $this->prepareField($init);
@@ -78,7 +78,7 @@ class ProfileSettingSearchNames implements ProfileSetting
         return $value;
     }
 
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         $success     = true;
         $success_tmp = true;
@@ -207,7 +207,7 @@ class ProfileSettingSearchNames implements ProfileSetting
         return $value;
     }
 
-    public function save(ProfilePage &$page, $field, $value)
+    public function save(ProfilePage $page, $field, $value)
     {
         require_once 'name.func.inc.php';
 
@@ -258,7 +258,7 @@ class ProfileSettingEdu implements ProfileSetting
         return ($a < $b) ? -1 : 1;
     }
 
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         $success = true;
         if (is_null($value)) {
@@ -293,7 +293,7 @@ class ProfileSettingEdu implements ProfileSetting
         return $value;
     }
 
-    public function save(ProfilePage &$page, $field, $value)
+    public function save(ProfilePage $page, $field, $value)
     {
         XDB::execute("DELETE FROM  profile_education
                             WHERE  pid = {?} AND !FIND_IN_SET('primary', flags)",
@@ -349,9 +349,9 @@ class ProfileSettingEdu implements ProfileSetting
 class ProfileSettingEmailDirectory implements ProfileSetting
 {
     public function __construct(){}
-    public function save(ProfilePage &$page, $field, $value){}
+    public function save(ProfilePage $page, $field, $value){}
 
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         $p = Platal::page();
 
@@ -390,7 +390,7 @@ class ProfileSettingNetworking implements ProfileSetting
         $this->number = new ProfileSettingNumber();
     }
 
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         if (is_null($value)) {
             $value = XDB::fetchAllAssoc("SELECT  n.address, n.pub, n.nwid AS type
@@ -431,7 +431,7 @@ class ProfileSettingNetworking implements ProfileSetting
         return $value;
     }
 
-    public function save(ProfilePage &$page, $field, $value)
+    public function save(ProfilePage $page, $field, $value)
     {
         XDB::execute("DELETE FROM profile_networking
                             WHERE pid = {?}",
@@ -461,7 +461,7 @@ class ProfileSettingPromo implements ProfileSetting
 {
     public function __construct(){}
 
-    public function save(ProfilePage &$page, $field, $value)
+    public function save(ProfilePage $page, $field, $value)
     {
         $gradYearNew = $value;
         if ($page->profile->mainEducation() == 'X') {
@@ -486,7 +486,7 @@ class ProfileSettingPromo implements ProfileSetting
         }
     }
 
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         $entryYear = $page->profile->entry_year;
         $gradYear  = $page->profile->grad_year;
@@ -537,7 +537,7 @@ class ProfilePageGeneral extends ProfilePage
 {
     protected $pg_template = 'profile/general.tpl';
 
-    public function __construct(PlWizard &$wiz)
+    public function __construct(PlWizard $wiz)
     {
         parent::__construct($wiz);
         $this->settings['search_names']
@@ -707,7 +707,7 @@ class ProfilePageGeneral extends ProfilePage
         }
     }
 
-    public function _prepare(PlPage &$page, $id)
+    public function _prepare(PlPage $page, $id)
     {
         require_once "education.func.inc.php";
 
index 2d7caaa..0f27bfd 100644 (file)
@@ -21,7 +21,7 @@
 
 class ProfileSettingSection implements ProfileSetting
 {
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         $success = true;
         if (is_null($value)) {
@@ -34,7 +34,7 @@ class ProfileSettingSection implements ProfileSetting
         return intval($value);
     }
 
-    public function save(ProfilePage &$page, $field, $value)
+    public function save(ProfilePage $page, $field, $value)
     {
         XDB::execute("UPDATE  profiles
                          SET  section = {?}
@@ -54,7 +54,7 @@ class ProfileSettingBinets implements ProfileSetting
     {
     }
 
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         if (is_null($value)) {
             $value = array();
@@ -75,7 +75,7 @@ class ProfileSettingBinets implements ProfileSetting
         return $value;
     }
 
-    public function save(ProfilePage &$page, $field, $value)
+    public function save(ProfilePage $page, $field, $value)
     {
         XDB::execute("DELETE FROM  profile_binets
                             WHERE  pid = {?}",
@@ -100,7 +100,7 @@ class ProfilePageGroups extends ProfilePage
 {
     protected $pg_template = 'profile/groups.tpl';
 
-    public function __construct(PlWizard &$wiz)
+    public function __construct(PlWizard $wiz)
     {
         parent::__construct($wiz);
         $this->settings['section']  = new ProfileSettingSection();
@@ -108,7 +108,7 @@ class ProfilePageGroups extends ProfilePage
         $this->watched['section'] = $this->watched['binets'] = true;
     }
 
-    public function _prepare(PlPage &$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  groups    AS a
index eb2379b..0970503 100644 (file)
@@ -131,7 +131,7 @@ class ProfileSettingJob implements ProfileSetting
         return $jobs;
     }
 
-    private function cleanJob(ProfilePage &$page, $jobid, array &$job, &$success, $maxPublicity)
+    private function cleanJob(ProfilePage $page, $jobid, array &$job, &$success, $maxPublicity)
     {
         if ($job['w_email'] == "new@example.org") {
             $job['w_email'] = $job['w_email_new'];
@@ -193,7 +193,7 @@ class ProfileSettingJob implements ProfileSetting
 
 
 
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         $entreprise = ProfileValidate::get_typed_requests($page->pid(), 'entreprise');
         $entr_val = 0;
@@ -257,7 +257,7 @@ class ProfileSettingJob implements ProfileSetting
         return $value;
     }
 
-    public function save(ProfilePage &$page, $field, $value)
+    public function save(ProfilePage $page, $field, $value)
     {
         $deletePrivate = S::user()->isMe($page->owner) || S::admin();
         XDB::execute('DELETE FROM  pj, pjt
@@ -344,7 +344,7 @@ class ProfileSettingJob implements ProfileSetting
 
 class ProfileSettingCorps implements ProfileSetting
 {
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         $success = true;
         if (is_null($value)) {
@@ -359,7 +359,7 @@ class ProfileSettingCorps implements ProfileSetting
         return $value;
     }
 
-    public function save(ProfilePage &$page, $field, $value)
+    public function save(ProfilePage $page, $field, $value)
     {
         if (!S::user()->isMe($page->owner)) {
             XDB::execute('INSERT INTO  profile_corps (original_corpsid, current_corpsid, rankid, corps_pub, pid)
@@ -390,7 +390,7 @@ class ProfilePageJobs extends ProfilePage
 {
     protected $pg_template = 'profile/jobs.tpl';
 
-    public function __construct(PlWizard &$wiz)
+    public function __construct(PlWizard $wiz)
     {
         parent::__construct($wiz);
         if (S::user()->checkPerms(User::PERM_DIRECTORY_PRIVATE)) {
@@ -425,7 +425,7 @@ class ProfilePageJobs extends ProfilePage
         }
     }
 
-    public function _prepare(PlPage &$page, $id)
+    public function _prepare(PlPage $page, $id)
     {
         require_once 'emails.combobox.inc.php';
         fill_email_combobox($page, $this->owner);
index 3a842c6..7a14e2d 100644 (file)
@@ -22,7 +22,7 @@
 /** Terms associated to profile mentoring */
 class ProfileSettingTerms implements ProfileSetting
 {
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         $success = true;
         if (is_null($value)) {
@@ -63,7 +63,7 @@ class ProfileSettingTerms implements ProfileSetting
         return $value;
     }
 
-    public function save(ProfilePage &$page, $field, $value)
+    public function save(ProfilePage $page, $field, $value)
     {
 
         XDB::execute("DELETE FROM  profile_mentor_term
@@ -92,7 +92,7 @@ class ProfileSettingTerms implements ProfileSetting
 
 class ProfileSettingCountry implements ProfileSetting
 {
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         $success = true;
         if (is_null($value)) {
@@ -115,7 +115,7 @@ class ProfileSettingCountry implements ProfileSetting
         return $value;
     }
 
-    public function save(ProfilePage &$page, $field, $value)
+    public function save(ProfilePage $page, $field, $value)
     {
         XDB::execute("DELETE FROM  profile_mentor_country
                             WHERE  pid = {?}",
@@ -137,7 +137,7 @@ class ProfilePageMentor extends ProfilePage
 {
     protected $pg_template = 'profile/mentor.tpl';
 
-    public function __construct(PlWizard &$wiz)
+    public function __construct(PlWizard $wiz)
     {
         parent::__construct($wiz);
         $this->settings['expertise'] = null;
@@ -173,7 +173,7 @@ class ProfilePageMentor extends ProfilePage
         }
     }
 
-    public function _prepare(PlPage &$page, $id)
+    public function _prepare(PlPage $page, $id)
     {
         $page->assign('countryList', XDB::iterator("SELECT  iso_3166_1_a2, country
                                                       FROM  geoloc_countries
index 1323e86..dd20de4 100644 (file)
@@ -31,11 +31,11 @@ interface ProfileSetting
      * Whatever happen, this function must always returns the function to
      * show on the page to the user.
      */
-    public function value(ProfilePage &$page, $field, $value, &$success);
+    public function value(ProfilePage $page, $field, $value, &$success);
 
     /** Save the new value for the given field.
      */
-    public function save(ProfilePage &$page, $field, $new_value);
+    public function save(ProfilePage $page, $field, $new_value);
 
     /** Get text from the value.
      */
@@ -44,7 +44,7 @@ interface ProfileSetting
 
 abstract class ProfileNoSave implements ProfileSetting
 {
-    public function save(ProfilePage &$page, $field, $new_value) { }
+    public function save(ProfilePage $page, $field, $new_value) { }
 
     public function getText($value) {
         return $value;
@@ -53,7 +53,7 @@ abstract class ProfileNoSave implements ProfileSetting
 
 class ProfileSettingWeb extends ProfileNoSave
 {
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         if (is_null($value)) {
             return isset($page->values[$field]) ? $page->values[$field] : S::v($field);
@@ -70,7 +70,7 @@ class ProfileSettingWeb extends ProfileNoSave
 
 class ProfileSettingEmail extends ProfileNoSave
 {
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         if (is_null($value)) {
             return isset($page->values[$field]) ? $page->values[$field] : S::v($field);
@@ -86,7 +86,7 @@ class ProfileSettingEmail extends ProfileNoSave
 
 class ProfileSettingNumber extends ProfileNoSave
 {
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         if (is_null($value)) {
             return isset($page->values[$field]) ? $page->values[$field] : S::v($field);
@@ -102,7 +102,7 @@ class ProfileSettingNumber extends ProfileNoSave
 
 class ProfileSettingPhones implements ProfileSetting
 {
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         $success = true;
         $phones = array();
@@ -127,7 +127,7 @@ class ProfileSettingPhones implements ProfileSetting
         }
     }
 
-    public function save(ProfilePage &$page, $field, $value)
+    public function save(ProfilePage $page, $field, $value)
     {
         Phone::deletePhones($page->pid(), Phone::LINK_PROFILE, null, S::user()->isMe($page->owner) || S::admin());
         Phone::savePhones($value, $page->pid(), Phone::LINK_PROFILE);
@@ -141,7 +141,7 @@ class ProfileSettingPhones implements ProfileSetting
 
 class ProfileSettingPub extends ProfileNoSave
 {
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         $success = true;
         if (is_null($value)) {
@@ -163,7 +163,7 @@ class ProfileSettingPub extends ProfileNoSave
 
 class ProfileSettingBool extends ProfileNoSave
 {
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         $success = true;
         if (is_null($value)) {
@@ -182,7 +182,7 @@ class ProfileSettingDate extends ProfileNoSave
         $this->allowEmpty = $allowEmpty;
     }
 
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         $success = true;
         if (is_null($value)) {
@@ -228,7 +228,7 @@ abstract class ProfilePage implements PlWizardPage
     public $profile  = null;
     public $owner    = null;
 
-    public function __construct(PlWizard &$wiz)
+    public function __construct(PlWizard $wiz)
     {
         $this->wizard =& $wiz;
         $this->profile = $this->wizard->getUserData('profile');
@@ -356,11 +356,11 @@ abstract class ProfilePage implements PlWizardPage
         return $this->profile->hrpid();
     }
 
-    protected function _prepare(PlPage &$page, $id)
+    protected function _prepare(PlPage $page, $id)
     {
     }
 
-    public function prepare(PlPage &$page, $id)
+    public function prepare(PlPage $page, $id)
     {
         if (count($this->values) == 0) {
             $this->fetchData();
index 21e3aa6..8a495cc 100644 (file)
@@ -32,7 +32,7 @@ class ProfileSettingSkill implements ProfileSetting
         $this->text_field = $text;
     }
 
-    public function value(ProfilePage &$page, $field, $value, &$success)
+    public function value(ProfilePage $page, $field, $value, &$success)
     {
         if (is_null($value)) {
             $value = array();
@@ -62,7 +62,7 @@ class ProfileSettingSkill implements ProfileSetting
         return $value;
     }
 
-    public function save(ProfilePage &$page, $field, $value)
+    public function save(ProfilePage $page, $field, $value)
     {
         XDB::execute("DELETE FROM  profile_{$this->table}s
                             WHERE  pid = {?}",
@@ -106,14 +106,14 @@ class ProfilePageSkills extends ProfilePage
 {
     protected $pg_template = 'profile/skill.tpl';
 
-    public function __construct(PlWizard &$wiz)
+    public function __construct(PlWizard $wiz)
     {
         parent::__construct($wiz);
         $this->settings['competences'] = new ProfileSettingSkill('skill', 'cid', 'text_fr');
         $this->settings['langues'] = new ProfileSettingSkill('langskill', 'lid', 'langue_fr');
     }
 
-    public function _prepare(PlPage &$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  profile_skill_enum"));
index 0dfd5c3..05a85e1 100644 (file)
@@ -29,7 +29,7 @@ class RegisterModule extends PLModule
         );
     }
 
-    function handler_register(&$page, $hash = null)
+    function handler_register($page, $hash = null)
     {
         $alert = null;
         $subState = new PlDict(S::v('subState', array()));
@@ -260,7 +260,7 @@ class RegisterModule extends PLModule
         }
     }
 
-    function handler_end(&$page, $hash = null)
+    function handler_end($page, $hash = null)
     {
         global $globals;
         $_SESSION['subState'] = array('step' => 5);
index 7127e34..c32d35a 100644 (file)
@@ -21,7 +21,7 @@
 
 // {{{ function checkId
 
-function checkId(&$subState)
+function checkId($subState)
 {
     $subState->set('xorgid', Profile::getXorgId($subState->i('schoolid')));
     if (!$subState->v('xorgid')) {
@@ -57,7 +57,7 @@ function checkId(&$subState)
 // }}}
 // {{{ function checkOldId
 
-function checkOldId(&$subState)
+function checkOldId($subState)
 {
     $uf = new UserFilter(new PFC_And(
             new PFC_Not(new UFC_Dead()),
@@ -98,7 +98,7 @@ function checkOldId(&$subState)
 // }}}
 // {{{ function checkNewUser
 
-function checkNewUser(&$subState)
+function checkNewUser($subState)
 {
     $firstname = preg_replace("/[ \t]+/", ' ', $subState->t('firstname'));
     $firstname = preg_replace("/--+/", '-', $firstname);
@@ -125,7 +125,7 @@ function checkNewUser(&$subState)
 // }}}
 // {{{ function createAliases
 
-function createAliases(&$subState)
+function createAliases($subState)
 {
     global $globals;
 
index 8c05b86..d1e6fd4 100644 (file)
@@ -28,7 +28,7 @@ class ReminderModule extends PLModule
         );
     }
 
-    function handler_reminder(&$page, $reminder_name = null, $action = null)
+    function handler_reminder($page, $reminder_name = null, $action = null)
     {
         require_once 'reminder.inc.php';
         $user = S::user();
index 8173c4a..b146f9b 100644 (file)
@@ -36,7 +36,7 @@ class SearchModule extends PLModule
         );
     }
 
-    function handler_redir_advanced(&$page, $mode = null)
+    function handler_redir_advanced($page, $mode = null)
     {
         pl_redirect('search/adv');
         exit;
@@ -51,7 +51,7 @@ class SearchModule extends PLModule
      * $model: The way of presenting the results: minifiche, trombi, geoloc.
      * $byletter: Show only names beginning with this letter
      */
-    function handler_quick(&$page, $model = null, $byletter = null)
+    function handler_quick($page, $model = null, $byletter = null)
     {
         global $globals;
 
@@ -147,7 +147,7 @@ class SearchModule extends PLModule
 
     /** $model is the way of presenting the results: minifiche, trombi, geoloc.
      */
-    function handler_advanced(&$page, $model = null, $byletter = null)
+    function handler_advanced($page, $model = null, $byletter = null)
     {
         global $globals;
         $page->assign('advanced',1);
@@ -202,7 +202,7 @@ class SearchModule extends PLModule
         $page->assign('public_directory',0);
     }
 
-    function handler_autocomplete(&$page, $type = null)
+    function handler_autocomplete($page, $type = null)
     {
         // Autocompletion : according to type required, return
         // a list of results matching with the number of matches.
@@ -280,7 +280,7 @@ class SearchModule extends PLModule
         exit();
     }
 
-    function handler_list(&$page, $type = null, $idVal = null)
+    function handler_list($page, $type = null, $idVal = null)
     {
         $page->assign('name', $type);
         $page->assign('with_text_value', true);
@@ -337,7 +337,7 @@ class SearchModule extends PLModule
             break;
           case 'jobterm':
             if (Env::has('jtid')) {
-                JobTerms::ajaxGetBranch(&$page, JobTerms::ONLY_JOBS);
+                JobTerms::ajaxGetBranch($page, JobTerms::ONLY_JOBS);
                 return;
             } else {
                 pl_content_headers('text/xml');
@@ -363,7 +363,7 @@ class SearchModule extends PLModule
         $page->assign('list', $ids);
     }
 
-    function handler_referent(&$page, $action = null, $subaction = null)
+    function handler_referent($page, $action = null, $subaction = null)
     {
         global $globals;
 
@@ -406,7 +406,7 @@ class SearchModule extends PLModule
      * know about. Only referents linked to term (jtid) are displayed.
      * @param $jtid id of job term to restrict referents
      */
-    function handler_referent_countries(&$page, $jtid = null)
+    function handler_referent_countries($page, $jtid = null)
     {
         pl_content_headers("text/xml");
         $page->changeTpl('include/field.select.tpl', NO_SKIN);
index 40a8a2b..376f2ba 100644 (file)
@@ -46,18 +46,18 @@ class StatsModule extends PLModule
         );
     }
 
-    function handler_stats(&$page)
+    function handler_stats($page)
     {
         $page->changeTpl('stats/index.tpl');
     }
 
-    function handler_evolution(&$page, $jours = 365)
+    function handler_evolution($page, $jours = 365)
     {
         $page->changeTpl('stats/evolution_inscrits.tpl');
         $page->assign('jours', $jours);
     }
 
-    function handler_graph_evo(&$page, $jours = 365)
+    function handler_graph_evo($page, $jours = 365)
     {
         define('DUREEJOUR', 24 * 3600);
 
@@ -121,7 +121,7 @@ EOF2;
         exit;
     }
 
-    function handler_graph(&$page, $promo = null)
+    function handler_graph($page, $promo = null)
     {
         if ($promo == 'all') {
             // date de départ
@@ -246,7 +246,7 @@ EOF2;
         exit;
     }
 
-    function handler_promos(&$page, $promo = null)
+    function handler_promos($page, $promo = null)
     {
         $page->changeTpl('stats/nb_by_promo.tpl');
 
@@ -273,7 +273,7 @@ EOF2;
         $page->assign('promo', $promo);
     }
 
-    function handler_coupures(&$page, $cp_id = null)
+    function handler_coupures($page, $cp_id = null)
     {
         $page->changeTpl('stats/coupure.tpl');
 
index 3c53625..8ea5817 100644 (file)
@@ -39,7 +39,7 @@ class SurveyModule extends PLModule
     // }}}
 
     // {{{ function handler_index() : lists all available surveys
-    function handler_index(&$page, $action = null)
+    function handler_index($page, $action = null)
     {
         $this->load('survey.inc.php');
         $page->changeTpl('survey/index.tpl');
@@ -50,10 +50,10 @@ class SurveyModule extends PLModule
     // }}}
 
     // {{{ function handler_vote() : handles the vote to a survey
-    function handler_vote(&$page, $id = -1)
+    function handler_vote($page, $id = -1)
     {
         if (Post::has('survey_cancel')) { // if the user cancels, returns to index
-            return $this->handler_index(&$page);
+            return $this->handler_index($page);
         }
         $id = intval($id);
         if ($id == -1) {
@@ -125,7 +125,7 @@ class SurveyModule extends PLModule
     // }}}
 
     // {{{ function handler_admin() : index of admin mode
-    function handler_admin(&$page, $id = -1)
+    function handler_admin($page, $id = -1)
     {
         $this->load('survey.inc.php');
         $this->clear_session();
@@ -148,7 +148,7 @@ class SurveyModule extends PLModule
     // }}}
 
     // {{{ function handler_adminEdit() : edits a survey in admin mode
-    function handler_adminEdit(&$page, $id = -1, $req = -1)
+    function handler_adminEdit($page, $id = -1, $req = -1)
     {
         if ($id == -1 || ($id == 'req' && $req == -1)) {
             return $this->show_error($page, "Un identifiant de sondage doit être précisé.", 'survey/admin');
@@ -174,12 +174,12 @@ class SurveyModule extends PLModule
     // }}}
 
     // {{{ function handler_adminValidate() : validates a survey (admin mode)
-    function handler_adminValidate(&$page, $id = -1)
+    function handler_adminValidate($page, $id = -1)
     {
         $id = Post::i('survey_id', $id);
         if (Post::has('survey_cancel')) { // if the admin cancels the validation, returns to the admin index
             $this->clear_session();
-            return $this->handler_admin(&$page, $id);
+            return $this->handler_admin($page, $id);
         }
         if ($id == -1) {
             return $this->show_error($page, "Un identifiant de sondage doit être précisé.", 'survey/admin');
@@ -204,11 +204,11 @@ class SurveyModule extends PLModule
     // }}}
 
     // {{{ function handler_adminDelete() : deletes a survey (admin mode)
-    function handler_adminDelete(&$page, $id = -1)
+    function handler_adminDelete($page, $id = -1)
     {
         $id = Post::i('survey_id', $id);
         if (Post::has('survey_cancel')) { // if the admin cancels the suppression, returns to the admin index
-            return $this->handler_admin(&$page, $id);
+            return $this->handler_admin($page, $id);
         }
         if ($id == -1) {
             return $this->show_error($page, "Un identifiant de sondage doit être précisé.", 'survey/admin');
@@ -232,7 +232,7 @@ class SurveyModule extends PLModule
     // }}}
 
     // {{{ function handler_edit() : edits a survey (in normal mode unless called by handler_adminEdit() )
-    function handler_edit(&$page, $action = 'show', $qid = 'root')
+    function handler_edit($page, $action = 'show', $qid = 'root')
     {
         $this->load('survey.inc.php');
         $action = Post::v('survey_action', $action);
@@ -357,7 +357,7 @@ class SurveyModule extends PLModule
                     return $this->handler_index($page); // else shows the 'normal' index
                 }
             } else { // asks for a confirmation if it has not been sent
-                $this->show_confirm(&$page, "Êtes-vous certain de vouloir annuler totalement l'édition de ce sondage ? Attention, "
+                $this->show_confirm($page, "Êtes-vous certain de vouloir annuler totalement l'édition de ce sondage ? Attention, "
                                            ."toutes les données éditées jusque là seront définitivement perdues.",
                                                 'edit', array('action' => $action));
             }
@@ -366,7 +366,7 @@ class SurveyModule extends PLModule
     // }}}
 
     // {{{ function handler_ajax() : some ajax in editing a new question (for now, there may be a little more later)
-    function handler_ajax(&$page, $type)
+    function handler_ajax($page, $type)
     {
         $this->load('survey.inc.php');
         pl_content_headers("text/html");
@@ -401,7 +401,7 @@ class SurveyModule extends PLModule
     // }}}
 
     // {{{ function check_surveyPerms() : checks the particular surveys access permissions
-    function check_surveyPerms(&$page, $survey, $silent = false, $admin_allowed = true)
+    function check_surveyPerms($page, $survey, $silent = false, $admin_allowed = true)
     {
         $this->load('survey.inc.php');
         if ($survey->isMode(Survey::MODE_ALL)) { // if the survey is not reserved to alumni
@@ -439,7 +439,7 @@ class SurveyModule extends PLModule
     // }}}
 
     // {{{ function show_survey() : calls the template to display a survey, for editing, voting, or consulting the results
-    function show_survey(&$page, $survey)
+    function show_survey($page, $survey)
     {
         $page->changeTpl('survey/show_root.tpl');
         $page->assign('survey', $survey->toArray());
@@ -448,7 +448,7 @@ class SurveyModule extends PLModule
     // }}}
 
     // {{{ function show_form() : calls the template to display the editing form
-    function show_form(&$page, $action, $qid, $type = 'new', $current = null)
+    function show_form($page, $action, $qid, $type = 'new', $current = null)
     {
         $page->changeTpl('survey/edit_survey.tpl');
         $page->assign('survey_action', $action);
@@ -468,7 +468,7 @@ class SurveyModule extends PLModule
     // }}}
 
     // {{{ function show_confirm() : calls the template to display a confirm form
-    function show_confirm(&$page, $message, $formaction, $formhidden = null)
+    function show_confirm($page, $message, $formaction, $formhidden = null)
     {
         $page->changeTpl('survey/confirm.tpl');
         $page->assign('survey_message', $message);
@@ -478,7 +478,7 @@ class SurveyModule extends PLModule
     // }}}
 
     // {{{ function show_error() : calls the template to display an error message
-    function show_error(&$page, $message, $link = "", $errArray = null)
+    function show_error($page, $message, $link = "", $errArray = null)
     {
         $page->changeTpl('survey/error.tpl');
         $page->assign('survey_message', $message);
@@ -491,7 +491,7 @@ class SurveyModule extends PLModule
     // }}}
 
     // {{{ function show_success() : calls the template to display a success message
-    function show_success(&$page, $message = "", $link = "")
+    function show_success($page, $message = "", $link = "")
     {
         $page->changeTpl('survey/success.tpl');
         $page->assign('survey_message', $message);
index 6dc536d..df5d753 100644 (file)
@@ -38,7 +38,7 @@ class XnetModule extends PLModule
         );
     }
 
-    function handler_photo(&$page, $x = null)
+    function handler_photo($page, $x = null)
     {
         if (!$x || !($profile = Profile::get($x))) {
             return PL_NOT_FOUND;
@@ -51,20 +51,20 @@ class XnetModule extends PLModule
         $photo->send();
     }
 
-    function handler_index(&$page)
+    function handler_index($page)
     {
         $page->nomenu = true;
         $page->changeTpl('xnet/index.tpl');
     }
 
-    function handler_exit(&$page)
+    function handler_exit($page)
     {
         Platal::session()->stopSUID();
         Platal::session()->destroy();
         $page->changeTpl('xnet/deconnexion.tpl');
     }
 
-    function handler_admin(&$page)
+    function handler_admin($page)
     {
         $page->changeTpl('xnet/admin.tpl');
 
@@ -129,7 +129,7 @@ class XnetModule extends PLModule
         $page->assign('assos', $res->fetchAllAssoc());
     }
 
-    function handler_plan(&$page)
+    function handler_plan($page)
     {
         $page->changeTpl('xnet/plan.tpl');
 
@@ -170,15 +170,15 @@ class XnetModule extends PLModule
         $page->assign('inst', $res);
     }
 
-    function handler_groups2(&$page)
+    function handler_groups2($page)
     {
-        $this->handler_groups(&$page, Get::v('cat'), Get::v('dom'));
+        $this->handler_groups($page, Get::v('cat'), Get::v('dom'));
     }
 
-    function handler_groups(&$page, $cat = null, $dom = null)
+    function handler_groups($page, $cat = null, $dom = null)
     {
         if (!$cat) {
-            $this->handler_index(&$page);
+            $this->handler_index($page);
         }
 
         $cat = mb_strtolower($cat);
@@ -211,7 +211,7 @@ class XnetModule extends PLModule
         $page->setType($cat);
     }
 
-    function handler_autologin(&$page)
+    function handler_autologin($page)
     {
         $allkeys = func_get_args();
         unset($allkeys[0]);
index 64ca542..c5729f3 100644 (file)
@@ -35,7 +35,7 @@ class XnetEventsModule extends PLModule
         );
     }
 
-    function handler_events(&$page, $archive = null)
+    function handler_events($page, $archive = null)
     {
         global $globals;
 
@@ -175,7 +175,7 @@ class XnetEventsModule extends PLModule
         $page->assign('undisplayed_events', $undisplayed_events);
     }
 
-    function handler_sub(&$page, $eid = null)
+    function handler_sub($page, $eid = null)
     {
         $this->load('xnetevents.inc.php');
         $page->changeTpl('xnetevents/subscribe.tpl');
@@ -271,7 +271,7 @@ class XnetEventsModule extends PLModule
         $page->assign('event', get_event_detail($eid));
     }
 
-    function handler_csv(&$page, $eid = null, $item_id = null)
+    function handler_csv($page, $eid = null, $item_id = null)
     {
         $this->load('xnetevents.inc.php');
 
@@ -301,7 +301,7 @@ class XnetEventsModule extends PLModule
         $page->assign('tout', !Env::v('item_id', false));
     }
 
-    function handler_ical(&$page, $eid = null)
+    function handler_ical($page, $eid = null)
     {
         global $globals;
 
@@ -333,7 +333,7 @@ class XnetEventsModule extends PLModule
         pl_content_headers("text/calendar");
     }
 
-    function handler_edit(&$page, $eid = null)
+    function handler_edit($page, $eid = null)
     {
         global $globals;
 
@@ -516,7 +516,7 @@ class XnetEventsModule extends PLModule
         $page->assign('url_ref', $eid);
     }
 
-    function handler_admin(&$page, $eid = null, $item_id = null)
+    function handler_admin($page, $eid = null, $item_id = null)
     {
         global $globals;
 
index f8a95e8..08201e9 100644 (file)
@@ -252,7 +252,7 @@ function subscribe_lists_event($uid, $evt, $participate, $paid, $payment = false
 // }}}
 
 //  {{{ function event_change_shortname()
-function event_change_shortname(&$page, $eid, $old, $new)
+function event_change_shortname($page, $eid, $old, $new)
 {
     global $globals;
 
index ba61966..711ece0 100644 (file)
@@ -56,7 +56,7 @@ class XnetGrpModule extends PLModule
         );
     }
 
-    function handler_index(&$page, $arg = null)
+    function handler_index($page, $arg = null)
     {
         global $globals, $platal;
         if (!is_null($arg)) {
@@ -136,13 +136,13 @@ class XnetGrpModule extends PLModule
         $page->assign('articles', $arts);
     }
 
-    function handler_logo(&$page)
+    function handler_logo($page)
     {
         global $globals;
         $globals->asso()->getLogo()->send();
     }
 
-    function handler_site(&$page)
+    function handler_site($page)
     {
         global $globals;
         $site = $globals->asso('site');
@@ -154,7 +154,7 @@ class XnetGrpModule extends PLModule
         exit;
     }
 
-    function handler_edit(&$page)
+    function handler_edit($page)
     {
         global $globals;
         $page->changeTpl('xnetgrp/edit.tpl');
@@ -244,7 +244,7 @@ class XnetGrpModule extends PLModule
         }
     }
 
-    function handler_mail(&$page)
+    function handler_mail($page)
     {
         global $globals;
 
@@ -281,7 +281,7 @@ class XnetGrpModule extends PLModule
         }
     }
 
-    function handler_forum(&$page, $group = null, $artid = null)
+    function handler_forum($page, $group = null, $artid = null)
     {
         global $globals;
         $page->changeTpl('xnetgrp/forum.tpl');
@@ -294,7 +294,7 @@ class XnetGrpModule extends PLModule
         run_banana($page, 'ForumsBanana', $get);
     }
 
-    function handler_annuaire(&$page, $action = null, $subaction = null)
+    function handler_annuaire($page, $action = null, $subaction = null)
     {
         global $globals;
 
@@ -347,17 +347,17 @@ class XnetGrpModule extends PLModule
         $page->assign('only_admin', Env::b('admin'));
     }
 
-    function handler_trombi(&$page)
+    function handler_trombi($page)
     {
         pl_redirect('annuaire/trombi');
     }
 
-    function handler_geoloc(&$page)
+    function handler_geoloc($page)
     {
         pl_redirect('annuaire/geoloc');
     }
 
-    function handler_vcard(&$page, $photos = null)
+    function handler_vcard($page, $photos = null)
     {
         global $globals;
         $vcard = new VCard($photos == 'photos', 'Membre du groupe ' . $globals->asso('nom'));
@@ -365,7 +365,7 @@ class XnetGrpModule extends PLModule
         $vcard->show();
     }
 
-    function handler_csv(&$page, $filename = null)
+    function handler_csv($page, $filename = null)
     {
         global $globals;
         if (is_null($filename)) {
@@ -385,7 +385,7 @@ class XnetGrpModule extends PLModule
                      $globals->asso('id'), $uid);
     }
 
-    private function validSubscription(User &$user)
+    private function validSubscription(User $user)
     {
         global $globals;
         $this->removeSubscriptionRequest($user->id());
@@ -410,7 +410,7 @@ class XnetGrpModule extends PLModule
         }
     }
 
-    function handler_subscribe(&$page, $u = null)
+    function handler_subscribe($page, $u = null)
     {
         global $globals;
         $page->changeTpl('xnetgrp/inscrire.tpl');
@@ -525,7 +525,7 @@ class XnetGrpModule extends PLModule
         }
     }
 
-    function handler_subscribe_valid(&$page)
+    function handler_subscribe_valid($page)
     {
         global $globals;
 
@@ -554,7 +554,7 @@ class XnetGrpModule extends PLModule
         $page->assign('valid', $it);
     }
 
-    function handler_change_rights(&$page)
+    function handler_change_rights($page)
     {
         if (Env::has('right') && (may_update() || S::suid())) {
             switch (Env::v('right')) {
@@ -581,7 +581,7 @@ class XnetGrpModule extends PLModule
         http_redirect($_SERVER['HTTP_REFERER']);
     }
 
-    function handler_admin_annuaire(&$page)
+    function handler_admin_annuaire($page)
     {
         global $globals;
 
@@ -621,7 +621,7 @@ class XnetGrpModule extends PLModule
         $page->assign('lists', $lists);
     }
 
-    function handler_admin_member_new(&$page, $email = null)
+    function handler_admin_member_new($page, $email = null)
     {
         global $globals;
 
@@ -705,7 +705,7 @@ class XnetGrpModule extends PLModule
         }
     }
 
-    function handler_admin_member_new_ajax(&$page)
+    function handler_admin_member_new_ajax($page)
     {
         pl_content_headers("text/html");
         $page->changeTpl('xnetgrp/membres-new-search.tpl', NO_SKIN);
@@ -738,7 +738,7 @@ class XnetGrpModule extends PLModule
         $page->assign('users', $users);
     }
 
-    function unsubscribe(PlUser &$user)
+    function unsubscribe(PlUser $user)
     {
         global $globals;
         XDB::execute("DELETE FROM  group_members
@@ -792,7 +792,7 @@ class XnetGrpModule extends PLModule
         return !$warning;
     }
 
-    function handler_unsubscribe(&$page)
+    function handler_unsubscribe($page)
     {
         $page->changeTpl('xnetgrp/membres-del.tpl');
         $user = S::user();
@@ -817,7 +817,7 @@ class XnetGrpModule extends PLModule
         $page->assign('is_member', is_member(true));
     }
 
-    function handler_admin_member_del(&$page, $user = null)
+    function handler_admin_member_del($page, $user = null)
     {
         $page->changeTpl('xnetgrp/membres-del.tpl');
         $user = User::getSilent($user);
@@ -839,7 +839,7 @@ class XnetGrpModule extends PLModule
         }
     }
 
-    private function changeLogin(PlPage &$page, PlUser &$user, MMList &$mmlist, $login)
+    private function changeLogin(PlPage $page, PlUser $user, MMList $mmlist, $login)
     {
         // Search the user's uid.
         $xuser = User::getSilent($login);
@@ -865,7 +865,7 @@ class XnetGrpModule extends PLModule
         return $user->login();
     }
 
-    function handler_admin_member(&$page, $user)
+    function handler_admin_member($page, $user)
     {
         global $globals;
 
@@ -991,7 +991,7 @@ class XnetGrpModule extends PLModule
         $page->assign('alias', $user->emailAliases($globals->asso('mail_domain'), 'user', true));
     }
 
-    function handler_rss(&$page, $user = null, $hash = null)
+    function handler_rss($page, $user = null, $hash = null)
     {
         global $globals;
         $page->assign('asso', $globals->asso());
@@ -1001,7 +1001,7 @@ class XnetGrpModule extends PLModule
         return $feed->run($page, $user, $hash, false);
     }
 
-    private function upload_image(PlPage &$page, PlUpload &$upload)
+    private function upload_image(PlPage $page, PlUpload $upload)
     {
         if (@!$_FILES['image']['tmp_name'] && !Env::v('image_url')) {
             return true;
@@ -1020,7 +1020,7 @@ class XnetGrpModule extends PLModule
         return true;
     }
 
-    function handler_photo_announce(&$page, $eid = null) {
+    function handler_photo_announce($page, $eid = null) {
         if ($eid) {
             $res = XDB::query('SELECT  *
                                  FROM  group_announces_photo
@@ -1045,7 +1045,7 @@ class XnetGrpModule extends PLModule
         exit;
     }
 
-    function handler_edit_announce(&$page, $aid = null)
+    function handler_edit_announce($page, $aid = null)
     {
         global $globals, $platal;
         $page->changeTpl('xnetgrp/announce-edit.tpl');
@@ -1210,7 +1210,7 @@ class XnetGrpModule extends PLModule
         $page->assign_by_ref('upload', $upload);
     }
 
-    function handler_admin_announce(&$page)
+    function handler_admin_announce($page)
     {
         global $globals;
         $page->changeTpl('xnetgrp/announce-admin.tpl');
index 55cb0a7..0e98197 100644 (file)
@@ -23,7 +23,7 @@ class UserFilterIterator implements PlIterator
 {
     private $it;
     private $user;
-    public function __construct(PlIterator &$it, PlUser &$user)
+    public function __construct(PlIterator $it, PlUser $user)
     {
         $this->it =& $it;
         $this->user =& $user;
@@ -70,7 +70,7 @@ class XnetGrpEventFeed extends PlFeed
                             'xnetgrp/announce-rss.tpl');
     }
 
-    protected function fetch(PlUser &$user)
+    protected function fetch(PlUser $user)
     {
         global $globals;
         if (!is_null($user)) {
index 948ccd9..8af7b3d 100644 (file)
@@ -21,7 +21,7 @@
 
 // {{{ get_all_redirects
 
-function get_all_redirects($membres, $mls, &$client)
+function get_all_redirects($membres, $mls, $client)
 {
     global $globals;
 
index 5af8e1e..a7a2ff0 100644 (file)
@@ -54,7 +54,7 @@ class XnetListsModule extends ListsModule
         );
     }
 
-    function prepare_client(&$page, $user = null)
+    function prepare_client($page, $user = null)
     {
         global $globals;
         Platal::load('lists', 'lists.inc.php');
@@ -70,7 +70,7 @@ class XnetListsModule extends ListsModule
         return $globals->asso('mail_domain');
     }
 
-    function handler_lists(&$page)
+    function handler_lists($page)
     {
         global $globals;
 
@@ -126,7 +126,7 @@ class XnetListsModule extends ListsModule
         }
     }
 
-    function handler_create(&$page)
+    function handler_create($page)
     {
         global $globals;
 
@@ -199,7 +199,7 @@ class XnetListsModule extends ListsModule
         pl_redirect('lists/admin/'.$liste);
     }
 
-    function handler_sync(&$page, $liste = null)
+    function handler_sync($page, $liste = null)
     {
         global $globals;
 
@@ -233,7 +233,7 @@ class XnetListsModule extends ListsModule
         $page->assign('not_in_list', $not_in_list);
     }
 
-    function handler_aadmin(&$page, $lfull = null)
+    function handler_aadmin($page, $lfull = null)
     {
         global $globals;
 
@@ -291,7 +291,7 @@ class XnetListsModule extends ListsModule
         $page->assign('mem', $mem);
     }
 
-    function handler_acreate(&$page)
+    function handler_acreate($page)
     {
         global $globals;
 
@@ -330,7 +330,7 @@ class XnetListsModule extends ListsModule
         pl_redirect("alias/admin/$new");
     }
 
-    function handler_profile(&$page, $user = null)
+    function handler_profile($page, $user = null)
     {
         http_redirect('https://www.polytechnique.org/profile/'.$user);
     }
index 3278f6e..02e1edc 100644 (file)
@@ -36,7 +36,7 @@ function display_address_isIdentity($idt, $value, $test_reverse = true)
     return false;
 }
 
-function smarty_function_display_address($param, &$smarty)
+function smarty_function_display_address($param, $smarty)
 {
     $adr = $param['adr'];
     $txtad = $adr->text;
index 8b9fdf7..330acd7 100644 (file)
@@ -65,7 +65,7 @@ function display_education($name, $url, $degree, $gradYear, $field, $program, $f
     return $txt;
 }
 
-function smarty_function_display_education($params, &$smarty)
+function smarty_function_display_education($params, $smarty)
 {
     $params = new PlDict($params);
     $edu = $params->v('edu');
index 1ac822b..64284bc 100644 (file)
@@ -19,7 +19,7 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-function smarty_function_display_phones($param, &$smarty)
+function smarty_function_display_phones($param, $smarty)
 {
     $txthtml = "";
     if (count($param['tels'])) {
index 6e2c4aa..7d45dc8 100644 (file)
@@ -19,7 +19,7 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-function smarty_function_poison($params, &$smarty) {
+function smarty_function_poison($params, $smarty) {
     $count = isset($params['count']) ? $params['count'] : 20;
     $seed  = isset($params['seed']) ? $params['seed'] : date('r');
     Platal::load('poison', 'poison.inc.php');
index 98448ee..516f019 100644 (file)
@@ -19,7 +19,7 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-function smarty_function_profile($params, &$smarty)
+function smarty_function_profile($params, $smarty)
 {
     $params = new PlDict($params);
     $with_promo = $params->b('promo', false) || $params->b('cat', false);
index 6b66f80..57bd46f 100644 (file)
@@ -39,7 +39,7 @@ function select_nat($valeur, $pad=false) {
     return $html;
 }
 
-function smarty_function_select_nat($params, &$smarty) {
+function smarty_function_select_nat($params, $smarty) {
     if (empty($params['pad']) || !($params['pad'])) {
              $pad = false;
     } else {
index 0076536..f3bcf25 100644 (file)
@@ -19,7 +19,7 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-function smarty_function_test_email($params, &$smarty) {
+function smarty_function_test_email($params, $smarty) {
     $label = isset($params['title']) ? $params['title'] : 'Envoyer un email de test';
     $token = "'" . S::v('xsrf_token') . (isset($params['hruid']) ? "', " : "'");
     $hruid = isset($params['hruid']) ? "'" . $params['hruid'] . "'" : '';