From eaf30d86cc99df2414cf4f171a9b0f11b0561e3b Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Mon, 27 Aug 2007 16:59:57 +0200 Subject: [PATCH] Non significant spaces suck. Signed-off-by: Pierre Habouzit --- bin/cron/banana.feedgen.php | 21 +++++++++- bin/cron/checkdb.php | 12 +++--- bin/cron/connect.db.inc.php | 32 +++++++++++++- bin/cron/cron_validations.php | 4 +- bin/cron/emails.check.php | 4 +- bin/cron/homonymes.php | 2 +- bin/cron/notifs.send.php | 2 +- bin/csv2sql.php | 8 ++-- classes/corelogger.php | 2 +- classes/csvimporter.php | 8 ++-- classes/env.php | 20 ++++----- classes/flagset.php | 16 +++---- classes/miniwiki.php | 36 ++++++++-------- classes/mmlist.php | 2 +- classes/platal.php | 2 +- classes/platalpage.php | 12 +++--- classes/plmailer.php | 12 +++--- classes/plset.php | 2 +- classes/pltableeditor.php | 12 +++--- classes/plupload.php | 2 +- classes/session.php | 4 +- classes/xnet.php | 4 +- htdocs/listes_redirect.php | 2 +- htdocs/webredirect.php | 6 +-- include/applis.func.inc.php | 6 +-- include/banana/forum.inc.php | 10 ++--- include/banana/hooks.inc.php | 20 ++++----- include/banana/ml.inc.php | 6 +-- include/banana/moderate.inc.php | 10 ++--- include/emails.inc.php | 4 +- include/geoloc.inc.php | 42 +++++++++---------- include/homonymes.inc.php | 2 +- include/marketing.inc.php | 18 ++++---- include/massmailer.inc.php | 6 +-- include/newsletter.inc.php | 26 ++++++------ include/notifs.inc.php | 8 ++-- include/platal.inc.php | 16 +++---- include/profil.func.inc.php | 14 +++---- include/rss.inc.php | 2 +- include/secure_hash.inc.php | 2 +- include/synchro_ax.inc.php | 8 ++-- include/user.func.inc.php | 62 ++++++++++++++-------------- include/userset.inc.php | 18 ++++---- include/validations.inc.php | 28 ++++++------- include/validations/aliases.inc.php | 2 +- include/validations/broken.inc.php | 8 ++-- include/validations/evts.inc.php | 8 ++-- include/validations/homonymes.inc.php | 14 +++---- include/validations/listes.inc.php | 6 +-- include/validations/marketing.inc.php | 10 ++--- include/validations/medals.inc.php | 6 +-- include/validations/nl.inc.php | 4 +- include/validations/nomusage.inc.php | 8 ++-- include/validations/orange.inc.php | 6 +-- include/validations/paiements.inc.php | 14 +++---- include/validations/photos.inc.php | 4 +- include/validations/surveys.inc.php | 2 +- include/vcard.inc.php | 2 +- include/webservices/manageurs.server.inc.php | 16 +++---- include/wiki.inc.php | 4 +- include/wiki/engine.php | 4 +- include/wiki/farmconfig.php | 16 +++---- include/xnet/page.inc.php | 8 ++-- include/xnet/session.inc.php | 8 ++-- include/xorg.misc.inc.php | 44 ++++++++++---------- include/xorg/session.inc.php | 4 +- modules/admin.php | 34 +++++++-------- modules/auth.php | 2 +- modules/auth/auth.inc.php | 2 +- modules/axletter.php | 6 +-- modules/axletter/axletter.inc.php | 14 +++---- modules/banana.php | 2 +- modules/bandeau.php | 4 +- modules/core.php | 2 +- modules/email.php | 12 +++--- modules/events.php | 28 ++++++------- modules/geoloc.php | 32 +++++++------- modules/lists.php | 4 +- modules/marketing.php | 2 +- modules/newsletter.php | 20 ++++----- modules/payment.php | 12 +++--- modules/payment/money.inc.php | 8 ++-- modules/payment/money/cyberpaiement.inc.php | 2 +- modules/payment/money/paypal.inc.php | 6 +-- modules/platal.php | 16 +++---- modules/profile.php | 58 +++++++++++++------------- modules/profile/assign_adresses.inc.php | 2 +- modules/profile/assign_poly.inc.php | 2 +- modules/profile/get_adresses.inc.php | 4 +- modules/profile/get_deco.inc.php | 2 +- modules/profile/get_general.inc.php | 2 +- modules/profile/get_mentor.inc.php | 2 +- modules/profile/update_adresses.inc.php | 4 +- modules/profile/verif_adresses.inc.php | 12 +++--- modules/profile/verif_general.inc.php | 2 +- modules/register.php | 6 +-- modules/register/register.inc.php | 18 ++++---- modules/search.php | 18 ++++---- modules/search/classes.inc.php | 10 ++--- modules/search/search.inc.php | 10 ++--- modules/stats.php | 4 +- modules/survey.php | 4 +- modules/xnet.php | 4 +- modules/xnetevents/xnetevents.inc.php | 4 +- modules/xnetgrp.php | 26 ++++++------ modules/xnetgrp/mail.inc.php | 6 +-- plugins/block.tidy.php | 2 +- plugins/function.display_address.php | 6 +-- plugins/function.select_db_table.php | 6 +-- plugins/insert.getNbIns.php | 4 +- plugins/insert.getNbNotifs.php | 2 +- plugins/insert.getUserName.php | 2 +- plugins/insert.mkStats.php | 4 +- upgrade/0.9.14/connect.db.inc.php | 32 +++++++++++++- 114 files changed, 639 insertions(+), 560 deletions(-) mode change 120000 => 100755 bin/cron/banana.feedgen.php mode change 120000 => 100644 bin/cron/connect.db.inc.php mode change 120000 => 100644 upgrade/0.9.14/connect.db.inc.php diff --git a/bin/cron/banana.feedgen.php b/bin/cron/banana.feedgen.php deleted file mode 120000 index 355e1d0..0000000 --- a/bin/cron/banana.feedgen.php +++ /dev/null @@ -1 +0,0 @@ -../banana.feedgen.php \ No newline at end of file diff --git a/bin/cron/banana.feedgen.php b/bin/cron/banana.feedgen.php new file mode 100755 index 0000000..b573adf --- /dev/null +++ b/bin/cron/banana.feedgen.php @@ -0,0 +1,20 @@ +#!/usr/bin/php5 +banana->mbox_helper; +Banana::$spool_root = $globals->banana->spool_root; +Banana::$nntp_host = "news://{$globals->banana->web_user}:{$globals->banana->web_pass}@{$globals->banana->server}:{$globals->banana->port}/"; +Banana::refreshAllFeeds(array('NNTP', 'MLArchive')); + +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: +?> diff --git a/bin/cron/checkdb.php b/bin/cron/checkdb.php index f6b4889..7f51b78 100755 --- a/bin/cron/checkdb.php +++ b/bin/cron/checkdb.php @@ -21,13 +21,13 @@ ***************************************************************************/ /* * verifie qu'il n'y a pas d'incoherences dans les tables de jointures - * -*/ + * +*/ require('./connect.db.inc.php'); require("Console/Getopt.php"); -function check($sql, $commentaire='') +function check($sql, $commentaire='') { $it = XDB::iterRow($sql); if ($err = XDB::error()) echo $err; @@ -43,7 +43,7 @@ function check($sql, $commentaire='') echo "|"; foreach ($arr as $val) echo "\t$val\t|"; echo "\n"; - } + } echo "\n"; } } @@ -139,7 +139,7 @@ check("SELECT e.uid, e.country, e.region FROM entreprises AS e LEFT JOIN geoloc_ /* donne la liste des emails douteux que les administrateurs n'ont pas encore traité */ check("SELECT a1.alias, a2.alias, e1.email, e2.flags FROM emails AS e1 - INNER JOIN emails AS e2 ON(e1.email = e2.email AND e1.uid!=e2.uid AND + INNER JOIN emails AS e2 ON(e1.email = e2.email AND e1.uid!=e2.uid AND (e1.uidbaseurl = "https://www.polytechnique.org"; +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: +?> diff --git a/bin/cron/cron_validations.php b/bin/cron/cron_validations.php index dce1a64..4cab467 100755 --- a/bin/cron/cron_validations.php +++ b/bin/cron/cron_validations.php @@ -21,7 +21,7 @@ ***************************************************************************/ /* vim: set sw=4 ts=4 sts=4 tw=100: * vérifie qu'il n'y a pas de validations en cours, et maile si c'est le cas -*/ +*/ $M_PERIOD = "INTERVAL 3 HOUR"; // période d'envoi des mails de 3h $R_PERIOD = "INTERVAL 6 HOUR"; // période de réponse moyenne de 6h @@ -58,7 +58,7 @@ while (list($type, $nb) = $res->next()) { $message .= "- $type: $nb\n"; } -$message = wordwrap($message,78); +$message = wordwrap($message,78); $mymail->setTxtBody($message); $mymail->send(); // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: diff --git a/bin/cron/emails.check.php b/bin/cron/emails.check.php index 5ad8bbe..b6aaf86 100755 --- a/bin/cron/emails.check.php +++ b/bin/cron/emails.check.php @@ -26,12 +26,12 @@ $panne_level = 3; require('./connect.db.inc.php'); -/* +/* * Check duplicated addresses */ $sql = "SELECT a1.alias, a2.alias, e1.email FROM emails AS e1 - INNER JOIN emails AS e2 ON (e1.email = e2.email AND e1.uid != e2.uid + INNER JOIN emails AS e2 ON (e1.email = e2.email AND e1.uid != e2.uid AND (e1.uid < e2.uid OR NOT FIND_IN_SET('active', e2.flags))) LEFT JOIN emails_watch AS w ON (e1.email = w.email) INNER JOIN aliases AS a1 ON (a1.id = e1.uid AND a1.type = 'a_vie') diff --git a/bin/cron/homonymes.php b/bin/cron/homonymes.php index 0c6338c..1530531 100755 --- a/bin/cron/homonymes.php +++ b/bin/cron/homonymes.php @@ -22,7 +22,7 @@ /* vim: set sw=4 ts=4 sts=4 tw=100: * crée des demandes de validation pour les kill d'alias * une demande 10 jours avant pour un warning, puis une autre pour le robot -*/ +*/ $W_PERIOD = "INTERVAL 7 DAY"; // temps d'envoi du warning avant la deadline diff --git a/bin/cron/notifs.send.php b/bin/cron/notifs.send.php index 583f0e1..12253c5 100755 --- a/bin/cron/notifs.send.php +++ b/bin/cron/notifs.send.php @@ -81,7 +81,7 @@ EOF; EOF; - + $mailer = new PlMailer(); $mailer->setFrom('Carnet Polytechnicien mail->domain . '>'); $mailer->addTo("\"$u['prenom']} {$u['nom']}\" <{$u['bestalias']}@" . $globals->mail->domain . '>'); diff --git a/bin/csv2sql.php b/bin/csv2sql.php index 20963d6..b2bdee3 100755 --- a/bin/csv2sql.php +++ b/bin/csv2sql.php @@ -20,7 +20,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ -require_once(dirname(__FILE__) . '/../classes/csvimporter.php'); +require_once(dirname(__FILE__) . '/../classes/csvimporter.php'); // {{{ function showHelp() @@ -81,9 +81,9 @@ function processArgs() // }}} global $debug, $action, $keys; -$debug = false; -$action = CSV_INSERT; -$keys = 'id'; +$debug = false; +$action = CSV_INSERT; +$keys = 'id'; processArgs(); require_once(dirname(__FILE__) . '/../classes/xdb.php'); diff --git a/classes/corelogger.php b/classes/corelogger.php index 611a7b1..baadf79 100644 --- a/classes/corelogger.php +++ b/classes/corelogger.php @@ -54,7 +54,7 @@ class CoreLogger } /** Creates a new session entry in database and return its ID. - * + * * @param $uid the id of the logged user * @param $suid the id of the administrator who has just su'd to the user * @return session the session id diff --git a/classes/csvimporter.php b/classes/csvimporter.php index 6bb92ee..809a82c 100644 --- a/classes/csvimporter.php +++ b/classes/csvimporter.php @@ -134,7 +134,7 @@ class CSVImporter VarStream::init(); global $csv_source; $this->index = null; - + $csv_source = $csv; $res = fopen('var://csv_source', 'r'); @@ -291,13 +291,13 @@ class CSVImporter } if ($current == 'values' && Env::has('csv_valid')) { $next = 'valid'; - } + } if (empty($csv)) { $next = 'source'; } if (Env::has('csv_action')) { $_SESSION['csv_action'] = Env::v('csv_action'); - } + } if ($next == 'valid') { if ($current != 'valid') { $cpyfields = array('csv_value', 'csv_user_value', 'csv_cond_field', @@ -346,7 +346,7 @@ class CSVImporter $page->assign('csv_field_desc', $this->field_desc); $page->assign('csv_page', $next); $page->assign('csv_path', $url); - $page->assign('csv_fields', $fields); + $page->assign('csv_fields', $fields); } } diff --git a/classes/env.php b/classes/env.php index 378305f..7448a71 100644 --- a/classes/env.php +++ b/classes/env.php @@ -41,10 +41,10 @@ class Env return Env::_get($key, $default); } - public static function s($key, $default = '') - { - return (string)Env::_get($key, $default); - } + public static function s($key, $default = '') + { + return (string)Env::_get($key, $default); + } public static function b($key, $default = false) { @@ -90,10 +90,10 @@ class Post return (bool)Post::_get($key, $default); } - public static function s($key, $default = '') - { - return (string)Post::_get($key, $default); - } + public static function s($key, $default = '') + { + return (string)Post::_get($key, $default); + } public static function i($key, $default = 0) { @@ -173,9 +173,9 @@ class Cookie return Cookie::_get($key, $default); } - public static function s($key, $default = '') + public static function s($key, $default = '') { - return (string)Cookie::_get($key, $default); + return (string)Cookie::_get($key, $default); } public static function b($key, $default = false) diff --git a/classes/flagset.php b/classes/flagset.php index 40a3b14..ce3d558 100644 --- a/classes/flagset.php +++ b/classes/flagset.php @@ -44,7 +44,7 @@ class Flagset * @param $flag XXX * @return VOID */ - public function addFlag($flag) + public function addFlag($flag) { if (!$flag) return; if (!$this->hasflag($flag)) { @@ -59,7 +59,7 @@ class Flagset * @param $flag XXX * @return 1 || 0 */ - public function hasFlag($flag) + public function hasFlag($flag) { $tok = strtok($this->value,$this->sep); while ($tok) { @@ -75,8 +75,8 @@ class Flagset { $perms = explode(',', $flag); foreach ($perms as $perm) - { - $ok = true; + { + $ok = true; $rights = explode(':', $perm); foreach ($rights as $right) { if (($right{0} == '!' && $this->hasFlag(substr($right, 1))) || !$this->hasFlag($right)) { @@ -85,16 +85,16 @@ class Flagset } if ($ok) { return true; - } + } } - return false; + return false; } /** remove flag * @param $flag XXX * @return VOID */ - public function rmFlag($flag) + public function rmFlag($flag) { if (!$flag) return; $newvalue = ""; @@ -116,7 +116,7 @@ class Flagset { return $this->value; } -} +} // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?> diff --git a/classes/miniwiki.php b/classes/miniwiki.php index eb5e94e..e81d9b7 100644 --- a/classes/miniwiki.php +++ b/classes/miniwiki.php @@ -21,25 +21,25 @@ class MiniWiki } return $id; } - + public static function init() { if (isset(MiniWiki::$patternsWiki[0])) { return; } MiniWiki::Markup("/(\r\n|\r([^\n]))/", "\n$2", "\n$2"); - + // retours à la ligne avec \\ MiniWiki::Markup("/\\\\(?".">(\\\\*))\n/e", "str_repeat('
\n',mb_strlen('$1'))", "str_repeat('\n',mb_strlen('$1'))", "ligne1\\\\\nligne2"); - - // * unordered list + + // * unordered list MiniWiki::Markup("/(^|\n)\*(([^\n]*(\n|$))(\*[^\n]*(\n|$))*)/se", "'

  • '.str_replace(\"\\n*\",'
  • ','$2').'

'", "'$1 -' . str_replace(\"\\n*\", \"\\n -\", '$2')", - "* element1\n* element2\n* element3"); - // # unordered list - MiniWiki::Markup("/(^|\n)#(([^\n]*(\n|$))(#[^\n]*(\n|$))*)/se", "'

  1. '.str_replace(\"\\n#\",'
  2. ','$2').'
'", "'$0'", "# element1\n# element2\n# element3"); - + "* element1\n* element2\n* element3"); + // # unordered list + MiniWiki::Markup("/(^|\n)#(([^\n]*(\n|$))(#[^\n]*(\n|$))*)/se", "'
  1. '.str_replace(\"\\n#\",'
  2. ','$2').'
'", "'$0'", "# element1\n# element2\n# element3"); + // bold, italic and others // ''' bold ''' MiniWiki::Markup("/'''(.*?)'''/",'$1','*$1*', "'''gras'''"); @@ -62,14 +62,14 @@ class MiniWiki "%red% texte en rouge %%\\\\\n%#ff0% texte en jaune %%\\\\\n%#0000ff% texte en bleu %%"); // [+ big +] [++ bigger ++] [+++ even bigger +++] ... MiniWiki::Markup("/\\[(([-+])+)(.*?)\\1\\]/e","'$3'", "'$3'", "[+ grand +]\n\n[++ plus grand ++]\n\n[+++ encore plus grand +++]"); - + // -----
MiniWiki::Markup("/(\n|^)--(--+| \n)/s", '$1
', '$1-- '."\n", "----\n"); // titles MiniWiki::$title_index = MiniWiki::Markup('/(\n|^)(!+)([^\n]*)/se', "'$1$3'", "'$1$3'", "!titre1\n\n!!titre2\n\n!!!titre3"); - + // links MiniWiki::Markup('/((?:https?|ftp):\/\/(?:[\.\,\;\!\:]*[\w@~%$£µ&i#\-+=_\/\?])*)/ui', '\\0', '<\\0>'); @@ -79,7 +79,7 @@ class MiniWiki MiniWiki::Markup('/\\[\\[\\s*<(?:a href=")?([^>]*)(?:">.*<\/a)?>\\s*\|([^\\]]+)\\]\\]/i', '\\2', '\\2 <\\1>', "[[http://www.example.com|Mon site web]]\n\nhttp://www.example.com\n\ntest@example.com"); - + // paragraphs and empty lines MiniWiki::Markup("/\n\n/", '

', "\n\n", "paragraphe1\n\nparagraphe2"); MiniWiki::Markup("/\n/", ' ', "\n"); @@ -100,7 +100,7 @@ class MiniWiki } return $html; } - + private static function justify($text, $n) { $arr = explode("\n", wordwrap($text, $n)); @@ -111,28 +111,28 @@ class MiniWiki $nxl_split = preg_split('! +!u', $nxl); $nxw_len = count($nxl_split) ? mb_strlen($nxl_split[0]) : 0; $line = trim($line); - + if (mb_strlen($line)+1+$nxw_len < $n) { $res .= "$line\n"; continue; } - + if (preg_match('![.:;]$!u',$line)) { $res .= "$line\n"; continue; } - + $tmp = preg_split('! +!u', trim($line)); $words = count($tmp); if ($words <= 1) { $res .= "$line\n"; continue; } - + $len = array_sum(array_map('mb_strlen', $tmp)); $empty = $n - $len; $sw = floatval($empty) / floatval($words-1); - + $cur = 0; $l = ''; foreach ($tmp as $word) { @@ -145,7 +145,7 @@ class MiniWiki } return trim($res); } - + public static function WikiToText($wiki, $just=false, $indent=0, $width=68, $title=false) { diff --git a/classes/mmlist.php b/classes/mmlist.php index b70fcbf..b6fe5b5 100644 --- a/classes/mmlist.php +++ b/classes/mmlist.php @@ -30,7 +30,7 @@ class MMList extends XmlrpcClient parent::__construct($url); if ($globals->debug & DEBUG_BT) { $this->bt = new PlBacktrace('MMList'); - } + } } public function __call($method, $args) diff --git a/classes/platal.php b/classes/platal.php index f97f5e9..46de900 100644 --- a/classes/platal.php +++ b/classes/platal.php @@ -142,7 +142,7 @@ class Platal if (!isset($place[$part])) { $place[$part] = array(); } - $place =& $place[$part]; + $place =& $place[$part]; } $place["#final#"] = array(); } diff --git a/classes/platalpage.php b/classes/platalpage.php index cfe745e..bf35d60 100644 --- a/classes/platalpage.php +++ b/classes/platalpage.php @@ -95,7 +95,7 @@ abstract class PlatalPage extends Smarty if (Env::has('json') && count($this->_jsonVars)) { return $this->jsonDisplay(); } - + if (Env::v('display') == 'light') { $this->_page_type = SIMPLE; } elseif (Env::v('display') == 'raw') { @@ -222,7 +222,7 @@ abstract class PlatalPage extends Smarty { if (!empty($css)) { $this->append('xorg_inline_css', $css); - } + } } // }}} @@ -276,7 +276,7 @@ function escape_xorgDB(&$item, $key) /** * default smarty plugin, used to auto-escape dangerous html. - * + * * < --> < * > --> > * " --> " @@ -331,7 +331,7 @@ function trimwhitespace($source, &$smarty) $source = preg_replace('/((?)\n)[\s]+/m', '\1', $source); $source = preg_replace("!&&&tags&&&!e", 'array_shift($tagsmatches[0])', $source); - return $source; + return $source; } // }}} @@ -362,7 +362,7 @@ function _hide_email($source) $source = str_replace("\n", '', $source); return ''; + '//]]>'; } function hide_emails($source, &$smarty) @@ -385,7 +385,7 @@ function hide_emails($source, &$smarty) $source = preg_replace("!<[^>]+[-a-z0-9_+.]+@[-a-z0-9_.]+.+?>!ius", '&&&misc&&&', $source); //catch ! - $source = preg_replace('!([-a-z0-9_+.]+@[-a-z0-9_.]+)!iue', '_hide_email("\1")', $source); + $source = preg_replace('!([-a-z0-9_+.]+@[-a-z0-9_.]+)!iue', '_hide_email("\1")', $source); $source = preg_replace('!&&&ahref&&&!e', '_hide_email(array_shift($ahref[0]))', $source); // restore data diff --git a/classes/plmailer.php b/classes/plmailer.php index 0377d80..eb26208 100644 --- a/classes/plmailer.php +++ b/classes/plmailer.php @@ -38,7 +38,7 @@ class PlMail extends Smarty $this->template_dir = $globals->spoolroot . "/templates/"; $this->compile_dir = $globals->spoolroot . "/spool/mails_c/"; $this->config_dir = $globals->spoolroot . "/configs/"; - + $this->register_outputfilter(Array($this, 'mail_format')); $this->register_function('from', Array($this, 'setFrom')); @@ -123,7 +123,7 @@ class PlMail extends Smarty } /** template function : subject. - * {subject text=...} + * {subject text=...} */ public function setSubject($params, &$smarty) { @@ -234,7 +234,7 @@ class PlMailer extends Mail_Mime { $this->page->assign($var, $value); } } - + public function assign_by_ref($var, &$value) { if (!is_null($this->page)) { @@ -248,7 +248,7 @@ class PlMailer extends Mail_Mime { $this->page->register_modifier($var, $callback); } } - + public function register_function($var, $callback) { if (!is_null($this->page)) { @@ -306,12 +306,12 @@ class PlMailer extends Mail_Mime { if(empty($addrs)) { return false; } - + $dests = Array(); foreach($addrs as $a) { $dests[] = "{$a->mailbox}@{$a->host}"; } - + // very important to do it in THIS order very precisely. $body = $this->get(array('text_charset' => $this->charset, 'text_encoding' => '8bit', diff --git a/classes/plset.php b/classes/plset.php index 8cf1ba2..2338706 100644 --- a/classes/plset.php +++ b/classes/plset.php @@ -277,7 +277,7 @@ abstract class MultipageView implements PlView unset($list['page']); unset($list['order']); return $list; - } + } } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: diff --git a/classes/pltableeditor.php b/classes/pltableeditor.php index ba57c72..be664fd 100644 --- a/classes/pltableeditor.php +++ b/classes/pltableeditor.php @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ -class PLTableEditor +class PLTableEditor { // the plat/al name of the page public $pl; @@ -84,7 +84,7 @@ class PLTableEditor $a['Value'] = $a['List'][0]; } else { $a['Type'] = 'set'; - } + } } elseif (substr($a['Type'],0,5) == 'enum(') { // get the list of options @@ -111,7 +111,7 @@ class PLTableEditor } // called before editing $entry - private function prepare_edit(&$entry) + private function prepare_edit(&$entry) { foreach ($this->vars as $field => $descr) { if ($descr['Type'] == 'set') { @@ -133,7 +133,7 @@ class PLTableEditor } return $entry; } - + // set whether the save button show redirect to list view or edit view public function list_on_edit($var) { @@ -146,14 +146,14 @@ class PLTableEditor $this->vars[$name]['desc'] = $desc; $this->vars[$name]['display'] = $display; } - + // add a join table, when deleting a row corresponding entries will be deleted in these tables public function add_join_table($name,$joinid,$joindel,$joinextra="") { if ($joindel) $this->jtables[$name] = array("joinid" => $joinid,"joinextra" => $joinextra?(" AND ".$joinextra):""); } - + // add a sort key public function add_sort_field($key, $desc = false, $default = false) { diff --git a/classes/plupload.php b/classes/plupload.php index 8844bc4..bab7286 100644 --- a/classes/plupload.php +++ b/classes/plupload.php @@ -74,7 +74,7 @@ class PlUpload } else if (!move_uploaded_file($file['tmp_name'], $this->filename)) { return false; } - $this->checkContentType(); + $this->checkContentType(); return true; } diff --git a/classes/session.php b/classes/session.php index 8fa0db7..4a80761 100644 --- a/classes/session.php +++ b/classes/session.php @@ -53,10 +53,10 @@ class Session return isset($_SESSION[$key]) ? $_SESSION[$key] : $default; } - public static function s($key, $default = '') + public static function s($key, $default = '') { return (string)Session::v($key, $default); - } + } public static function i($key, $default = 0) { diff --git a/classes/xnet.php b/classes/xnet.php index 58d1375..ad8a0b7 100644 --- a/classes/xnet.php +++ b/classes/xnet.php @@ -53,8 +53,8 @@ class Xnet extends Platal $link = str_replace('%grp', $globals->asso('diminutif'), parent::near_hook()); if ($link != $this->path) { return $link; - } - return null; + } + return null; } protected function find_hook() diff --git a/htdocs/listes_redirect.php b/htdocs/listes_redirect.php index c3eba99..ef1d86a 100644 --- a/htdocs/listes_redirect.php +++ b/htdocs/listes_redirect.php @@ -29,7 +29,7 @@ if ($matches) { $mbox = $matches[2]; $fqdn = strtolower($matches[3]); $sup = $matches[4]; - + if ($fqdn == 'polytechnique.org') { http_redirect("https://www.polytechnique.org/lists/$action/$mbox$sup"); } diff --git a/htdocs/webredirect.php b/htdocs/webredirect.php index dfecc26..fd83b8d 100644 --- a/htdocs/webredirect.php +++ b/htdocs/webredirect.php @@ -24,9 +24,9 @@ require_once dirname(__FILE__).'/../include/xorg.inc.php'; global $globals; list($username, $path) = preg_split('/\//', $_SERVER["REQUEST_URI"], 2, PREG_SPLIT_NO_EMPTY); $res = XDB::query( - "SELECT redirecturl - FROM auth_user_quick AS a - INNER JOIN aliases AS al ON (al.id = a.user_id AND (al.type='a_vie' OR al.type='alias')) + "SELECT redirecturl + FROM auth_user_quick AS a + INNER JOIN aliases AS al ON (al.id = a.user_id AND (al.type='a_vie' OR al.type='alias')) LEFT JOIN virtuals_redirect AS vr ON (vr.redirect LIKE CONCAT(al.alias, '@%') INNER JOIN virtuals AS v ON (v.vid = vr.vid) WHERE al.alias = {?} OR v.alias = CONCAT({?}, '@', {?}) diff --git a/include/applis.func.inc.php b/include/applis.func.inc.php index eacbc34..babf28e 100644 --- a/include/applis.func.inc.php +++ b/include/applis.func.inc.php @@ -24,7 +24,7 @@ global $page; function applis_options($current=0) { $html = ''; $res = XDB::iterator("select * from applis_def order by text"); - while ($arr_appli = $res->next()) { + while ($arr_appli = $res->next()) { $html .= '

".pl_entities($this->title()).'

'; $body = MiniWiki::WikiToHTML($this->_body); $app = MiniWiki::WikiToHTML($this->_append); - + $art = "$title\n"; $art .= "
\n$body\n"; if ($app) { $art .= "
$app
"; } $art .= "
\n"; - + return $art; } diff --git a/include/notifs.inc.php b/include/notifs.inc.php index 3e691c1..4295b16 100644 --- a/include/notifs.inc.php +++ b/include/notifs.inc.php @@ -132,7 +132,7 @@ function select_notifs($mail, $uid=null, $last=null, $iterator=true) // }}} // {{{ function getNbNotifs -function getNbNotifs() +function getNbNotifs() { if (!S::has('uid')) { return 0; @@ -155,7 +155,7 @@ function getNbNotifs() // }}} // {{{ class AllNotifs -class AllNotifs +class AllNotifs { public $_cats = Array(); public $_data = Array(); @@ -187,7 +187,7 @@ class AllNotifs // }}} // {{{ class Notifs -class Notifs +class Notifs { public $_uid; public $_cats = Array(); @@ -220,7 +220,7 @@ class Notifs // }}} // {{{ class Watch -class Watch +class Watch { public $_uid; public $_promos; diff --git a/include/platal.inc.php b/include/platal.inc.php index 073479c..7ab9ef8 100644 --- a/include/platal.inc.php +++ b/include/platal.inc.php @@ -119,22 +119,22 @@ set_error_handler('pl_error_handler', E_ALL | E_STRICT); register_shutdown_function('pl_print_errors'); // register_shutdown_function('pl_dump_env'); -/** Check if the string is utf8 +/** Check if the string is utf8 */ function is_utf8($s) { return @iconv('utf-8', 'utf-8', $s) == $s; } -/** vérifie si une adresse email est bien formatée * ATTENTION, cette fonction ne doit pas être appelée sur une chaîne ayant subit un addslashes (car elle accepte le "'" qui it alors un "\'" - * @param $email l'adresse email a verifier +/** vérifie si une adresse email est bien formatée * ATTENTION, cette fonction ne doit pas être appelée sur une chaîne ayant subit un addslashes (car elle accepte le "'" qui it alors un "\'" + * @param $email l'adresse email a verifier * @return BOOL */ -function isvalid_email($email) +function isvalid_email($email) { - // la rfc2822 authorise les caractères "a-z", "0-9", "!", "#", "$", "%", "&", "'", "*", "+", "-", "/", "=", "?", "^", `", "{", "|", "}", "~" aussi bien dans la partie locale que dans le domaine. - // Pour la partie locale, on réduit cet ensemble car il n'est pas utilisé. - // Pour le domaine, le système DNS limite à [a-z0-9.-], on y ajoute le "_" car il est parfois utilisé. - return preg_match("/^[a-z0-9_.'+-]+@[a-z0-9._-]+\.[a-z]{2,4}$/i", $email); + // la rfc2822 authorise les caractères "a-z", "0-9", "!", "#", "$", "%", "&", "'", "*", "+", "-", "/", "=", "?", "^", `", "{", "|", "}", "~" aussi bien dans la partie locale que dans le domaine. + // Pour la partie locale, on réduit cet ensemble car il n'est pas utilisé. + // Pour le domaine, le système DNS limite à [a-z0-9.-], on y ajoute le "_" car il est parfois utilisé. + return preg_match("/^[a-z0-9_.'+-]+@[a-z0-9._-]+\.[a-z]{2,4}$/i", $email); } function pl_url($path, $query = null, $fragment = null) diff --git a/include/profil.func.inc.php b/include/profil.func.inc.php index 803dc30..cd493cd 100644 --- a/include/profil.func.inc.php +++ b/include/profil.func.inc.php @@ -46,7 +46,7 @@ function put_in_db($string){ } // example of use for diff_user_details : get $b from database, $a from other site -// calculate diff $c and add $c in database (with set_user_details) +// calculate diff $c and add $c in database (with set_user_details) function diff_user_details(&$a, &$b, $view = 'private') { // compute $c = $a - $b // if (!isset($b) || !$b || !is_array($b) || count($b) == 0) // return $a; @@ -131,11 +131,11 @@ function diff_user_address($a, $b) { $a['pub'] = $b['pub']; if (isset($b['tels'])) { $bvar = $b['tels']; - + $telids_b = array(); - foreach ($bvar as $i => $telb) $telids_b[$telb['telid']] = $i; + foreach ($bvar as $i => $telb) $telids_b[$telb['telid']] = $i; - if (isset($a['tels'])) + if (isset($a['tels'])) $avar = $a['tels']; else $avar = array(); @@ -161,7 +161,7 @@ function diff_user_address($a, $b) { } } } - + foreach ($telids_b as $telidb => $i) $ctels[] = array('telid' => $telidb, 'remove' => 1); @@ -183,8 +183,8 @@ function diff_user_address($a, $b) { function diff_user_addresses(&$a, &$b) { $c = $a; $adrids_b = array(); - foreach ($b as $i => $adrb) $adrids_b[$adrb['adrid']] = $i; - + foreach ($b as $i => $adrb) $adrids_b[$adrb['adrid']] = $i; + foreach ($a as $j => $adra) { if (isset($adra['adrid'])) { // if b has an address with the same adrid, compute diff diff --git a/include/rss.inc.php b/include/rss.inc.php index b461376..22a8a2b 100644 --- a/include/rss.inc.php +++ b/include/rss.inc.php @@ -51,7 +51,7 @@ function init_rss($template, $alias, $hash, $require_uid = true) if ($template) { header('Content-Type: application/rss+xml; charset=utf8'); - } + } return $uid; } diff --git a/include/secure_hash.inc.php b/include/secure_hash.inc.php index af1cfdc..dd8dd96 100644 --- a/include/secure_hash.inc.php +++ b/include/secure_hash.inc.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ - + function hash_encrypt($s) { return sha1($s); } diff --git a/include/synchro_ax.inc.php b/include/synchro_ax.inc.php index 3648e54..58384d0 100644 --- a/include/synchro_ax.inc.php +++ b/include/synchro_ax.inc.php @@ -37,7 +37,7 @@ function get_user_ax($matricule_ax, $raw=false) $userax = Array(); $userax['matricule_ax'] = $matricule_ax; - + $userax['nom'] = strtoupper($ancien->Nom_patr()); $userax['nom_usage'] = strtoupper($ancien->Nom_usuel()); if ($userax['nom_usage'] == $userax['nom']) $userax['nom_usage'] = ''; @@ -54,8 +54,8 @@ function get_user_ax($matricule_ax, $raw=false) $userax['corps'] = $ancien->Corps(); $userax['corps_grade'] = $ancien->Grade(); } */ - $userax['adr_pro'] = array(); - + $userax['adr_pro'] = array(); + for ($i = 0; $i < $ancien->Num_Activite(); $i++) { $jobax = array(); $jobax['entreprise'] = $ancien->Entreprise($i); @@ -100,7 +100,7 @@ function get_user_ax($matricule_ax, $raw=false) if ($ancien->Mobile($i)) $userax['mobile'] = $ancien->Mobile($i); $userax['adr'][$i] = $adrax; } - + /* $userax['formation'] = array(); for($i=$ancien->Num_formation() - 1; $i >= 0; $i--) $userax['formation'][$i] = $ancien->Formation($i);*/ diff --git a/include/user.func.inc.php b/include/user.func.inc.php index 03e437e..b515c0c 100644 --- a/include/user.func.inc.php +++ b/include/user.func.inc.php @@ -44,7 +44,7 @@ function user_clear_all_subs($user_id, $really_del=true) array_push($tables_to_clear['uid'], 'emails', 'groupex.membres', 'contacts', 'adresses', 'tels', 'photo', 'perte_pass', 'langues_ins', 'forums.abos', 'forums.profils'); array_push($tables_to_clear['user_id'], 'newsletter_ins', 'auth_user_quick', 'binets_ins'); - $tables_to_clear['id'] = array('aliases'); + $tables_to_clear['id'] = array('aliases'); $tables_to_clear['contact'] = array('contacts'); $tables_to_clear['guid'] = array('groupesx_ins'); XDB::execute("UPDATE auth_user_md5 @@ -108,7 +108,7 @@ function get_user_login($data, $get_forlife = false, $callback = '_default_user_ if (strstr($data, '@')===false) { $data = $data.'@'.$globals->mail->domain; } - + list($mbox, $fqdn) = explode('@', $data); if ($fqdn == $globals->mail->domain || $fqdn == $globals->mail->domain2) { @@ -134,7 +134,7 @@ function get_user_login($data, $get_forlife = false, $callback = '_default_user_ return false; } elseif ($fqdn == $globals->mail->alias_dom || $fqdn == $globals->mail->alias_dom2) { - + $res = XDB::query("SELECT redirect FROM virtual_redirect INNER JOIN virtual USING(vid) @@ -156,10 +156,10 @@ function get_user_login($data, $get_forlife = false, $callback = '_default_user_ case 0: call_user_func($callback, $data); return false; - + case 1: return $res->fetchOneCell(); - + default: if (S::has_perms()) { $aliases = $res->fetchColumn(); @@ -169,7 +169,7 @@ function get_user_login($data, $get_forlife = false, $callback = '_default_user_ } } } - + return false; } @@ -210,12 +210,12 @@ function get_users_forlife_list($members, $strict = false, $callback = '_default // {{{ function has_user_right() function has_user_right($pub, $view = 'private') { if ($pub == $view) return true; - // all infos available for private + // all infos available for private if ($view == 'private') return true; - // public infos available for all + // public infos available for all if ($pub == 'public') return true; // here we have view = ax or public, and pub = ax or private, and pub != view - return false; + return false; } // }}} // {{{ function get_not_registered_user() @@ -240,7 +240,7 @@ function get_not_registered_user($login, $iterator = false) $sql = "SELECT user_id, nom, prenom, promo FROM auth_user_md5 WHERE $where - ORDER BY promo, nom, prenom"; + ORDER BY promo, nom, prenom"; if ($iterator) { return XDB::iterator($sql, $nom, $prenom, $promo); } else { @@ -293,7 +293,7 @@ function get_user_details_pro($uid, $view = 'private') } if (!has_user_right($pro['tel_pub'], $view)) { // if no tel was defined, then the viewer will be able to write it - if ($pro['tel'] == '' && + if ($pro['tel'] == '' && $pro['fax'] == '' && $pro['mobile'] == '') { $all_pro[$i]['tel_pub'] = $view; @@ -353,7 +353,7 @@ function get_user_details_adr($uid, $view = 'private') { else $adrid_index[$adr['adrid']] = $i; } - + $sql = "SELECT t.adrid, t.tel_pub, t.tel_type, t.tel, t.telid FROM tels AS t INNER JOIN adresses AS a ON (a.uid = t.uid) AND (a.adrid = t.adrid) @@ -365,7 +365,7 @@ function get_user_details_adr($uid, $view = 'private') { $adrid = $nexttel['adrid']; unset($nexttel['adrid']); if (isset($adrid_index[$adrid])) { - if (!isset($all_adr[$adrid_index[$adrid]]['tels'])) + if (!isset($all_adr[$adrid_index[$adrid]]['tels'])) $all_adr[$adrid_index[$adrid]]['tels'] = array($nexttel); else $all_adr[$adrid_index[$adrid]]['tels'][] = $nexttel; @@ -399,7 +399,7 @@ function &get_user_details($login, $from_uid = '', $view = 'private') LEFT JOIN contacts AS c ON (c.uid = {?} and c.contact = u.user_id) LEFT JOIN geoloc_pays AS gp ON (gp.a2 = u.nationalite) INNER JOIN sections AS s ON (s.id = u.section) - LEFT JOIN photo AS p ON (p.uid = u.user_id) + LEFT JOIN photo AS p ON (p.uid = u.user_id) LEFT JOIN mentor AS m ON (m.uid = u.user_id) LEFT JOIN emails AS e ON (e.uid = u.user_id AND e.flags='active') WHERE a.alias = {?} @@ -447,7 +447,7 @@ function &get_user_details($login, $from_uid = '', $view = 'private') $res = XDB::query($sql, $uid); $user['binets'] = $res->fetchColumn(); $user['binets_join'] = join(', ', $user['binets']); - + $res = XDB::iterRow("SELECT text, url FROM groupesx_ins LEFT JOIN groupesx_def ON groupesx_ins.gid = groupesx_def.id @@ -457,7 +457,7 @@ function &get_user_details($login, $from_uid = '', $view = 'private') while (list($gxt, $gxu) = $res->next()) { $user['gpxs'][] = $gxu ? "$gxt" : $gxt; $user['gpxs_name'][] = $gxt; - } + } $user['gpxs_join'] = join(', ', $user['gpxs']); } @@ -466,7 +466,7 @@ function &get_user_details($login, $from_uid = '', $view = 'private') INNER JOIN applis_def ON applis_def.id = applis_ins.aid WHERE uid={?} ORDER BY ordre", $uid); - + $user['applis_fmt'] = Array(); $user['formation'] = Array(); while (list($txt, $url, $type) = $res->next()) { @@ -514,7 +514,7 @@ function add_user_address($uid, $adrid, $adr) { function update_user_address($uid, $adrid, $adr) { // update address XDB::execute( - "UPDATE adresses AS a LEFT JOIN geoloc_pays AS gp ON (gp.pays = {?}) + "UPDATE adresses AS a LEFT JOIN geoloc_pays AS gp ON (gp.pays = {?}) SET `adr1` = {?}, `adr2` = {?}, `adr3` = {?}, `postcode` = {?}, `city` = {?}, a.`country` = gp.a2, `datemaj` = NOW(), `pub` = {?} WHERE adrid = {?} AND uid = {?}", @@ -594,7 +594,7 @@ function update_user_pro($uid, $entrid, $pro) { $set = ""; $args_join = array(); $args_set = array(); - + $join .= "LEFT JOIN emploi_secteur AS s ON(s.label LIKE {?}) LEFT JOIN emploi_ss_secteur AS ss ON(s.id = ss.secteur AND ss.label LIKE {?}) LEFT JOIN fonctions_def AS f ON(f.fonction_fr LIKE {?} OR f.fonction_en LIKE {?})"; @@ -607,7 +607,7 @@ function update_user_pro($uid, $entrid, $pro) { $args_set[] = $pro['poste']; $args_set[] = $pro['web']; $args_set[] = $pro['pub']; - + if (isset($pro['adr1'])) { $join .= "LEFT JOIN geoloc_pays AS gp ON (gp.country LIKE {?} OR gp.pays LIKE {?}) LEFT JOIN geoloc_region AS gr ON (gr.a2 = gp.a2 AND gr.name LIKE {?})"; @@ -622,7 +622,7 @@ function update_user_pro($uid, $entrid, $pro) { $args_set[] = $pro['city']; $args_set[] = $pro['adr_pub']; } - + if (isset($pro['tel'])) { $set .= ", e.`tel` = {?}, e.`fax` = {?}, e.`mobile` = {?}, e.tel_pub = {?}"; $args_set[] = $pro['tel']; @@ -634,7 +634,7 @@ function update_user_pro($uid, $entrid, $pro) { $set .= ", e.`email` = {?}, e.`email_pub` = {?}"; $args_set[] = $pro['email']; $args_set[] = $pro['email_pub']; - } + } $query = "UPDATE entreprises AS e ".$join." SET ".substr($set,1)." WHERE e.uid = {?} AND e.entrid = {?}"; $args_where = array($uid, $entrid); $args = array_merge(array($query), $args_join, $args_set, $args_where); @@ -712,7 +712,7 @@ function set_user_details($uid, $details) { XDB::execute( "INSERT INTO binets_ins (`user_id`, `binet_id`) SELECT {?}, id FROM binets_def WHERE text = {?} LIMIT 1", - $uid, $binet); + $uid, $binet); } if (isset($details['gpxs']) && is_array($details['gpxs'])) { XDB::execute("DELETE FROM groupesx_ins WHERE user_id = {?}", $uid); @@ -722,7 +722,7 @@ function set_user_details($uid, $details) { "INSERT INTO groupesx_ins (`user_id`, `binet_id`) SELECT {?}, id FROM groupesx_def WHERE text = {?} LIMIT 1", $uid, $groupex); - } + } } // applis // medals @@ -787,7 +787,7 @@ function user_reindex($uid) { // {{{ function set_new_usage() function set_new_usage($uid, $usage, $alias=false) -{ +{ XDB::execute("UPDATE auth_user_md5 set nom_usage={?} WHERE user_id={?}",$usage ,$uid); XDB::execute("DELETE FROM aliases WHERE FIND_IN_SET('usage',flags) AND id={?}", $uid); if ($alias && $usage) { @@ -808,15 +808,15 @@ function set_new_usage($uid, $usage, $alias=false) // {{{ function get_X_mat function get_X_mat($ourmat) { - if (!preg_match('/^[0-9]{8}$/', $ourmat)) { + if (!preg_match('/^[0-9]{8}$/', $ourmat)) { // le matricule de notre base doit comporter 8 chiffres return 0; - } - + } + $year = intval(substr($ourmat, 0, 4)); $rang = intval(substr($ourmat, 5, 3)); if ($year < 1996) { - return; + return; } elseif ($year < 2000) { $year = intval(substr(1900 - $year, 1, 3)); return sprintf('%02u0%03u', $year, $rang); @@ -824,8 +824,8 @@ function get_X_mat($ourmat) $year = intval(substr(1900 - $year, 1, 3)); return sprintf('%03u%03u', $year, $rang); } -} - +} + // }}} diff --git a/include/userset.inc.php b/include/userset.inc.php index 7595292..8789ea9 100644 --- a/include/userset.inc.php +++ b/include/userset.inc.php @@ -44,10 +44,10 @@ class UserSet extends PlSet { global $globals; parent::__construct('auth_user_md5 AS u', - (!empty($GLOBALS['IS_XNET_SITE']) ? - 'INNER JOIN groupex.membres AS gxm ON (u.user_id = gxm.uid + (!empty($GLOBALS['IS_XNET_SITE']) ? + 'INNER JOIN groupex.membres AS gxm ON (u.user_id = gxm.uid AND gxm.asso_id = ' . $globals->asso('id') . ') ' : '') - . 'LEFT JOIN auth_user_quick AS q USING (user_id) + . 'LEFT JOIN auth_user_quick AS q USING (user_id) LEFT JOIN aliases AS a ON (a.id = u.user_id AND type = \'a_vie\') ' . $joins, $where, @@ -204,7 +204,7 @@ class MinificheView extends MultipageView LEFT JOIN geoloc_pays AS gp ON (adr.country = gp.a2) LEFT JOIN geoloc_region AS gr ON (adr.country = gr.a2 AND adr.region = gr.region) LEFT JOIN emails AS em ON (em.uid = u.user_id AND em.flags = 'active')" . - (S::logged() ? + (S::logged() ? "LEFT JOIN contacts AS c On (c.contact = u.user_id AND c.uid = " . S::v('uid') . ")" : ""); } @@ -219,12 +219,12 @@ class MentorView extends MultipageView { public function __construct(PlSet &$set, $data, array $params) { - $this->entriesPerPage = 10; + $this->entriesPerPage = 10; $this->addSortKey('rand', array('RAND(' . S::i('uid') . ')'), 'aléatoirement'); - $this->addSortKey('name', array('nom', 'prenom'), 'nom'); - $this->addSortKey('promo', array('-promo', 'nom', 'prenom'), 'promotion'); - $this->addSortKey('date_mod', array('-date', '-promo', 'nom', 'prenom'), 'dernière modification'); - parent::__construct($set, $data, $params); + $this->addSortKey('name', array('nom', 'prenom'), 'nom'); + $this->addSortKey('promo', array('-promo', 'nom', 'prenom'), 'promotion'); + $this->addSortKey('date_mod', array('-date', '-promo', 'nom', 'prenom'), 'dernière modification'); + parent::__construct($set, $data, $params); } public function fields() diff --git a/include/validations.inc.php b/include/validations.inc.php index 0b1eeac..81c3041 100644 --- a/include/validations.inc.php +++ b/include/validations.inc.php @@ -57,7 +57,7 @@ class ValidateIterator extends XOrgDBIterator abstract class Validate { // {{{ properties - + public $uid; public $prenom; public $nom; @@ -70,7 +70,7 @@ abstract class Validate public $unique; // enable the refuse button public $refuse = true; - + public $type; public $comments = Array(); // the validations rules : comments for admins @@ -78,7 +78,7 @@ abstract class Validate // }}} // {{{ constructor - + /** constructeur * @param $_uid user id * @param $_unique requête pouvant être multiple ou non @@ -98,7 +98,7 @@ abstract class Validate WHERE u.user_id={?}", $_uid); list($this->prenom, $this->nom, $this->promo, $this->sexe, $this->forlife, $this->bestalias) = $res->fetchOneRow(); } - + // }}} // {{{ function submit() @@ -110,7 +110,7 @@ abstract class Validate if ($this->unique) { XDB::execute('DELETE FROM requests WHERE user_id={?} AND type={?}', $this->uid, $this->type); } - + $this->stamp = date('YmdHis'); XDB::execute('INSERT INTO requests (user_id, type, data, stamp) VALUES ({?}, {?}, {?}, {?})', $this->uid, $this->type, $this, $this->stamp); @@ -131,7 +131,7 @@ abstract class Validate // }}} // {{{ function clean() - + /** fonction à utiliser pour nettoyer l'entrée de la requête dans la table requests * attention, tout est supprimé si c'est un unique */ @@ -148,7 +148,7 @@ abstract class Validate // }}} // {{{ function handle_formu() - + /** fonction à réaliser en cas de valistion du formulaire */ public function handle_formu() @@ -190,7 +190,7 @@ abstract class Validate $mailer->addTo($globals->core->admin_emails); $body = "Validation {$this->type} pour {$this->prenom} {$this->nom}\n\n" - . S::v('bestalias')." a ajouté le commentaire :\n\n" + . S::v('bestalias')." a ajouté le commentaire :\n\n" . Env::v('comm')."\n\n" . "cf la discussion sur : ".$globals->baseurl."/admin/validate"; @@ -251,13 +251,13 @@ abstract class Validate // }}} // {{{ function trig() - + protected function trig($msg) { global $page; $page->trig($msg); } - + // }}} // {{{ function get_typed_request() @@ -312,22 +312,22 @@ abstract class Validate // {{{ function _mail_body abstract protected function _mail_body($isok); - + // }}} // {{{ function _mail_subj abstract protected function _mail_subj(); - + // }}} // {{{ function commit() - + /** fonction à utiliser pour insérer les données dans x4dat */ abstract public function commit(); // }}} // {{{ function formu() - + /** nom du template qui contient le formulaire */ abstract public function formu(); diff --git a/include/validations/aliases.inc.php b/include/validations/aliases.inc.php index c89e48d..6ff67a0 100644 --- a/include/validations/aliases.inc.php +++ b/include/validations/aliases.inc.php @@ -31,7 +31,7 @@ class AliasReq extends Validate public $old=''; public $public='private'; - + public $rules = "Interdire ce qui peut nous servir (virus@, postmaster@, ...), les alias vulgaires, et les prenom.nom (sauf si c'est pour l'utilisateur prenom.nom). Pas de contrainte pour les tirets ou les points, en revanche le souligné (_) est interdit"; diff --git a/include/validations/broken.inc.php b/include/validations/broken.inc.php index 9dc5dca..80317a7 100644 --- a/include/validations/broken.inc.php +++ b/include/validations/broken.inc.php @@ -67,7 +67,7 @@ class BrokenReq extends Validate // }}} // {{{ function _mail_subj - + protected function _mail_subj() { return "[Polytechnique.org] Récupération de {$this->m_prenom} {$this->m_nom} ({$this->m_promo})"; @@ -100,7 +100,7 @@ class BrokenReq extends Validate global $globals; $email = $this->m_bestalias . '@' . $globals->mail->domain; - XDB::execute("UPDATE emails AS e + XDB::execute("UPDATE emails AS e INNER JOIN aliases AS a ON (a.id = e.uid) SET e.flags = 'active' WHERE a.alias = {?} AND e.email = {?}", $this->m_forlife, $this->m_email); @@ -121,7 +121,7 @@ class BrokenReq extends Validate $mailer->send(); return true; } - + $email = $this->m_bestalias . '@' . $globals->mail->domain; if ($this->old_email) { $subject = "Ton adresse $email semble ne plus fonctionner"; @@ -142,7 +142,7 @@ class BrokenReq extends Validate } elseif (count($redirect) == 1) { $reason .= ' car sa redirection vers ' . $redirect[0] . ' est hors-service depuis plusiers mois.'; } else { - $reason .= ' car ses redirections vers ' . implode(', ', $redirect) + $reason .= ' car ses redirections vers ' . implode(', ', $redirect) . ' sont hors-services depuis plusieurs mois.'; } } diff --git a/include/validations/evts.inc.php b/include/validations/evts.inc.php index f9c2441..4a3a0ce 100644 --- a/include/validations/evts.inc.php +++ b/include/validations/evts.inc.php @@ -30,14 +30,14 @@ class EvtReq extends Validate public $texte; public $pmin; public $pmax; - public $peremption; + public $peremption; public $comment; public $imgtype; public $imgx; public $imgy; public $img; - + // }}} // {{{ constructor @@ -52,7 +52,7 @@ class EvtReq extends Validate $this->comment = $_comment; if ($upload) { $this->readImage($upload); - } + } } // }}} @@ -111,7 +111,7 @@ class EvtReq extends Validate // }}} // {{{ function _mail_subj - + protected function _mail_subj() { return "[Polytechnique.org/EVENEMENTS] Proposition d'événement"; diff --git a/include/validations/homonymes.inc.php b/include/validations/homonymes.inc.php index 8fe93e6..b88586c 100644 --- a/include/validations/homonymes.inc.php +++ b/include/validations/homonymes.inc.php @@ -25,7 +25,7 @@ require_once 'validations.inc.php'; class HomonymeReq extends Validate { // {{{ properties - + public $loginbis; public $warning = true; @@ -36,7 +36,7 @@ class HomonymeReq extends Validate // }}} // {{{ constructor - + public function __construct($_uid, $_loginbis, $_homonymes_forlife, $warning=true) { $this->warning = $warning; @@ -47,10 +47,10 @@ class HomonymeReq extends Validate $this->loginbis = $_loginbis; $this->homonymes_forlife = $_homonymes_forlife; } - + // }}} // {{{ title() - + private function title() { return $this->warning?'alerte alias':'robot répondeur'; @@ -74,7 +74,7 @@ class HomonymeReq extends Validate // }}} // {{{ function _mail_body - + protected function _mail_body($isok) { global $globals; @@ -115,7 +115,7 @@ est ambigu pour des raisons d'homonymie et signalera ton email exact."; } // }}} // {{{ function commit() - + public function commit() { require_once('homonymes.inc.php'); @@ -125,7 +125,7 @@ est ambigu pour des raisons d'homonymie et signalera ton email exact."; XDB::execute("UPDATE aliases SET type='homonyme',expire=NOW() WHERE alias={?}", $this->loginbis); XDB::execute("REPLACE INTO homonymes (homonyme_id,user_id) VALUES({?},{?})", $this->uid, $this->uid); } - + return true; } diff --git a/include/validations/listes.inc.php b/include/validations/listes.inc.php index cd7356d..8558c38 100644 --- a/include/validations/listes.inc.php +++ b/include/validations/listes.inc.php @@ -24,7 +24,7 @@ class ListeReq extends Validate { // {{{ properties - + public $liste; public $desc; @@ -39,12 +39,12 @@ class ListeReq extends Validate Refuser également des listes qui pourraient nous servir (admin, postmaster,...)"; // }}} // {{{ constructor - + public function __construct($_uid, $_liste, $_desc, $_advertise, $_modlevel, $_inslevel, $_owners, $_members, $_stamp=0) { parent::__construct($_uid, true, 'liste', $_stamp); - + $this->liste = $_liste; $this->desc = $_desc; $this->advertise = $_advertise; diff --git a/include/validations/marketing.inc.php b/include/validations/marketing.inc.php index 7b5c759..adf3fd0 100644 --- a/include/validations/marketing.inc.php +++ b/include/validations/marketing.inc.php @@ -35,9 +35,9 @@ class MarkReq extends Validate public $m_type; public $m_data; - public $rules = "Accepter si l'adresse mail parait correcte, et pas absurde (ou si le marketeur est de confiance). Si le + public $rules = "Accepter si l'adresse mail parait correcte, et pas absurde (ou si le marketeur est de confiance). Si le demandeur marque sa propre adresse mail, refuser dans tous les cas. - Ne pas marqueter au nom de Polytechnique.org plus d'une + Ne pas marqueter au nom de Polytechnique.org plus d'une fois par an."; // }}} // {{{ constructor @@ -55,7 +55,7 @@ class MarkReq extends Validate FROM auth_user_md5 AS u WHERE user_id = {?} GROUP BY u.user_id', $mark_id); - list ($this->m_nom, $this->m_prenom, $this->m_promo) = $res->fetchOneRow(); + list ($this->m_nom, $this->m_prenom, $this->m_promo) = $res->fetchOneRow(); } // }}} @@ -75,7 +75,7 @@ class MarkReq extends Validate // }}} // {{{ function _mail_subj - + protected function _mail_subj() { return "[Polytechnique.org] Marketing de {$this->m_prenom} {$this->m_nom} ({$this->m_promo})"; @@ -105,7 +105,7 @@ class MarkReq extends Validate if ($market == null) { return false; } - $market->send(); + $market->send(); return true; } diff --git a/include/validations/medals.inc.php b/include/validations/medals.inc.php index a742da5..e419e46 100644 --- a/include/validations/medals.inc.php +++ b/include/validations/medals.inc.php @@ -42,7 +42,7 @@ class MedalReq extends Validate // {{{ function formu() public function formu() - { + { return 'include/form.valid.medals.tpl'; } @@ -73,11 +73,11 @@ class MedalReq extends Validate { //var_dump($this); $r = XDB::query(" - SELECT IF (g.text IS NOT NULL, CONCAT(m.text,' - ', g.text), m.text) + SELECT IF (g.text IS NOT NULL, CONCAT(m.text,' - ', g.text), m.text) FROM profile_medals AS m LEFT JOIN profile_medals_grades AS g ON(g.mid = m.id AND g.gid = {?}) WHERE m.id = {?}", $this->gid, $this->mid); - return $r->fetchOneCell(); + return $r->fetchOneCell(); } // }}} diff --git a/include/validations/nl.inc.php b/include/validations/nl.inc.php index f9aff28..fe4114e 100644 --- a/include/validations/nl.inc.php +++ b/include/validations/nl.inc.php @@ -29,7 +29,7 @@ class NLReq extends Validate public $art; public $rules = "Laisser valider par le NL-MASTER"; - + // }}} // {{{ constructor @@ -68,7 +68,7 @@ class NLReq extends Validate // }}} // {{{ function _mail_subj - + protected function _mail_subj() { return "[Polytechnique.org/NL] Proposition d'article dans la NL"; diff --git a/include/validations/nomusage.inc.php b/include/validations/nomusage.inc.php index cdfa4ee..5c01b0c 100644 --- a/include/validations/nomusage.inc.php +++ b/include/validations/nomusage.inc.php @@ -35,10 +35,10 @@ class UsageReq extends Validate public $homonyme; public $reason; - - public $rules = "Refuser - tout ce qui n'est visiblement pas un nom de famille (ce qui est - extremement rare car à peu près n'importe quoi peut être un nom de + + public $rules = "Refuser + tout ce qui n'est visiblement pas un nom de famille (ce qui est + extremement rare car à peu près n'importe quoi peut être un nom de famille...)"; // }}} diff --git a/include/validations/orange.inc.php b/include/validations/orange.inc.php index f7a0402..f734421 100644 --- a/include/validations/orange.inc.php +++ b/include/validations/orange.inc.php @@ -29,9 +29,9 @@ class OrangeReq extends Validate public $promo; public $promo_sortie; - + public $rules = "A priori accepter (la validation sert à repousser les - petits malins). Refuse si tu connais la personne et que tu es sure + petits malins). Refuse si tu connais la personne et que tu es sure qu'elle n'est pas orange."; // }}} @@ -42,7 +42,7 @@ class OrangeReq extends Validate parent::__construct($_uid, true, 'orange'); $this->promo_sortie = $_sortie; $res = XDB::query("SELECT promo FROM auth_user_md5 WHERE user_id = {?}", $_uid); - $this->promo = $res->fetchOneCell(); + $this->promo = $res->fetchOneCell(); } // }}} diff --git a/include/validations/paiements.inc.php b/include/validations/paiements.inc.php index 7e7f96b..54a01ba 100644 --- a/include/validations/paiements.inc.php +++ b/include/validations/paiements.inc.php @@ -24,7 +24,7 @@ class PayReq extends Validate { // {{{ properties - + public $titre; public $site; @@ -77,7 +77,7 @@ class PayReq extends Validate $where = "%".$wassoid."%".$wevt."%"; return $where; } - + // }}} // {{{ function accept() @@ -96,9 +96,9 @@ class PayReq extends Validate return true; } - // }}} - // {{{ function submit() - + // }}} + // {{{ function submit() + // supprime les demandes de paiments pour le meme evenement public function submit() { @@ -160,7 +160,7 @@ class PayReq extends Validate // }}} // {{{ function commit() - + public function commit() { global $globals; @@ -174,7 +174,7 @@ class PayReq extends Validate $id, $this->titre, $this->site, $this->montant, $this->montant_min, $this->montant_max, $this->bestalias."@".$globals->mail->domain, $this->msg_reponse, $this->asso_id); - if ($this->asso_id && $this->evt) + if ($this->asso_id && $this->evt) $ret = XDB::execute("UPDATE groupex.evenements SET paiement_id = {?} WHERE asso_id = {?} AND eid = {?}", $id, $this->asso_id, $this->evt); return $ret; diff --git a/include/validations/photos.inc.php b/include/validations/photos.inc.php index 9010dea..c62cff7 100644 --- a/include/validations/photos.inc.php +++ b/include/validations/photos.inc.php @@ -54,7 +54,7 @@ class PhotoReq extends Validate private function read(PlUpload &$upload) { - $this->valid = $upload->resizeImage(240, 300, 160, 0, SIZE_MAX); + $this->valid = $upload->resizeImage(240, 300, 160, 0, SIZE_MAX); if (!$this->valid) { $this->trig('Le fichier que tu as transmis n\'est pas une image valide, ou est trop gros pour être traité'); } @@ -62,7 +62,7 @@ class PhotoReq extends Validate list($this->x, $this->y, $this->mimetype) = $upload->imageInfo(); $upload->rm(); } - + // }}} // {{{ function isValid() diff --git a/include/validations/surveys.inc.php b/include/validations/surveys.inc.php index 7c26267..c0be8bb 100644 --- a/include/validations/surveys.inc.php +++ b/include/validations/surveys.inc.php @@ -54,7 +54,7 @@ class SurveyReq extends Validate // }}} // {{{ function _mail_subj - + protected function _mail_subj() { return "[Polytechnique.org/SONDAGES] Proposition de sondage"; diff --git a/include/vcard.inc.php b/include/vcard.inc.php index 52d6905..f357f74 100644 --- a/include/vcard.inc.php +++ b/include/vcard.inc.php @@ -87,7 +87,7 @@ class VCardIterator implements PlIterator S::v('uid'), $user['forlife'].'@'.$globals->mail->domain, $user['forlife'].'@'.$globals->mail->domain2); - + $user['virtualalias'] = $res->fetchOneCell(); $user['gpxs_vcardjoin'] = join(',', array_map(array('VCard', 'text_encode'), $user['gpxs_name'])); $user['binets_vcardjoin'] = join(',', array_map(array('VCard', 'text_encode'), $user['binets'])); diff --git a/include/webservices/manageurs.server.inc.php b/include/webservices/manageurs.server.inc.php index 8fbd891..50a5854 100644 --- a/include/webservices/manageurs.server.inc.php +++ b/include/webservices/manageurs.server.inc.php @@ -75,7 +75,7 @@ function get_annuaire_infos($method, $params) { $i++; } } - + // on rajoute les numéros de tél $adrid_index = array(); foreach ($array['adresse'] as $i => $a) $adrid_index[$a['adrid']] = $i; @@ -89,10 +89,10 @@ function get_annuaire_infos($method, $params) { foreach ($array['adresse'] as $i => $adr) { unset($lasttel); foreach($adr['tels'] as $j => $t){ - if (!isset($array['adresse'][$i]['tel']) && (strpos($t['tel_type'], 'Tél') === 0)) $array['adresse'][$i]['tel'] = $t['tel']; + if (!isset($array['adresse'][$i]['tel']) && (strpos($t['tel_type'], 'Tél') === 0)) $array['adresse'][$i]['tel'] = $t['tel']; elseif (!isset($array['adresse'][$i]['fax']) && (strpos($t['tel_type'], 'Fax') === 0)) $array['adresse'][$i]['fax'] = $t['tel']; else $lasttel = $t['tel']; - if (isset($array['adresse'][$i]['tel']) && isset($array['adresse'][$i]['fax'])) break; + if (isset($array['adresse'][$i]['tel']) && isset($array['adresse'][$i]['fax'])) break; } if (!isset($array['adresse'][$i]['tel']) && isset($lasttel)) $array['adresse'][$i]['tel'] = $lasttel; @@ -137,9 +137,9 @@ function get_annuaire_infos($method, $params) { $args = array("erreur" => 1, "erreurstring" => $error_mat); $reply = xmlrpc_encode_request(NULL,$args); } - - return $reply; -} + + return $reply; +} function get_nouveau_infos($method, $params) { global $error_mat, $error_key, $globals; @@ -149,14 +149,14 @@ function get_nouveau_infos($method, $params) { $res = XDB::query( "SELECT a.nom, a.nom_usage,a.prenom, FIND_IN_SET('femme', a.flags) as femme ,a.deces!= 0 as decede , - a.naissance, a.promo, concat(al.alias, '@m4x.org') as mail + a.naissance, a.promo, concat(al.alias, '@m4x.org') as mail FROM auth_user_md5 AS a INNER JOIN aliases as al ON a.user_id=al.id WHERE al.flags='bestalias' and a.matricule = {?}",$params[1]); $data=$res->fetchOneAssoc(); //$data['mail'].='@polytechnique.org'; - + //on commence le cryptage des donnees if (manageurs_encrypt_init($params[1]) == 1) {//on a pas trouve la cle pour crypter $args = array("erreur" => 3, "erreurstring" => $error_key); diff --git a/include/wiki.inc.php b/include/wiki.inc.php index aa0c654..ae81f03 100644 --- a/include/wiki.inc.php +++ b/include/wiki.inc.php @@ -180,7 +180,7 @@ function wiki_delete_page($pagename) return false; } $file = wiki_work_dir().'/'.wiki_filename($pagename_dots); - $cachefile = wiki_work_dir().'/cache_'.$pagename_dots.'.tpl'; + $cachefile = wiki_work_dir().'/cache_'.$pagename_dots.'.tpl'; if (is_file($cachefile)) { unlink($cachefile); } @@ -227,7 +227,7 @@ function wiki_rename_page($pagename, $newname, $changeLinks = true) } $groupname = substr($pagename_dots, 0, strpos($pagename_dots,'.')); $newgroupname = substr($newname_dots, 0, strpos($pagename_dots,'.')); - + $file = wiki_work_dir().'/'.wiki_filename($pagename_dots); $newfile = wiki_work_dir().'/'.wiki_filename($newname_dots); if (!is_file($file)) { diff --git a/include/wiki/engine.php b/include/wiki/engine.php index 08d7572..dfd587f 100644 --- a/include/wiki/engine.php +++ b/include/wiki/engine.php @@ -35,7 +35,7 @@ switch (Env::v('action')) { case 'rss': case 'atom': case 'sdf': case 'dc': wiki_apply_feed_perms($perms[0]); $feed = true; - case '': case 'search': + case '': case 'search': break; case 'edit': @@ -135,7 +135,7 @@ if (!Env::v('action')) { $url = '/' . str_replace('.', '/', $n) . '?action=rss'; if (S::logged()) { $url .= '&user=' . S::v('forlife') . '&hash=' . S::v('core_rss_hash'); - } + } $page->setRssLink($n, $url); } diff --git a/include/wiki/farmconfig.php b/include/wiki/farmconfig.php index a4adf9d..b867000 100644 --- a/include/wiki/farmconfig.php +++ b/include/wiki/farmconfig.php @@ -18,7 +18,7 @@ $InterMapFiles[] = $globals->spoolroot.'/configs/pmwiki.intermap.txt'; $Skin = 'empty'; @include_once("$FarmD/cookbook/e-protect.php"); -include_once($FarmD.'/scripts/xlpage-utf-8.php'); +include_once($FarmD.'/scripts/xlpage-utf-8.php'); ResolvePageName(); if ($action == 'rss' || $action == 'atom' || $action == 'rdf' || $action == 'dc') { @@ -49,16 +49,16 @@ $GUIButtons['ul'] = array(530, '\\n* ', '\\n', '$[Unordered list]', $GUIButtons['hr'] = array(540, '\\n----\\n', '', '', '$GUIButtonDirUrlFmt/hr.gif"$[Horizontal rule]"'); $GUIButtons['table'] = array(600, - '||border=1 width=80%\\n||!Hdr ||!Hdr ||!Hdr ||\\n|| || || ||\\n|| || || ||\\n', '', '', + '||border=1 width=80%\\n||!Hdr ||!Hdr ||!Hdr ||\\n|| || || ||\\n|| || || ||\\n', '', '', '$GUIButtonDirUrlFmt/table.gif"$[Table]"'); // set default author $Author = $_SESSION['forlife'].'|'.$_SESSION['prenom'].' '.$_SESSION['nom']; $InputTags['e_form'] = array( - ':html' => "
"
"); // set profiles to point to plat/al fiche @@ -76,9 +76,9 @@ Markup('restorelinks','<%%',"//", ''); ## [[#anchor]] in standard XHTML Markup('[[#','<[[','/(?>\\[\\[#([A-Za-z][-.:\\w]*))\\]\\]/e', "Keep(\"\",'L')"); - + Markup('tablebicol', 'assign('is_logged', S::logged()); - if ($globals->asso('id')) { + if ($globals->asso('id')) { $this->assign('asso', $globals->asso()); $this->setType($globals->asso('cat')); $this->assign('is_admin', may_update()); $this->assign('is_member', is_member()); } } - + // }}} // {{{ function setType @@ -85,9 +85,9 @@ class XnetPage extends PlatalPage $sub = array(); $sub['liste des groupes'] = 'plan'; $sub['documentation'] = 'Xnet'; - $sub['signaler un bug'] = array('href' => 'send_bug', 'class' => 'popup_840x600'); + $sub['signaler un bug'] = array('href' => 'send_bug', 'class' => 'popup_840x600'); $menu["no_title"] = $sub; - + if (S::logged() && $globals->asso()) { $sub = array(); $dim = $globals->asso('diminutif'); diff --git a/include/xnet/session.inc.php b/include/xnet/session.inc.php index 3fbeac4..2159954 100644 --- a/include/xnet/session.inc.php +++ b/include/xnet/session.inc.php @@ -23,7 +23,7 @@ class XnetSession { // {{{ function init - public static function init() + public static function init() { global $globals; @@ -104,7 +104,7 @@ class XnetSession // }}} // {{{ doAuthX - public static function doAuthX() + public static function doAuthX() { global $globals, $page; @@ -159,7 +159,7 @@ class XnetSession // {{{ killSuid public static function killSuid() - { + { if (!S::has('suid')) { return; } @@ -211,7 +211,7 @@ function may_update($force = false, $lose = false) /** Get membership informations for the current asso * @param force Force membership to be read from database * @param lose Force membership to be false - */ + */ function is_member($force = false, $lose = false) { if (!isset($_SESSION['is_member'])) { diff --git a/include/xorg.misc.inc.php b/include/xorg.misc.inc.php index 1a22f22..96db292 100644 --- a/include/xorg.misc.inc.php +++ b/include/xorg.misc.inc.php @@ -52,13 +52,13 @@ function quoted_printable_encode($input, $line_max = 76) return trim($output); } -/** vérifie si une adresse email convient comme adresse de redirection +/** vérifie si une adresse email convient comme adresse de redirection * @param $email l'adresse email a verifier * @return BOOL */ function isvalid_email_redirection($email) { - return isvalid_email($email) && + return isvalid_email($email) && !preg_match("/@(polytechnique\.(org|edu)|melix\.(org|net)|m4x\.org)$/", $email); } @@ -83,7 +83,7 @@ function rand_token($len = 22) /** genere une chaine aleatoire convenable pour une url * @param $len longueur souhaitée, 22 par défaut - * @return la chaine aleatoire + * @return la chaine aleatoire */ function rand_url_id($len = 22) { @@ -108,11 +108,11 @@ $lc_convert = array('é' => 'e', 'è' => 'e', 'ë' => 'e', 'ê' => 'e', 'ô' => 'o', 'ö' => 'o', 'ò' => 'o', 'ó' => 'o', 'õ' => 'o', 'ø' => 'o', 'ú' => 'u', 'ù' => 'u', 'û' => 'u', 'ü' => 'u', 'ç' => 'c', 'ñ' => 'n'); -$uc_convert = array('É' => 'E', 'È' => 'E', 'Ë' => 'E', 'Ê' => 'E', - 'Á' => 'A', 'À' => 'A', 'Ä' => 'A', 'Â' => 'A', 'Å' => 'A', 'Ã' => 'A', - 'Ï' => 'I', 'Î' => 'I', 'Ì' => 'I', 'Í' => 'I', - 'Ô' => 'O', 'Ö' => 'O', 'Ò' => 'O', 'Ó' => 'O', 'Õ' => 'O', 'Ø' => 'O', - 'Ú' => 'U', 'Ù' => 'U', 'Û' => 'U', 'Ü' => 'U', +$uc_convert = array('É' => 'E', 'È' => 'E', 'Ë' => 'E', 'Ê' => 'E', + 'Á' => 'A', 'À' => 'A', 'Ä' => 'A', 'Â' => 'A', 'Å' => 'A', 'Ã' => 'A', + 'Ï' => 'I', 'Î' => 'I', 'Ì' => 'I', 'Í' => 'I', + 'Ô' => 'O', 'Ö' => 'O', 'Ò' => 'O', 'Ó' => 'O', 'Õ' => 'O', 'Ø' => 'O', + 'Ú' => 'U', 'Ù' => 'U', 'Û' => 'U', 'Ü' => 'U', 'Ç' => 'C', 'Ñ' => 'N'); function replace_accent($string) @@ -173,28 +173,28 @@ function soundex_fr($sIn) $accents['Ç'] = 'S'; $accents['¿'] = 'E'; } - // Si il n'y a pas de mot, on sort immédiatement - if ( $sIn === '' ) return ' '; - // On supprime les accents + // Si il n'y a pas de mot, on sort immédiatement + if ( $sIn === '' ) return ' '; + // On supprime les accents $sIn = strtr( $sIn, $accents); - // On met tout en minuscule - $sIn = strtoupper( $sIn ); - // On supprime tout ce qui n'est pas une lettre - $sIn = preg_replace( '`[^A-Z]`', '', $sIn ); - // Si la chaîne ne fait qu'un seul caractère, on sort avec. - if ( strlen( $sIn ) === 1 ) return $sIn . ' '; - // on remplace les consonnances primaires + // On met tout en minuscule + $sIn = strtoupper( $sIn ); + // On supprime tout ce qui n'est pas une lettre + $sIn = preg_replace( '`[^A-Z]`', '', $sIn ); + // Si la chaîne ne fait qu'un seul caractère, on sort avec. + if ( strlen( $sIn ) === 1 ) return $sIn . ' '; + // on remplace les consonnances primaires $sIn = str_replace( $convGuIn, $convGuOut, $sIn ); // on supprime les lettres répétitives $sIn = preg_replace( '`(.)\1`', '$1', $sIn ); // on réinterprète les voyelles $sIn = preg_replace( $convVIn, $convVOut, $sIn); - // on supprime les terminaisons T, D, S, X (et le L qui précède si existe) + // on supprime les terminaisons T, D, S, X (et le L qui précède si existe) $sIn = preg_replace( '`L?[TDSX]$`', '', $sIn ); // on supprime les E, A et Y qui ne sont pas en première position $sIn = preg_replace( '`(?!^)Y([^AEOU]|$)`', '\1', $sIn); $sIn = preg_replace( '`(?!^)[EA]`', '', $sIn); - return substr( $sIn . ' ', 0, 4); + return substr( $sIn . ' ', 0, 4); } /** met les majuscules au debut de chaque atome du prénom @@ -284,9 +284,9 @@ function check_redirect($red = null) require_once 'emails.inc.php'; if (is_null($red)) { $red = new Redirect(S::v('uid')); - } + } $_SESSION['no_redirect'] = !$red->other_active(''); - $_SESSION['mx_failures'] = $red->get_broken_mx(); + $_SESSION['mx_failures'] = $red->get_broken_mx(); } function send_warning_mail($title) diff --git a/include/xorg/session.inc.php b/include/xorg/session.inc.php index 265d2c0..6e8b3e8 100644 --- a/include/xorg/session.inc.php +++ b/include/xorg/session.inc.php @@ -25,7 +25,7 @@ class XorgSession { // {{{ public static function init - public static function init() + public static function init() { S::init(); if (!S::has('uid')) { @@ -158,7 +158,7 @@ class XorgSession * @param page the calling page (by reference) */ public static function doAuthCookie() - + { if (S::logged()) { return true; diff --git a/modules/admin.php b/modules/admin.php index dbc30fc..99e594a 100644 --- a/modules/admin.php +++ b/modules/admin.php @@ -396,12 +396,12 @@ class AdminModule extends PLModule LEFT JOIN aliases AS a ON (a.id = u.user_id AND type= 'a_vie') WHERE u.user_id = {?}", $login); } else { - $r = XDB::query("SELECT *, a.alias AS forlife, + $r = XDB::query("SELECT *, a.alias AS forlife, FIND_IN_SET('watch', u.flags) AS watch, FIND_IN_SET('femme', u.flags) AS sexe, (year(naissance) > promo - 15 or year(naissance) < promo - 25) AS naiss_err FROM auth_user_md5 AS u INNER JOIN aliases AS a ON ( a.id = u.user_id AND a.alias={?} AND type!='homonyme' )", $login); - } + } $mr = $r->fetchOneAssoc(); if (!is_numeric($login)) { //user has a forlife @@ -435,7 +435,7 @@ class AdminModule extends PLModule XDB::execute("UPDATE emails SET rewrite = '' WHERE uid = {?} AND rewrite LIKE CONCAT({?}, '@%')", - $mr['user_id'], $val); + $mr['user_id'], $val); fix_bestalias($mr['user_id']); $page->trig($val." a été supprimé"); } @@ -552,7 +552,7 @@ class AdminModule extends PLModule $res = XDB::query($watch); $new_fields = $res->fetchOneAssoc(); - + $mailer = new PlMailer("admin/mail_intervention.tpl"); $mailer->assign("user", S::v('forlife')); $mailer->assign('old', $old_fields); @@ -633,7 +633,7 @@ class AdminModule extends PLModule { if (Env::has('promo')) { if(Env::i('promo') > 1900 && Env::i('promo') < 2050) { - $action = Env::v('valid_promo') == 'Ajouter des membres' ? 'add' : 'ax'; + $action = Env::v('valid_promo') == 'Ajouter des membres' ? 'add' : 'ax'; pl_redirect('admin/promo/' . $action . '/' . Env::i('promo')); } else { $page->trig('Promo non valide'); @@ -963,7 +963,7 @@ class AdminModule extends PLModule } } } - + if ($action == 'delete' && $wikipage != '') { if (wiki_delete_page($wikipage)) { $page->trig("La page ".$wikipage." a été supprimée."); @@ -971,7 +971,7 @@ class AdminModule extends PLModule $page->trig("Impossible de supprimer la page ".$wikipage."."); } } - + if ($action == 'rename' && $wikipage != '' && $wikipage2 != '' && $wikipage != $wikipage2) { if ($changedLinks = wiki_rename_page($wikipage, $wikipage2)) { $s = 'La page '.$wikipage.' a été déplacée en '.$wikipage2.'.'; @@ -1018,9 +1018,9 @@ class AdminModule extends PLModule } function handler_ipwatch(&$page, $action = 'list', $ip = null) - { + { $page->changeTpl('admin/ipwatcher.tpl'); - + $states = array('safe' => 'Ne pas surveiller', 'unsafe' => 'Surveiller les inscriptions', 'dangerous' => 'Surveiller tous les accès', @@ -1033,15 +1033,15 @@ class AdminModule extends PLModule Xdb::execute('INSERT IGNORE INTO ip_watch (ip, state, detection, last, uid, description) VALUES ({?}, {?}, CURDATE(), NOW(), {?}, {?})', trim(Post::v('ipN')), Post::v('stateN'), S::i('uid'), Post::v('descriptionN')); - }; - break; - - case 'edit': - Xdb::execute('UPDATE ip_watch + }; + break; + + case 'edit': + Xdb::execute('UPDATE ip_watch SET state = {?}, last = NOW(), uid = {?}, description = {?} WHERE ip = {?}', Post::v('stateN'), S::i('uid'), Post::v('descriptionN'), Post::v('ipN')); break; - + default: if ($action == 'delete' && !is_null($ip)) { Xdb::execute('DELETE FROM emails_watch WHERE ip = {?}', $ip); @@ -1085,7 +1085,7 @@ class AdminModule extends PLModule $sql = "SELECT w.detection, w.state, w.last, w.description, a1.alias AS edit, a2.alias AS forlife, s.host FROM ip_watch AS w - LEFT JOIN aliases AS a1 ON (a1.id = w.uid AND a1.type = 'a_vie') + LEFT JOIN aliases AS a1 ON (a1.id = w.uid AND a1.type = 'a_vie') LEFT JOIN logger.sessions AS s ON (w.ip = s.ip) LEFT JOIN aliases AS a2 ON (a2.id = s.uid AND a2.type = 'a_vie') WHERE w.ip = {?} @@ -1111,7 +1111,7 @@ class AdminModule extends PLModule $page->assign('ip', $props); } } - + function handler_icons(&$page) { $page->changeTpl('admin/icons.tpl'); diff --git a/modules/auth.php b/modules/auth.php index 3781291..e4c8b89 100644 --- a/modules/auth.php +++ b/modules/auth.php @@ -180,7 +180,7 @@ class AuthModule extends PLModule $table_editor->describe('privkey','clé privée',false); $table_editor->describe('datafields','champs renvoyés',true); $table_editor->apply($page, $action, $id); - } + } } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: diff --git a/modules/auth/auth.inc.php b/modules/auth/auth.inc.php index e8502a7..bcd8b5b 100644 --- a/modules/auth/auth.inc.php +++ b/modules/auth/auth.inc.php @@ -56,7 +56,7 @@ function gpex_make($chlg, $privkey, $datafields, $charset) if (isset($_GET['group'])) { $res = XDB::query("SELECT perms FROM groupex.membres - INNER JOIN groupex.asso ON(id = asso_id) + INNER JOIN groupex.asso ON(id = asso_id) WHERE uid = {?} AND diminutif = {?}", S::v('uid'), $_GET['group']); $perms = $res->fetchOneCell(); diff --git a/modules/axletter.php b/modules/axletter.php index 945a55b..7c8c936 100644 --- a/modules/axletter.php +++ b/modules/axletter.php @@ -217,7 +217,7 @@ class AXLetterModule extends PLModule $select .= "\n"; } $page->assign('echeance_time', $select); - } + } } function handler_cancel(&$page, $force = null) @@ -319,7 +319,7 @@ class AXLetterModule extends PLModule INNER JOIN auth_user_md5 AS u USING(user_id) INNER JOIN aliases AS a ON (u.user_id = a.id AND a.type = 'a_vie')"); $page->assign('admins', $res); - + $importer = new CSVImporter('axletter_ins'); $importer->registerFunction('user_id', 'email vers Id X.org', array($this, 'idFromMail')); $importer->forceValue('hash', array($this, 'createHash')); @@ -344,7 +344,7 @@ class AXLetterModule extends PLModule $user = $email; $domain = $globals->mail->domain2; } else { - list($user, $domain) = explode('@', $email); + list($user, $domain) = explode('@', $email); } if ($domain != $globals->mail->domain && $domain != $globals->mail->domain2 && $domain != $globals->mail->alias_dom && $domain != $globals->mail->alias_dom2) { diff --git a/modules/axletter/axletter.inc.php b/modules/axletter/axletter.inc.php index af34cac..386eb26 100644 --- a/modules/axletter/axletter.inc.php +++ b/modules/axletter/axletter.inc.php @@ -113,7 +113,7 @@ class AXLetter extends MassMailer WHERE ni.last < {?} AND {$this->subscriptionWhere()} AND (e.email IS NOT NULL OR ni.user_id = 0) GROUP BY u.user_id"; - } + } static public function subscriptionState($uid = null) { @@ -122,8 +122,8 @@ class AXLetter extends MassMailer FROM axletter_ins WHERE user_id={?}", $user); return $res->fetchOneCell(); - } - + } + static public function unsubscribe($uid = null, $hash = false) { $user = is_null($uid) ? S::v('uid') : $uid; @@ -177,7 +177,7 @@ class AXLetter extends MassMailer if (!is_numeric($uid)) { $res = XDB::query("SELECT id FROM aliases WHERE alias = {?}", $uid); $uid = $res->fetchOneCell(); - } + } if (!$uid) { return false; } @@ -222,16 +222,16 @@ class AXLetter extends MassMailer } static public function listSent() - { + { $res = XDB::query("SELECT IF(shortname IS NULL, id, shortname) as id, date, subject AS titre FROM axletter WHERE NOT (FIND_IN_SET('new', bits)) ORDER BY date DESC"); return $res->fetchAllAssoc(); } - + static public function listAll() - { + { $res = XDB::query("SELECT IF(shortname IS NULL, id, shortname) as id, date, subject AS titre FROM axletter ORDER BY date DESC"); diff --git a/modules/banana.php b/modules/banana.php index 9bd9988..891b505 100644 --- a/modules/banana.php +++ b/modules/banana.php @@ -83,7 +83,7 @@ class BananaModule extends PLModule { $req = XDB::query(" SELECT nom,mail,sig,if(FIND_IN_SET('threads',flags),'1','0'), - IF(FIND_IN_SET('automaj',flags),'1','0') + IF(FIND_IN_SET('automaj',flags),'1','0') FROM forums.profils WHERE uid = {?}", S::v('uid')); if (!(list($nom,$mail,$sig,$disp,$maj) = $req->fetchOneRow())) { diff --git a/modules/bandeau.php b/modules/bandeau.php index 4f77b0c..87fa509 100644 --- a/modules/bandeau.php +++ b/modules/bandeau.php @@ -36,7 +36,7 @@ class BandeauModule extends PLModule readfile('../htdocs/images/x.png'); exit(); } - + function handler_html(&$page, $login = '') { $page->changeTpl('skin/common.bandeau.tpl', NO_SKIN); @@ -49,7 +49,7 @@ class BandeauModule extends PLModule readfile('../htdocs/css/bandeau.css'); exit(); } - + } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: diff --git a/modules/core.php b/modules/core.php index cc0c4f6..ac99545 100644 --- a/modules/core.php +++ b/modules/core.php @@ -94,7 +94,7 @@ class CoreModule extends PLModule if (isset($_SESSION['log'])) { $_SESSION['log']->log("suid_start", "login by ".S::v('forlife')); - } + } $_SESSION['suid'] = $_SESSION; $_SESSION['perms'] =& XorgSession::make_perms($level); diff --git a/modules/email.php b/modules/email.php index 1350ec7..356d32c 100644 --- a/modules/email.php +++ b/modules/email.php @@ -79,7 +79,7 @@ class EmailModule extends PLModule "SELECT alias FROM virtual AS v INNER JOIN virtual_redirect AS vr USING(vid) - WHERE (redirect={?} OR redirect={?}) + WHERE (redirect={?} OR redirect={?}) AND alias LIKE '%@{$globals->mail->alias_dom}'", $forlife.'@'.$globals->mail->domain, $forlife.'@'.$globals->mail->domain2); $page->assign('melix', $res->fetchOneCell()); @@ -115,7 +115,7 @@ class EmailModule extends PLModule FROM auth_user_quick, virtual INNER JOIN virtual_redirect USING(vid) WHERE ( redirect={?} OR redirect= {?} ) - AND alias LIKE '%@{$globals->mail->alias_dom}' AND user_id = {?}", + AND alias LIKE '%@{$globals->mail->alias_dom}' AND user_id = {?}", $forlife.'@'.$globals->mail->domain, $forlife.'@'.$globals->mail->domain2, S::v('uid')); list($alias, $visibility) = $res->fetchOneRow(); @@ -241,7 +241,7 @@ class EmailModule extends PLModule FROM virtual INNER JOIN virtual_redirect USING(vid) WHERE (redirect={?} OR redirect={?}) - AND alias LIKE '%@{$globals->mail->alias_dom}'", + AND alias LIKE '%@{$globals->mail->alias_dom}'", $forlife.'@'.$globals->mail->domain, $forlife.'@'.$globals->mail->domain2); $melix = $res->fetchOneCell(); if ($melix) { @@ -454,7 +454,7 @@ L'équipe d'administration mail->domain . '>'; "SELECT e1.uid, e1.panne != 0 AS panne, count(e2.uid) AS nb_mails, u.nom, u.prenom, u.promo, a.alias AS forlife FROM emails as e1 - LEFT JOIN emails as e2 ON(e1.uid = e2.uid + LEFT JOIN emails as e2 ON(e1.uid = e2.uid AND FIND_IN_SET('active', e2.flags) AND e1.email != e2.email) INNER JOIN auth_user_md5 as u ON(e1.uid = u.user_id) @@ -546,7 +546,7 @@ L'équipe d'administration mail->domain . '>'; $sql = "SELECT w.detection, w.state, w.last, w.description, a1.alias AS edit, a2.alias AS forlife FROM emails_watch AS w - LEFT JOIN aliases AS a1 ON (a1.id = w.uid AND a1.type = 'a_vie') + LEFT JOIN aliases AS a1 ON (a1.id = w.uid AND a1.type = 'a_vie') LEFT JOIN emails AS e ON (w.email = e.email) LEFT JOIN aliases AS a2 ON (a2.id = e.uid AND a2.type = 'a_vie') WHERE w.email = {?} @@ -573,7 +573,7 @@ L'équipe d'administration mail->domain . '>'; function handler_lost(&$page, $action = 'list', $email = null) { $page->changeTpl('emails/lost.tpl'); - + $page->assign('lost_emails', XDB::iterator(' SELECT u.user_id, a.alias FROM auth_user_md5 AS u diff --git a/modules/events.php b/modules/events.php index e29b7f2..67e6abd 100644 --- a/modules/events.php +++ b/modules/events.php @@ -76,7 +76,7 @@ class EventsModule extends PLModule } while ($priority && !$res->numRows()); if (!$res->numRows()) { return null; - } + } return $res->fetchOneAssoc(); } @@ -86,7 +86,7 @@ class EventsModule extends PLModule // annonces promos triées par présence d'une limite sur les promos // puis par dates croissantes d'expiration $promo = S::v('promo'); - $uid = S::i('uid'); + $uid = S::i('uid'); $sql = "SELECT e.id,e.titre, ev.user_id IS NULL AS nonlu FROM evenements AS e LEFT JOIN evenements_vus AS ev ON (e.id = ev.evt_id AND ev.user_id = {?}) @@ -181,7 +181,7 @@ class EventsModule extends PLModule // cache les evenements lus et raffiche les evenements a relire if ($action == 'read' && $eid) { XDB::execute('DELETE evenements_vus.* - FROM evenements_vus AS ev + FROM evenements_vus AS ev INNER JOIN evenements AS e ON e.id = ev.evt_id WHERE peremption < NOW()'); XDB::execute('REPLACE INTO evenements_vus VALUES({?},{?})', @@ -245,11 +245,11 @@ class EventsModule extends PLModule } function handler_rss(&$page, $user = null, $hash = null) - { + { require_once 'rss.inc.php'; - + $uid = init_rss('events/rss.tpl', $user, $hash); - + $rss = XDB::iterator( 'SELECT e.id, e.titre, e.texte, e.creation_date, e.post_id, p.attachmime IS NOT NULL AS photo, IF(u2.nom_usage = "", u2.nom, u2.nom_usage) AS nom, u2.prenom, u2.promo @@ -286,7 +286,7 @@ class EventsModule extends PLModule { $page->changeTpl('events/submit.tpl'); $page->addJsLink('ajax.js'); - + require_once('wiki.inc.php'); wiki_require_page('Xorg.Annonce'); @@ -363,7 +363,7 @@ class EventsModule extends PLModule } } - function handler_admin_events(&$page, $action = 'list', $eid = null) + function handler_admin_events(&$page, $action = 'list', $eid = null) { $page->changeTpl('events/admin.tpl'); $page->addJsLink('ajax.js'); @@ -401,12 +401,12 @@ class EventsModule extends PLModule $flags->addFlag('important'); } else { $flags->rmFlag('important'); - } + } XDB::execute('UPDATE evenements - SET creation_date = creation_date, + SET creation_date = creation_date, titre={?}, texte={?}, peremption={?}, promo_min={?}, promo_max={?}, flags = {?} - WHERE id = {?}', + WHERE id = {?}', Post::v('titre'), Post::v('texte'), Post::v('peremption'), Post::v('promo_min'), Post::v('promo_max'), $flags->flags(), $eid); @@ -416,7 +416,7 @@ class EventsModule extends PLModule $eid, $type, $x, $y, $upload->getContents()); $upload->rm(); } - } + } } if ($action == 'edit') { @@ -444,7 +444,7 @@ class EventsModule extends PLModule $month=substr($p_stamp,4,2); $day=substr($p_stamp,6,2); - $select .= "\n"; } @@ -500,7 +500,7 @@ class EventsModule extends PLModule } $page->assign('arch', $arch); $page->assign('admin_evts', true); - } + } } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: diff --git a/modules/geoloc.php b/modules/geoloc.php index cc437ea..d9d7358 100644 --- a/modules/geoloc.php +++ b/modules/geoloc.php @@ -43,28 +43,28 @@ class GeolocModule extends PLModule $page->changeTpl('geoloc/admin.tpl'); require_once("geoloc.inc.php"); $page->assign('xorg_title','Polytechnique.org - Administration - Geolocalisation'); - + $nb_synchro = 0; - + if (Env::has('id') && is_numeric(Env::v('id'))) { if (synchro_city(Env::v('id'))) $nb_synchro ++; } - + if ($action == 'missinglat') { $res = XDB::iterRow("SELECT id FROM geoloc_city WHERE lat = 0 AND lon = 0"); while ($a = $res->next()) if (synchro_city($a[0])) $nb_synchro++; } - - if ($nb_synchro) + + if ($nb_synchro) $page->trig(($nb_synchro > 1)?($nb_synchro." villes ont été synchronisées"):"Une ville a été synchronisée"); - + $res = XDB::query("SELECT COUNT(*) FROM geoloc_city WHERE lat = 0 AND lon = 0"); $page->assign("nb_missinglat", $res->fetchOneCell()); } - + function handler_admin_dynamap(&$page, $action = false) { $page->changeTpl('geoloc/admin_dynamap.tpl'); - + if ($action == 'cities_not_on_map') { require_once('geoloc.inc.php'); if (!fix_cities_not_on_map(20)) @@ -72,31 +72,31 @@ class GeolocModule extends PLModule else $refresh = true; } - + if ($action == 'smallest_maps') { require_once('geoloc.inc.php'); set_smallest_levels(); } - + if ($action == 'precise_coordinates') { XDB::execute("UPDATE adresses AS a INNER JOIN geoloc_city AS c ON(a.cityid = c.id) SET a.glat = c.lat / 100000, a.glng = c.lon / 100000"); } - + if ($action == 'newmaps') { require_once('geoloc.inc.php'); if (!get_new_maps(Env::v('url'))) $page->trig("Impossible d'accéder aux nouvelles cartes"); } - + $countMissing = XDB::query("SELECT COUNT(*) FROM geoloc_city AS c LEFT JOIN geoloc_city_in_maps AS m ON(c.id = m.city_id) WHERE m.city_id IS NULL"); $missing = $countMissing->fetchOneCell(); - + $countNoSmallest = XDB::query("SELECT SUM(IF(infos = 'smallest',1,0)) AS n FROM geoloc_city_in_maps GROUP BY city_id ORDER BY n"); $noSmallest = $countNoSmallest->fetchOneCell() == 0; - + $countNoCoordinates = XDB::query("SELECT COUNT(*) FROM adresses WHERE cityid IS NOT NULL AND glat = 0 AND glng = 0"); $noCoordinates = $countNoCoordinates->fetchOneCell(); - + if (isset($refresh) && $missing) { $page->assign("xorg_extra_header", ""); } @@ -104,7 +104,7 @@ class GeolocModule extends PLModule $page->assign("no_smallest", $noSmallest); $page->assign("no_coordinates", $noCoordinates); } - + } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: diff --git a/modules/lists.php b/modules/lists.php index b2bacc0..89c21de 100644 --- a/modules/lists.php +++ b/modules/lists.php @@ -372,7 +372,7 @@ class ListsModule extends PLModule if (list($det) = $this->client->get_members($liste)) { if (substr($liste,0,5) != 'promo' && ($det['ins'] || $det['priv']) && !$det['own'] && ($det['sub'] < 2)) { - exit; + exit; } require_once('banana/ml.inc.php'); $banana = new MLBanana(S::v('forlife'), Array('listname' => $liste, 'domain' => $domain, 'action' => 'rss2')); @@ -437,7 +437,7 @@ class ListsModule extends PLModule } if (Env::has('sadd')) { pl_redirect('lists/moderate/'.$liste); - } + } } if (Post::has('moderate_mails') && Post::has('select_mails')) { diff --git a/modules/marketing.php b/modules/marketing.php index 1b62a06..b967df7 100644 --- a/modules/marketing.php +++ b/modules/marketing.php @@ -267,7 +267,7 @@ class MarketingModule extends PLModule } else { // On cherche les marketings précédents sur cette adresse // email, en se restreignant au dernier mois - + if (Marketing::get($uid, $email, true)) { $page->assign('already', true); } else { diff --git a/modules/newsletter.php b/modules/newsletter.php index d05c52a..3abc1ee 100644 --- a/modules/newsletter.php +++ b/modules/newsletter.php @@ -97,28 +97,28 @@ class NewsletterModule extends PLModule $page->changeTpl('newsletter/admin.tpl'); $page->assign('xorg_title','Polytechnique.org - Administration - Newsletter : liste'); require_once("newsletter.inc.php"); - + if($new) { Newsletter::create(); pl_redirect("admin/newsletter"); } - + $page->assign('nl_list', Newsletter::listAll()); } - + function handler_admin_nl_edit(&$page, $nid = 'last', $aid = null, $action = 'edit') { $page->changeTpl('newsletter/edit.tpl'); $page->addCssLink('nl.css'); - $page->assign('xorg_title','Polytechnique.org - Administration - Newsletter : Edition'); + $page->assign('xorg_title','Polytechnique.org - Administration - Newsletter : Edition'); require_once("newsletter.inc.php"); - + $nl = new NewsLetter($nid); - + if($action == 'delete') { $nl->delArticle($aid); pl_redirect("admin/newsletter/edit/$nid"); } - + if($aid == 'update') { $nl->_title = Post::v('title'); $nl->_title_mail= Post::v('title_mail'); @@ -132,14 +132,14 @@ class NewsletterModule extends PLModule pl_redirect('admin/newsletter/edit/' . $nl->_id); } } - + if(Post::v('save')) { $art = new NLArticle(Post::v('title'), Post::v('body'), Post::v('append'), $aid, Post::v('cid'), Post::v('pos')); $nl->saveArticle($art); pl_redirect("admin/newsletter/edit/$nid"); } - + if($action == 'edit' && $aid != 'update') { $eaid = $aid; if(Post::has('title')) { @@ -150,7 +150,7 @@ class NewsletterModule extends PLModule } $page->assign('art', $art); } - + $page->assign_by_ref('nl',$nl); } diff --git a/modules/payment.php b/modules/payment.php index 5ecc7f4..6cd2b14 100644 --- a/modules/payment.php +++ b/modules/payment.php @@ -85,7 +85,7 @@ class PaymentModule extends PLModule '%grp/payment/cyber_return' => $this->make_hook('cyber_return', AUTH_PUBLIC), '%grp/payment/paypal_return' => $this->make_hook('paypal_return', AUTH_PUBLIC), 'admin/payments' => $this->make_hook('admin', AUTH_MDP, 'admin'), - + ); } @@ -200,7 +200,7 @@ class PaymentModule extends PLModule WHERE rcb.id='$champ906'"); if (list($rcb_text, $c_id, $c_text) = $res->fetchOneRow()) { cb_erreur("erreur lors du paiement : $c_text ($c_id)"); - } else{ + } else{ cb_erreur("erreur inconnue lors du paiement"); } } @@ -337,12 +337,12 @@ class PaymentModule extends PLModule function handler_xnet_payment(&$page, $pid = null) { global $globals; - + if (!is_null($pid)) { return $this->handler_payment($page, $pid); } $page->changeTpl('payment/xnet.tpl'); - + $res = XDB::query( "SELECT id, text, url FROM {$globals->money->mpay_tprefix}paiements @@ -436,7 +436,7 @@ class PaymentModule extends PLModule $page->assign('trans', $trans); $page->assign('event', $event); } - + function handler_admin(&$page, $action = 'list', $id = null) { $page->assign('xorg_title','Polytechnique.org - Administration - Paiements'); $page->assign('title', 'Gestion des télépaiements'); @@ -453,7 +453,7 @@ class PaymentModule extends PLModule $table_editor->describe('mail','email contact',true); $table_editor->describe('confirmation','message confirmation',false); $table_editor->apply($page, $action, $id); - } + } } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: diff --git a/modules/payment/money.inc.php b/modules/payment/money.inc.php index ab32ff9..a79f03a 100644 --- a/modules/payment/money.inc.php +++ b/modules/payment/money.inc.php @@ -37,7 +37,7 @@ class Payment // }}} // {{{ constructor - + function Payment($ref=-1) { global $globals; @@ -46,7 +46,7 @@ class Payment FROM {$globals->money->mpay_tprefix}paiements WHERE id={?}", $r); list($this->id, $this->text, $this->url, $flags, $this->mail, $this->montant_min, $this->montant_max, $this->montant_def, $this->asso_id) = $res->fetchOneRow(); - + $this->montant_min = (float)$this->montant_min; $this->montant_max = (float)$this->montant_max; $this->flags = new Flagset($flags); @@ -54,7 +54,7 @@ class Payment // }}} // {{{ function check() - + function check($value) { $v = (float)strtr($value, ',', '.'); @@ -114,7 +114,7 @@ class PayMethod $i = $id==-1 ? $globals->money->mpay_def_meth : $id; $res = XDB::query("SELECT id,text,include FROM {$globals->money->mpay_tprefix}methodes WHERE id={?}", $i); list($this->id, $this->text, $this->inc) = $res->fetchOneRow(); - } + } // }}} } diff --git a/modules/payment/money/cyberpaiement.inc.php b/modules/payment/money/cyberpaiement.inc.php index ff37371..d031c9e 100644 --- a/modules/payment/money/cyberpaiement.inc.php +++ b/modules/payment/money/cyberpaiement.inc.php @@ -31,7 +31,7 @@ class CyberPayment // }}} // {{{ constructor - + function CyberPayment($val) { $this->val = strtr(sprintf("%.02f", (float)$val), '.', ','); diff --git a/modules/payment/money/paypal.inc.php b/modules/payment/money/paypal.inc.php index 9bc7b03..fb7fab4 100644 --- a/modules/payment/money/paypal.inc.php +++ b/modules/payment/money/paypal.inc.php @@ -27,12 +27,12 @@ class PayPal var $urlform; var $nomsite = "PayPal"; var $text; - + var $infos; // }}} // {{{ constructor - + function PayPal($val) { $this->val_number = $val; @@ -68,7 +68,7 @@ class PayPal 'return' => $roboturl, 'cn' => 'Commentaires', 'no_shipping' => 1, - 'cbt' => empty($GLOBALS['IS_XNET_SITE']) ? + 'cbt' => empty($GLOBALS['IS_XNET_SITE']) ? 'Revenir sur polytechnique.org' : 'Revenir sur polytechnique.net'); diff --git a/modules/platal.php b/modules/platal.php index e2de116..4ba4740 100644 --- a/modules/platal.php +++ b/modules/platal.php @@ -185,7 +185,7 @@ class PlatalModule extends PLModule $_SESSION['password'] = $password = Post::v('response2'); - XDB::execute('UPDATE auth_user_md5 + XDB::execute('UPDATE auth_user_md5 SET password={?} WHERE user_id={?}', $password, S::v('uid')); @@ -210,7 +210,7 @@ class PlatalModule extends PLModule { $page->changeTpl('platal/acces_smtp.tpl'); $page->assign('xorg_title','Polytechnique.org - Acces SMTP/NNTP'); - + require_once 'wiki.inc.php'; wiki_require_page('Xorg.SMTPSécurisé'); wiki_require_page('Xorg.NNTPSécurisé'); @@ -219,8 +219,8 @@ class PlatalModule extends PLModule $pass = Env::v('smtppass1'); $log = S::v('log'); - if (Env::v('op') == "Valider" && strlen($pass) >= 6 - && Env::v('smtppass1') == Env::v('smtppass2')) + if (Env::v('op') == "Valider" && strlen($pass) >= 6 + && Env::v('smtppass1') == Env::v('smtppass2')) { XDB::execute('UPDATE auth_user_md5 SET smtppass = {?} WHERE user_id = {?}', $pass, $uid); @@ -233,7 +233,7 @@ class PlatalModule extends PLModule $log->log("passwd_del"); } - $res = XDB::query("SELECT IF(smtppass != '', 'actif', '') + $res = XDB::query("SELECT IF(smtppass != '', 'actif', '') FROM auth_user_md5 WHERE user_id = {?}", $uid); $page->assign('actif', $res->fetchOneCell()); @@ -283,8 +283,8 @@ class PlatalModule extends PLModule $page->assign('ok', true); - $url = rand_url_id(); - XDB::execute('INSERT INTO perte_pass (certificat,uid,created) + $url = rand_url_id(); + XDB::execute('INSERT INTO perte_pass (certificat,uid,created) VALUES ({?},{?},NOW())', $url, $uid); $res = XDB::query('SELECT email FROM emails @@ -307,7 +307,7 @@ class PlatalModule extends PLModule Si en cliquant dessus tu n'y arrives pas, copie intégralement l'adresse dans la barre de ton navigateur. Si tu n'as pas utilisé ce lien dans six heures, tu peux tout simplement recommencer cette procédure. --- +-- Polytechnique.org \"Le portail des élèves & anciens élèves de l'Ecole polytechnique\" diff --git a/modules/profile.php b/modules/profile.php index 013199d..95ffb9d 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -130,7 +130,7 @@ class ProfileModule extends PLModule WHERE user_id = {?} AND type="photo"', S::v('uid')); } elseif (Env::v('cancel')) { - $sql = XDB::query('DELETE FROM requests + $sql = XDB::query('DELETE FROM requests WHERE user_id={?} AND type="photo"', S::v('uid')); } @@ -159,7 +159,7 @@ class ProfileModule extends PLModule if (is_numeric($x)) { $res = XDB::query( - "SELECT alias + "SELECT alias FROM aliases AS a INNER JOIN auth_user_md5 AS u ON (a.id=u.user_id AND a.type='a_vie') WHERE matricule={?}", $x); @@ -430,7 +430,7 @@ class ProfileModule extends PLModule } elseif ($promo_sortie == $promo + 3) { XDB::execute( - "UPDATE auth_user_md5 set promo_sortie={?} + "UPDATE auth_user_md5 set promo_sortie={?} WHERE user_id={?}", $promo_sortie, S::v('uid')); $page->trig('Ton statut "orange" a été supprimé.'); $page->assign('promo_sortie_old', $promo_sortie); @@ -552,20 +552,20 @@ class ProfileModule extends PLModule if ($where) { $where = join(' AND ', $where); - $set = new UserSet("INNER JOIN mentor AS m ON (m.uid = u.user_id) - LEFT JOIN mentor_pays AS mp ON (mp.uid = m.uid) + $set = new UserSet("INNER JOIN mentor AS m ON (m.uid = u.user_id) + LEFT JOIN mentor_pays AS mp ON (mp.uid = m.uid) LEFT JOIN mentor_secteurs AS ms ON (ms.uid = m.uid)", $where); $set->addMod('mentor', 'Référents'); $set->apply('referent/search', $page, $action, $subaction); if ($set->count() > 100) { - $page->assign('recherche_trop_large', true); + $page->assign('recherche_trop_large', true); } } - $page->changeTpl('profile/referent.tpl'); + $page->changeTpl('profile/referent.tpl'); } - function handler_ref_sect(&$page, $sect) + function handler_ref_sect(&$page, $sect) { header('Content-Type: text/html; charset=utf-8'); $page->changeTpl('include/field.select.tpl', NO_SKIN); @@ -573,7 +573,7 @@ class ProfileModule extends PLModule $page->assign('id', 'ssect_field'); $page->assign('name', 'ss_secteur'); $it = XDB::iterator("SELECT id,label AS field - FROM emploi_ss_secteur + FROM emploi_ss_secteur WHERE secteur = {?}", $sect); $page->assign('list', $it); } @@ -613,7 +613,7 @@ class ProfileModule extends PLModule $page->assign('usage_old', $usage_old); $page->assign('alias_old', $alias_old); - $nom_usage = replace_accent(trim(Env::v('nom_usage'))); + $nom_usage = replace_accent(trim(Env::v('nom_usage'))); $nom_usage = strtoupper($nom_usage); $page->assign('usage_req', $nom_usage); @@ -638,17 +638,17 @@ class ProfileModule extends PLModule { $page->changeTpl('profile/groupesx.tpl'); $page->assign('xorg_title', 'Polytechnique.org - Promo, Groupes X, Binets'); - + $req = XDB::query(' - SELECT m.asso_id, a.nom, diminutif, a.logo IS NOT NULL AS has_logo, + SELECT m.asso_id, a.nom, diminutif, a.logo IS NOT NULL AS has_logo, COUNT(e.eid) AS events, mail_domain AS lists - FROM groupex.membres AS m + FROM groupex.membres AS m INNER JOIN groupex.asso AS a ON(m.asso_id = a.id) LEFT JOIN groupex.evenements AS e ON(e.asso_id = m.asso_id AND e.archive = 0) WHERE uid = {?} GROUP BY m.asso_id ORDER BY a.nom', S::i('uid')); $page->assign('assos', $req->fetchAllAssoc()); } - + function handler_vcard(&$page, $x = null) { if (is_null($x)) { @@ -669,22 +669,22 @@ class ProfileModule extends PLModule $page->changeTpl('profile/admin_trombino.tpl'); $page->assign('xorg_title','Polytechnique.org - Administration - Trombino'); $page->assign('uid', $uid); - + $q = XDB::query( "SELECT a.alias,promo FROM auth_user_md5 AS u INNER JOIN aliases AS a ON ( u.user_id = a.id AND type='a_vie' ) WHERE user_id = {?}", $uid); list($forlife, $promo) = $q->fetchOneRow(); - + switch ($action) { - + case "original": header("Content-type: image/jpeg"); readfile("/home/web/trombino/photos".$promo."/".$forlife.".jpg"); exit; break; - + case "new": $data = file_get_contents($_FILES['userfile']['tmp_name']); list($x, $y) = getimagesize($_FILES['userfile']['tmp_name']); @@ -694,12 +694,12 @@ class ProfileModule extends PLModule "REPLACE INTO photo SET uid={?}, attachmime = {?}, attach={?}, x={?}, y={?}", $uid, $mimetype, $data, $x, $y); break; - + case "delete": XDB::execute('DELETE FROM photo WHERE uid = {?}', $uid); break; } - + $page->assign('forlife', $forlife); } function handler_admin_binets(&$page, $action = 'list', $id = null) { @@ -714,34 +714,34 @@ class ProfileModule extends PLModule $page->assign('xorg_title','Polytechnique.org - Administration - Formations'); $page->assign('title', 'Gestion des formations'); $table_editor = new PLTableEditor('admin/formations','applis_def','id'); - $table_editor->add_join_table('applis_ins','aid',true); + $table_editor->add_join_table('applis_ins','aid',true); $table_editor->describe('text','intitulé',true); $table_editor->describe('url','site web',false); $table_editor->apply($page, $action, $id); - } + } function handler_admin_groupesx(&$page, $action = 'list', $id = null) { $page->assign('xorg_title','Polytechnique.org - Administration - Groupes X'); $page->assign('title', 'Gestion des Groupes X'); $table_editor = new PLTableEditor('admin/groupes-x','groupesx_def','id'); - $table_editor->add_join_table('groupesx_ins','gid',true); + $table_editor->add_join_table('groupesx_ins','gid',true); $table_editor->describe('text','intitulé',true); $table_editor->describe('url','site web',false); $table_editor->apply($page, $action, $id); - } + } function handler_admin_sections(&$page, $action = 'list', $id = null) { $page->assign('xorg_title','Polytechnique.org - Administration - Sections'); $page->assign('title', 'Gestion des Sections'); $table_editor = new PLTableEditor('admin/sections','sections','id'); $table_editor->describe('text','intitulé',true); $table_editor->apply($page, $action, $id); - } + } function handler_admin_secteurs(&$page, $action = 'list', $id = null) { $page->assign('xorg_title','Polytechnique.org - Administration - Secteurs'); $page->assign('title', 'Gestion des Secteurs'); $table_editor = new PLTableEditor('admin/secteurs','emploi_secteur','id'); $table_editor->describe('label','intitulé',true); $table_editor->apply($page, $action, $id); - } + } function handler_admin_medals(&$page, $action = 'list', $id = null) { $page->assign('xorg_title','Polytechnique.org - Administration - Distinctions'); $page->assign('title', 'Gestion des Distinctions'); @@ -752,9 +752,9 @@ class ProfileModule extends PLModule $table_editor->apply($page, $action, $id); if ($id && $action == 'edit') { $page->changeTpl('profile/admin_decos.tpl'); - + $mid = $id; - + if (Post::v('act') == 'del') { XDB::execute('DELETE FROM profile_medals_grades WHERE mid={?} AND gid={?}', $mid, Post::i('gid')); } elseif (Post::v('act') == 'new') { @@ -768,7 +768,7 @@ class ProfileModule extends PLModule $res = XDB::iterator('SELECT gid, text, pos FROM profile_medals_grades WHERE mid={?} ORDER BY pos', $mid); $page->assign('grades', $res); } - } + } } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: diff --git a/modules/profile/assign_adresses.inc.php b/modules/profile/assign_adresses.inc.php index 8dfb88c..e9afd63 100644 --- a/modules/profile/assign_adresses.inc.php +++ b/modules/profile/assign_adresses.inc.php @@ -52,7 +52,7 @@ foreach($adresses as $adrid => $adr){ array('tel' => '', 'tel_pub' => 'private', 'tel_type' => 'Tél.', 'telid' => 0, 'new_tel' => true), array('tel' => '', 'tel_pub' => 'private', 'tel_type' => 'Fax', 'telid' => 1, 'new_tel' => true)); } elseif (count($adr['tels']) < $nb_tel_max) { - $adresses[$adrid]['tels'][] = + $adresses[$adrid]['tels'][] = array('tel' => '', 'tel_pub' => 'private', 'tel_type' => 'Autre', 'telid' => generate_new_telid($adr), 'new_tel' => true); } } diff --git a/modules/profile/assign_poly.inc.php b/modules/profile/assign_poly.inc.php index 318c43c..d423fa2 100644 --- a/modules/profile/assign_poly.inc.php +++ b/modules/profile/assign_poly.inc.php @@ -20,7 +20,7 @@ ***************************************************************************/ $uid = S::v('uid'); - + $res = XDB::query( "SELECT text,id FROM binets_ins, binets_def diff --git a/modules/profile/get_adresses.inc.php b/modules/profile/get_adresses.inc.php index a8d064b..2f653b0 100644 --- a/modules/profile/get_adresses.inc.php +++ b/modules/profile/get_adresses.inc.php @@ -40,7 +40,7 @@ function is_adr_empty($adrid){ break; } } - return ( + return ( ($adr['adr1'] == '') && ($adr['adr2'] == '') && ($adr['adr3'] == '') && ($adr['postcode'] == '') && ($adr['city'] == '') && ($adr['country'] == '00') && ($emptytel) @@ -114,7 +114,7 @@ $restels = XDB::iterator( t.adrid, telid, tel_type, t.tel_pub, t.tel FROM tels AS t INNER JOIN adresses AS a ON(t.uid = a.uid AND t.adrid = a.adrid) WHERE t.uid = {?} AND NOT FIND_IN_SET('pro',statut) ORDER BY t.adrid, tel_type DESC, telid" -, S::v('uid', -1) +, S::v('uid', -1) ); while ($tel = $restels->next()) { $adrid = $tel['adrid']; diff --git a/modules/profile/get_deco.inc.php b/modules/profile/get_deco.inc.php index 011873f..f0e658c 100644 --- a/modules/profile/get_deco.inc.php +++ b/modules/profile/get_deco.inc.php @@ -41,7 +41,7 @@ if (Post::has('grade')) { foreach (Post::v('grade') as $mid=>$gid) { XDB::execute('UPDATE profile_medals_sub SET gid={?} WHERE uid={?} AND mid={?}', $gid, S::v('uid'), $mid); } -} +} $res = XDB::query( "SELECT m.id, m.text AS medal, m.type, m.img, s.gid diff --git a/modules/profile/get_general.inc.php b/modules/profile/get_general.inc.php index d0fa5d6..8f7eadb 100644 --- a/modules/profile/get_general.inc.php +++ b/modules/profile/get_general.inc.php @@ -32,7 +32,7 @@ $sql = "SELECT u.nom, u.prenom, u.nom_ini, u.prenom_ini, u.promo, u.promo_sorti $result = XDB::query($sql, S::v('uid', -1)); list($nom, $prenom, $nom_ini, $prenom_ini, $promo, $promo_sortie, $nom_usage, $nationalite, - $mobile, $mobile_pub, $web, $web_pub, $freetext, $freetext_pub, $nickname, + $mobile, $mobile_pub, $web, $web_pub, $freetext, $freetext_pub, $nickname, $synchro_ax, $matricule_ax, $appli_id1,$appli_type1, $appli_id2,$appli_type2) = $result->fetchOneRow(); diff --git a/modules/profile/get_mentor.inc.php b/modules/profile/get_mentor.inc.php index 063231e..53d18a6 100644 --- a/modules/profile/get_mentor.inc.php +++ b/modules/profile/get_mentor.inc.php @@ -40,7 +40,7 @@ if(Post::v('mentor_pays_op', '') == 'retirer') { } //recuperation des pays -$res = XDB::iterRow("SELECT m.pid, p.pays +$res = XDB::iterRow("SELECT m.pid, p.pays FROM mentor_pays AS m LEFT JOIN geoloc_pays AS p ON(m.pid = p.a2) WHERE m.uid = {?} LIMIT {?}", S::v('uid', -1), $max_mentor_pays); $nb_mentor_pays = $res->total(); diff --git a/modules/profile/update_adresses.inc.php b/modules/profile/update_adresses.inc.php index b6b2d92..0ec632f 100644 --- a/modules/profile/update_adresses.inc.php +++ b/modules/profile/update_adresses.inc.php @@ -66,11 +66,11 @@ foreach ($adresses as $adrid => $adr) { $adr['cityid'], $adr['country'], $adr['region'], $adr['regiontxt'], $adr['pub'], $statut, S::v('uid', -1), $adrid); - $telsvalues = ""; + $telsvalues = ""; foreach ($adr['tels'] as $tel) { insert_new_tel($adrid, $tel); } - } else { + } else { //c'est une mise à jour XDB::execute("UPDATE adresses SET adr1 = {?}, adr2 = {?}, adr3 = {?}, postcode = {?}, city = {?}, cityid = {?}, diff --git a/modules/profile/verif_adresses.inc.php b/modules/profile/verif_adresses.inc.php index 675a759..953f2c1 100644 --- a/modules/profile/verif_adresses.inc.php +++ b/modules/profile/verif_adresses.inc.php @@ -56,7 +56,7 @@ function generate_new_telid($adr){ foreach($telid_array as $current_telid) if ($current_telid == $new_telid) $new_telid ++; - else + else return $new_telid;//s'ils sont differents, il y a un trou dans la liste des telid donc new_telid convient //si aucun convient, on retourne le plus grand des telid actuel + 1 return $new_telid; @@ -71,7 +71,7 @@ function replace_ifset_adr($varname, $i){ function replace_ifset_tel($varname, $i, $t){ $tab = Env::v($varname.$t, Array()); if (isset($tab[$i])) - $GLOBALS['adresses'][$i]['tels'][$t][$varname] = $tab[$i]; + $GLOBALS['adresses'][$i]['tels'][$t][$varname] = $tab[$i]; } function get_adr_arg($varname, $i) { @@ -102,7 +102,7 @@ function replace_address($i){ $adresses[$i]['nouvelle'] = 'ajout'; $adresses[$i]['adrid'] = $i; } - + replace_ifset_adr('secondaire', $i); set_flag_adr('courrier', $i); replace_ifset_adr('temporaire', $i); @@ -119,14 +119,14 @@ function replace_address($i){ replace_ifset_adr('country', $i); replace_ifset_adr('region', $i); replace_ifset_adr('pub', $i); - + for ($telid = 0; $telid <= $nb_tel_max; $telid++) { $tab = Env::v('telid'.$telid, Array()); if(isset($tab[$i])){ //ce telid etait donc present dans le formulaire replace_tel($i, $telid); } } - + if (!get_adr_arg('parsevalid', $i)) replace_ifset_adr('txt', $i); $tab = Env::v('numero_formulaire', Array()); if($tab[$i]) @@ -144,7 +144,7 @@ function geoloc_adresse($i) { $adresses[$i] = array_merge($adresses[$i], empty_address()); // localize new address $new = get_address_infos($adresses[$i]['txt']); - if (compare_addresses_text($adresses[$i]['txt'], $geotxt = get_address_text($new)) || get_adr_arg('parsevalid', $i)) + if (compare_addresses_text($adresses[$i]['txt'], $geotxt = get_address_text($new)) || get_adr_arg('parsevalid', $i)) $adresses[$i] = array_merge($adresses[$i], $new); else { $adresses[$i] = array_merge($adresses[$i], cut_address($adresses[$i]['txt'])); diff --git a/modules/profile/verif_general.inc.php b/modules/profile/verif_general.inc.php index 564f275..c3a2b6b 100644 --- a/modules/profile/verif_general.inc.php +++ b/modules/profile/verif_general.inc.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ - + function strmatch_whole_words($nouveau, $ancien) { $nouveau = strtoupper($nouveau); $ancien = strtoupper($ancien); diff --git a/modules/register.php b/modules/register.php index 19b1b25..c3e4a7b 100644 --- a/modules/register.php +++ b/modules/register.php @@ -48,7 +48,7 @@ class RegisterModule extends PLModule $sub_state['backs'][] = $state; if (count($sub_state['backs']) == 3) { $alert .= "Tentative d'inscription tres hesitante - "; - } + } } // Compatibility with old sources, keep it atm @@ -69,7 +69,7 @@ class RegisterModule extends PLModule $sub_state['nom'] = $nom; $sub_state['prenom'] = $prenom; $sub_state['ourmat'] = $ourmat; - $sub_state['watch'] = $watch; + $sub_state['watch'] = $watch; $sub_state['naissance_ini'] = $naiss; XDB::execute( @@ -362,7 +362,7 @@ class RegisterModule extends PLModule . " - ip : {$logger->ip} ({$logger->host})\n" . ($logger->proxy_ip ? " - proxy : {$logger->proxy_ip} ({$logger->proxy_host})\n" : ""); $mymail->setTxtBody($msg); - $mymail->send(); + $mymail->send(); } Marketing::clear($uid); diff --git a/modules/register/register.inc.php b/modules/register/register.inc.php index f96cce7..bd7dd83 100644 --- a/modules/register/register.inc.php +++ b/modules/register/register.inc.php @@ -31,7 +31,7 @@ function user_cmp($prenom, $nom, $_prenom, $_nom) $prenom = strtoupper(replace_accent($prenom)); $is_ok = strtoupper($_prenom) == strtoupper($prenom); - + $tokens = preg_split("/[ \-']/", $nom, -1, PREG_SPLIT_NO_EMPTY); $maxlen = 0; @@ -161,7 +161,7 @@ function create_aliases (&$sub) "envoie un mail à mail->domain}\">" . "support@{$globals->mail->domain} en expliquant ta situation."; } - + $res = XDB::query('SELECT id, type, expire FROM aliases WHERE alias={?}', $mailorg); if ( $res->numRows() ) { @@ -182,25 +182,25 @@ function create_aliases (&$sub) $mailer->addCc('"Support Polytechnique.org" mail->domain . '>'); $msg = "Bonjour,\n\n". - + "Un homonyme vient de s'inscrire. La politique de Polytechnique.org est de fournir des\n". "adresses mail devinables, nous ne pouvons donc pas conserver ton alias '$mailorg' qui\n". "correspond maintenant à deux personnes.\n\n". - + "Tu gardes tout de même l'usage de cet alias pour un mois encore à compter de ce jour.\n\n". - + "Lorsque cet alias sera désactivé, l'adresse $mailorg@polytechnique.org renverra vers un \n". "robot qui indiquera qu'il y a plusieurs personnes portant le même nom ;\n". "cela évite que l'un des homonymes reçoive des courriels destinés à l'autre.\n\n". - + "Pour te connecter au site, tu pourras utiliser comme identifiant n'importe lequel de tes\n". "autres alias :\n". " ".join(', ', $als)."\n"; "Commence dès aujourd'hui à communiquer à tes correspondants la nouvelle adresse que tu comptes utiliser !\n\n". - + "En nous excusant pour le désagrément occasionné,\n". "Cordialement,\n\n". - + "-- \n". "L'équipe de Polytechnique.org\n". "\"Le portail des élèves & anciens élèves de l'X\""; @@ -232,7 +232,7 @@ function finish_ins($sub_state) $pass = rand_pass(); $pass_encrypted = hash_encrypt($pass_clair); $hash = rand_url_id(12); - + XDB::execute('UPDATE auth_user_md5 SET last_known_email={?} WHERE matricule = {?}', $email, $mat); XDB::execute( diff --git a/modules/search.php b/modules/search.php index b4c4cca..a4cd481 100644 --- a/modules/search.php +++ b/modules/search.php @@ -145,7 +145,7 @@ class SearchModule extends PLModule } require_once dirname(__FILE__) . '/search/search.inc.php'; - $page->changeTpl('search/index.tpl'); + $page->changeTpl('search/index.tpl'); $page->assign('xorg_title','Polytechnique.org - Annuaire'); } @@ -165,7 +165,7 @@ class SearchModule extends PLModule $view->addMod('trombi', 'Trombinoscope', false, array('with_promo' => true)); $view->addMod('geoloc', 'Planisphère', false, array('with_annu' => 'search/adv')); $view->apply('search/adv', $page, $action, $subaction); - + if ($subaction) { return; } @@ -199,7 +199,7 @@ class SearchModule extends PLModule $_REQUEST['q']); if (!$q) exit(); - // try to look in cached results + // try to look in cached results $cache = XDB::query('SELECT `result` FROM `search_autocomplete` WHERE `name` = {?} AND @@ -210,7 +210,7 @@ class SearchModule extends PLModule echo $res; die(); } - + // default search $q = preg_quote($q); $unique = '`user_id`'; @@ -219,7 +219,7 @@ class SearchModule extends PLModule $beginwith = true; $field2 = false; $qsearch = $q; - + switch ($type) { case 'binetTxt': $db = '`binets_def` INNER JOIN @@ -314,7 +314,7 @@ class SearchModule extends PLModule $beginwith = false; break; case 'sectionTxt': - $db = '`sections` INNER JOIN + $db = '`sections` INNER JOIN `auth_user_md5` ON(`auth_user_md5`.`section` = `sections`.`id`)'; $field = '`sections`.`text`'; $realid = '`sections`.`id`'; @@ -362,7 +362,7 @@ class SearchModule extends PLModule echo $res; exit(); } - + function handler_list(&$page, $type = null, $idVal = null) { // Give the list of all values possible of type and builds a select input for it @@ -393,7 +393,7 @@ class SearchModule extends PLModule $db = '`groupesx_def`'; break; case 'nationalite': - $db = '`geoloc_pays` INNER JOIN + $db = '`geoloc_pays` INNER JOIN `auth_user_md5` ON (`geoloc_pays`.`a2` = `auth_user_md5`.`nationalite`)'; $field = 'IF(`nat`=\'\', `pays`, `nat`)'; $id = '`a2`'; @@ -401,7 +401,7 @@ class SearchModule extends PLModule case 'region': $db = '`geoloc_region`'; $field = '`name`'; - $id = '`region`'; + $id = '`region`'; if (isset($_REQUEST['country'])) { $where .= ' WHERE `a2` = "'.$_REQUEST['country'].'"'; } diff --git a/modules/search/classes.inc.php b/modules/search/classes.inc.php index 29d7163..edebc8c 100644 --- a/modules/search/classes.inc.php +++ b/modules/search/classes.inc.php @@ -38,7 +38,7 @@ require_once("xorg.misc.inc.php"); IF(n.nat=\'\',n.pays,n.nat) AS nat, n.a2 AS iso3166, COUNT(em.email) > 0 AS actif,'; // hide private information if not logged -if (S::logged()) +if (S::logged()) $globals->search->result_fields .=' q.profile_web AS web, q.profile_mobile AS mobile, @@ -138,7 +138,7 @@ class SField // }}} // {{{ function get_request() - /** récupérer la requête de l'utilisateur + /** récupérer la requête de l'utilisateur * on met une chaîne vide si le champ n'a pas été complété */ function get_request() { @@ -149,7 +149,7 @@ class SField // {{{ function get_where_statement() /** récupérer la clause correspondant au champ dans la clause WHERE de la requête - * on parcourt l'ensemble des champs de la bdd de $fieldDbName et on associe + * on parcourt l'ensemble des champs de la bdd de $fieldDbName et on associe * à chacun d'entre eux une clause spécifique * la clause totale et la disjonction de ces clauses spécifiques */ function get_where_statement() @@ -490,7 +490,7 @@ class MapSField extends RefSField $this->value = $this->mapId; $this->RefSField($_fieldFormName, $_fieldDbName, $_refTable, $_refAlias, $_refCondition, true, false); } - + function get_select_statement() { if ($this->mapId === '') return false; @@ -651,7 +651,7 @@ class PromoSField extends SField // }}} // {{{ constructor - /** constructeur + /** constructeur * compareField est un champ de formulaire très simple qui ne sert qu'à la construction de la * clause WHERE de la promo */ function PromoSField($_fieldFormName, $_compareFieldFormName, $_fieldDbName, $_fieldResultName) diff --git a/modules/search/search.inc.php b/modules/search/search.inc.php index 8334c36..dab3017 100644 --- a/modules/search/search.inc.php +++ b/modules/search/search.inc.php @@ -35,7 +35,7 @@ function advancedSearchFromInput() $firstnameField = new StringSField('firstname',array('u.prenom'),''); } $nicknameField = new StringSField('nickname',array('q.profile_nick'),''); - + $promo1Field = new PromoSField('promo1','egal1',array('u.promo'),''); $promo2Field = new PromoSField('promo2','egal2',array('u.promo'),''); $womanField = new RefSField('woman',array('FIND_IN_SET(\'femme\',u.flags)+1'),'','',''); @@ -53,17 +53,17 @@ function advancedSearchFromInput() $fonctionField = new RefSField('fonction',array('en.fonction'),'entreprises','en','u.user_id=en.uid'); $secteurField = new RefSField('secteur',array('fm.secteur'),'entreprises','fm','u.user_id=fm.uid'); $cvField = new RefSField('cv',array('u.cv'),'','','',false); - + $natField = new RefSField('nationalite',array('u.nationalite'),'','',''); $binetField = new RefSField('binet',array('b.binet_id'),'binets_ins','b','u.user_id=b.user_id'); $groupexField = new RefSField('groupex',array('g.gid'),'groupesx_ins','g','u.user_id=g.guid'); $sectionField = new RefSField('section',array('u.section'),'','',''); $schoolField = new RefSField('school',array('as.aid'),'applis_ins','`as`','u.user_id=as.uid'); $diplomaField = new RefSField('diploma',array('ad.type'),'applis_ins','ad','u.user_id=ad.uid'); - + $freeField = new RefSField('free',array('q.profile_freetext'),'','','',false); - - return array( + + return array( $nameField, $firstnameField, $nicknameField, $promo1Field, $promo2Field, $womanField, $subscriberField, $aliveField, $townField, $countryField, $regionField, $mapField, $entrepriseField, diff --git a/modules/stats.php b/modules/stats.php index 4887934..58ee7d1 100644 --- a/modules/stats.php +++ b/modules/stats.php @@ -68,7 +68,7 @@ class StatsModule extends PLModule TO_DAYS(date_ins)-TO_DAYS(NOW()), ".(-($jours+1)).") AS jour, COUNT(user_id) AS nb - FROM auth_user_md5 + FROM auth_user_md5 WHERE perms IN ('admin','user') GROUP BY jour"); @@ -188,7 +188,7 @@ EOF2; TO_DAYS(date_ins)-TO_DAYS(NOW()), ".(-($jours+1)).") AS jour, COUNT(user_id) AS nb - FROM auth_user_md5 + FROM auth_user_md5 WHERE promo = {?} AND perms IN ('admin','user') GROUP BY jour", $promo); diff --git a/modules/survey.php b/modules/survey.php index 6ee4676..65ed987 100644 --- a/modules/survey.php +++ b/modules/survey.php @@ -359,7 +359,7 @@ class SurveyModule extends PLModule } // }}} } // }}} - + // {{{ function handler_ajax() : some ajax in editing a new question (for now, there may be a little more later) function handler_ajax(&$page, $type) { @@ -442,7 +442,7 @@ class SurveyModule extends PLModule } } // }}} - + // {{{ function show_confirm() : calls the template to display a confirm form function show_confirm(&$page, $message, $formaction, $formhidden = null) { diff --git a/modules/xnet.php b/modules/xnet.php index 4fceb21..d57101a 100644 --- a/modules/xnet.php +++ b/modules/xnet.php @@ -56,7 +56,7 @@ class XnetModule extends PLModule } exit; } - + function handler_index(&$page) { $page->nomenu = true; @@ -197,7 +197,7 @@ class XnetModule extends PLModule $page->setType($cat); } - + function handler_autologin(&$page) { $allkeys = func_get_args(); diff --git a/modules/xnetevents/xnetevents.inc.php b/modules/xnetevents/xnetevents.inc.php index 1fbd64a..73af616 100644 --- a/modules/xnetevents/xnetevents.inc.php +++ b/modules/xnetevents/xnetevents.inc.php @@ -40,7 +40,7 @@ function get_event_detail($eid, $item_id = false) LEFT JOIN groupex.evenements_participants AS ep ON(e.eid = ep.eid AND ei.item_id = ep.item_id) LEFT JOIN virtual AS al ON(al.type = 'evt' AND al.alias = CONCAT(short_name, {?})) LEFT JOIN virtual AS pl ON(pl.type = 'evt' AND pl.alias = CONCAT(short_name, {?})) - WHERE (e.eid = {?} OR e.short_name = {?}) AND ei.item_id = {?} AND e.asso_id = {?} + WHERE (e.eid = {?} OR e.short_name = {?}) AND ei.item_id = {?} AND e.asso_id = {?} GROUP BY ei.item_id", '-absents@'.$globals->xnet->evts_domain, '-participants@'.$globals->xnet->evts_domain, @@ -126,7 +126,7 @@ function get_event_participants($evt, $item_id, $tri, $limit = '') { IF(m.origine != 'X',m.sexe,FIND_IN_SET('femme', u.flags)) AS femme, m.perms='admin' AS admin, (m.origine = 'X') AS x, - ep.uid, SUM(ep.paid) AS paid, SUM(nb) AS nb + ep.uid, SUM(ep.paid) AS paid, SUM(nb) AS nb FROM groupex.evenements_participants AS ep INNER JOIN groupex.evenements AS e ON (ep.eid = e.eid) LEFT JOIN groupex.membres AS m ON ( ep.uid = m.uid AND e.asso_id = m.asso_id) diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index 918101e..0c29632 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -46,7 +46,7 @@ function get_infos($email) WHERE user_id = {?}", $user['uid']); $user = array_merge($user, $res->fetchOneAssoc()); } - return $user; + return $user; } elseif ($dom == 'polytechnique.org' || $dom == 'm4x.org') { $res = XDB::query( "SELECT user_id AS uid, u.promo, @@ -122,7 +122,7 @@ class XnetGrpModule extends PLModule XDB::query('DELETE r.* FROM groupex.announces_read AS r INNER JOIN groupex.announces AS a ON a.id = r.announce_id - WHERE peremption < CURRENT_DATE()'); + WHERE peremption < CURRENT_DATE()'); XDB::query('INSERT INTO groupex.announces_read VALUES ({?}, {?})', Env::i('read'), S::i('uid')); @@ -170,7 +170,7 @@ class XnetGrpModule extends PLModule $page->setRssLink("Polytechnique.net :: {$globals->asso("nom")} :: News", 'rss/'.S::v('forlife') .'/'.S::v('core_rss_hash').'/rss.xml'); } - + $page->register_modifier('wiki_to_html', array('MiniWiki','WikiToHTML')); $page->assign('articles', $arts); @@ -430,7 +430,7 @@ class XnetGrpModule extends PLModule LEFT JOIN emails AS e ON ( e.flags = 'active' AND e.uid = m.uid) WHERE m.asso_id = {?} $ini AND (m.origine != 'X' OR u.perms != 'pending' OR m.email IS NOT NULL) - GROUP BY m.uid + GROUP BY m.uid ORDER BY $tri LIMIT {?},{?}", $globals->asso('id'), $ofs*NB_PER_PAGE, NB_PER_PAGE); $page->assign('ann', $ann); @@ -446,7 +446,7 @@ class XnetGrpModule extends PLModule { pl_redirect('annuaire/geoloc'); } - + function handler_vcard(&$page, $photos = null) { global $globals; @@ -582,7 +582,7 @@ class XnetGrpModule extends PLModule { if (Env::has('right') && (may_update() || S::has('suid'))) { switch (Env::v('right')) { - case 'admin': + case 'admin': XnetSession::killSuid(); break; case 'anim': @@ -591,7 +591,7 @@ class XnetGrpModule extends PLModule is_member(true); break; case 'member': - XnetSession::doSelfSuid(); + XnetSession::doSelfSuid(); may_update(false, true); is_member(true); break; @@ -698,7 +698,7 @@ class XnetGrpModule extends PLModule $market = new Marketing($uid, $email, 'group', $globals->asso('nom'), Env::v('market_from'), S::v('uid')); $market->add(); - } + } } XDB::execute('INSERT INTO groupex.membres (uid, asso_id, origine, email) VALUES ({?}, {?}, "X", {?})', @@ -1017,9 +1017,9 @@ class XnetGrpModule extends PLModule $promo_min = ($art['public'] ? 0 : $art['promo_min']); $promo_max = ($art['public'] ? 0 : $art['promo_max']); if (is_null($aid)) { - $fulltext = $art['texte']; - if (!empty($art['contact_html'])) { - $fulltext .= "\n\n'''Contacts :'''\\\\\n" . $art['contact_html']; + $fulltext = $art['texte']; + if (!empty($art['contact_html'])) { + $fulltext .= "\n\n'''Contacts :'''\\\\\n" . $art['contact_html']; } $post = null; if ($globals->asso('forum')) { @@ -1062,7 +1062,7 @@ class XnetGrpModule extends PLModule } if (Post::v('valid') == 'Enregistrer' || Post::v('valid') == 'Annuler') { pl_redirect(""); - } + } if (empty($art) && !is_null($aid)) { $res = XDB::query("SELECT a.*, u.nom, u.prenom, u.promo, l.alias AS forlife, @@ -1088,7 +1088,7 @@ class XnetGrpModule extends PLModule if ($events->total()) { $page->assign('events', $events); } - } + } $art['contact_html'] = @MiniWiki::WikiToHTML($art['contact_html']); $page->assign('art', $art); diff --git a/modules/xnetgrp/mail.inc.php b/modules/xnetgrp/mail.inc.php index a56719f..d20ec27 100644 --- a/modules/xnetgrp/mail.inc.php +++ b/modules/xnetgrp/mail.inc.php @@ -24,9 +24,9 @@ function get_all_redirects($membres, $mls, &$client) { global $globals; - + $tos = array(); - + if (!empty($membres)) { $membres = array_map(create_function('$str', 'return "\"$str\"";'), $membres); $membres = join(',', $membres); @@ -82,7 +82,7 @@ function _send_xnet_mail($user, $body, $wiki, $mailer, $replyto = null) $nom = isset($user['nom']) ? $user['nom'] : ""; $pnom = isset($user['prenom']) ? $user['prenom'] : preg_replace('!@.*!u', '', $user['email']); $to = isset($user['prenom']) ? "\"{$user['prenom']} {$user['nom']}\" <{$user['email']}>" : $user['email']; - + $text = $body; $text = preg_replace('!!i', $cher, $text); $text = preg_replace('!!i', $nom, $text); diff --git a/plugins/block.tidy.php b/plugins/block.tidy.php index 20aeb0d..ffa414c 100644 --- a/plugins/block.tidy.php +++ b/plugins/block.tidy.php @@ -41,7 +41,7 @@ $tidy_config = array( * File: block.min_perms.php * Type: block * Name: min_perms - * Purpose: + * Purpose: * ------------------------------------------------------------- */ function smarty_block_tidy($params, $content, &$smarty) diff --git a/plugins/function.display_address.php b/plugins/function.display_address.php index c498d90..25c991e 100644 --- a/plugins/function.display_address.php +++ b/plugins/function.display_address.php @@ -30,8 +30,8 @@ function display_address_isIdentity($idt, $value, $test_reverse = true) return true; } - if ($test_reverse) { - return display_address_isIdentity($idt, implode(' ', array_reverse(explode(' ', $value))), false); + if ($test_reverse) { + return display_address_isIdentity($idt, implode(' ', array_reverse(explode(' ', $value))), false); } return false; } @@ -82,7 +82,7 @@ function smarty_function_display_address($param, &$smarty) if ($param['adr']['mobile']) $txthtml .= "
\nTél : \n".$param['adr']['mobile']."\n
\n"; if ($param['adr']['tels'] && count($param['adr']['tels'])) { - foreach ($param['adr']['tels'] as $tel) + foreach ($param['adr']['tels'] as $tel) $txthtml .= "
\n".$tel['tel_type']." : \n".$tel['tel']."\n
\n"; } if (!$param['nodiv']) { diff --git a/plugins/function.select_db_table.php b/plugins/function.select_db_table.php index 7c598e8..edea562 100644 --- a/plugins/function.select_db_table.php +++ b/plugins/function.select_db_table.php @@ -28,8 +28,8 @@ function select_options($table,$valeur,$champ="text",$pad=false, $order = $champ; if ($group) { $fields .= ',' . $group; - $order = $group . ',' . $order; - } + $order = $group . ',' . $order; + } $sql = "SELECT $fields FROM $table AS t $join $where ORDER BY $order"; $res = XDB::iterRow($sql); $sel = ' selected="selected"'; @@ -48,7 +48,7 @@ function select_options($table,$valeur,$champ="text",$pad=false, $html .= ''; $optgrp = $my_grp; } - $html .= sprintf("\n", + $html .= sprintf("\n", $my_id, ($valeur==$my_id?$sel:""), $my_text); } if (!is_null($optgrp)) { diff --git a/plugins/insert.getNbIns.php b/plugins/insert.getNbIns.php index bd7e7f5..f19ff89 100644 --- a/plugins/insert.getNbIns.php +++ b/plugins/insert.getNbIns.php @@ -21,11 +21,11 @@ /* * Smarty plugin - * ------------------------------------------------------------- + * ------------------------------------------------------------- * File: insert.getNbIns.php * Type: insert * Name: getNbIns - * Purpose: + * Purpose: * ------------------------------------------------------------- */ function smarty_insert_getNbIns($params, &$smarty) diff --git a/plugins/insert.getNbNotifs.php b/plugins/insert.getNbNotifs.php index de4501f..3da1aad 100644 --- a/plugins/insert.getNbNotifs.php +++ b/plugins/insert.getNbNotifs.php @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ - + function smarty_insert_getNbNotifs($params, &$smarty) { if(S::logged()) { diff --git a/plugins/insert.getUserName.php b/plugins/insert.getUserName.php index ca14209..cacb67a 100644 --- a/plugins/insert.getUserName.php +++ b/plugins/insert.getUserName.php @@ -40,7 +40,7 @@ function smarty_insert_getUsername() FROM virtual AS v INNER JOIN virtual_redirect USING(vid) INNER JOIN aliases AS a ON(id={?} AND a.type='a_vie') - WHERE redirect = CONCAT(a.alias, {?}) + WHERE redirect = CONCAT(a.alias, {?}) OR redirect = CONCAT(a.alias, {?})", $id, "@".$globals->mail->domain, "@".$globals->mail->domain2); $alias = $res->fetchOneCell(); diff --git a/plugins/insert.mkStats.php b/plugins/insert.mkStats.php index 9acdb4b..0133eee 100644 --- a/plugins/insert.mkStats.php +++ b/plugins/insert.mkStats.php @@ -22,11 +22,11 @@ /* * Smarty plugin - * ------------------------------------------------------------- + * ------------------------------------------------------------- * File: insert.mkStats.php * Type: insert * Name: mkStats - * Purpose: + * Purpose: * ------------------------------------------------------------- */ function smarty_insert_mkStats($params, &$smarty) diff --git a/upgrade/0.9.14/connect.db.inc.php b/upgrade/0.9.14/connect.db.inc.php deleted file mode 120000 index 442fab7..0000000 --- a/upgrade/0.9.14/connect.db.inc.php +++ /dev/null @@ -1 +0,0 @@ -../../bin/connect.db.inc.php \ No newline at end of file diff --git a/upgrade/0.9.14/connect.db.inc.php b/upgrade/0.9.14/connect.db.inc.php new file mode 100644 index 0000000..1cade25 --- /dev/null +++ b/upgrade/0.9.14/connect.db.inc.php @@ -0,0 +1,31 @@ +baseurl = "https://www.polytechnique.org"; +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: +?> -- 2.1.4