X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fbanana.inc.php;h=f537fdafe37448709ee0d6e65a74f201138f102b;hb=f107d806eb6cb92fb37de0f4fb4c28aa6b7f9042;hp=304d13b3c36b246c475df6367564c190256985e0;hpb=cce828e536471e7dce67d642d150e2ad1c31426b;p=platal.git
diff --git a/include/banana.inc.php b/include/banana.inc.php
index 304d13b..f537fda 100644
--- a/include/banana.inc.php
+++ b/include/banana.inc.php
@@ -24,8 +24,8 @@ require_once('banana/banana.inc.php');
function hook_formatDisplayHeader($_header,$_text) {
global $globals;
if ($_header == 'x-org-id') {
- return $_text . ' []';
+ return $_text . ' []';
}
}
@@ -40,35 +40,38 @@ function hook_checkcancel($_headers) {
}
function hook_makeLink($params) {
- global $globals;
- $base = $globals->baseurl . '/banana';
- if ($params['subscribe'] == 1) {
- return $base . '/subscription';
- }
-
- if (!isset($params['group'])) {
- return $base;
- }
- $base .= '/' . $params['group'];
-
- if (isset($params['first'])) {
- return $base . '/from/' . $params['first'];
- }
- if (isset($params['artid'])) {
- if ($params['action'] == 'new') {
- $base .= '/reply';
- } elseif ($params['action'] == 'cancel') {
- $base .= '/cancel';
- } else {
- $base .= '/read';
- }
- return $base . '/' . $params['artid'];
- }
-
- if ($params['action'] == 'new') {
- return $base . '/new';
- }
- return $base;
+ global $globals;
+ $base = $globals->baseurl . '/banana';
+ if ($params['subscribe'] == 1) {
+ return $base . '/subscription';
+ }
+ if (isset($params['xface'])) {
+ return $base . '/xface/' . $params['xface'];
+ }
+
+ if (!isset($params['group'])) {
+ return $base;
+ }
+ $base .= '/' . $params['group'];
+
+ if (isset($params['first'])) {
+ return $base . '/from/' . $params['first'];
+ }
+ if (isset($params['artid'])) {
+ if ($params['action'] == 'new') {
+ $base .= '/reply';
+ } elseif ($params['action'] == 'cancel') {
+ $base .= '/cancel';
+ } else {
+ $base .= '/read';
+ }
+ return $base . '/' . $params['artid'];
+ }
+
+ if ($params['action'] == 'new') {
+ return $base . '/new';
+ }
+ return $base;
}
function hook_makeImg($img, $alt, $height, $width)
@@ -140,7 +143,7 @@ class PlatalBanana extends Banana
global $banana, $globals;
if (Get::get('banana') == 'updateall'
- || (!is_null($params) && isset($params['banana']) && $params['banana'] == 'updateall')) {
+ || (!is_null($params) && isset($params['banana']) && $params['banana'] == 'updateall')) {
$globals->xdb->execute('UPDATE auth_user_quick SET banana_last={?} WHERE user_id={?}', gmdate('YmdHis'), Session::getInt('uid'));
$_SESSION['banana_last'] = time();
}