Beispiel #1
0
 /**
  * function to update compiled template file in cache folder
  *
  * @param string $tpl_id template id
  *
  * @return boolean
  */
 public function templateTouch($tpl_id)
 {
     $tplfile = $this->getHandlerTplFile()->get($tpl_id);
     if (is_object($tplfile)) {
         $file = $tplfile->getVar('tpl_file', 'n');
         $module = $tplfile->getVar('tpl_module', 'n');
         $type = $tplfile->getVar('tpl_type', 'n');
         $tpl = new XoopsTpl();
         return $tpl->touch($type . ':' . $module . '/' . $file);
     }
     return false;
 }
Beispiel #2
0
/**
 * function to update compiled template file in templates_c folder
 *
 * @param string $tpl_id
 * @param boolean $clear_old
 * @return boolean
 */
function xoops_template_touch($tpl_id, $clear_old = true)
{
    $tplfile_handler =& xoops_gethandler('tplfile');
    $tplfile =& $tplfile_handler->get($tpl_id);
    if (is_object($tplfile)) {
        $file = $tplfile->getVar('tpl_file', 'n');
        $tpl = new XoopsTpl();
        return $tpl->touch('db:' . $file);
    }
    return false;
}