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;
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',
// 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)) {
}
}
- public function stripGeocodingFromAddress(Address &$address) {
+ public function stripGeocodingFromAddress(Address $address) {
$address->geocodedText = null;
$address->geoloc_choice = null;
$address->countryId = null;
// 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);
}
}
// 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));
}
}
// 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
// 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;
* 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'));
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());
}
}
// 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;
return $groups;
}
- private function getUIDList($uids = null, PlLimit &$limit)
+ private function getUIDList($uids = null, PlLimit $limit)
{
$this->requireAccounts();
$this->buildQuery();
return $fetched;
}
- private function getPIDList($pids = null, PlLimit &$limit)
+ private function getPIDList($pids = null, PlLimit $limit)
{
$this->requireProfiles();
$this->buildQuery();
/** Check that the user match the given rule.
*/
- public function checkUser(PlUser &$user)
+ public function checkUser(PlUser $user)
{
$this->requireAccounts();
$this->buildQuery();
/** Check that the profile match the given rule.
*/
- public function checkProfile(Profile &$profile)
+ public function checkProfile(Profile $profile)
{
$this->requireProfiles();
$this->buildQuery();
abstract class UFC_UserRelated extends UserFilterCondition
{
protected $user;
- public function __construct(PlUser &$user)
+ public function __construct(PlUser $user)
{
$this->user =& $user;
}
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;
return $ans;
}
- public function force_login(PlPage &$page)
+ public function force_login(PlPage $page)
{
$redirect = S::v('loginX');
if (!$redirect) {
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()) {
-Subproject commit 9261ede012d3edda638f614494df31e876e8d758
+Subproject commit ed4f7de016bb136fae9f72256c827ef09d4ea863
{
private $user;
- public function __construct(User &$user, $params = null)
+ public function __construct(User $user, $params = null)
{
$this->user = &$user;
class BananaHandler
{
- public function __construct(PlWizard &$wiz)
+ public function __construct(PlWizard $wiz)
{
}
return 'banana/index.tpl';
}
- public function prepare(PlPage &$page, $id)
+ public function prepare(PlPage $page, $id)
{
}
}
}
-function run_banana(&$page, $class, array $args)
+function run_banana($page, $class, array $args)
{
$user = S::user();
$banana = new $class($user, $args);
static public $domain;
private $user;
- function __construct(User &$user, $params = null)
+ function __construct(User $user, $params = null)
{
global $globals;
$this->user = &$user;
static public $domain;
static public $client;
- function __construct(User &$user, $params = null)
+ function __construct(User $user, $params = null)
{
ini_set('memory_limit', '128M');
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;
}
// 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
// constructor {{{2
- public function __construct(User &$user)
+ public function __construct(User $user)
{
if (!$user) {
return;
{
// constructor {{{2
- public function __construct(User &$user, $row)
+ public function __construct(User $user, $row)
{
$this->user = &$user;
$this->sufficient = true;
}
// 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();
}
- public function __construct(User &$user, $name)
+ public function __construct(User $user, $name)
{
$this->user = &$user;
$this->email = $name;
// constructor {{{2
- public function __construct(User &$user)
+ public function __construct(User $user)
{
$this->user = &$user;
$this->bogo = new Bogo($user);
// 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()) {
}
}
- static public function relance(PlUser &$user, $nbx = -1)
+ static public function relance(PlUser $user, $nbx = -1)
{
global $globals;
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);
}
}
- return new NLIssue($id, &$this);
+ return new NLIssue($id, $this);
}
/** Create a new, empty, pending newsletter issue
}
/** 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();
* @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());
* @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();
* @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();
/** 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();
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;
}
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(), {?})
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
return self::$order;
}
- public function getDate(PlUser &$user)
+ public function getDate(PlUser $user)
{
return $user->registration_date;
}
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;
}
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
}
- private static function getDate(PlUser &$user, $date)
+ private static function getDate(PlUser $user, $date)
{
if (is_null($date)) {
$date = $user->watchLast();
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();
}
}
- 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;
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;
}
}
- public function addTerm(JobTerm &$term)
+ public function addTerm(JobTerm $term)
{
$this->terms[$term->jtid] = $term;
}
$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);
}
}
}
// 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.
// 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;
// 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);
// 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);
}
// Prepares the display by assigning template variables.
- public function Prepare(&$page)
+ public function Prepare($page)
{
$page->assign_by_ref('reminder', $this);
}
// 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
// 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;
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();
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;
return true;
}
- public static function IsCandidate(User &$user, $candidate)
+ public static function IsCandidate(User $user, $candidate)
{
if (!$user->checkPerms(User::PERM_MAIL)) {
return false;
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;
}
}
- public function Prepare(&$page)
+ public function Prepare($page)
{
parent::Prepare($page);
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
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();
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;
}
}
- public function Prepare(&$page)
+ public function Prepare($page)
{
parent::Prepare($page);
$profile = $this->user->profile();
return new PlFlagSet($flags);
}
- public static function IsCandidate(User &$user, $candidate)
+ public static function IsCandidate(User $user, $candidate)
{
$profile = $user->profile();
if (!$profile) {
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) {
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;
$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;
}
return false;
}
- public function apply(UserFilterBuilder &$ufb) {
+ public function apply(UserFilterBuilder $ufb) {
if (!$this->check($ufb)) {
return false;
}
/** 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
$this->maxlength = $maxlength;
}
- protected function check(UserFilterBuilder &$ufb)
+ protected function check(UserFilterBuilder $ufb)
{
if ($ufb->blank($this->envfield)) {
$this->empty = true;
$this->max = $max;
}
- protected function check(UserFilterBuilder &$ufb)
+ protected function check(UserFilterBuilder $ufb)
{
if ($ufb->blank($this->envfield)) {
$this->empty = true;
*/
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;
$this->strict = $strict;
}
- protected function check(UserFilterBuilder &$ufb)
+ protected function check(UserFilterBuilder $ufb)
{
if ($ufb->blank($this->envfield)) {
$this->empty = true;
// {{{ 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;
$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;
// {{{ 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;
return true;
}
- protected function buildUFC(UserFilterBuilder &$ufb)
+ protected function buildUFC(UserFilterBuilder $ufb)
{
$r = $s = $this->val;
$this->reversed_envfield = $reversed_envfield;
}
- protected function check(UserFilterBuilder &$ufb)
+ protected function check(UserFilterBuilder $ufb)
{
if ($ufb->blank($this->envfield)) {
$this->empty = true;
return true;
}
- protected function buildUFC(UserFilterBuilder &$ufb)
+ protected function buildUFC(UserFilterBuilder $ufb)
{
$ufc = new UFC_SchoolId($this->type, $this->val);
if ($this->reversed) {
// {{{ 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;
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'));
}
$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;
return true;
}
- protected function buildUFC(UserFilterBuilder &$ufb) {
+ protected function buildUFC(UserFilterBuilder $ufb) {
return new UFC_Promo($this->comp, UserFilter::GRADE_ING, $this->val);
}
}
}
- protected function buildUFC(UserFilterBuilder &$ufb)
+ protected function buildUFC(UserFilterBuilder $ufb)
{
return new UFC_Sex(self::getVal($this->val));
}
// 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(
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();
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());
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;
$this->onlycurrentfield = $onlycurrentfield;
}
- protected function buildUFC(UserFilterBuilder &$ufb)
+ protected function buildUFC(UserFilterBuilder $ufb)
{
if ($ufb->isOn($this->onlycurrentfield)) {
$flags = UFC_Address::FLAG_CURRENT;
}
- protected function buildUFC(UserFilterBuilder &$ufb)
+ protected function buildUFC(UserFilterBuilder $ufb)
{
if ($ufb->isOn($this->onlycurrentfield)) {
$flags = UFC_Address::FLAG_CURRENT;
}
- protected function buildUFC(UserFilterBuilder &$ufb)
+ protected function buildUFC(UserFilterBuilder $ufb)
{
if ($ufb->isOn($this->onlycurrentfield)) {
$flags = UFC_Address::FLAG_CURRENT;
$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)) {
}
}
- protected function buildUFC(UserFilterBuilder &$ufb)
+ protected function buildUFC(UserFilterBuilder $ufb)
{
return new UFC_Job_Company(UFC_Job_Company::JOBNAME, $this->val);
}
// {{{ 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);
}
$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);
$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);
{
protected $direnum = DirEnum::NATIONALITIES;
- protected function buildUFC(UserFilterBuilder &$ufb)
+ protected function buildUFC(UserFilterBuilder $ufb)
{
return new UFC_Nationality($this->val);
}
{
protected $direnum = DirEnum::BINETS;
- protected function buildUFC(UserFilterBuilder &$ufb)
+ protected function buildUFC(UserFilterBuilder $ufb)
{
return new UFC_Binet($this->val);
}
{
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]);
{
protected $direnum = DirEnum::SECTIONS;
- protected function buildUFC(UserFilterBuilder &$ufb)
+ protected function buildUFC(UserFilterBuilder $ufb)
{
return new UFC_Section($this->val);
}
{
protected $direnum = DirEnum::EDUSCHOOLS;
- protected function buildUFC(UserFilterBuilder &$ufb)
+ protected function buildUFC(UserFilterBuilder $ufb)
{
return new UFC_EducationSchool($this->val);
}
{
protected $direnum = DirEnum::EDUDEGREES;
- protected function buildUFC(UserFilterBuilder &$ufb)
+ protected function buildUFC(UserFilterBuilder $ufb)
{
return new UFC_EducationDegree($this->val);
}
{
protected $direnum = DirEnum::EDUFIELDS;
- protected function buildUFC(UserFilterBuilder &$ufb)
+ protected function buildUFC(UserFilterBuilder $ufb)
{
return new UFC_EducationField($this->val);
}
// {{{ 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);
}
// {{{ 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);
}
$this->networktypefield = $networktypefield;
}
- public function check(UserFilterBuilder &$ufb)
+ public function check(UserFilterBuilder $ufb)
{
if (parent::check($ufb)) {
$this->nwtype = $ufb->i($this->networktypefield);
return parent::isEmpty() || $this->nwtype == 0;
}
- public function buildUFC(UserFilterBuilder &$ufb)
+ public function buildUFC(UserFilterBuilder $ufb)
{
return new UFC_Networking($this->nwtype, $this->val);
}
// {{{ class UFBF_Mentor
class UFBF_Mentor extends UFBF_Bool
{
- protected function buildUFC(UserFilterBuilder &$ufb)
+ protected function buildUFC(UserFilterBuilder $ufb)
{
return new UFC_Mentor();
}
// {{{ 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);
}
// {{{ 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);
}
// {{{ 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);
}
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);
}
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);
}
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();
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;
*/
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;
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'] != ""
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'));
class TrombiView extends ProfileView
{
- public function __construct(PlSet &$set, array $params)
+ public function __construct(PlSet $set, array $params)
{
$this->entriesPerPage = 24;
$this->defaultkey = 'name';
return 'include/plview.trombi.tpl';
}
- public function apply(PlPage &$page)
+ public function apply(PlPage $page)
{
if (!empty($GLOBALS['IS_XNET_SITE'])) {
global $globals;
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)));
}
{
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);
* @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');
* @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;
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);
// }}}
// {{{ 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;
// }}}
// {{{ 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;
// }}}
// {{{ 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;
// }}}
// {{{ 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();
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');
}
// }}}
// {{{ constructor
- public function __construct(User &$_user, $_loginbis, $_homonymes_hruid, $warning=true)
+ public function __construct(User $_user, $_loginbis, $_homonymes_hruid, $warning=true)
{
$this->warning = $warning;
// }}}
// {{{ 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);
// }}}
// {{{ 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;
// }}}
// {{{ 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;
// }}}
// {{{ 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';
// }}}
// {{{ 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);
// }}}
// {{{ 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;
// }}}
// {{{ 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)
{
// }}}
// {{{ 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);
// }}}
// {{{ 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) {
// }}}
// {{{ 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;
<?php
-function ax_load_object(&$obj, $from)
+function ax_load_object($obj, $from)
{
foreach ($from as $k=>$v) {
if (property_exists($obj, $k)) {
}\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
);
}
- 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');
}
}
- function handler_set_skin(&$page)
+ function handler_set_skin($page)
{
S::assert_xsrf_token();
S::set('skin', Post::s('change_skin'));
}
}
- 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');
$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);
// }}}
- function handler_logger(&$page, $action = null, $arg = null) {
+ function handler_logger($page, $action = null, $arg = null) {
if ($action == 'session') {
// we are viewing a session
$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');
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) {
return $infos;
}
- private static function formatSex(&$page, $sex, $line)
+ private static function formatSex($page, $sex, $line)
{
switch ($sex) {
case 'F':
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');
}
}
- 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');
}
}
- 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');
$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');
$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');
$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');
$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');
$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');
$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');
$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');
$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');
$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');
}
- 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');
$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',
$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');
}
}
- function handler_icons(&$page)
+ function handler_icons($page)
{
$page->changeTpl('admin/icons.tpl');
$dh = opendir('../htdocs/images/icons');
$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,
ORDER BY a.hruid'));
}
- function handler_jobs(&$page, $id = -1)
+ function handler_jobs($page, $id = -1)
{
$page->changeTpl('admin/jobs.tpl');
}
}
- function handler_profile(&$page)
+ function handler_profile($page)
{
$page->changeTpl('admin/profile.tpl');
* 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>";
$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>";
$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
);
}
- 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;
exit;
}
- function handler_manageurs(&$page)
+ function handler_manageurs($page)
{
global $globals;
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);
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');
return NewsLetter::forGroup(NewsLetter::GROUP_AX);
}
- function handler_out(&$page, $hash = null)
+ function handler_out($page, $hash = null)
{
if (!$hash) {
if (!S::logged()) {
);
}
- 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);
$page->assign('seed', $login);
}
- function handler_css(&$page)
+ function handler_css($page)
{
pl_cached_content_headers("text/css");
readfile('../htdocs/css/bandeau.css');
);
}
- function _add_rss_link(&$page)
+ function _add_rss_link($page)
{
if (!S::hasAuthToken()) {
return;
'/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');
$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 : ' . $promo . '.');
return (int)$promo;
}
- private function getPromo(PlPage &$page, $promo)
+ private function getPromo(PlPage $page, $promo)
{
if (strpos($promo, '-') === false) {
$promo = $this->getSinglePromotion($page, $promo);
return $array;
}
- private function addPromo(PlPage &$page, $promo)
+ private function addPromo(PlPage $page, $promo)
{
$promos = $this->getPromo($page, $promo);
if (!$promos || count($promos) == 0) {
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) {
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());
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 = {?}',
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');
$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);
//}
}
- 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();
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();
);
}
- 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)) {
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)) {
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');
$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)) {
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.
private $notifs;
private $it;
- public function __construct(PlUser &$owner)
+ public function __construct(PlUser $owner)
{
$notifs = Watch::getEvents($owner);
$infos = array();
'carnet/rss.tpl');
}
- protected function fetch(PlUser &$user)
+ protected function fetch(PlUser $user)
{
return new CarnetFeedIterator($user);
}
'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;
}
}
- private static function profile_to_contact(&$p) {
+ private static function profile_to_contact($p) {
$contact = array(
'Prénom' => $p->firstName(),
'Nom' => $p->lastName(),
// 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) {
}
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 ',';
);
}
- function handler_emails(&$page, $action = null, $email = null)
+ function handler_emails($page, $action = null, $email = null)
{
global $globals;
require_once 'emails.inc.php';
$page->assign('melix', $res->fetchOneCell());
}
- function handler_alias(&$page, $action = null, $value = null)
+ function handler_alias($page, $action = null, $value = null)
{
global $globals;
$page->assign('mail_public', $visibility);
}
- function handler_redirect(&$page, $action = null, $email = null)
+ function handler_redirect($page, $action = null, $email = null)
{
global $globals;
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');
$page->assign('filtre', $bogo->level());
}
- function handler_submit(&$page)
+ function handler_submit($page)
{
$wp = new PlWikiPage('Xorg.Mails');
$wp->buildCache();
}
}
- function handler_send(&$page)
+ function handler_send($page)
{
$page->changeTpl('emails/send.tpl');
$page->assign('user', S::user());
}
- function handler_test(&$page, $hruid = null)
+ function handler_test($page, $hruid = null)
{
require_once 'emails.inc.php';
exit;
}
- function handler_rewrite_in(&$page, $mail, $hash)
+ function handler_rewrite_in($page, $mail, $hash)
{
$page->changeTpl('emails/rewrite.tpl');
$page->assign('option', 'in');
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');
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;
}
}
- 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');
}
}
- function handler_duplicated(&$page, $action = 'list', $email = null)
+ function handler_duplicated($page, $action = 'list', $email = null)
{
$page->changeTpl('emails/duplicated.tpl');
}
}
- function handler_lost(&$page, $action = 'list', $email = null)
+ function handler_lost($page, $action = 'list', $email = null)
{
$page->changeTpl('emails/lost.tpl');
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');
return NewsLetter::forGroup(NewsLetter::GROUP_EP);
}
- function handler_out(&$page, $hash = null)
+ function handler_out($page, $hash = null)
{
if (!$hash) {
if (!S::logged()) {
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;
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');
$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);
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');
pl_content_headers("text/html");
}
- function handler_ev_submit(&$page)
+ function handler_ev_submit($page)
{
$page->changeTpl('events/submit.tpl');
}
}
- 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');
}
}
- 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');
'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']);
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,
);
}
- 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');
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)) {
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');
$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');
}
- function handler_index(&$page)
+ function handler_index($page)
{
if (Platal::globals()->merge->state == 'pending') {
$page->changeTpl('fusionax/index.tpl');
}
/** 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');
exit;
}
- function handler_view(&$page, $action = '')
+ function handler_view($page, $action = '')
{
$page->changeTpl('fusionax/view.tpl');
if ($action == 'create') {
}
/** 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');
}
}
- function handler_deceased(&$page, $action = '')
+ function handler_deceased($page, $action = '')
{
if ($action == 'updateXorg') {
XDB::execute('UPDATE fusionax_deceased
$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
$page->assign('nbMissmatchingPromosTotal', $nbMissmatchingPromos);
}
- function handler_names(&$page, $action = '')
+ function handler_names($page, $action = '')
{
$page->changeTpl('fusionax/names.tpl');
}
- function handler_edu(&$page, $action = '')
+ function handler_edu($page, $action = '')
{
$page->changeTpl('fusionax/education.tpl');
$page->assign('missingCoupleCount', $missingCouple->total());
}
- function handler_corps(&$page)
+ function handler_corps($page)
{
$page->changeTpl('fusionax/corps.tpl');
$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') {
$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') {
$page->assign('total', count($issues));
}
- function handler_issues(&$page, $action = '')
+ function handler_issues($page, $action = '')
{
static $issueList = array(
'name' => 'noms',
);
}
- 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);
$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;
// 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);
);
}
- function handler_index(&$page, $action = null)
+ function handler_index($page, $action = null)
{
require_once("emails.inc.php");
require_once("googleapps.inc.php");
$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');
$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');
}
}
- 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');
);
}
- function prepare_client(&$page, $user = null)
+ function prepare_client($page, $user = null)
{
global $globals;
return array($subs, $mails);
}
- function handler_lists(&$page)
+ function handler_lists($page)
{
function filter_owner($list)
{
}
}
- function handler_ajax(&$page, $list = null)
+ function handler_ajax($page, $list = null)
{
pl_content_headers("text/html");
$domain = $this->prepare_client($page);
$page->assign_by_ref('liste', $liste);
}
- function handler_create(&$page)
+ function handler_create($page)
{
global $globals;
}
}
- function handler_members(&$page, $liste = null)
+ function handler_members($page, $liste = null)
{
if (is_null($liste)) {
return PL_NOT_FOUND;
}
}
- function handler_csv(PlPage &$page, $liste = null)
+ function handler_csv(PlPage $page, $liste = null)
{
if (is_null($liste)) {
return PL_NOT_FOUND;
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;
$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;
}
}
- 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;
$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;
}
}
- function handler_admin(&$page, $liste = null)
+ function handler_admin($page, $liste = null)
{
global $globals;
}
}
- function handler_options(&$page, $liste = null)
+ function handler_options($page, $liste = null)
{
if (is_null($liste)) {
return PL_NOT_FOUND;
}
}
- function handler_delete(&$page, $liste = null)
+ function handler_delete($page, $liste = null)
{
global $globals;
if (is_null($liste)) {
}
}
- function handler_soptions(&$page, $liste = null)
+ function handler_soptions($page, $liste = null)
{
if (is_null($liste)) {
return PL_NOT_FOUND;
}
}
- function handler_check(&$page, $liste = null)
+ function handler_check($page, $liste = null)
{
if (is_null($liste)) {
return PL_NOT_FOUND;
}
}
- function handler_admin_all(&$page)
+ function handler_admin_all($page)
{
$page->changeTpl('lists/admin_all.tpl');
$page->setTitle('Administration - Mailing lists');
);
}
- function handler_marketing(&$page)
+ function handler_marketing($page)
{
$page->changeTpl('marketing/index.tpl');
$page->setTitle('Marketing');
$page->assign('marketings', $marketings);
}
- function handler_private(&$page, $hruid = null,
+ function handler_private($page, $hruid = null,
$action = null, $value = null)
{
global $globals;
$page->assign('path', 'marketing/private/' . $user->login());
}
- function handler_broken(&$page, $uid = null)
+ function handler_broken($page, $uid = null)
{
$page->changeTpl('marketing/broken.tpl');
}
}
- function handler_promo(&$page, $promo = null)
+ function handler_promo($page, $promo = null)
{
$page->changeTpl('marketing/promo.tpl');
$page->assign('nonins', $users);
}
- function handler_public(&$page, $hruid = null)
+ function handler_public($page, $hruid = null)
{
$page->changeTpl('marketing/public.tpl');
}
}
- function handler_week(&$page, $sorting = 'per_promo')
+ function handler_week($page, $sorting = 'per_promo')
{
$page->changeTpl('marketing/this_week.tpl');
$page->assign('users', $uf->getUsers());
}
- function handler_volontaire(&$page, $promo = null)
+ function handler_volontaire($page, $promo = null)
{
$page->changeTpl('marketing/volontaire.tpl');
}
}
- function handler_relance(&$page)
+ function handler_relance($page)
{
$page->changeTpl('marketing/relance.tpl');
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) {
$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();
}
}
- function handler_nl_submit(&$page)
+ function handler_nl_submit($page)
{
$page->changeTpl('newsletter/submit.tpl');
$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');
$page->assign('nl_list', $nl->listAllIssues());
}
- function handler_admin_nl_groups(&$page)
+ function handler_admin_nl_groups($page)
{
require_once 'newsletter.inc.php';
$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');
/** 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) {
/** 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) {
/** 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) {
$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');
);
}
- function handler_openid(&$page, $login = null)
+ function handler_openid($page, $login = null)
{
$this->load('openid.inc.php');
$requested_user = User::getSilent($login);
pl_redirect('');
}
- function handler_melix(&$page, $login = null)
+ function handler_melix($page, $login = null)
{
$this->load('openid.inc.php');
}
}
- function handler_xrds(&$page, $login = null)
+ function handler_xrds($page, $login = null)
{
$this->load('openid.inc.php');
$requested_user = User::getSilent($login);
}
}
- function handler_trust(&$page)
+ function handler_trust($page)
{
$this->load('openid.inc.php');
$server = new OpenId();
}
}
- 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');
$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');
// 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';
// 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(
// 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());
}
// 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);
}
// 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);
// 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();
}
);
}
- function handler_payment(&$page, $ref = -1)
+ function handler_payment($page, $ref = -1)
{
global $globals;
$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');
exit;
}
- function handler_cyber2_return(&$page, $uid = null)
+ function handler_cyber2_return($page, $uid = null)
{
global $globals, $platal;
exit;
}
- function handler_paypal_return(&$page, $uid = null)
+ function handler_paypal_return($page, $uid = null)
{
$page->changeTpl('payment/retour_paypal.tpl');
$page->assign('erreur', $erreur);
}
- function handler_xnet_payment(&$page, $pid = null)
+ function handler_xnet_payment($page, $pid = null)
{
global $globals;
$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');
$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}");
$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");
$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");
$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');
}
}
- 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);
}
}
- 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')) {
// }}}
// {{{ function init()
- function init($val, &$meth)
+ function init($val, $meth)
{
require_once dirname(__FILE__).'/money/'.$meth->inc;
$this->api = new $api($val);
// }}}
// {{{ function form()
- function prepareform(&$pay)
+ function prepareform($pay)
{
global $globals, $platal;
$log = S::v('log');
// }}}
// {{{ function form()
- function prepareform(&$pay)
+ function prepareform($pay)
{
// toute la doc se trouve sur
// http://www.cyberpaiement.tm.fr/donnees.htm
$this->val_number = $val;
}
- function prepareform(&$pay)
+ function prepareform($pay)
{
// Documentation:
// https://www.paypal.com/developer
function bugize($list)
{
- $list = split(',', $list);
+ $list = preg_split('/,/', Env::s('libs'), -1, PREG_SPLIT_NO_EMPTY);
$ans = array();
foreach ($list as $bug) {
);
}
- function handler_index(&$page)
+ function handler_index($page)
{
// Include X-XRDS-Location response-header for Yadis discovery
global $globals;
}
}
- 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');
}
}
- function handler_prefs(&$page)
+ function handler_prefs($page)
{
$page->changeTpl('platal/preferences.tpl');
$page->setTitle('Mes préférences');
}
}
- function handler_webredir(&$page)
+ function handler_webredir($page)
{
$page->changeTpl('platal/webredirect.tpl');
$page->setTitle('Redirection de page WEB');
$page->assign('bestalias', $res->fetchOneCell());
}
- function handler_prefs_rss(&$page)
+ function handler_prefs_rss($page)
{
$page->changeTpl('platal/filrss.tpl');
}
}
- function handler_password(&$page)
+ function handler_password($page)
{
global $globals;
$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');
$page->assign('actif', $res->fetchOneCell());
}
- function handler_recovery(&$page)
+ function handler_recovery($page)
{
global $globals;
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
}
}
- function handler_skin(&$page)
+ function handler_skin($page)
{
global $globals;
$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();
}
}
- 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;
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();
);
}
- function handler_poison(&$page, $seed = null, $count = 20)
+ function handler_poison($page, $seed = null, $count = 20)
{
$this->load('poison.inc.php');
if ($seed == null) {
exit;
}
- function handler_tags(&$page, $seed = null, $count = 20)
+ function handler_tags($page, $seed = null, $count = 20)
{
global $globals;
exit;
}
- function handler_mailto(&$page, $seed = null, $count = 20)
+ function handler_mailto($page, $seed = null, $count = 20)
{
global $globals;
exit;
}
- function handler_rand(&$page) {
+ function handler_rand($page) {
$this->load('poison.inc.php');
randomize_poison_file();
exit;
/* 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;
$photo->send();
}
- function handler_medal(&$page, $mid)
+ function handler_medal($page, $mid)
{
$thumb = ($mid == 'thumb');
$mid = $thumb ? @func_get_arg(2) : $mid;
exit;
}
- function handler_name_info(&$page)
+ function handler_name_info($page)
{
pl_content_headers("text/html");
$page->changeTpl('profile/name_info.tpl', SIMPLE);
$page->assign('types', $res);
}
- function handler_networking(&$page, $mid)
+ function handler_networking($page, $mid)
{
$res = XDB::query("SELECT icon
FROM profile_networking_enum
return $profile;
}
- function handler_photo_change(&$page, $hrpid = null)
+ function handler_photo_change($page, $hrpid = null)
{
global $globals;
$profile = $this->findProfile($hrpid);
$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.
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) {
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;
}
}
- 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);
$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);
$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);
}
}
- 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);
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);
$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);
* @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);
}
}
- 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);
$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);
$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);
$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);
* 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');
}
/**
*
* @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");
exit();
}
- function handler_xnet(&$page)
+ function handler_xnet($page)
{
$page->changeTpl('profile/groupesx.tpl');
$page->setTitle('Promo, Groupes X, Binets');
$page->assign('assos', $req->fetchAllAssoc());
}
- function handler_xnetlogo(&$page, $id)
+ function handler_xnetlogo($page, $id)
{
if (is_null($id)) {
return PL_NOT_FOUND;
exit;
}
- function handler_vcard(&$page, $x = null)
+ function handler_vcard($page, $x = null)
{
if (is_null($x)) {
return PL_NOT_FOUND;
$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');
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);
$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');
$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');
$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);
$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');
$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');
$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');
$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');
$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');
$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');
class ProfileSettingAddresses implements ProfileSetting
{
- public function value(ProfilePage &$page, $field, $value, &$success)
+ public function value(ProfilePage $page, $field, $value, &$success)
{
$success = true;
$addresses = array();
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();
{
protected $pg_template = 'profile/adresses.tpl';
- public function __construct(PlWizard &$wiz)
+ public function __construct(PlWizard $wiz)
{
parent::__construct($wiz);
$this->settings['addresses'] = new ProfileSettingAddresses();
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)) {
return $value;
}
- public function save(ProfilePage &$page, $field, $value)
+ public function save(ProfilePage $page, $field, $value)
{
$orig =& $page->orig[$field];
{
protected $pg_template = 'profile/deco.tpl';
- public function __construct(PlWizard &$wiz)
+ public function __construct(PlWizard $wiz)
{
parent::__construct($wiz);
$this->settings['medals'] = new ProfileSettingDeco();
}
}
- 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
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);
return $value;
}
- public function value(ProfilePage &$page, $field, $value, &$success)
+ public function value(ProfilePage $page, $field, $value, &$success)
{
$success = true;
$success_tmp = true;
return $value;
}
- public function save(ProfilePage &$page, $field, $value)
+ public function save(ProfilePage $page, $field, $value)
{
require_once 'name.func.inc.php';
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)) {
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)",
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();
$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
return $value;
}
- public function save(ProfilePage &$page, $field, $value)
+ public function save(ProfilePage $page, $field, $value)
{
XDB::execute("DELETE FROM profile_networking
WHERE pid = {?}",
{
public function __construct(){}
- public function save(ProfilePage &$page, $field, $value)
+ public function save(ProfilePage $page, $field, $value)
{
$gradYearNew = $value;
if ($page->profile->mainEducation() == 'X') {
}
}
- 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;
{
protected $pg_template = 'profile/general.tpl';
- public function __construct(PlWizard &$wiz)
+ public function __construct(PlWizard $wiz)
{
parent::__construct($wiz);
$this->settings['search_names']
}
}
- public function _prepare(PlPage &$page, $id)
+ public function _prepare(PlPage $page, $id)
{
require_once "education.func.inc.php";
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)) {
return intval($value);
}
- public function save(ProfilePage &$page, $field, $value)
+ public function save(ProfilePage $page, $field, $value)
{
XDB::execute("UPDATE profiles
SET section = {?}
{
}
- public function value(ProfilePage &$page, $field, $value, &$success)
+ public function value(ProfilePage $page, $field, $value, &$success)
{
if (is_null($value)) {
$value = array();
return $value;
}
- public function save(ProfilePage &$page, $field, $value)
+ public function save(ProfilePage $page, $field, $value)
{
XDB::execute("DELETE FROM profile_binets
WHERE pid = {?}",
{
protected $pg_template = 'profile/groups.tpl';
- public function __construct(PlWizard &$wiz)
+ public function __construct(PlWizard $wiz)
{
parent::__construct($wiz);
$this->settings['section'] = new ProfileSettingSection();
$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
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'];
- 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;
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
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)) {
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)
{
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)) {
}
}
- public function _prepare(PlPage &$page, $id)
+ public function _prepare(PlPage $page, $id)
{
require_once 'emails.combobox.inc.php';
fill_email_combobox($page, $this->owner);
/** 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)) {
return $value;
}
- public function save(ProfilePage &$page, $field, $value)
+ public function save(ProfilePage $page, $field, $value)
{
XDB::execute("DELETE FROM profile_mentor_term
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)) {
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 = {?}",
{
protected $pg_template = 'profile/mentor.tpl';
- public function __construct(PlWizard &$wiz)
+ public function __construct(PlWizard $wiz)
{
parent::__construct($wiz);
$this->settings['expertise'] = null;
}
}
- 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
* 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.
*/
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;
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);
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);
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);
class ProfileSettingPhones implements ProfileSetting
{
- public function value(ProfilePage &$page, $field, $value, &$success)
+ public function value(ProfilePage $page, $field, $value, &$success)
{
$success = true;
$phones = array();
}
}
- 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);
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)) {
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)) {
$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)) {
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');
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();
$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();
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 = {?}",
{
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"));
);
}
- function handler_register(&$page, $hash = null)
+ function handler_register($page, $hash = null)
{
$alert = null;
$subState = new PlDict(S::v('subState', array()));
}
}
- function handler_end(&$page, $hash = null)
+ function handler_end($page, $hash = null)
{
global $globals;
$_SESSION['subState'] = array('step' => 5);
// {{{ function checkId
-function checkId(&$subState)
+function checkId($subState)
{
$subState->set('xorgid', Profile::getXorgId($subState->i('schoolid')));
if (!$subState->v('xorgid')) {
// }}}
// {{{ function checkOldId
-function checkOldId(&$subState)
+function checkOldId($subState)
{
$uf = new UserFilter(new PFC_And(
new PFC_Not(new UFC_Dead()),
// }}}
// {{{ function checkNewUser
-function checkNewUser(&$subState)
+function checkNewUser($subState)
{
$firstname = preg_replace("/[ \t]+/", ' ', $subState->t('firstname'));
$firstname = preg_replace("/--+/", '-', $firstname);
// }}}
// {{{ function createAliases
-function createAliases(&$subState)
+function createAliases($subState)
{
global $globals;
);
}
- 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();
);
}
- function handler_redir_advanced(&$page, $mode = null)
+ function handler_redir_advanced($page, $mode = null)
{
pl_redirect('search/adv');
exit;
* $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;
/** $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);
$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.
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);
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');
$page->assign('list', $ids);
}
- function handler_referent(&$page, $action = null, $subaction = null)
+ function handler_referent($page, $action = null, $subaction = null)
{
global $globals;
* 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);
);
}
- 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);
exit;
}
- function handler_graph(&$page, $promo = null)
+ function handler_graph($page, $promo = null)
{
if ($promo == 'all') {
// date de départ
exit;
}
- function handler_promos(&$page, $promo = null)
+ function handler_promos($page, $promo = null)
{
$page->changeTpl('stats/nb_by_promo.tpl');
$page->assign('promo', $promo);
}
- function handler_coupures(&$page, $cp_id = null)
+ function handler_coupures($page, $cp_id = null)
{
$page->changeTpl('stats/coupure.tpl');
// }}}
// {{{ 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');
// }}}
// {{{ 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) {
// }}}
// {{{ 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();
// }}}
// {{{ 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');
// }}}
// {{{ 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');
// }}}
// {{{ 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');
// }}}
// {{{ 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);
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));
}
// }}}
// {{{ 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");
// }}}
// {{{ 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
// }}}
// {{{ 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());
// }}}
// {{{ 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);
// }}}
// {{{ 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);
// }}}
// {{{ 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);
// }}}
// {{{ 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);
);
}
- function handler_photo(&$page, $x = null)
+ function handler_photo($page, $x = null)
{
if (!$x || !($profile = Profile::get($x))) {
return PL_NOT_FOUND;
$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');
$page->assign('assos', $res->fetchAllAssoc());
}
- function handler_plan(&$page)
+ function handler_plan($page)
{
$page->changeTpl('xnet/plan.tpl');
$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);
$page->setType($cat);
}
- function handler_autologin(&$page)
+ function handler_autologin($page)
{
$allkeys = func_get_args();
unset($allkeys[0]);
);
}
- function handler_events(&$page, $archive = null)
+ function handler_events($page, $archive = null)
{
global $globals;
$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');
$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');
$page->assign('tout', !Env::v('item_id', false));
}
- function handler_ical(&$page, $eid = null)
+ function handler_ical($page, $eid = null)
{
global $globals;
pl_content_headers("text/calendar");
}
- function handler_edit(&$page, $eid = null)
+ function handler_edit($page, $eid = null)
{
global $globals;
$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;
// }}}
// {{{ function event_change_shortname()
-function event_change_shortname(&$page, $eid, $old, $new)
+function event_change_shortname($page, $eid, $old, $new)
{
global $globals;
);
}
- function handler_index(&$page, $arg = null)
+ function handler_index($page, $arg = null)
{
global $globals, $platal;
if (!is_null($arg)) {
$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');
exit;
}
- function handler_edit(&$page)
+ function handler_edit($page)
{
global $globals;
$page->changeTpl('xnetgrp/edit.tpl');
}
}
- function handler_mail(&$page)
+ function handler_mail($page)
{
global $globals;
}
}
- function handler_forum(&$page, $group = null, $artid = null)
+ function handler_forum($page, $group = null, $artid = null)
{
global $globals;
$page->changeTpl('xnetgrp/forum.tpl');
run_banana($page, 'ForumsBanana', $get);
}
- function handler_annuaire(&$page, $action = null, $subaction = null)
+ function handler_annuaire($page, $action = null, $subaction = null)
{
global $globals;
$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'));
$vcard->show();
}
- function handler_csv(&$page, $filename = null)
+ function handler_csv($page, $filename = null)
{
global $globals;
if (is_null($filename)) {
$globals->asso('id'), $uid);
}
- private function validSubscription(User &$user)
+ private function validSubscription(User $user)
{
global $globals;
$this->removeSubscriptionRequest($user->id());
}
}
- function handler_subscribe(&$page, $u = null)
+ function handler_subscribe($page, $u = null)
{
global $globals;
$page->changeTpl('xnetgrp/inscrire.tpl');
}
}
- function handler_subscribe_valid(&$page)
+ function handler_subscribe_valid($page)
{
global $globals;
$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')) {
http_redirect($_SERVER['HTTP_REFERER']);
}
- function handler_admin_annuaire(&$page)
+ function handler_admin_annuaire($page)
{
global $globals;
$page->assign('lists', $lists);
}
- function handler_admin_member_new(&$page, $email = null)
+ function handler_admin_member_new($page, $email = null)
{
global $globals;
}
}
- 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);
$page->assign('users', $users);
}
- function unsubscribe(PlUser &$user)
+ function unsubscribe(PlUser $user)
{
global $globals;
XDB::execute("DELETE FROM group_members
return !$warning;
}
- function handler_unsubscribe(&$page)
+ function handler_unsubscribe($page)
{
$page->changeTpl('xnetgrp/membres-del.tpl');
$user = S::user();
$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);
}
}
- 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);
return $user->login();
}
- function handler_admin_member(&$page, $user)
+ function handler_admin_member($page, $user)
{
global $globals;
$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());
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;
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
exit;
}
- function handler_edit_announce(&$page, $aid = null)
+ function handler_edit_announce($page, $aid = null)
{
global $globals, $platal;
$page->changeTpl('xnetgrp/announce-edit.tpl');
$page->assign_by_ref('upload', $upload);
}
- function handler_admin_announce(&$page)
+ function handler_admin_announce($page)
{
global $globals;
$page->changeTpl('xnetgrp/announce-admin.tpl');
{
private $it;
private $user;
- public function __construct(PlIterator &$it, PlUser &$user)
+ public function __construct(PlIterator $it, PlUser $user)
{
$this->it =& $it;
$this->user =& $user;
'xnetgrp/announce-rss.tpl');
}
- protected function fetch(PlUser &$user)
+ protected function fetch(PlUser $user)
{
global $globals;
if (!is_null($user)) {
// {{{ get_all_redirects
-function get_all_redirects($membres, $mls, &$client)
+function get_all_redirects($membres, $mls, $client)
{
global $globals;
);
}
- function prepare_client(&$page, $user = null)
+ function prepare_client($page, $user = null)
{
global $globals;
Platal::load('lists', 'lists.inc.php');
return $globals->asso('mail_domain');
}
- function handler_lists(&$page)
+ function handler_lists($page)
{
global $globals;
}
}
- function handler_create(&$page)
+ function handler_create($page)
{
global $globals;
pl_redirect('lists/admin/'.$liste);
}
- function handler_sync(&$page, $liste = null)
+ function handler_sync($page, $liste = null)
{
global $globals;
$page->assign('not_in_list', $not_in_list);
}
- function handler_aadmin(&$page, $lfull = null)
+ function handler_aadmin($page, $lfull = null)
{
global $globals;
$page->assign('mem', $mem);
}
- function handler_acreate(&$page)
+ function handler_acreate($page)
{
global $globals;
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);
}
return false;
}
-function smarty_function_display_address($param, &$smarty)
+function smarty_function_display_address($param, $smarty)
{
$adr = $param['adr'];
$txtad = $adr->text;
return $txt;
}
-function smarty_function_display_education($params, &$smarty)
+function smarty_function_display_education($params, $smarty)
{
$params = new PlDict($params);
$edu = $params->v('edu');
* 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'])) {
* 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');
* 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);
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 {
* 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'] . "'" : '';