mirror of
https://github.com/e107inc/e107.git
synced 2025-07-24 00:12:24 +02:00
Attempt to fix the import of custom pages and build well formed sitemap
links
This commit is contained in:
@@ -361,7 +361,7 @@ class gsitemap
|
||||
{
|
||||
if(!$sql -> select("gsitemap", "*", "gsitemap_name='".$row['page_title']."' "))
|
||||
{
|
||||
$importArray[] = array('name' => $row['page_title'], 'url' => "page.php?".$row['page_id'],'type' => "Custom Page");
|
||||
$importArray[] = array('name' => $row['page_title'], 'url' => e107::getUrl()->create('page/view', $row, array('allow' => 'page_sef,page_title,page_id')), 'type' => "Custom Page");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -376,13 +376,13 @@ class gsitemap
|
||||
{
|
||||
if(!$sql -> select("gsitemap", "*", "gsitemap_name='".$row['forum_name']."' "))
|
||||
{
|
||||
$importArray[] = array('name' => $row['forum_name'], 'url' => $PLUGINS_DIRECTORY."forum/forum_viewforum.php?".$row['forum_id'], 'type' => "Forum");
|
||||
$importArray[] = array('name' => $row['forum_name'], 'url' => e107::getUrl()->create('forum/forum/view', $row['forum_id']), 'type' => "Forum");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* content pages ... */
|
||||
/* DEPRECATED content pages ...
|
||||
if(plugInstalled('content'))
|
||||
{
|
||||
$sql -> select("pcontent", "content_id, content_heading", "LEFT(content_parent,1) = '0' ORDER BY content_heading");
|
||||
@@ -400,7 +400,7 @@ class gsitemap
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
$text = "
|
||||
<form action='".e_SELF."' id='form' method='post'>
|
||||
|
@@ -54,6 +54,7 @@ $sql -> db_Select("gsitemap", "*", "gsitemap_active IN (".USERCLASS_LIST.") ORDE
|
||||
$smArray = $sql -> db_getList();
|
||||
foreach($smArray as $sm)
|
||||
{
|
||||
if($sm['gsitemap_url'][0] == '/') $sm['gsitemap_url'] = ltrim($sm['gsitemap_url'], '/');
|
||||
$loc = (substr($sm['gsitemap_url'],0,4)== "http")? $sm['gsitemap_url'] : SITEURL.$tp->replaceConstants($sm['gsitemap_url'],TRUE);
|
||||
$xml .= "
|
||||
<url>
|
||||
|
Reference in New Issue
Block a user