X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fuserset.inc.php;h=f45cf484cac7cbaea6cc177f0c7569c62a34f6f0;hb=63f06a435ff8e9c058b1dee1eb97fff99606d490;hp=a35cdedc9d39f57869a72f79a787d2e091530a44;hpb=e1ce18d25c473f31b4b6c167cd8ecc43b44a847e;p=platal.git diff --git a/include/userset.inc.php b/include/userset.inc.php index a35cded..f45cf48 100644 --- a/include/userset.inc.php +++ b/include/userset.inc.php @@ -19,7 +19,6 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ -require_once('xorg.misc.inc.php'); require_once('user.func.inc.php'); global $globals; @@ -210,6 +209,23 @@ class MinificheView extends MultipageView : ""); } + public function bounds() + { + $order = Env::v('order', $this->defaultkey); + $show_bounds = 0; + if (($order == "name") || ($order == "-name")) { + $this->bound_field = "nom"; + $show_bounds = 1; + } elseif (($order == "promo") || ($order == "-promo")) { + $this->bound_field = "promo"; + $show_bounds = -1; + } + if ($order{0} == '-') { + $show_bounds = -$show_bounds; + } + return $show_bounds; + } + public function templateName() { return 'include/plview.minifiche.tpl'; @@ -235,6 +251,23 @@ class MentorView extends MultipageView ms.secteur, ms.ss_secteur"; } + public function bounds() + { + $order = Env::v('order', $this->defaultkey); + $show_bounds = 0; + if (($order == "name") || ($order == "-name")) { + $this->bound_field = "nom"; + $show_bounds = 1; + } elseif (($order == "promo") || ($order == "-promo")) { + $this->bound_field = "promo"; + $show_bounds = -1; + } + if ($order{0} == '-') { + $show_bounds = -$show_bounds; + } + return $show_bounds; + } + public function templateName() { return 'include/plview.referent.tpl'; @@ -265,12 +298,29 @@ class TrombiView extends MultipageView return "INNER JOIN photo AS p ON (p.uid = u.user_id) "; } + public function bounds() + { + $order = Env::v('order', $this->defaultkey); + $show_bounds = 0; + if (($order == "name") || ($order == "-name")) { + $this->bound_field = "nom"; + $show_bounds = 1; + } elseif (($order == "promo") || ($order == "-promo")) { + $this->bound_field = "promo"; + $show_bounds = -1; + } + if ($order{0} == '-') { + $show_bounds = -$show_bounds; + } + return $show_bounds; + } + public function templateName() { return 'include/plview.trombi.tpl'; } - public function apply(PlatalPage &$page) + public function apply(PlPage &$page) { if (!empty($GLOBALS['IS_XNET_SITE'])) { global $globals; @@ -307,7 +357,7 @@ class GeolocView implements PlView return $args; } - public function apply(PlatalPage &$page) + public function apply(PlPage &$page) { require_once 'geoloc.inc.php'; require_once '../modules/search/search.inc.php'; @@ -405,7 +455,7 @@ class GadgetView implements PlView : ""); } - public function apply(PlatalPage &$page) + public function apply(PlPage &$page) { $page->assign_by_ref('set', $this->set->get($this->fields(), $this->joins(), null, null, null, 5, 0));