<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_core
 */

$table = 'contentcache';
$query = "
    CREATE TABLE {contentcache} (
      `cc_url` varchar(255) NOT NULL default '',
      `cc_userid` int(11) NOT NULL default '0',
      `cc_content` text NOT NULL,
      `cc_cached` int(11) NOT NULL default '0',
      `cc_expires` int(11) NOT NULL default '0',
      PRIMARY KEY  (`cc_url`,`cc_userid`)
    ) ENGINE=InnoDB;";

/* Check table structure */
$result = Jojo::checkTable($table, $query);

/* Change collation of cc_content field to UTF-8 to avoid ? characters appearing in cached output*/
Jojo::structureQuery("ALTER TABLE {contentcache} CHANGE `cc_content` `cc_content` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ");

/* Output result */
if (isset($result['created'])) {
    echo sprintf("Table <b>%s</b> Does not exist - created empty table.<br />", $table);
}

if (isset($result['added'])) {
    foreach ($result['added'] as $col => $v) {
        echo sprintf("Table <b>%s</b> column <b>%s</b> Does not exist - added.<br />", $table, $col);
    }
}

if (isset($result['different'])) Jojo::printTableDifference($table,$result['different']);<commit_msg>Changed: Increased the content cache size<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_core
 */

$table = 'contentcache';
$query = "
    CREATE TABLE {contentcache} (
      `cc_url` varchar(255) NOT NULL default '',
      `cc_userid` int(11) NOT NULL default '0',
      `cc_content` longtext NOT NULL,
      `cc_cached` int(11) NOT NULL default '0',
      `cc_expires` int(11) NOT NULL default '0',
      PRIMARY KEY  (`cc_url`,`cc_userid`)
    ) ENGINE=InnoDB;";

/* Check table structure */
$result = Jojo::checkTable($table, $query);

/* Change collation of cc_content field to UTF-8 to avoid ? characters appearing in cached output*/
Jojo::structureQuery("ALTER TABLE {contentcache} CHANGE `cc_content` `cc_content` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ");

/* Output result */
if (isset($result['created'])) {
    echo sprintf("Table <b>%s</b> Does not exist - created empty table.<br />", $table);
}

if (isset($result['added'])) {
    foreach ($result['added'] as $col => $v) {
        echo sprintf("Table <b>%s</b> column <b>%s</b> Does not exist - added.<br />", $table, $col);
    }
}

if (isset($result['different'])) Jojo::printTableDifference($table,$result['different']);
{'fraction_non_alphanumeric': 0.17530224525043178, 'fraction_numerical': 0.020149683362118594, 'mean_word_length': 3.6333333333333333, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, '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': '2396744', 'n_tokens_mistral': 1205, 'n_tokens_neox': 1127, 'n_words': 324}