Lines Matching refs:opts

28     var $opts = array();  variable in admin_plugin_pagemove
168 …owrap><input type="text" name="newns" id="newns" value="'.formtext($this->opts['newns']).'" class=…
173 …name="pagename" id="pagename" value="'.formtext(isset($this->opts['newname']) ? $this->opts['newna…
190 …"namespacename" value="'.formtext(isset($this->opts['newnsname']) ? $this->opts['newnsname'] : $th…
290 $this->opts['ns'] = getNS($ID);
291 $this->opts['name'] = noNS($ID);
292 $this->opts['page_ns'] = $_REQUEST['page_ns'];
295 if( $this->opts['page_ns'] == 'ns' ) {
301 $this->opts['newnsname'] = $_REQUEST['namespacename'];
302 if ( cleanID($this->opts['newnsname']) == '' ) {
307 $this->opts['newns'] = $this->opts['newnsname'];
310 $this->opts['newns'] = $_REQUEST['ns'].':'.$this->opts['newnsname'];
317 $nsRelPath = utf8_encodeFN(str_replace(':', '/', $this->opts['ns']));
326 $nsRelPath = utf8_encodeFN(str_replace(':', '/', $this->opts['ns']));
327 $this->_pm_move_recursive($nsRelPath, $this->opts);
329 $newNsAbsPath = $conf['datadir'].'/'.str_replace(':', '/', $this->opts['newns']);
332 elseif( $this->opts['page_ns'] == 'page' ) {
337 $this->opts['newname'] = $_REQUEST['pagename'];
339 if ( cleanID($this->opts['newname']) == '' ) {
345 … $this->opts['newns'] = ($_REQUEST['ns_for_page'] == ':' ? '' : $_REQUEST['ns_for_page']);
350 $this->opts['newns'] = $_REQUEST['newns'];
352 if ( cleanID($this->opts['newns']) == '' ) {
367 $this->_pm_move_page($this->opts);
373 $ID = $opts['new_id'];
429 function _pm_move_recursive($pathToSearch, $opts) { argument
442 $nsOpts = $opts;
453 $pageOpts = $opts;
472 * @param array $opts
474 function _pm_move_page($opts) { argument
506 $this->_pm_search($backlinksById, $conf['datadir'], '_pm_search_backlinks', $opts);
519 $opts['new_id'] = cleanID($opts['newns'].':'.$opts['newname']);
520 $opts['new_path'] = wikiFN($opts['new_id']);
523 if ( $opts['newns'] == $opts['ns'] && $opts['newname'] == $opts['name'] ) {
528 if ( @file_exists($opts['new_path']) ) {
529 $this->errors[] = sprintf($this->lang['pm_existing'], $opts['newname'],
530 ($opts['newns'] == '' ? $this->lang['pm_root'] : $opts['newns']));
557 if ( $tns == $opts['newns'] ) {
561 elseif ( preg_match('#^'.$opts['newns'].':(.*:)$#', $tns, $matches) ) {
574 if ( $opts['ns'] != $opts['newns'] ) {
582 if ( $tns == $opts['newns'] ) {
586 elseif ( preg_match('#^'.$opts['newns'].':(.*:)$#', $tns, $matches) ) {
601 $this->_pm_movemeta('metadir', '/^'.$opts['name'].'\.\w*?$/', $opts);
604 if ($opts['ns'] == $opts['newns']) {
607 elseif ( $opts['name'] == $opts['newname'] ) {
613 $summary = sprintf($this->lang[$lang_key], $ID, $opts['new_id']);
614 saveWikiText($opts['new_id'], $this->text, $summary);
617 if (@file_exists(wikiFN($opts['new_id']))) {
623 $this->_pm_updatebacklinks($backlinkingId, $backlinks, $opts, $brackets);
627 $this->_pm_movemeta('olddir', '/^'.$opts['name'].'\.[0-9]{10}\.txt(\.gz)?$/', $opts);
640 function _pm_updatebacklinks($backlinkingId, $links, $opts, &$brackets) { argument
647 $cleanname = cleanID($opts['newname']);
656 if ( $bns == $opts['newns'] ) {
660 elseif ( preg_match('#^'.$bns.':(.*)$#', $opts['newns'], $matches) ) {
665 $replacementNamespace = $opts['newns'].':';
672 if ( $bns == $opts['ns'] ) {
675 … $oid[$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
676 …id['.:'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
677 …oid['.'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
680 if ( preg_match('#^'.$bns.':(.*)$#', $opts['ns'], $matches) ) {
683 …[1].':'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
684 …[1].':'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
687 … if ( preg_match('#^'.$opts['ns'].':(.*)$#', $bns , $matches) && $opts['page_ns'] == 'page' ) {
690 …d['..:'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
691 …id['..'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
692 …'.:..:'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
698 …$oid[$opts['ns'].':'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opt…
705 $oldNamespaces = explode(':', $opts['ns'], $backlinkingNamespaceCount);
720 …dottedRelLink] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
734 … saveWikiText($backlinkingId, $text, sprintf($this->lang['pm_linkchange'], $ID, $opts['new_id']));
841 function _pm_movemeta($dir, $regex, $opts) { argument
844 $old_path = $conf[$dir].'/'.str_replace(':','/',$opts['ns']).'/';
845 $new_path = $conf[$dir].'/'.str_replace(':','/',$opts['newns']).'/';
853 … io_rename($old_path.$file,$new_path.str_replace($opts['name'], $opts['newname'], $file));
872 * @param array $opts Options to the search functions
876 function _pm_search(&$data, $base, $func, $opts, $dir='' ,$lvl=1) { argument
898 if ($this->$func($data, $base, $dir, 'd', $lvl, $opts)) {
899 $this->_pm_search($data, $base, $func, $opts, $dir, $lvl+1);
904 $this->$func($data, $base, $file, 'f', $lvl, $opts);
917 function _pm_search_backlinks(&$data, $base, $file, $type, $lvl, $opts) { argument
926 $absSearchedId = $opts['name'];
927 resolve_pageid($opts['ns'], $absSearchedId, $exists);