<commit_before><?php
// vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker:
// +-------------------------------------------------------------------------+
// | Author: <NAME> <<EMAIL>>                               |
// +-------------------------------------------------------------------------+
// $Id$
// ---------------------------------------------------------------------------

class Frontend_Controller extends Controller
{
    // {{{ Constructor
    function __construct()
    {
        parent::__construct();

        // Default page title
        $this->layout->page_title = _("Static Pages");
    }
    // }}}
    // {{{ view
    public function view_any($id = 0)
    {
        $this->StaticPages = new StaticPages_Model;

        $exist = false;

        if (is_numeric($id)) {
            $exist = $this->StaticPages->checkID($id);
        }

        if ($exist) {

            $row = $this->StaticPages->getPage($id);

            $data = Array('id'      => $row['id'],
                          'subject' => $row['subject'],
                          'page'    => $row['page']);

            $this->layout->content = new View('frontend/preview', $data);

        } else {
            url::redirect('staticpages/frontend/index','refresh');
        }<commit_msg>Added page title for staticpages.<commit_after><?php
// vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker:
// +-------------------------------------------------------------------------+
// | Author: <NAME> <<EMAIL>>                               |
// +-------------------------------------------------------------------------+
// $Id$
// ---------------------------------------------------------------------------

class Frontend_Controller extends Controller
{
    // {{{ Constructor
    function __construct()
    {
        parent::__construct();

        // Default page title
        $this->layout->page_title = _("Static Pages");
    }
    // }}}
    // {{{ index
    public function index()
    {
    }
    // }}}
    // {{{ view
    public function view_any($id = 0)
    {
        $this->StaticPages = new StaticPages_Model;

        $exist = false;

        if (is_numeric($id)) {
            $exist = $this->StaticPages->checkID($id);
        }

        if ($exist) {

            $row = $this->StaticPages->getPage($id);

            $data = Array('id'      => $row['id'],
                          'subject' => $row['subject'],
                          'page'    => $row['page']);

            $this->layout->page_title = $row['subject'];

            $this->layout->content = new View('frontend/preview', $data);

        } else {
            url::redirect('staticpages/frontend/index','refresh');
        }
{'fraction_non_alphanumeric': 0.3084008843036109, 'fraction_numerical': 0.002210759027266028, 'mean_word_length': 1.098145285935085, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1081017', 'n_tokens_mistral': 682, 'n_tokens_neox': 661, 'n_words': 122}