From ab408b35ab31f493d7d117e666bc32a7832f763e Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Tue, 2 Nov 2004 07:48:40 +0000 Subject: [PATCH] smarter --- htdocs/listes/trombi.php | 3 +-- htdocs/mescontacts.php | 3 +-- htdocs/trombipromo.php | 3 ++- include/trombi.inc.php | 6 +++--- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/htdocs/listes/trombi.php b/htdocs/listes/trombi.php index 34f5e18..32b9c5e 100644 --- a/htdocs/listes/trombi.php +++ b/htdocs/listes/trombi.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: trombi.php,v 1.11 2004-11-02 06:46:49 x2000habouzit Exp $ + $Id: trombi.php,v 1.12 2004-11-02 07:48:40 x2000habouzit Exp $ ***************************************************************************/ if(empty($_REQUEST['liste'])) header('Location: index.php'); @@ -76,7 +76,6 @@ if(is_array($owners)) { $page->assign_by_ref('owners', $moderos); $trombi = new Trombi('getList'); - $trombi->showPromo(); $page->assign_by_ref('trombi',$trombi); } else $page->assign('no_list',true); diff --git a/htdocs/mescontacts.php b/htdocs/mescontacts.php index e6fe45c..69f1cf6 100644 --- a/htdocs/mescontacts.php +++ b/htdocs/mescontacts.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: mescontacts.php,v 1.24 2004-11-02 06:46:48 x2000habouzit Exp $ + $Id: mescontacts.php,v 1.25 2004-11-02 07:48:40 x2000habouzit Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -82,7 +82,6 @@ if(isset($_GET['trombi'])) { $trombi = new Trombi('getList'); $trombi->setNbRows(4); - $trombi->showPromo(); $page->assign_by_ref('trombi',$trombi); } else { $sql = "SELECT contact AS id, diff --git a/htdocs/trombipromo.php b/htdocs/trombipromo.php index 59bbce4..6b3ae8c 100644 --- a/htdocs/trombipromo.php +++ b/htdocs/trombipromo.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: trombipromo.php,v 1.7 2004-10-28 20:28:41 x2000habouzit Exp $ + $Id: trombipromo.php,v 1.8 2004-11-02 07:48:40 x2000habouzit Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -60,6 +60,7 @@ if(isset($_REQUEST['xpromo'])) { $page->assign('erreur', "Promotion incorrecte (saisir au format YYYY). Recommence."); } else { $trombi = new Trombi('getList'); + $trombi->hidePromo(); $trombi->setAdmin(); $page->assign_by_ref('trombi',$trombi); } diff --git a/include/trombi.inc.php b/include/trombi.inc.php index 5290c33..dc37f4a 100644 --- a/include/trombi.inc.php +++ b/include/trombi.inc.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: trombi.inc.php,v 1.3 2004-11-02 06:46:49 x2000habouzit Exp $ + $Id: trombi.inc.php,v 1.4 2004-11-02 07:48:41 x2000habouzit Exp $ ***************************************************************************/ require_once('xorg.plugin.inc.php'); @@ -27,11 +27,11 @@ class Trombi extends XOrgPlugin { var $_get_vars = Array('offset'); var $limit = 24; var $admin = false; - var $showpromo = false; + var $showpromo = true; function setNbRows($row) { $this->limit = $row*3; } function setAdmin() { $this->admin = true; } - function showPromo() { $this->showpromo = true; } + function hidePromo() { $this->showpromo = false; } function show() { /* this point is nasty... but since show() is called from the template ... -- 2.1.4