<commit_before><?php

App::uses('AppController', 'Controller');
/**
 * Slides Controller.
 *
 * @property Slide $Slide
 * @property PaginatorComponent $Paginator
 * @property SessionComponent $Session
 */
class SlidesController extends AppController
{
    public $presetVars = array(
        array('field' => 'name', 'type' => 'value'),
        array('field' => 'display_name', 'type' => 'value'),
        array('field' => 'description', 'type' => 'value'),
        array('field' => 'category', 'type' => 'value'),
        array('field' => 'created_f', 'type' => 'value'),
        array('field' => 'created_t', 'type' => 'value'),
    );

    public $uses = array('Slide', 'User');

    public function beforeFilter()
    {
        $this->Auth->allow('index', 'view', 'update_view');
        parent::beforeFilter();
    }

    /**
     * index method.
     */
    public function index()
    {
        $this->set('title_for_layout', __('All Slides'));
        $this->Slide->recursive = 0;

        $this->Prg->commonProcess();

        $add_query = array('Slide.convert_status = '.SUCCESS_CONVERT_COMPLETED);

        $val = isset($this->passedArgs['created_f']) ? $this->passedArgs['created_f'] : null;
        if (!empty($val)) {
            $add_query[] = "Slide.created >= '".$val."'";
        }<commit_msg>refs #3 allow to download without login<commit_after><?php

App::uses('AppController', 'Controller');
/**
 * Slides Controller.
 *
 * @property Slide $Slide
 * @property PaginatorComponent $Paginator
 * @property SessionComponent $Session
 */
class SlidesController extends AppController
{
    public $presetVars = array(
        array('field' => 'name', 'type' => 'value'),
        array('field' => 'display_name', 'type' => 'value'),
        array('field' => 'description', 'type' => 'value'),
        array('field' => 'category', 'type' => 'value'),
        array('field' => 'created_f', 'type' => 'value'),
        array('field' => 'created_t', 'type' => 'value'),
    );

    public $uses = array('Slide', 'User');

    public function beforeFilter()
    {
        $this->Auth->allow('index', 'view', 'update_view', 'download');
        parent::beforeFilter();
    }

    /**
     * index method.
     */
    public function index()
    {
        $this->set('title_for_layout', __('All Slides'));
        $this->Slide->recursive = 0;

        $this->Prg->commonProcess();

        $add_query = array('Slide.convert_status = '.SUCCESS_CONVERT_COMPLETED);

        $val = isset($this->passedArgs['created_f']) ? $this->passedArgs['created_f'] : null;
        if (!empty($val)) {
            $add_query[] = "Slide.created >= '".$val."'";
        }
{'fraction_non_alphanumeric': 0.19924812030075187, 'fraction_numerical': 0.0011278195488721805, 'mean_word_length': 3.0075301204819276, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4607309', 'n_tokens_mistral': 828, 'n_tokens_neox': 813, 'n_words': 165}