G Sitemap

Tasklist

FS#33 - Parameter pg change to idpg in GuppY 4.6.10

Attached to Project: G Sitemap
Opened by Sylvain (hpsam) - Tuesday, 15 September 2009, 12:58 GMT
Last edited by Sylvain (hpsam) - Tuesday, 15 September 2009, 14:17 GMT
Task Type Bug Report
Category Display
Status Closed
Assigned To Sylvain (hpsam)
Operating System All
Severity Medium
Priority Normal
Reported Version 1.3.1
Due in Version 1.3.2
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The links to events change in GuppY 4.6.10.
For an article with the ID X :
Before: pg=X
After: idpg=X/

------------------------------

Les liens vers les événements change avec GuppY 4.6.10.
Pour un article avec l'ID x :
Avant : pg=X
Après : idpg=X/
This task depends upon

Closed by  Sylvain (hpsam)
Tuesday, 15 September 2009, 14:17 GMT
Reason for closing:  Fixed
Comment by Sylvain (hpsam) - Tuesday, 15 September 2009, 13:51 GMT
Replace GSCreateXmlFromDB function by this one :

function GSCreateXmlFromDB($fields, $page) {
global $xml0, $xml1, $lang, $site, $ISOcode;
$gsCountFields = count($fields);

$page = $site[3] . $page . '%d&lng=%s';
// For agenda compatibility with GuppY before and after 4.6.10
if (strpos($page, 'agenda') !== false) $page .= '&idpg=%1$d/';

for ($i = 0; $i < $gsCountFields; $i++) {

$xml0 .= "<url>\n";
$xml0 .= '<loc>'.EncodeISO(sprintf($page, $fields[$i], $lang[0]),$ISOcode)."</loc>\n";
$lastmod = "";
if (filemtime(DBBASE.$fields[$i].INCEXT)) {
$lastmod = date("Y-m-d",filemtime(DBBASE.$fields[$i].INCEXT));
$xml0 .= '<lastmod>'.$lastmod."</lastmod>\n";
}
$xml0 .= "<changefreq>weekly</changefreq>\n";
$xml0 .= "<priority>0.5</priority>\n";
$xml0 .= "</url>\n";
if ($lang[1] != "") {
$xml1 .= "<url>\n";
$xml1 .= '<loc>'.EncodeISO(sprintf($page, $fields[$i], $lang[1]),$ISOcode)."</loc>\n";
if ($lastmod != "") {
$xml1 .= '<lastmod>'.$lastmod."</lastmod>\n";
}
$xml1 .= "<changefreq>weekly</changefreq>\n";
$xml1 .= "<priority>0.5</priority>\n";
$xml1 .= "</url>\n";
}
echo " | ";
}
echo " [$gsCountFields]";
}

Loading...