Lines Matching refs:new

42      * @param array  $page_moves  Moves that shall be considered in the form [[$old,$new],...] ($old can be $original)
43 * @param array $media_moves Moves of media files that shall be considered in the form $old => $new
57 * Go through the list of moves and find the new value for the given old ID
62 * @return string the new full qualified ID
67 if($type != 'media' && $type != 'page') throw new Exception('Not a valid type');
90 return $old; // this is now new
94 * if the old link ended with a colon and the new one is a start page, adjust
97 * @param $new string the new, full qualified ID
101 protected function _nsStartCheck($relold, $new, $type) {
105 if($new == $conf['start']) {
106 $new = '.:';
107 } else if(substr($new, -1 * ($len + 1)) == ':' . $conf['start']) {
108 $new = substr($new, 0, -1 * $len);
111 return $new;
115 * Construct a new ID relative to the current page's location
121 * @param string $new the new, full qualified ID
126 public function relativeLink($relold, $new, $type) {
128 if($type != 'media' && $type != 'page') throw new Exception('Not a valid type');
143 if($old == $new) {
158 if($this->ns && !getNS($new)) $new = ':' . $new;
159 $new = $this->_nsStartCheck($relold, $new, $type);
160 return $new;
165 $goalpath = explode(':', getNS($new));
176 // build the new relative path
179 $newrel .= noNS($new);
183 // if the old link ended with a colon and the new one is a start page, adjust
187 if(strlen($newrel) > strlen($new)) {
188 $newrel = $new;
189 if($this->ns && !getNS($new)) $newrel = ':' . $newrel;
217 // all new, keep CamelCase in title