<commit_before><?php
/**
 *                    Jojo CMS
 *                ================
 *
 * Copyright 2007-2008 <NAME> <<EMAIL>>
 * Copyright 2007-2008 <NAME> <<EMAIL>>
 * Copyright 2007 <NAME> <<EMAIL>>
 *
 * See the enclosed file license.txt for license information (LGPL). If you
 * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
 *
 * @author  <NAME> <<EMAIL>>
 * @author  <NAME> <<EMAIL>>
 * @author  <NAME> <<EMAIL>>
 * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License
 * @link    http://www.jojocms.org JojoCMS
 * @package jojo_sitemap
 */

/* Add a Sitemap page is one does not exist */
Jojo::updateQuery("UPDATE {page} SET pg_link='Jojo_Plugin_Jojo_sitemap' WHERE pg_link='jojo_sitemap.php'");
$data = Jojo::selectQuery("SELECT * FROM {page} WHERE pg_link='Jojo_Plugin_Jojo_Sitemap'");
if (!count($data)) {
    echo "Adding <b>Sitemap</b> Page to menu<br />";
    Jojo::insertQuery("INSERT INTO {page} SET pg_title='Sitemap', pg_link='Jojo_Plugin_Jojo_Sitemap', pg_url='sitemap', pg_desc='A simple listing of all pages on this website', pg_mainnav='no', pg_footernav='yes'");
}

/* Update for old filename */
Jojo::updateQuery("UPDATE {page} SET pg_link = 'Jojo_Plugin_Jojo_SitemapXML' WHERE pg_link = 'xml_sitemap.php' OR pg_link = 'Jojo_Plugin_Xml_sitemap'");

/* Add Google sitemap (sitemap.xml) page if one does not exist */
$data = Jojo::selectQuery("SELECT * FROM {page} WHERE pg_link = 'Jojo_Plugin_Jojo_SitemapXML'");
if (!count($data)) {
    echo "Adding <b>Google Sitemap</b> Page<br />";
    Jojo::insertQuery("INSERT INTO {page} SET pg_title = 'XML Sitemap', pg_link = 'Jojo_Plugin_Jojo_SitemapXML', pg_url = 'sitemap.xml', pg_parent = ?, pg_order=0, pg_mainnav='no', pg_xmlsitemapnav='no', pg_index='yes', pg_body = ''", array($_NOT_ON_MENU_ID));
}

/* Add gss.xsl page if one does not exist */
$data = Jojo::selectQuery("SELECT * FROM {page} WHERE pg_link = 'Jojo_Plugin_Jojo_SitemapXSL'");
if (!count($data)) {
    echo "Adding <b>Google_sitemap_style.xsl</b> Page<br />";
    Jojo::insertQuery("INSERT INTO {page} SET pg_title = 'Google_Sitemap_Style.xsl', pg_link = 'Jojo_Plugin_Jojo_SitemapXSL', pg_url = 'google_sitemap_style.xsl', pg_parent = ?, pg_order=0, pg_mainnav='no', pg_xmlsitemapnav='no', pg_index='no', pg_body = ''", array($_NOT_ON_MENU_ID));
}


/* add extra page fields for xml lastmod/changefreq/priority  - michaelbrandon 10/7/08*/

$table="page";
<commit_msg>don't disallow sitemap stylesheet by default<commit_after><?php
/**
 *                    Jojo CMS
 *                ================
 *
 * Copyright 2007-2008 <NAME> <<EMAIL>>
 * Copyright 2007-2008 <NAME> <<EMAIL>>
 * Copyright 2007 <NAME> <<EMAIL>>
 *
 * See the enclosed file license.txt for license information (LGPL). If you
 * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
 *
 * @author  <NAME> <<EMAIL>>
 * @author  <NAME> <<EMAIL>>
 * @author  <NAME> <<EMAIL>>
 * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License
 * @link    http://www.jojocms.org JojoCMS
 * @package jojo_sitemap
 */

/* Add a Sitemap page is one does not exist */
Jojo::updateQuery("UPDATE {page} SET pg_link='Jojo_Plugin_Jojo_sitemap' WHERE pg_link='jojo_sitemap.php'");
$data = Jojo::selectQuery("SELECT * FROM {page} WHERE pg_link='Jojo_Plugin_Jojo_Sitemap'");
if (!count($data)) {
    echo "Adding <b>Sitemap</b> Page to menu<br />";
    Jojo::insertQuery("INSERT INTO {page} SET pg_title='Sitemap', pg_link='Jojo_Plugin_Jojo_Sitemap', pg_url='sitemap', pg_desc='A simple listing of all pages on this website', pg_mainnav='no', pg_footernav='yes'");
}

/* Update for old filename */
Jojo::updateQuery("UPDATE {page} SET pg_link = 'Jojo_Plugin_Jojo_SitemapXML' WHERE pg_link = 'xml_sitemap.php' OR pg_link = 'Jojo_Plugin_Xml_sitemap'");

/* Add Google sitemap (sitemap.xml) page if one does not exist */
$data = Jojo::selectQuery("SELECT * FROM {page} WHERE pg_link = 'Jojo_Plugin_Jojo_SitemapXML'");
if (!count($data)) {
    echo "Adding <b>Google Sitemap</b> Page<br />";
    Jojo::insertQuery("INSERT INTO {page} SET pg_title = 'XML Sitemap', pg_link = 'Jojo_Plugin_Jojo_SitemapXML', pg_url = 'sitemap.xml', pg_parent = ?, pg_order=0, pg_mainnav='no', pg_xmlsitemapnav='no', pg_index='yes', pg_body = ''", array($_NOT_ON_MENU_ID));
}

/* Add gss.xsl page if one does not exist */
$data = Jojo::selectQuery("SELECT * FROM {page} WHERE pg_link = 'Jojo_Plugin_Jojo_SitemapXSL'");
if (!count($data)) {
    echo "Adding <b>Google_sitemap_style.xsl</b> Page<br />";
    Jojo::insertQuery("INSERT INTO {page} SET pg_title = 'Google_Sitemap_Style.xsl', pg_link = 'Jojo_Plugin_Jojo_SitemapXSL', pg_url = 'google_sitemap_style.xsl', pg_parent = ?, pg_order=0, pg_mainnav='no', pg_xmlsitemapnav='no', pg_index='yes', pg_body = ''", array($_NOT_ON_MENU_ID));
}


/* add extra page fields for xml lastmod/changefreq/priority  - michaelbrandon 10/7/08*/

$table="page";

{'fraction_non_alphanumeric': 0.1655241935483871, 'fraction_numerical': 0.010887096774193548, 'mean_word_length': 4.97710843373494, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7634922', 'n_tokens_mistral': 1896, 'n_tokens_neox': 1810, 'n_words': 417}