From 787bb3d745141f2f85bd947ad7dd775d2c63f908 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Mon, 27 Aug 2007 23:19:38 +0200 Subject: [PATCH] Merge branch 'master' of /home/git/platal into profile_edit Conflicts: htdocs/css/keynote.css modules/profile/get_general.inc.php modules/profile/verif_general.inc.php Signed-off-by: Florent Bruneau --- 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 ++-- bin/devel/xhtml.classes.pl | 4 +- bin/lists.mhonarc_by_month.pl | 6 +-- bin/lists.rpc.py | 2 +- 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/css/ax.css | 2 +- htdocs/css/default.css | 2 +- htdocs/css/espace.css | 4 +- htdocs/css/humlinux.css | 4 +- htdocs/css/keynote.css | 12 +++--- htdocs/css/linux.css | 4 +- htdocs/css/nbviolet.css | 2 +- htdocs/css/openweb.css | 46 ++++++++++----------- htdocs/css/spectral.css | 8 ++-- htdocs/css/trapped.css | 12 +++--- htdocs/css/wiki.css | 18 ++++---- 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/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_mentor.inc.php | 2 +- modules/profile/update_adresses.inc.php | 4 +- modules/profile/verif_adresses.inc.php | 12 +++--- 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.0.0_to_0.9.0/new_newsletter.sh | 2 +- upgrade/0.0.0_to_0.9.0/to_mailman.py | 4 +- upgrade/0.9.14/connect.db.inc.php | 32 +++++++++++++- upgrade/0.9.2/update.sh | 2 +- upgrade/0.9.3/update.sh | 2 +- upgrade/0.9.4/update.sh | 2 +- 130 files changed, 677 insertions(+), 598 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/bin/devel/xhtml.classes.pl b/bin/devel/xhtml.classes.pl index f0524ef..2b66b6e 100755 --- a/bin/devel/xhtml.classes.pl +++ b/bin/devel/xhtml.classes.pl @@ -91,7 +91,7 @@ sub parse_tag($$) { if($tag =~ / (checked|disabled|multiple|readonly)( |$)/); print STDERR "${red}XHTML error: ${yel}attribut $1 ${blu}($file)${gra}\n" if($tag =~ / (align|width|border|color|valign)=/); - + # récupération des classes utilisées ... if($tag =~ /^(\w+).* class=('{[^}]*}'|"{[^}]*}"|'[^{}']*'|"[^{}"]*")/) { my $t = lc($1); @@ -102,7 +102,7 @@ sub parse_tag($$) { foreach my $cl (@cycle) { &class_add($file,$t,$cl) if($cl); } - } else { + } else { &class_add($file,$t,$c); } } diff --git a/bin/lists.mhonarc_by_month.pl b/bin/lists.mhonarc_by_month.pl index c1b41d1..330434f 100755 --- a/bin/lists.mhonarc_by_month.pl +++ b/bin/lists.mhonarc_by_month.pl @@ -13,7 +13,7 @@ my $list = shift; # ################################################################################ # CONSTANTS -# +# my $spool = "/var/spool/platal/archives/"; my $tmpbox = "mytmpbox.mbox"; @@ -64,13 +64,13 @@ while(<>) { # dummy init $odir = 1; } - + $m = $conv{$1}; $y = $2; open FILE,"> $tmpbox"; } } - + print FILE $line; } diff --git a/bin/lists.rpc.py b/bin/lists.rpc.py index 4c07c5e..ea7e412 100755 --- a/bin/lists.rpc.py +++ b/bin/lists.rpc.py @@ -172,7 +172,7 @@ def quote(s, is_header=False): else: h = s h = str('').join(re.split('[\x00-\x08\x0B-\x1f]+', h)) - return Utils.uquote(h.replace('&', '&').replace('>', '>').replace('<', '<')) + return Utils.uquote(h.replace('&', '&').replace('>', '>').replace('<', '<')) def to_forlife(email): try: 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/css/ax.css b/htdocs/css/ax.css index 560c205..d1254d3 100644 --- a/htdocs/css/ax.css +++ b/htdocs/css/ax.css @@ -89,7 +89,7 @@ div.ax_mail div.body h2 { color : #a40000; border-width : 0 0 thin 0; border-style : dotted; - border-color : #a40000; + border-color : #a40000; } div.ax_mail div.signature { diff --git a/htdocs/css/default.css b/htdocs/css/default.css index 2957cc6..21e3537 100644 --- a/htdocs/css/default.css +++ b/htdocs/css/default.css @@ -277,7 +277,7 @@ div.long td.rt { width: 65%; } 6 Profil [ onglets des profils ] *******************************************************************************/ - + table.flags { margin: 1em 0em 0em 0em; } diff --git a/htdocs/css/espace.css b/htdocs/css/espace.css index 4048436..2ecad1c 100644 --- a/htdocs/css/espace.css +++ b/htdocs/css/espace.css @@ -122,7 +122,7 @@ td.conteneur_tab { #onglet li { background-color: #ddddff; border-color: #2f006f; -} +} #onglet li:hover { background-color: #2f006f; @@ -171,7 +171,7 @@ td.conteneur_tab { float: right; padding-right: 0.2em; } - + #fiche_identite div.contact { border-color: #2f006f; background-color: #eeeeff; diff --git a/htdocs/css/humlinux.css b/htdocs/css/humlinux.css index 10b57b7..c462e83 100644 --- a/htdocs/css/humlinux.css +++ b/htdocs/css/humlinux.css @@ -30,7 +30,7 @@ fieldset { legend { background-color: #dddddd; } - + /******************************************************************************* 2 Styles

,

, ,
  • @@ -90,7 +90,7 @@ div.contact div.long { background-repeat: repeat-y; background-position: top left; } - + #body-logo { border-top: none; border-bottom: none; diff --git a/htdocs/css/keynote.css b/htdocs/css/keynote.css index 6fa6dc3..3c1a22c 100644 --- a/htdocs/css/keynote.css +++ b/htdocs/css/keynote.css @@ -39,7 +39,7 @@ a:hover { color: #999; } img { vertical-align: middle; } a img { border: 0px; } td { vertical-align: top; } -li { padding-left: 3px; padding-right: 3px; +li { padding-left: 3px; padding-right: 3px; text-align: justify; } hr { text-align: center; } dt { font-weight: bold; } @@ -191,7 +191,7 @@ table.tinybicol th, table.bicol th { } table.tinybicol tr:first-child th, table.bicol tr:first-child th { - color: #fff; + color: #fff; background: url('../images/skins/keynote_title.gif') #000 top left repeat-x; } @@ -483,8 +483,8 @@ td.conteneur_tab { #fiche_identite div.civilite { text-align: center; font-weight: bold; - width: 80%; - float: left; + width: 80%; + float: left; color: #fff; background: inherit; padding-top: 0.5ex; @@ -518,7 +518,7 @@ td.conteneur_tab { #fiche_identite div.email { - clear: left; + clear: left; float: left; } @@ -530,7 +530,7 @@ td.conteneur_tab { #fiche_identite div.formation { margin: 0em 1em; - clear: both; + clear: both; } div.adresse { diff --git a/htdocs/css/linux.css b/htdocs/css/linux.css index 9edcabc..f0e79b5 100644 --- a/htdocs/css/linux.css +++ b/htdocs/css/linux.css @@ -34,7 +34,7 @@ legend { border: 1px #777777 solid; color: inherit; } - + /******************************************************************************* 2 Styles

    ,

    , ,
  • @@ -49,7 +49,7 @@ h1 a:link, h1 a:visited, h1 a:active { h1 a:hover { color: #cccccc; } - + h1 { color: #eeeeee; background-color: #444444; diff --git a/htdocs/css/nbviolet.css b/htdocs/css/nbviolet.css index 0492410..7fc0ae9 100644 --- a/htdocs/css/nbviolet.css +++ b/htdocs/css/nbviolet.css @@ -98,7 +98,7 @@ table.tinybicol th, table.bicol th { #skin td.skigauche { background-color: #efddff; } - + /******************************************************************************* 5 Contacts [ Styles liés à l'affichage de contacts ] diff --git a/htdocs/css/openweb.css b/htdocs/css/openweb.css index 482b3a1..f0f9d9a 100644 --- a/htdocs/css/openweb.css +++ b/htdocs/css/openweb.css @@ -268,7 +268,7 @@ div.long td.rt { width: 65%; } 6 Profil [ onglets des profils ] *******************************************************************************/ - + table.flags { margin: 1em 0em 0em 0em; } @@ -507,33 +507,33 @@ div.adresse div.titre { color: purple; } .backtrace:hover div.hide { display: block } .backtrace h1 { margin: 0px; } -#suid { - color: red; - background: #ffc0cb; - width: auto; - font-weight: bold; - text-align: center; -} -#suid a { - color: red; - background: inherit; - text-decoration: none; - display: block; -} -#suid:hover { - color: red; - background: #ffffcb; -} -#suid a:hover { - color: #ff7000; - background: inherit; -} +#suid { + color: red; + background: #ffc0cb; + width: auto; + font-weight: bold; + text-align: center; +} +#suid a { + color: red; + background: inherit; + text-decoration: none; + display: block; +} +#suid:hover { + color: red; + background: #ffffcb; +} +#suid a:hover { + color: #ff7000; + background: inherit; +} table#body { color: #000; background: #fff; border: 3px solid #000; - + width: 900px; margin: 1em auto; } diff --git a/htdocs/css/spectral.css b/htdocs/css/spectral.css index a897a22..9c5ddfc 100644 --- a/htdocs/css/spectral.css +++ b/htdocs/css/spectral.css @@ -47,7 +47,7 @@ h1 a:link, h1 a:visited, h1 a:active { h1 a:hover { color: #cccccc; } - + h1 { color: #eeeeee; background-color: #444444; @@ -99,7 +99,7 @@ table.bicol th a:active, table.bicol th a:hover { #skin td.skigauche { background-color: #ccddff; -} +} /******************************************************************************* 5 Contacts @@ -132,8 +132,8 @@ td.conteneur_tab { background-color: #ccddff; } -#onglet li:hover { - background-color: +#onglet li:hover { + background-color: } #onglet li.actif { diff --git a/htdocs/css/trapped.css b/htdocs/css/trapped.css index e46db2f..8b3a917 100644 --- a/htdocs/css/trapped.css +++ b/htdocs/css/trapped.css @@ -50,7 +50,7 @@ legend { border: 1px #ab8b7d solid; color: inherit; } - + /******************************************************************************* 2 Styles

    ,

    , ,
  • @@ -63,7 +63,7 @@ h1 a:link, h1 a:visited, h1 a:active { } h1 a:hover { color: #e2d9c2; } - + h1 { color: #ffffff; background-image: url("../images/skins/trapped_titre.gif"); @@ -85,7 +85,7 @@ table.tinybicol, table.bicol { table.tinybicol tr, table.bicol tr { } table.tinybicol tr.pair, table.bicol tr.pair { background-color: #e2d9c2; } table.tinybicol th, table.bicol th { - background-color: #291602; + background-color: #291602; } table.tinybicol th a:link, @@ -181,9 +181,9 @@ td.conteneur_tab { #fiche h2 { color: #7a614f; - background-color: #f2e9e2; + background-color: #f2e9e2; border-top: 1px solid #ab8b7d; - border-bottom: 1px solid #ab8b7d; + border-bottom: 1px solid #ab8b7d; border-right: 1px solid #ab8b7d; } @@ -222,7 +222,7 @@ td.conteneur_tab { /* only for fiche_referent.php*/ #fiche_referent em{color: #5a412f;} - + /******************************************************************************* A SKIN [ choix de classes faites par le skinneur diff --git a/htdocs/css/wiki.css b/htdocs/css/wiki.css index a8612d4..89fc8e8 100644 --- a/htdocs/css/wiki.css +++ b/htdocs/css/wiki.css @@ -43,38 +43,38 @@ table.quickref td { .diffbox { border: 1px #999999 solid; - margin-top: 1.33em; + margin-top: 1.33em; } .diffauthor { - font-weight: bold; + font-weight: bold; } .diffchangesum { - font-weight: bold; + font-weight: bold; } .difftime { font-size: 66%; - background-color: #dddddd; + background-color: #dddddd; } .difftype { clear: both; font-size: 66%; - font-weight: bold; + font-weight: bold; } .diffadd { border-left: 5px #99ff99 solid; - padding-left: 5px; + padding-left: 5px; } .diffdel { border-left: 5px #ffff99 solid; - padding-left: 5px; + padding-left: 5px; } .diffrestore { clear: both; font-size: 66%; - margin: 1.5em 0px; + margin: 1.5em 0px; } a.varlink { - text-decoration: none; + text-decoration: none; } a.createlink { font-size: smaller; 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 .= '