コード例 #1
0
 function initialize()
 {
     // For various reasons this gets squished
     global $tldTree;
     if (empty($tldTree)) {
         if (!empty(self::$_thetree)) {
             $tldTree = self::$_thetree;
         }
     }
     $nickname = GNUsocial::currentSite();
     if (empty($nickname)) {
         $this->log(LOG_WARNING, "No current site");
         return;
     }
     try {
         $sn = Status_network::getKV('nickname', $nickname);
     } catch (Exception $e) {
         $this->log(LOG_ERR, $e->getMessage());
         return;
     }
     $tags = $sn->getTags();
     foreach ($tags as $tag) {
         if (strncmp($tag, 'domain=', 7) == 0) {
             $domain = substr($tag, 7);
             $this->log(LOG_INFO, "Setting email domain to {$domain}");
             common_config_append('email', 'whitelist', $domain);
         }
     }
 }
コード例 #2
0
ファイル: docfile.php プロジェクト: bashrc/gnusocial-debian
 static function mailPaths()
 {
     $paths = array(INSTALLDIR . '/local/mail-src/', INSTALLDIR . '/mail-src/');
     $site = GNUsocial::currentSite();
     if (!empty($site)) {
         array_unshift($paths, INSTALLDIR . '/local/mail-src/' . $site . '/');
     }
     return $paths;
 }
コード例 #3
0
 /**
  * Combines the queue_basename from configuration with the
  * group name for this queue to give eg:
  *
  * /queue/statusnet/main
  * /queue/statusnet/main/distrib
  * /queue/statusnet/xmpp/xmppout/site01
  *
  * @param string $queue
  * @return string
  */
 protected function queueName($queue)
 {
     $group = $this->queueGroup($queue);
     $site = GNUsocial::currentSite();
     $specs = array("{$group}/{$queue}/{$site}", "{$group}/{$queue}");
     foreach ($specs as $spec) {
         if (in_array($spec, $this->breakout)) {
             return $this->base . $spec;
         }
     }
     return $this->base . $group;
 }