Beispiel #1
0
 public function doUpdate()
 {
     shareApp::updatePrefs();
     $res = new ezcMvcResult();
     $res->status = new ezcMvcExternalRedirect('/prefs');
     return $res;
 }
Beispiel #2
0
 public function doRegisterSubmit()
 {
     $res = new ezcMvcResult();
     if (isset($this->reg)) {
         $res->variables['success'] = shareApp::register($message);
         $res->variables['message'] = $message;
     }
     return $res;
 }
Beispiel #3
0
 public function createResult()
 {
     if (isset($_POST['update'])) {
         shareApp::addFromWeb($_POST['update']);
     }
     $res = new ezcMvcResult();
     $res->status = new ezcMvcExternalRedirect($_POST['redirUrl']);
     return $res;
 }
Beispiel #4
0
 function runResultFilters(ezcMvcRoutingInformation $routeInfo, ezcMvcRequest $request, ezcMvcResult $result)
 {
     $result->variables['installDomain'] = $this->config->getSetting('TheWire', 'installDomain');
     $result->variables['mailDomain'] = $this->config->getSetting('TheWire', 'mailDomain');
     $result->variables['jabberUser'] = $this->config->getSetting('jabber', 'user');
     $result->variables['jabberDomain'] = $this->config->getSetting('jabber', 'domain');
     $result->variables['bugLinkFormat'] = $this->config->getSetting('formats', 'bugLinkFormat');
     $result->variables['tagCloud'] = shareApp::tagCloud();
     $result->variables['peopleCloud'] = shareApp::peopleCloud();
     $result->variables['debugOutput'] = debugLogger::generateOutput();
     $this->runAddCurrentUrlFilter($result);
     switch ($routeInfo->matchedRoute) {
         case '/register/submit':
         case '/register':
         case '/basic-auth-required':
         case '/login-required':
         case '/login':
         case '/logout':
         case '/fatal':
             break;
         default:
             $result->variables['user'] = isset($request->variables['user']) ? $request->variables['user'] : '******';
     }
 }
Beispiel #5
0
 function handleMessage($from, $to, $body, $subject, $thread, $id, $extended)
 {
     /*
     echo "Subject: $subject\tThread; $thread\n";
     echo "ID: $id\n";
     echo "\n";
     */
     $from = preg_replace('@/.*$@', '', $from);
     echo "Incoming message!\n";
     echo "From: {$from}\t\tTo: {$to}\n";
     echo "Body: {$body}\n";
     echo "Extended:\n";
     if (!isset($this->jab->roster[$from]) || $this->jab->roster[$from]['show'] == 'off') {
         $this->jab->subscription_request_accept($from);
         $this->jab->subscribe($from, "checking");
         $this->jab->message($from, "chat", NULL, "Welcome, please authorise me!");
         return;
     }
     if (trim($body) === '') {
         return;
     }
     if (!shareApp::handleJabberActions($from, $body)) {
         shareApp::addFromJabber($from, $body);
     }
 }