<commit_before><?php
/**
 *                    Jojo CMS
 *                ================
 *
 * Copyright 2007 <NAME> <<EMAIL>>
 * Copyright 2007 <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
 */


class JOJO_Plugin_Jojo_links extends JOJO_Plugin
{

    function _getContent()
    {
        global  $smarty;
        $content = array();

        if (Jojo::tableexists('linkcategory'))  {
            $linkcategorys = Jojo::selectQuery("SELECT * FROM linkcategory, link WHERE lk_categoryid=linkcategoryid GROUP BY linkcategoryid ORDER BY lc_order, lc_name"); //the join strips out categories with no links
            $smarty->assign('linkcategorys', $linkcategorys);
        }

        $links = Jojo::selectQuery("SELECT * FROM link WHERE 1 ORDER BY lk_order, lk_name");
        /* ensure images aren't broken */
        $n = count($links);
        for ($i=0;$i<$n;$i++) {
            if (!Jojo::fileExists(_DOWNLOADDIR.'/links/'.$links[$i]['lk_image'])) {
                $links[$i]['lk_image'] = '';
            }
        }
        $smarty->assign('links', $links);

        $thumbsize = 120;

        $smarty->assign('content', $this->page['pg_body']);

        $content['content'] = $smarty->fetch('jojo_links.tpl');

        return $content;
    }
}<commit_msg>adding curly brackets to database queries<commit_after><?php
/**
 *                    Jojo CMS
 *                ================
 *
 * Copyright 2007 <NAME> <<EMAIL>>
 * Copyright 2007 <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
 */


class JOJO_Plugin_Jojo_links extends JOJO_Plugin
{

    function _getContent()
    {
        global  $smarty;
        $content = array();

        if (Jojo::tableexists('linkcategory'))  {
            $linkcategorys = Jojo::selectQuery("SELECT * FROM {linkcategory}, {link} WHERE lk_categoryid=linkcategoryid GROUP BY linkcategoryid ORDER BY lc_order, lc_name"); //the join strips out categories with no links
            $smarty->assign('linkcategorys', $linkcategorys);
        }

        $links = Jojo::selectQuery("SELECT * FROM {link} WHERE 1 ORDER BY lk_order, lk_name");
        /* ensure images aren't broken */
        $n = count($links);
        for ($i=0;$i<$n;$i++) {
            if (!Jojo::fileExists(_DOWNLOADDIR.'/links/'.$links[$i]['lk_image'])) {
                $links[$i]['lk_image'] = '';
            }
        }
        $smarty->assign('links', $links);

        $thumbsize = 120;

        $smarty->assign('content', $this->page['pg_body']);

        $content['content'] = $smarty->fetch('jojo_links.tpl');

        return $content;
    }
}
{'fraction_non_alphanumeric': 0.16706875753920386, 'fraction_numerical': 0.010253317249698432, 'mean_word_length': 2.6611479028697573, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 49, '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': '3896038', 'n_tokens_mistral': 1104, 'n_tokens_neox': 1023, 'n_words': 243}