move banana things into the banana module.
authorx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 23 Jul 2006 12:19:05 +0000 (12:19 +0000)
committerx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 23 Jul 2006 12:19:05 +0000 (12:19 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@584 839d8a87-29fc-0310-9880-83ba4fa771e5

bin/banana.spoolgen.php
modules/banana.php
modules/banana/banana.inc.php [moved from include/banana.inc.php with 99% similarity]

index 16f2004..6cf1ce0 100755 (executable)
@@ -8,8 +8,8 @@
  * Copyright: See COPYING files that comes with this distribution
  ********************************************************************************/
 
-require_once('connect.db.inc.php');
-require_once('banana/banana.inc.php');
+require_once 'connect.db.inc.php';
+require_once dirname(__FILE__).'/ ../modules/banana/banana.inc.php';
 
 class MyBanana extends Banana
 {
index eecfc2c..63234c2 100644 (file)
@@ -116,7 +116,7 @@ class BananaModule extends PLModule
         $page->addCssLink('css/banana.css');
         $page->assign('xorg_title','Polytechnique.org - Forums & PA');
 
-        require_once('banana.inc.php');
+        require_once dirname(__FILE__).'/banana/banana.inc.php';
 
         $res = PlatalBanana::run($params);
         $page->assign_by_ref('banana', $banana);
similarity index 99%
rename from include/banana.inc.php
rename to modules/banana/banana.inc.php
index 6fc4052..f897c40 100644 (file)
@@ -19,7 +19,7 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once('banana/banana.inc.php');
+require_once 'banana/banana.inc.php';
 
 function hook_formatDisplayHeader($_header, $_text) {
     global $banana;
@@ -68,7 +68,7 @@ function hook_makeLink($params) {
         }
         return $base . '/' . $params['artid'];
     }
-    
+
     if ($params['action'] == 'new') {
         return $base . '/new';
     }
@@ -85,7 +85,7 @@ function hook_makeImg($img, $alt, $height, $width)
     if (!is_null($height)) {
         $height = ' height="' . $height . '"';
     }
-    
+
     return '<img src="' . $url . '"' . $height . $width . ' alt="' . $alt . '" />';
 }
 
@@ -131,7 +131,7 @@ class PlatalBanana extends Banana
         $this->profile['display']   = $disp;
         $this->profile['autoup']    = $maj;
         $this->profile['lastnews']  = S::v('banana_last');
-        
+
         if ($maj) {
             XDB::execute("UPDATE auth_user_quick SET banana_last={?} WHERE user_id={?}", gmdate("YmdHis"), $uid);
         }
@@ -174,7 +174,7 @@ class PlatalBanana extends Banana
         if (!count($_POST['subscribe'])) {
             return true;
         }
-        
+
         $req  = XDB::iterRow("SELECT fid,nom FROM {$globals->banana->table_prefix}list");
         $fids = array();
         while (list($fid,$fnom) = $req->next()) {