get rid of session.inc.php (banana)
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Mon, 3 Jan 2005 10:38:20 +0000 (10:38 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:27:09 +0000 (23:27 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-211

htdocs/banana/include/config.inc.php
htdocs/banana/include/session.inc.php [deleted file]

index 56f0021..f35d725 100644 (file)
@@ -1,5 +1,14 @@
 <?php
 
+switch (basename($_SERVER['SCRIPT_NAME'])) {
+    case 'index.php':
+        if (Get::get('banana') == 'updateall') {
+            $globals->xdb->execute('UPDATE auth_user_quick SET banana_last={?} WHERE user_id={?}', gmdate('YmdHis'), Session::getInt('uid'));
+            $_SESSION['banana_last'] = time();
+        }
+}
+
+
 function hook_banana(&$banana) {
     global $globals;
 
diff --git a/htdocs/banana/include/session.inc.php b/htdocs/banana/include/session.inc.php
deleted file mode 100644 (file)
index 9d48525..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-/********************************************************************************
- * include/session.inc.php : sessions for profile
- * -------------------------
- *
- * This file is part of the banana distribution
- * Copyright: See COPYING files that comes with this distribution
- ********************************************************************************/
-
-switch (basename($_SERVER['SCRIPT_NAME'])) {
-    case 'thread.php':
-        if (!Session::has('bananapostok')) {
-            $_SESSION['bananapostok'] = true;
-        }
-        break;
-
-    case 'index.php':
-        if (Get::get('banana') == 'updateall') {
-            $globals->xdb->execute('UPDATE auth_user_quick SET banana_last={?} WHERE user_id={?}', gmdate('YmdHis'), Session::getInt('uid'));
-            $_SESSION['banana_last'] = time();
-        }
-
-    default:
-        $_SESSION['bananapostok'] = true;
-}
-
-?>