wibble
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Sun, 2 Jan 2005 14:00:38 +0000 (14:00 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:27:08 +0000 (23:27 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-205

htdocs/banana/include/session.inc.php

index f2148fe..9d48525 100644 (file)
@@ -7,11 +7,7 @@
  * Copyright: See COPYING files that comes with this distribution
  ********************************************************************************/
 
-$sname = $_SERVER['SCRIPT_NAME'];
-$array = explode('/',$sname);
-$sname = array_pop($array);
-unset($array);
-switch ($sname) {
+switch (basename($_SERVER['SCRIPT_NAME'])) {
     case 'thread.php':
         if (!Session::has('bananapostok')) {
             $_SESSION['bananapostok'] = true;