Esempio n. 1
0
 function __construct(User $user, $params = null)
 {
     global $globals;
     $this->user =& $user;
     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->spoolroot . '/banana/mbox-helper/mbox-helper';
     Banana::$feed_updateOnDemand = true;
     if (S::admin()) {
         Banana::$msgshow_mimeparts[] = 'source';
     }
     array_push(Banana::$msgparse_headers, 'x-org-id', 'x-org-mail');
     Banana::$feed_active = S::hasAuthToken();
     MLBanana::$listname = $params['listname'];
     MLBanana::$domain = $params['domain'];
     $params['group'] = $params['listname'] . '@' . $params['domain'];
     parent::__construct($params, 'MLArchive', 'PlatalBananaMLPage');
 }
Esempio n. 2
0
 function handler_rss($page, $liste = null, $alias = null, $hash = null)
 {
     if (!$liste) {
         return PL_NOT_FOUND;
     }
     $user = Platal::session()->tokenAuth($alias, $hash);
     if (is_null($user)) {
         return PL_FORBIDDEN;
     }
     $mlist = $this->prepare_list($liste);
     if (list($det) = $mlist->getMembers()) {
         if (substr($liste, 0, 5) != 'promo' && ($det['ins'] || $det['priv']) && !$det['own'] && $det['sub'] < 2) {
             exit;
         }
         require_once 'banana/ml.inc.php';
         $banana = new MLBanana($user, array('listname' => $mlist->mbox, 'domain' => $mlist->domain, 'action' => 'rss2'));
         $banana->run();
     }
     exit;
 }