Lines Matching refs:id

42      * @param string $id The id of the page the metadata shall be loaded for
45 public function getMoveMeta($id) {
46 $all_meta = p_get_metadata($id, '', METADATA_DONT_RENDER);
55 p_set_metadata($id, array(self::METAKEY => $all_meta[self::METAKEY], 'plugin_pagemove' => null), false, true);
77 * @param $id
79 public function unsetMoveMeta($id) {
80 p_set_metadata($id, array(self::METAKEY => array()), false, true);
86 * @param string $id affected page
87 * @param string $src moved document's original id
88 * @param string $dst moved document's new id
92 public function setMoveMeta($id, $src, $dst, $type) {
93 $this->setMoveMetas($id, array($src => $dst), $type);
99 * @param string $id affected page
104 public function setMoveMetas($id, $moves, $type) {
108 if(!page_exists($id, '', false)) {
112 $meta = $this->getMoveMeta($id);
117 p_set_metadata($id, array(self::METAKEY => $meta), false, true);
125 * @param string $id moved page's original (and still current) id
127 public function setSelfMoveMeta($id) {
128 $meta = $this->getMoveMeta($id);
133 $meta['origin'] = $id;
135 p_set_metadata($id, array(self::METAKEY => $meta), false, true);
206 * @param string $id The id of the wiki page, if the page itself was moved the old id
210 public function rewrite($id, $text) {
211 $meta = $this->getMoveMeta($id);
217 if($origin == '') $origin = $id;
220 'id' => $id,
247 $Parser->Handler->init($id, $origin, $pages, $media, $handlers);
260 * @param string $id The id of the page that shall be rewritten
264 public function rewritePage($id, $text = null, $save = true) {
265 $meta = $this->getMoveMeta($id);
267 $text = rawWiki($id);
272 $text = $this->rewrite($id, $text);
275 $file = wikiFN($id, '', false);
280 $oldRev = filemtime(wikiFN($id));
283 saveWikiText($id, $text, $this->symbol . ' ' . $this->getLang('linkchange'), $this->getConf('minor'));
285 $this->unsetMoveMeta($id);
288 msg('Error: Page ' . hsc($id) . ' needs to be rewritten because of page renames but is not writable.', -1);