From: Florent Bruneau Date: Mon, 27 Sep 2010 09:38:13 +0000 (+0200) Subject: Cannot configure mbox-helper and banana's spool root anymore. X-Git-Tag: xorg/1.0.1~152 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=5f0ecf6ce6e006d4e494ddc8e126a0695980f173;p=platal.git Cannot configure mbox-helper and banana's spool root anymore. * the mbox-helper is taken from the banana submodule * banana's spool is put in spool/banana Note: you need to run "make" in order to use banana on your working copy. Signed-off-by: Florent Bruneau --- diff --git a/Makefile b/Makefile index 26f294e..21b1134 100644 --- a/Makefile +++ b/Makefile @@ -55,9 +55,9 @@ core: ## conf ## -conf: spool/templates_c spool/mails_c classes/platalglobals.php configs/platal.cron htdocs/.htaccess spool/conf spool/tmp +conf: spool/templates_c spool/mails_c classes/platalglobals.php configs/platal.cron htdocs/.htaccess spool/conf spool/tmp spool/banana -spool/templates_c spool/mails_c spool/uploads spool/conf spool/tmp spool/run: +spool/templates_c spool/mails_c spool/uploads spool/conf spool/tmp spool/run spool/banana: mkdir -p $@ chmod o+w $@ diff --git a/bin/banana.feedgen.php b/bin/banana.feedgen.php index e588630..390403a 100755 --- a/bin/banana.feedgen.php +++ b/bin/banana.feedgen.php @@ -12,8 +12,8 @@ require_once 'connect.db.inc.php'; require_once dirname(__FILE__) . '/../include/banana/forum.inc.php'; ini_set('memory_limit', '128M'); -Banana::$mbox_helper = $globals->banana->mbox_helper; -Banana::$spool_root = $globals->banana->spool_root; +Banana::$mbox_helper = $globals->spoolroot . '/banana/mbox-helper/mbox-helper'; +Banana::$spool_root = $globals->spoolroot . '/spool/banana/'; Banana::$nntp_host = ForumsBanana::buildURL(); Banana::refreshAllFeeds(array('NNTP', 'MLArchive')); diff --git a/bin/banana.spoolgen.php b/bin/banana.spoolgen.php index 1857df7..e1bc4c9 100755 --- a/bin/banana.spoolgen.php +++ b/bin/banana.spoolgen.php @@ -12,10 +12,10 @@ require_once 'connect.db.inc.php'; require_once dirname(__FILE__) . '/../include/banana/forum.inc.php'; ini_set('memory_limit', '128M'); -Banana::$mbox_helper = $globals->banana->mbox_helper; -Banana::$spool_root = $globals->banana->spool_root; +Banana::$mbox_helper = $globals->spoolroot . '/banana/mbox-helper/mbox-helper'; +Banana::$spool_root = $globals->spoolroot . '/spool/banana/'; Banana::$nntp_host = ForumsBanana::buildURL(); Banana::createAllSpool(array('NNTP', 'MLArchive')); -system("chown -R www-data:www-data /var/spool/banana"); +system("chown -R www-data:www-data " . Banana::$spool_root); // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?> diff --git a/bin/cron/banana.feedgen.php b/bin/cron/banana.feedgen.php index 379c1bc..09d169d 100755 --- a/bin/cron/banana.feedgen.php +++ b/bin/cron/banana.feedgen.php @@ -12,8 +12,8 @@ require_once 'connect.db.inc.php'; require_once dirname(__FILE__) . '/../../include/banana/forum.inc.php'; ini_set('memory_limit', '128M'); -Banana::$mbox_helper = $globals->banana->mbox_helper; -Banana::$spool_root = $globals->banana->spool_root; +Banana::$mbox_helper = $globals->spoolroot . '/banana/mbox-helper/mbox-helper'; +Banana::$spool_root = $globals->spoolroot . '/spool/banana/'; Banana::$nntp_host = ForumsBanana::buildURL(); Banana::refreshAllFeeds(array('NNTP')); diff --git a/configs/platal.ini b/configs/platal.ini index 77330c0..be796ca 100644 --- a/configs/platal.ini +++ b/configs/platal.ini @@ -17,9 +17,6 @@ password = "***" web_user = "***" web_pass = "***" -spool_root = "/var/spool/banana" -mbox_helper = "/usr/bin/banana-mbox-helper" - event_forum = "" event_reply = "" diff --git a/include/banana/forum.inc.php b/include/banana/forum.inc.php index b43ab28..a87d1ff 100644 --- a/include/banana/forum.inc.php +++ b/include/banana/forum.inc.php @@ -36,7 +36,7 @@ class ForumsBanana extends Banana global $globals; Banana::$msgedit_canattach = false; - Banana::$spool_root = $globals->banana->spool_root; + Banana::$spool_root = $globals->spoolroot . '/spool/banana/'; array_push(Banana::$msgparse_headers, 'x-org-id', 'x-org-mail'); Banana::$nntp_host = self::buildURL($user->login()); if (S::admin()) { @@ -101,7 +101,7 @@ class ForumsBanana extends Banana $time = null; if (!is_null($this->params) && isset($this->params['updateall'])) { $time = intval($this->params['updateall']); - S::user()->banana_last = $time; + $this->user->banana_last = $time; } $infos = $this->fetchProfile(); @@ -119,7 +119,7 @@ class ForumsBanana extends Banana Banana::$profile['signature'] = $infos['sig']; Banana::$profile['display'] = $infos['threads']; Banana::$profile['autoup'] = $infos['maj']; - Banana::$profile['lastnews'] = S::user()->banana_last; + Banana::$profile['lastnews'] = $this->user->banana_last; Banana::$profile['subscribe'] = $req->fetchColumn(); Banana::$tree_unread = $infos['tree_unread']; Banana::$tree_read = $infos['tree_read']; diff --git a/include/banana/ml.inc.php b/include/banana/ml.inc.php index c09dd5b..8995535 100644 --- a/include/banana/ml.inc.php +++ b/include/banana/ml.inc.php @@ -51,12 +51,12 @@ class MLBanana extends Banana global $globals; $this->user = &$user; - Banana::$spool_root = $globals->banana->spool_root; + Banana::$spool_root = $globals->spoolroot . '/spool/banana/'; Banana::$spool_boxlist = false; Banana::$msgedit_canattach = true; Banana::$debug_mbox = ($globals->debug & DEBUG_BT); Banana::$debug_smarty = ($globals->debug & DEBUG_SMARTY); - Banana::$mbox_helper = $globals->banana->mbox_helper; + Banana::$mbox_helper = $globals->spoolroot . '/banana/mbox-helper/mbox-helper'; Banana::$feed_updateOnDemand = true; if (S::admin()) { Banana::$msgshow_mimeparts[] = 'source'; diff --git a/include/banana/moderate.inc.php b/include/banana/moderate.inc.php index 307183e..b09d2f1 100644 --- a/include/banana/moderate.inc.php +++ b/include/banana/moderate.inc.php @@ -64,7 +64,7 @@ class ModerationBanana extends Banana ModerationBanana::$listname = $params['listname']; ModerationBanana::$domain = isset($params['domain']) ? $params['domain'] : $globals->mail->domain; $params['group'] = ModerationBanana::$listname . '@' . ModerationBanana::$domain; - Banana::$spool_root = $globals->banana->spool_root; + Banana::$spool_root = $globals->spoolroot . '/spool/banana/'; Banana::$spool_boxlist = false; Banana::$msgshow_withthread = false; Banana::$withtabs = false;