Lines Matching refs:src

207      * @param string $src
210 public function addPageMove($src, $dst) {
211 $this->addMove($src, $dst, self::CLASS_DOC, self::TYPE_PAGES);
217 * @param string $src
220 public function addMediaMove($src, $dst) {
221 $this->addMove($src, $dst, self::CLASS_DOC, self::TYPE_MEDIA);
227 * @param string $src
230 public function addPageNamespaceMove($src, $dst) {
231 $this->addMove($src, $dst, self::CLASS_NS, self::TYPE_PAGES);
237 * @param string $src
240 public function addMediaNamespaceMove($src, $dst) {
241 $this->addMove($src, $dst, self::CLASS_NS, self::TYPE_MEDIA);
247 * @param string $src ID of the item to move
253 protected function addMove($src, $dst, $class = self::CLASS_NS, $type = self::TYPE_PAGES) {
256 $src = cleanID($src);
260 'src' => $src,
302 $this->addToDocumentList($move['src'], $move['dst'], $move['type']);
306 $path = utf8_encodeFN(str_replace(':', '/', $move['src']));
315 if($move['src'] !== '') {
316 $strip = strlen($move['src']) + 1;
334 $this->addToDocumentList($move['src'], $move['dst'], self::CLASS_NS);
336 $this->findMissingDocuments($move['src'] . ':', $move['dst'],$move['type']);
339 $this->findAffectedPages($move['src'], $move['dst'], $move['class'], $move['type']);
489 list($src, $dst) = explode("\t", trim($line));
496 if(!$this->MoveOperator->$call($src, $dst)) {
497 $log .= $this->build_log_line($mark, $src, $dst, false); // FAILURE!
507 $log .= $this->build_log_line($mark, $src, $dst, true); // SUCCESS!
588 list($src, $dst) = explode("\t", $line);
589 $miss[$src] = $dst;
616 * @todo fixed that $src and $dst are seperated by tab, not newline. This method has no tests?
629 list($src, $dst) = explode("\t", trim($line));
630 $FileMover->moveNamespaceSubscription($src, $dst);
679 * If the src has been added before, this is ignored. This makes sure you can move a single page
682 * @param string $src
687 protected function addToDocumentList($src, $dst, $type = self::TYPE_PAGES) {
698 if(!isset($this->tmpstore[$store][$src])) {
699 $this->tmpstore[$store][$src] = $dst;
719 * Looks up pages that will be affected by a move of $src
723 * @param string $src source namespace
728 protected function findAffectedPages($src, $dst, $class, $type) {
732 $src_ = "$src:*"; // use wildcard lookup for namespaces
734 $src_ = $src;
740 $len = strlen($src);
742 if (substr($page, 0, $len + 1) === "$src:") {
755 * Find missing pages in the $src namespace
757 * @param string $src source namespace
761 protected function findMissingDocuments($src, $dst, $type = self::TYPE_PAGES) {
776 $len = strlen($src);
778 if(substr($page, 0, $len) != "$src") continue;
818 foreach($this->tmpstore[$store] as $src => $dst) {
820 $data .= "$src\n"; // for affected pages only one ID is saved
822 $data .= "$src\t$dst\n";
900 $alen = substr_count($a['src'], ':');
901 $blen = substr_count($b['src'], ':');