DataObjects/Cms_template.php
authorleon <leon@roojs.com>
Wed, 26 Jul 2023 03:00:05 +0000 (11:00 +0800)
committerleon <leon@roojs.com>
Wed, 26 Jul 2023 03:00:05 +0000 (11:00 +0800)
DataObjects/Cms_template.php

index f736d79..ae2cb70 100644 (file)
@@ -270,77 +270,4 @@ class Pman_Cms_DataObjects_Cms_template  extends Pman_Core_DataObjects_Core_temp
         return clone($tmpl);
     
     }
-
-    function syncPowerpointXMLText($pgdata) 
-    {
-        $ct = DB_DataObject::factory($this->tableName());
-        $ct->viewname = $pgdata['base'];
-
-        if($ct->get('template', $pgdata['template'])) {
-            if(strtotime($ct->updated) >= filetime($pgdata['template_dir'] . '/' . $pgdata['template'])) {
-                if($ct->is_deleted != 0 || $ct->filetype != 'xml') {
-                    $old = clone($ct);
-                    $ct->is_deleted = 0;
-                    $ct->filetype = 'xml';
-                    $ct->update($old);
-                }
-                return $ct;
-            }
-        }
-
-        $words = array();
-
-
-        /*
-        $tmpl = DB_DataObject::Factory($this->tableName());
-        $tmpl->view_name = $pgdata['base'];
-        $tmpl->currentTemplate = $pgdata['template_dir'] . '/'. $pgdata['template'];
-        
-        if ($tmpl->get('template',  $pgdata['template'])) {
-            if (strtotime($tmpl->updated) >= filemtime( $tmpl->currentTemplate )) {
-                if ($tmpl->is_deleted != 0 ||  $tmpl->filetype != 'js') {
-                    $oo = clone($tmpl);
-                    $tmpl->is_deleted = 0;
-                    $tmpl->filetype = 'js';
-                    $tmpl->update($oo);
-                }
-                return $tmpl;
-            }
-        }
-        $words = array();
-        
-        $fc = file_get_contents( $tmpl->currentTemplate );
-        
-        preg_match_all('/\._\("([^"]+)"\)/', $fc, $outd);
-        $words = $outd[1];
-         
-        preg_match_all('/\._\(\'([^\']+)\'\)/', $fc, $outs);
-        
-        // ?? seriously adding two arrays?
-        $words =  array_diff(array_merge($words, $outs[1]), array_intersect($words, $outs[1]));
-        $words = array_unique($words);
-        
-        if (empty($words)) {
-            return;
-        }
-        if ($tmpl->id) {
-            $tmpl->is_deleted = 0;
-            $tmpl->filetype = 'js';
-            $tmpl->update($tmpl);
-        } else {
-            $tmpl->is_deleted = 0;
-            $tmpl->filetype = 'js';
-            $tmpl->lang = 'en';
-            $tmpl->insert();
-        }
-        
-             
-        $tmpl->words = $words;
-            
-        $this->factoryStr()->syncTemplateWords($tmpl);    
-         
-        
-        return $tmpl;
-        */
-    }
 }
\ No newline at end of file