Do not show broken marketing link on the public profile
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 21 Jan 2007 10:36:58 +0000 (10:36 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 21 Jan 2007 10:36:58 +0000 (10:36 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1372 839d8a87-29fc-0310-9880-83ba4fa771e5

modules/search/search.inc.php

index 97bbe7b..f0bf810 100644 (file)
@@ -133,7 +133,7 @@ class XOrgSearch extends XOrgPlugin
     function show()
     {
         $this->setAuth();
-       global $page;
+       global $page, $globals;
 
         $offset = intval($this->get_value('offset'));
         $tab    = @$this->orders[$this->get_value('order')];
@@ -149,20 +149,20 @@ class XOrgSearch extends XOrgPlugin
 
         list($list, $total) = call_user_func($this->_callback, $offset, $this->limit, $sql_order);
         
-       $page_max = intval(($total-1)/$this->limit);
+       $page_max = intval(($total-1)/$this->limit);
         if(!S::logged() && $page_max > $globals->search->public_max)
             $page_max = $globals->search->public_max;
 
-       $links = Array();
-       if ($offset) {
-           $links[] = Array('u'=> $this->make_url(Array('offset'=>$offset-1)), 'i' => $offset-1,  'text' => 'précédent');
-       }
-       for ($i = 0; $i <= $page_max ; $i++) {
-           $links[] = Array('u'=>$this->make_url(Array('offset'=>$i)), 'i' => $i, 'text' => $i+1);
+       $links = Array();
+           if ($offset) {
+           $links[] = Array('u'=> $this->make_url(Array('offset'=>$offset-1)), 'i' => $offset-1,  'text' => 'précédent');
+           }
+       for ($i = 0; $i <= $page_max ; $i++) {
+               $links[] = Array('u'=>$this->make_url(Array('offset'=>$i)), 'i' => $i, 'text' => $i+1);
         }
-       if ($offset < $page_max) {
-           $links[] = Array ('u' => $this->make_url(Array('offset'=>$offset+1)), 'i' => $offset+1, 'text' => 'suivant');
-       }
+       if ($offset < $page_max) {
+               $links[] = Array ('u' => $this->make_url(Array('offset'=>$offset+1)), 'i' => $offset+1, 'text' => 'suivant');
+       }
         
         $page->assign('search_results', $list);
         $page->assign('search_results_nb', $total);