banana evolves
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Sun, 2 Jan 2005 19:50:52 +0000 (19:50 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:27:08 +0000 (23:27 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-208

htdocs/banana/include/config.inc.php
htdocs/banana/include/format.inc.php
htdocs/banana/include/profile.inc.php

index 32e4c29..61b5b24 100644 (file)
@@ -1,16 +1,5 @@
 <?php
 
-/** comparison function for the overview 
- * @param $a OBJECT spoolhead 
- * @param $b OBJECT spoolhead
- * @return
- */
-
-function spoolcompare($a,$b) {
-  global $news;
-  return ($b->date>=$a->date);
-}
-
 // spool config in spool.inc.php
 $news['maxspool'] = 2000;
 
@@ -18,32 +7,20 @@ $news['maxspool'] = 2000;
 $news['hdecode'] = array('from','name','organization','subject');
 
 // headers in post
-$news['head'] = array(
-  'From' => 'from',
-  'Subject' => 'subject',
-  'Newsgroups' => 'newsgroups',
-  'Message-ID' => 'msgid',
-  'Followup-To' => 'followup',
-  'Date' => 'date',
-  'X-Org-Id' => 'xorgid',
-  'Organization' => 'organization',
-  'References' => 'references',
-  'X-Face' => 'xface',
-  'Content-Type' => 'contenttype',
-  'Content-Transfer-Encoding' => 'contentencoding'
-  );
+$news['head'] = array('from', 'subject', 'newsgroups', 'message-id', 'followup-to', 'date',
+    'x-org-id', 'organization', 'references', 'x-face', 'content-type', 'content-transfer-encoding');
 
 // headers in article.php
-$news['headdisp']=array(
+$news['headdisp'] = array(
   'from',
   'subject',
   'newsgroups',
-  'followup',
+  'followup-id',
   'date',
   'organization',
   'references',
-  'xorgid',
-  'xface',
+  'x-org-id',
+  'x-face',
 );
 $locale['headers']['xorgid']='Identité';
 
index d31f200..b491fba 100644 (file)
@@ -32,7 +32,7 @@ function formatDisplayHeader($_header,$_text,$_spool) {
         case "date": 
             return formatDate($_text);
 
-        case "followup":
+        case "followup-to":
         case "newsgroups":
             $res = "";
             $groups = preg_split("/(\t| )*,(\t| )*/",$_text);
@@ -63,10 +63,10 @@ function formatDisplayHeader($_header,$_text,$_spool) {
             }
             return $rsl;
 
-        case "xface":
+        case "x-face":
             return '<img src="xface.php?face='.base64_encode($_text).'"  alt="x-face" />';
 
-        case "xorgid":
+        case "x-org-id":
             return "$_text".(preg_match("/[\w]+\.[\w\d]+/",$_text)?" [<a href=\"".url("fiche.php")."?user=$_text\" class='popup2'>fiche</a>]":"");
 
         default:
index 95212ff..26239c8 100644 (file)
@@ -13,7 +13,7 @@
  */
 
 function checkcancel($_headers) {
-    return ($_headers->xorgid == Session::get('forlife') or has_perms());
+    return ($_headers['x-org-id'] == Session::get('forlife') or has_perms());
 }
 
 /** getprofile : sets profile variables