projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updates the hooks in module/carnet.php to use the new PlTokenHook.
[platal.git]
/
include
/
banana
/
hooks.inc.php
diff --git
a/include/banana/hooks.inc.php
b/include/banana/hooks.inc.php
index
9e37484
..
c08c983
100644
(file)
--- a/
include/banana/hooks.inc.php
+++ b/
include/banana/hooks.inc.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-20
09
Polytechnique.org *
+ * Copyright (C) 2003-20
10
Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-19,7
+19,8
@@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-require_once 'banana/banana.inc.php';
+require_once dirname(__FILE__) . '/../../banana/banana/banana.inc.php';
+require_once dirname(__FILE__) . '/../../banana/banana/message.func.inc.php';
function hook_formatDisplayHeader($_header, $_text, $in_spool = false)
{
function hook_formatDisplayHeader($_header, $_text, $in_spool = false)
{
@@
-76,7
+77,7
@@
function hook_platalRSS($group)
} else {
$group = '';
}
} else {
$group = '';
}
- return '/rss/' . $group . S::v('hruid') . '/' . S::
s('token')
. '/rss.xml';
+ return '/rss/' . $group . S::v('hruid') . '/' . S::
user()->token
. '/rss.xml';
}
function hook_platalMessageLink($params)
}
function hook_platalMessageLink($params)
@@
-190,9
+191,9
@@
function hook_getXFace($headers)
}
if (isset($headers['x-face'])) {
$user = User::getSilent($login);
}
if (isset($headers['x-face'])) {
$user = User::getSilent($login);
- $res = XDB::query(
'
SELECT pf.uid
+ $res = XDB::query(
"
SELECT pf.uid
FROM forum_profiles AS pf
FROM forum_profiles AS pf
- WHERE pf.uid = {?} AND FIND_IN_SET(
\'xface\', pf.flags)'
,
+ WHERE pf.uid = {?} AND FIND_IN_SET(
'xface', pf.flags)"
,
$user->id());
if ($res->numRows()) {
// User wants his xface to be showed, fallback to default handler
$user->id());
if ($res->numRows()) {
// User wants his xface to be showed, fallback to default handler
@@
-329,7
+330,7
@@
class BananaHandler
function run_banana(&$page, $class, array $args)
{
function run_banana(&$page, $class, array $args)
{
- $user =
&
S::user();
+ $user = S::user();
$banana = new $class($user, $args);
$page->assign('banana', $banana->run());
$page->addCssInline($banana->css());
$banana = new $class($user, $args);
$page->assign('banana', $banana->run());
$page->addCssInline($banana->css());