/**
  * forceUpdate
  *
  * @param XoopsTplFile $tplfile object
  *
  * @return bool
  */
 public function forceUpdate(XoopsTplFile $tplfile)
 {
     if (!$tplfile->isDirty()) {
         return true;
     }
     if (!$tplfile->cleanVars()) {
         return false;
     }
     $vars = $tplfile->cleanVars;
     $tpl_module = $vars['tpl_module'];
     $tpl_refid = $vars['tpl_refid'];
     $tpl_tplset = $vars['tpl_tplset'];
     $tpl_file = $vars['tpl_file'];
     $tpl_desc = $vars['tpl_desc'];
     $tpl_lastmodified = $vars['tpl_lastmodified'];
     $tpl_lastimported = $vars['tpl_lastimported'];
     $tpl_type = $vars['tpl_type'];
     //$tpl_id           = $vars['tpl_id'];
     if (isset($vars['tpl_source'])) {
         $tpl_source = $vars['tpl_source'];
     }
     if (!$tplfile->isNew()) {
         $tpl_id = 0;
         $values = array('tpl_module' => $tpl_module, 'tpl_refid' => $tpl_refid, 'tpl_tplset' => $tpl_tplset, 'tpl_file' => $tpl_file, 'tpl_desc' => $tpl_desc, 'tpl_lastmodified' => $tpl_lastmodified, 'tpl_lastimported' => $tpl_lastimported, 'tpl_type' => $tpl_type);
         if (!$this->db2->updatePrefix('system_tplfile', $values, array('tpl_id' => $tpl_id))) {
             return false;
         }
         if (isset($tpl_source) && $tpl_source != '') {
             $tpl_id = 0;
             $values = array('tpl_source' => $tpl_source);
             if ($this->db2->updatePrefix('system_tplsource', $values, array('tpl_id' => $tpl_id))) {
                 return false;
             }
         }
         return true;
     } else {
         return false;
     }
 }