Ejemplo n.º 1
0
 function _checkFile($directory, $file)
 {
     $f = "{$directory}/{$file}";
     if (is_dir($f) && ctype_digit($file)) {
         return 1;
     }
     if (fnmatch('entry*' . EXT, $file)) {
         $id = basename($file, EXT);
         $arr = draft_parse($id);
         //$this->add($id, $arr['subject']);
         $this->_list[$id] = $arr['subject'];
         return 0;
     }
 }
Ejemplo n.º 2
0
 function main()
 {
     global $fpdb;
     if (isset($_REQUEST['entry'])) {
         $id = $_REQUEST['entry'];
         if ($a = entry_parse($id)) {
         } else {
             $a = draft_parse($id);
         }
         if ($a) {
             if (THEME_LEGACY_MODE) {
                 theme_entry_filters($a, $id);
             }
             $this->smarty->assign('entry', $a);
             $this->smarty->assign('id', $id);
             return 0;
         }
     }
     return 1;
 }
Ejemplo n.º 3
0
 function main()
 {
     global $lang;
     $id = $this->id;
     if (isset($_REQUEST['entry'])) {
         $arr = draft_parse($id);
         if (!$arr) {
             $arr = entry_parse($id);
         } else {
             $this->smarty->assign('draft', true);
         }
         // if entry does not exists
         if ($arr) {
             $this->_makePreview($arr, $id);
         }
     }
     $this->_getCatsFlags();
     add_filter('wp_title', array(&$this, 'makePageTitle'), 10, 2);
     if ($this->draft) {
         add_filter('admin_body_class', array(&$this, 'draft_class'));
     }
 }