Lines Matching refs:this

22 …$controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'handle_tpl_metaheader_output…
23 $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'handle_ajax');
24 … $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'handle_logoutconvenience');
28 if (isset($this->instance)) return;
29 $this->domain = trim($this->getConf('etherpadlite_domain'));
30 if ($this->domain == "")
31 $this->domain = $_SERVER["HTTP_HOST"];
32 $this->ep_url = rtrim(trim($this->getConf('etherpadlite_url')),"/");
33 $ep_key = trim($this->getConf('etherpadlite_apikey'));
34 $this->ep_instance = new EtherpadLiteClient($ep_key, $this->ep_url."/api");
35 $this->ep_group = trim($this->getConf('etherpadlite_group'));
36 $this->ep_url_args = trim($this->getConf('etherpadlite_urlargs'));
37 $this->groupid = $this->ep_instance->createGroupIfNotExistsFor($this->ep_group);
38 $this->groupid = (string) $this->groupid->groupID;
45 if (!empty($this->ep_group)) {
46 return $this->groupid."\$".$meta[$rev]["pageid"];
56 $pageid = $this->getPageID();
58 $text = $this->ep_instance->getText($pageid);
62 if (!empty($this->ep_group)) {
63 $this->ep_instance->createGroupPad($this->groupid, $newpageid, $text);
65 $this->ep_instance->createPad($newpageid, $text);
67 $this->ep_instance->deletePad($pageid);
70 $pageid = $this->getPageID();
76 $this->createEPInstance();
77 if (!empty($this->ep_group)) {
78 $this->ep_instance->deleteSession($_SESSION["ep_sessionID"]);
91 if(method_exists($this, "handle_ajax_$call")) {
96 $ret = $this->handle_ajax_inner($call);
98 …ehler (Pad-Plugin): ".$e->getMessage(), "trace" => $e->getTraceAsString(), "url" => $this->ep_url);
107 $this->createEPInstance();
109 $this->client = $_SERVER['REMOTE_USER'];
110 if(!$this->client) $this->client = clientIP(true);
111 $this->clientname = $USERINFO["name"];
112 if (empty($this->clientname)) $this->clientname = $this->client;
117 …return array("file" => __FILE__, "line" => __LINE__, "error" => $this->getLang('Permission denied'…
124 …return array("file" => __FILE__, "line" => __LINE__, "error" => $this->getLang('You need to create…
132 $pageid = $this->getPageID();
151 if (isset($meta[$rev]) && ($meta[$rev]["owner"] != $this->client)) {
175 if (isset($meta[$rev]) && ($meta[$rev]["owner"] != $this->client) && $_POST["isSaveable"]) {
176 …return array("file" => __FILE__, "line" => __LINE__, "error" => sprintf($this->getLang('Permission…
179 …return array("file" => __FILE__, "line" => __LINE__, "error" => $this->getLang('Permission denied'…
182 …return array("file" => __FILE__, "line" => __LINE__, "error" => $this->getLang('Permission denied …
187 $ret = $this->{"handle_ajax_$call"}();
195 if (!empty($this->ep_group)) {
196 $canPassword = ($meta[$rev]["owner"] == $this->client);
201 … $hasPassword = (bool) ($this->ep_instance->isPasswordProtected($pageid)->isPasswordProtected);
223 $roid = (string) $this->ep_instance->getReadOnlyID($pageid)->readOnlyID;
224 $ret["url"] = $this->ep_url."/ro/".$roid;
226 $ret["url"] = $this->ep_url."/p/".$pageid;
228 $ret["url"] .= "?".$this->ep_url_args;
230 $isOwner = ($meta[$rev]["owner"] == $this->client);
242 …return Array("file" => __FILE__, "line" => __LINE__, "error" => $this->getLang("CSRF protection.")…
245 …if (!is_array($meta)) return Array("file" => __FILE__, "line" => __LINE__, "error" => $this->getLa…
246 …[$rev])) return Array("file" => __FILE__, "line" => __LINE__, "error" => $this->getLang("Permissio…
247 …if ($meta[$rev]["owner"] != $this->client) return Array("file" => __FILE__, "line" => __LINE__, "e…
263 $this->renameCurrentPage();
268 $this->ep_instance->setPassword($pageid, $password);
293 return $this->getPageInfo();
299 …if (!is_array($meta)) return Array("file" => __FILE__, "line" => __LINE__, "error" => $this->getLa…
300 …[$rev])) return Array("file" => __FILE__, "line" => __LINE__, "error" => $this->getLang("Permissio…
302 $text = $this->ep_instance->getText($pageid);
312 …return Array("file" => __FILE__, "line" => __LINE__, "error" => $this->getLang("CSRF protection.")…
315 …if (!is_array($meta)) return Array("file" => __FILE__, "line" => __LINE__, 'error' => $this->getLa…
316 …[$rev])) return Array("file" => __FILE__, "line" => __LINE__, 'error' => $this->getLang("Permissio…
317 …if ($meta[$rev]["owner"] != $this->client) return Array("file" => __FILE__, "line" => __LINE__, 'e…
319 $text = $this->ep_instance->getText($pageid);
328 'client' => $this->client,
332 …return Array("file" => __FILE__, "line" => __LINE__, 'error' => $this->getLang("pad could not be s…
335 $this->ep_instance->deletePad($pageid);
352 …return Array("file" => __FILE__, "line" => __LINE__, "error" => $this->getLang("CSRF protection.")…
355 if (!empty($this->ep_group)) {
357 … $authorid = $this->ep_instance->createAuthorIfNotExistsFor($this->client, $this->clientname);
359 …$cookies = $this->ep_instance->createSession($this->groupid, $authorid, time() + 7 * 24 * 60 * 60);
363 $host = parse_url($this->ep_url, PHP_URL_HOST);
365 setcookie("sessionID",$_SESSION["ep_sessionID"], 0, "/", $this->domain);
370 …return Array("file" => __FILE__, "line" => __LINE__, 'error' => $this->getLang("There is no such p…
381 if (!empty($this->ep_group)) {
382 $this->ep_instance->createGroupPad($this->groupid, $pageid, $text);
384 $this->ep_instance->createPad($pageid, $text);
388 $meta[$rev]["owner"] = $this->client;
397 if (!empty($this->ep_group)) {
398 $this->ep_instance->createGroupPad($this->groupid, $pageid, "");
400 $this->ep_instance->createPad($pageid, "");
405 $pageid = $this->getPageID();
407 $ret = $this->getPageInfo();
408 …$ret = array_merge($ret, Array("sessionID" => $_SESSION["ep_sessionID"], "domain" => $this->domain…
415 $this->include_script($event, 'document.domain = "'.$this->domain.'";');
430 $this->include_script($event, 'var etherpad_lite_config = '.$json->encode($config));
431 $this->link_script($event, DOKU_BASE.'lib/plugins/etherpadlite/'.$path);