Beispiel #1
0
 private function setViewType()
 {
     $requestUri = \OCP\Util::getRequestUri();
     if (substr($requestUri, -5) === 'chat/') {
         $this->viewType = self::APP;
     } else {
         $this->viewType = self::INTEGRATED;
     }
 }
Beispiel #2
0
 /**
  * @brief Gets the URL requested by the client.
  *
  * @return mixed URL requested by the Sync client on success, false
  *	otherwise.
  */
 private static function getUrl()
 {
     $url = \OCP\Util::getRequestUri();
     $url = str_replace('//', '/', $url);
     $pos = strpos($url, 'mozilla_sync');
     if ($pos === false) {
         return false;
     }
     $pos += strlen('mozilla_sync');
     $url = substr($url, $pos);
     return $url;
 }