private function _rebuild_cache_templates_infos() { $bdd = new Bdd(); $query = $bdd->query('SELECT * FROM ' . TABLE_CONFIG . ' WHERE config_name = "header" OR config_name = "footer"'); $linesFile = array('<?php', '$templates_infos = array();'); while ($fetch = $bdd->fetch($query)) { $infosPart = unserialize($fetch['config_value']); foreach ($infosPart as $k => $info) { $linesFile[] = '$templates_infos[\'' . $fetch['config_lang'] . '\'][\'' . $k . '\'] = \'' . $info . '\';'; } } $linesFile[] = 'return $templates_infos;' . "\n" . '?>'; file_put_contents(DIR_CACHE . 'templates_infos' . CACHE_LOAD, implode("\n", $linesFile)); chmod(DIR_CACHE . 'templates_infos' . CACHE_LOAD, 0777); return $this->get_cache('templates_infos', CACHE_LOAD, true, true); }