X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fuserset.inc.php;h=21d5b0b54767c8352eeb9dcd93e9f2029028ba43;hb=f3df6d384c72871c814d607cd9122eba03666543;hp=a35cdedc9d39f57869a72f79a787d2e091530a44;hpb=0c50ac76147e7c3bffa90501559bdef63bb689e3;p=platal.git diff --git a/include/userset.inc.php b/include/userset.inc.php index a35cded..21d5b0b 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; @@ -64,8 +63,7 @@ class SearchSet extends UserSet public function __construct($quick = false, $no_search = false, $join = '', $where = '') { - require_once dirname(__FILE__).'/../modules/search/search.inc.php'; - + Platal::load('search', 'search.inc.php'); if ($no_search) { return; } @@ -80,7 +78,7 @@ class SearchSet extends UserSet private function getQuick($join, $where) { - require_once dirname(__FILE__).'/../modules/search/search.inc.php'; + Platal::load('search', 'search.inc.php'); global $globals; if (!S::logged()) { Env::kill('with_soundex'); @@ -139,7 +137,7 @@ class ArraySet extends UserSet { $where = $this->getUids($users); if ($where) { - $where = "a.alias IN ($where)"; + $where = "u.hruid IN ($where)"; } else { $where = " 0 "; } @@ -148,7 +146,7 @@ class ArraySet extends UserSet private function getUids(array $users) { - $users = get_users_forlife_list($users, true, '_silent_user_callback'); + $users = User::getBulkHruid($users, array('User', '_silent_user_callback')); if (is_null($users)) { return ''; } @@ -210,6 +208,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 +250,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 +297,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 +356,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 +454,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));