No RSS popup when the link points the RSS activation form.
[platal.git] / classes / plset.php
index aa5bfa6..648d814 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -96,7 +96,7 @@ class PlSet
     protected function encodeArgs(array $args, $encode = false)
     {
         $qs = '?';
-        $sep = $encode ? '&' : '&amp;';
+        $sep = '&';
         foreach ($args as $k=>$v) {
             if (!$encode) {
                 $k = urlencode($k);
@@ -116,7 +116,6 @@ class PlSet
             $limitcount = "LIMIT $limitcount";
         }
         $joins  = $this->joins . ' ' . $joins;
-        $where  = $where;
         if (trim($this->where)) {
             if (trim($where)) {
                 $where .= ' AND ';
@@ -138,7 +137,8 @@ class PlSet
     {
         $view = strtolower($view);
         if (!$view || !class_exists($view . 'View') || !isset($this->mods[$view])) {
-            $view = $this->default ? $this->default : $this->mods[0];
+            reset($this->mods);
+            $view = $this->default ? $this->default : key($this->mods);
         }
         $this->mod = $view;
         $class = $view . 'View';
@@ -160,6 +160,9 @@ class PlSet
             return false;
         }
         $args = $view->args();
+        if (!isset($args['rechercher'])) {
+            $args['rechercher'] = 'Chercher';
+        }
         $page->changeTpl('core/plset.tpl');
         $page->assign('plset_base', $baseurl);
         $page->assign('plset_mods', $this->mods);
@@ -274,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: