projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix networking display on profiles
[platal.git]
/
modules
/
gadgets.php
diff --git
a/modules/gadgets.php
b/modules/gadgets.php
index
d769a9d
..
b8700de
100644
(file)
--- a/
modules/gadgets.php
+++ b/
modules/gadgets.php
@@
-42,14
+42,13
@@
class GadgetsModule extends PLModule
require_once 'gadgets/gadgets.inc.php';
init_igoogle_html('gadgets/ig-events.tpl', AUTH_COOKIE);
require_once 'gadgets/gadgets.inc.php';
init_igoogle_html('gadgets/ig-events.tpl', AUTH_COOKIE);
- $events = XDB::iterator(
'
SELECT SQL_CALC_FOUND_ROWS
+ $events = XDB::iterator(
"
SELECT SQL_CALC_FOUND_ROWS
e.id, e.titre, UNIX_TIMESTAMP(e.creation_date) AS creation_date,
e.id, e.titre, UNIX_TIMESTAMP(e.creation_date) AS creation_date,
- IF(u.nom_usage = "", u.nom, u.nom_usage) AS nom, u.prenom, u.promo,
- ev.user_id IS NULL AS nonlu, e.uid
- FROM announces AS e
+ ev.uid IS NULL AS nonlu, e.uid
+ FROM announces AS e
LEFT JOIN announce_read AS ev ON (e.id = ev.evt_id AND ev.uid = {?})
LEFT JOIN announce_read AS ev ON (e.id = ev.evt_id AND ev.uid = {?})
- WHERE FIND_IN_SET(
"valide", e.flags) AND peremp
tion >= NOW()
- ORDER BY e.creation_date DESC
'
, S::i('uid'));
+ WHERE FIND_IN_SET(
'valide', e.flags) AND expira
tion >= NOW()
+ ORDER BY e.creation_date DESC
"
, S::i('uid'));
$page->assign('event_count', XDB::query("SELECT FOUND_ROWS()")->fetchOneCell());
Platal::load('events', 'feed.inc.php');
$page->assign('event_count', XDB::query("SELECT FOUND_ROWS()")->fetchOneCell());
Platal::load('events', 'feed.inc.php');
@@
-72,7
+71,9
@@
class GadgetsModule extends PLModule
function handler_ig_search(&$page)
{
if (Env::has('quick') && Env::s('quick') != '') {
function handler_ig_search(&$page)
{
if (Env::has('quick') && Env::s('quick') != '') {
+ global $globals;
require_once 'userset.inc.php';
require_once 'userset.inc.php';
+
$view = new SearchSet(true);
$view->addMod('gadget', 'Gadget', true);
$view->apply(null, $page);
$view = new SearchSet(true);
$view->addMod('gadget', 'Gadget', true);
$view->apply(null, $page);
@@
-86,6
+87,8
@@
class GadgetsModule extends PLModule
$page->assign('error', 'Recherche trop générale.');
} elseif (empty($nb_tot)) {
$page->assign('error', 'Il n\'existe personne correspondant à ces critères dans la base !');
$page->assign('error', 'Recherche trop générale.');
} elseif (empty($nb_tot)) {
$page->assign('error', 'Il n\'existe personne correspondant à ces critères dans la base !');
+ } else {
+ $page->assign('error', false);
}
}
}
}