19declare(strict_types=1);
52 $this->log = $this->domain->
log();
54 $this->wiki_id = $this->pm->getWikiId();
68 foreach($this->missing_page_repo->getSourcesOfMissingTarget(
$wiki_id, $title,
$lang) as $i) {
81 $this->missing_page_repo->deleteForTarget(
$wiki_id, $title,
$lang);
84 $this->missing_page_repo->deleteForSourceId(
$wiki_id, $page_id,
$lang);
87 $xml = $domdoc->saveXML();
89 foreach ($int_wiki_links as $wlink) {
90 $target_page_id = (
int) $this->pm->getPageIdForTitle($wlink,
$lang);
92 if ($target_page_id > 0) {
102 $this->missing_page_repo->save(
120 $wiki_id = $this->wiki_id;
126 foreach ($sources as $source) {
127 if ($source[
"type"] ===
"wpg:pg" && $source[
"lang"] ===
$lang) {
128 $ids[] = (
int) $source[
"id"];
133 foreach ($this->pm->getInfoOfSelected($ids,
$lang) as $p) {
Repository internal data service.
Repository internal repo service.
Wiki internal data service.
MissingPageDBRepository $missing_page_repo
__construct(InternalDataService $data_service, MissingPageDBRepository $missing_page_repo, InternalDomainService $domain, int $ref_id)
saveInternalLinksForPage(\DOMDocument $domdoc, int $page_id, string $title, string $lang)
InternalDomainService $domain
getLinksToPage(int $a_page_id, string $lang="-")
InternalDataService $data_service
static _getSourcesOfTarget(string $a_target_type, int $a_target_id, int $a_target_inst)
get all sources of a link target
static _saveLink(string $a_source_type, int $a_source_id, string $a_target_type, int $a_target_id, int $a_target_inst=0, string $a_source_lang="-")
save internal link information
static collectInternalLinks(string $s, int $a_wiki_id, bool $a_collect_non_ex=false, string $mode=IL_WIKI_MODE_COLLECT)
Collect internal wiki links of a string.