Lines Matching refs:id

213 		$id = is_array($page['id'])?$page['id'][0]:$page['id'];
214 if($page['llastModified'].','.$page['rlastModified'] == $this->_profile[$id]) {
217 return !strncmp($id, $this->_profile['namespace'], strlen($this->_profile['namespace'])) &&
221 function getLocalPage($id, $onlyinfo = false) { argument
222 if(empty($id)) return false;
224 $file = wikiFN($id,'');
230 $info = getRevisionInfo($id, $time, 1024);
233 'name' => $id,
241 $page['text'] = rawWiki($id,'');
243 $data = array($id);
250 function getRemotePage($id, $onlyinfo = false) { argument
251 if(empty($id)) return false;
252 if($this->_rpcQuery('wiki.getPageInfo', $id, $page)) {
256 $this->_rpcQuery('wiki.getPage', $id, $page['text']);
265 function page_l2r($id, $sum='') { argument
266 if(! ($page = $this->getLocalPage($id)) ) {
269 if($this->_rpcQuery('wiki.putPage', array($id, $page['text'], $sum), $res)) {
271 $rversion = $this->getRemotePage($id, true);
272 $this->_profile[$id] = $page['version'].','.$rversion['lastModified']->getTimestamp();
281 function page_r2l($id, $sum='') { argument
286 $id = cleanID($id);
287 if(empty($id))
290 $page = $this->getRemotePage($id);
297 if(!page_exists($id) && empty($TEXT)) {
301 if(auth_quickaclcheck($id) < AUTH_EDIT)
305 if(checklock($id))
313 if(!page_exists($id) && empty($sum)) {
318 if(page_exists($id) && empty($TEXT) && empty($sum)) {
322 lock($id);
324 saveWikiText($id,$TEXT,$sum);
326 unlock($id);
329 if(!@file_exists(metaFN($id, '.indexed'))) {
346 idx_addPage($id);
349 io_saveFile(metaFN($id,'.indexed'),INDEXER_VERSION);
353 $lversion = $this->getLocalPage($id, true);
354 $this->_profile[$id] = $lversion['version'].','.$page['lastModified']->getTimestamp();
359 function getLocalFile($id, $onlyinfo = false) { argument
360 if(empty($id)) return false;
361 if (auth_quickaclcheck(getNS($id).':*') < AUTH_READ)
364 $filename = mediaFN($id);
379 function getRemoteFile($id, $onlyinfo = false) { argument
380 if(empty($id)) return false;
383 if($this->_rpcQuery('wiki.getAttachmentInfo', $id, $file) && $file['lastModified']) {
387 $fetchurl = str_replace('xmlrpc.php', 'fetch.php?media='.$id, $this->_profile['xmlrpcurl']);
397 function file_l2r($id, $sum='') { argument
398 $id = cleanID($id);
399 $file = $this->getLocalFile($id);
400 …if($file && $this->_rpcQuery('wiki.putAttachment', array($id, $file['content'], array("ow" => true…
402 $rversion = $this->getRemoteFile($id, true);
403 $this->_profile[$id] = $file['lastModified'].','.$rversion['lastModified'];
411 function file_r2l($id, $sum='') { argument
415 if(!isset($id)) {
419 $file = $this->getRemoteFile($id);
427 $auth = auth_quickaclcheck(getNS($id).':*');
430 $ftmp = $conf['tmpdir'] . '/' . $id;
438 list($iext, $imime,$dl) = mimetype($id);
439 $id = cleanID($id);
440 $fn = mediaFN($id);
468 $data[2] = $id;
475 $lversion = $this->getLocalFile($id, true);
476 $this->_profile[$id] = $lversion['lastModified'].','.$file['lastModified'];
518 function getDiff($id) { argument
519 $id = cleanID($id);
520 if(empty($id))
522 $lpage = $this->getLocalPage($id);
523 $rpage = $this->getRemotePage($id);