Commit dbceaf121ec77b10a4fabc57d05566cc15aa37ac

Authored by Administrator
1 parent 0ffbfe70

20.07.16

Showing 1 changed file with 3 additions and 4 deletions   Show diff stats
console/controllers/SiteMapController.php
... ... @@ -121,9 +121,9 @@ class SiteMapController extends Controller
121 121  
122 122  
123 123  
124   - $dirName = Yii::getAlias('@uploadDir');
  124 + $dirName = Yii::getAlias('@frontend').'/web';
125 125  
126   - $filename = 'sitemap_'. date('d_m_Y_H_i') .'.xml';
  126 + $filename = 'sitemap.xml';
127 127  
128 128 setlocale(LC_ALL, 'ru_RU.CP1251');
129 129 $handle = fopen($dirName .'/'. $filename, "w");
... ... @@ -131,8 +131,7 @@ class SiteMapController extends Controller
131 131 $content = '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
132 132  
133 133 foreach ($this->getAddStatic() as $page) {
134   - $url = Url::to(['text/index','translit' => $page->translit]);
135   - $this->createRow($url , 1,$content);
  134 + $this->createRow($page , 1,$content);
136 135 }
137 136  
138 137 foreach ($this->getStaticPages() as $page) {
... ...