Skip to content

Commit

Permalink
Merge branch 'release/6.0.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
hadimansouri committed Apr 25, 2020
2 parents 6ffe56d + d19674c commit 06c7ddc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 25 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name" : "pluf/seo",
"version" : "6.0.10",
"version" : "6.0.11",
"description" : "SEO package of pluf",
"type" : "library",
"license" : "MIT",
Expand Down
7 changes: 7 additions & 0 deletions sql/V6.0.9.1__Seo_set_some_fields_nullable.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

ALTER TABLE `seo_sitemap_link` CHANGE `title` `title` varchar(50) DEFAULT '';
ALTER TABLE `seo_sitemap_link` CHANGE `description` `description` varchar(200) DEFAULT '';
ALTER TABLE `seo_sitemap_link` CHANGE `lastmod` `lastmod` datetime DEFAULT '0000-00-00 00:00:00';
ALTER TABLE `seo_sitemap_link` CHANGE `changefreq` `changefreq` varchar(16) DEFAULT '';
ALTER TABLE `seo_sitemap_link` CHANGE `priority` `priority` decimal(32,8) DEFAULT '0.00000000';

28 changes: 6 additions & 22 deletions src/Seo/SitemapLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,64 +80,48 @@ function init()
$this->_a['cols'] = array(
'id' => array(
'type' => 'Sequence',
'blank' => true,
'verbose' => 'unique and no repreducable id fro reception'
),
'title' => array(
'type' => 'Varchar',
'blank' => true,
'is_null' => true,
'size' => 50,
'editable' => true,
'readable' => true
),
'description' => array(
'type' => 'Varchar',
'blank' => true,
'is_null' => true,
'size' => 200,
'editable' => true,
'readable' => true
),
'loc' => array(
'type' => 'Varchar',
'blank' => false,
'is_null' => false,
'size' => 2048,
'editable' => true,
'readable' => true
),
'lastmod' => array(
'type' => 'Datetime',
'blank' => true,
'is_null' => true,
'verbose' => 'last modification date',
'editable' => true,
'readable' => true
),
'changefreq' => array(
'type' => 'Varchar',
'blank' => true,
'is_null' => true,
'size' => 16,
'editable' => true,
'readable' => true
),
'priority' => array(
'type' => 'Float',
'blank' => true,
'is_null' => true,
'editable' => true,
'readable' => true
),
// 'creation_dtime' => array(
// 'type' => 'Datetime',
// 'blank' => true,
// 'verbose' => 'creation date',
// 'editable' => false,
// 'readable' => true
// ),
// 'modif_dtime' => array(
// 'type' => 'Datetime',
// 'blank' => true,
// 'verbose' => 'modification date',
// 'editable' => false,
// 'readable' => true
// )
);
}

Expand Down
3 changes: 1 addition & 2 deletions templates/sitemap.template
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{assign $tag1='<?xml version="1.0" encoding="UTF-8" ?>'}{$tag1|safe}
{assign $tag2='<?xml-stylesheet href="/seo/xsl/sitemap.xsl" type="text/xsl" ?>'}{$tag2|safe}
{assign $tag2='<?xml-stylesheet href="https://cdn.viraweb123.ir/api/v2/cdn/libs/seo@0.1.0/xsl/xml-sitemap.xsl" type="text/xsl" ?>'}{$tag2|safe}
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
{foreach $links as $link}<url>
<loc>{$link->loc}</loc>
{if $link->lastmod!=='0000-00-00 00:00:00'}<lastmod>{$link->lastmod}</lastmod>{/if}
{if $link->changefreq}<changefreq>{$link->changefreq}</changefreq>{/if}
{if $link->priority}<priority>{$link->priority}</priority>{/if}
</url>{/foreach}
Expand Down

0 comments on commit 06c7ddc

Please sign in to comment.