Преглед изворни кода

Set order in canonical addresses

Visman пре 2 година
родитељ
комит
fcee58adea

+ 2 - 0
app/Models/Pages/Auth.php

@@ -120,6 +120,7 @@ class Auth extends Page
         $this->nameTpl      = 'login';
         $this->onlinePos    = 'login';
         $this->onlineDetail = null;
+        $this->canonical    = $this->c->Router->link('Login');
         $this->robots       = 'noindex';
         $this->titles       = 'Login';
         $this->regLink      = 1 === $this->c->config->b_regs_allow ? $this->c->Router->link('Register') : null;
@@ -363,6 +364,7 @@ class Auth extends Page
         $this->nameTpl      = 'passphrase_reset';
         $this->onlinePos    = 'passphrase_reset';
         $this->onlineDetail = null;
+        $this->canonical    = $this->c->Router->link('Forget');
         $this->robots       = 'noindex';
         $this->titles       = 'Passphrase reset';
         $this->form         = $this->formForget($v->email ?? $email);

+ 1 - 1
app/Models/Pages/Delete.php

@@ -72,7 +72,7 @@ class Delete extends Page
 
         $this->nameTpl    = 'post';
         $this->onlinePos  = 'topic-' . $topic->id;
-        $this->canonical  = $post->linkDelete;
+//        $this->canonical  = $post->linkDelete;
         $this->robots     = 'noindex';
         $this->formTitle  = $deleteTopic ? 'Delete topic' : 'Delete post';
         $this->crumbs     = $this->crumbs($this->formTitle, $topic);

+ 1 - 1
app/Models/Pages/Edit.php

@@ -129,7 +129,7 @@ class Edit extends Page
 
         $this->nameTpl   = 'post';
         $this->onlinePos = 'topic-' . $topic->id;
-        $this->canonical = $post->linkEdit;
+//        $this->canonical = $post->linkEdit;
         $this->robots    = 'noindex';
         $this->formTitle = $firstPost ? 'Edit topic' : 'Edit post';
         $this->crumbs    = $this->crumbs($this->formTitle, $topic);

+ 1 - 0
app/Models/Pages/Rules.php

@@ -47,6 +47,7 @@ class Rules extends Page
         $this->nameTpl      = 'rules';
         $this->onlinePos    = 'rules';
         $this->onlineDetail = null;
+        $this->canonical    = $this->c->Router->link('Register');
         $this->robots       = 'noindex';
         $this->crumbs       = $this->crumbs(
             'Forum rules',

+ 1 - 1
app/Models/Pages/Search.php

@@ -143,7 +143,7 @@ class Search extends Page
         $this->nameTpl      = 'search';
         $this->onlinePos    = 'search';
         $this->onlineDetail = null;
-        $this->canonical    = $this->c->Router->link('Search');
+        $this->canonical    = $this->c->Router->link($advanced ? 'SearchAdvanced' : 'Search');
         $this->robots       = 'noindex';
         $this->form         = $advanced ? $this->formSearchAdvanced($v) : $this->formSearch($v);
         $this->crumbs       = $this->crumbs();