Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. <?php
  2.  
  3. $list = new \Concrete\Core\Page\PageList();
  4. $list->ignorePermissions();
  5. $pages = $list->getResults();
  6.  
  7. $count = 0;
  8.  
  9. /** @var \Concrete\Core\Page\Page $page */
  10. foreach ($pages as $page) {
  11. $page->clearPagePaths();
  12. $page->rescanCollectionPath();
  13. ++$count;
  14. }
  15.  
  16. echo sprintf('%d pages rescanned.', $count);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement