wwwthomasbauerattf hat geschrieben:in phpbb_styles_template_data konnte ich nichts finden was irgendwie falsch ausschaut.
template_filename existiert ganz normal als "mcp_post.html"
Oops, ist das ein Fehler in umil.php?
Du brichst hier ab:
Code: Alles auswählen
if (!($fp = @fopen("{$phpbb_root_path}styles/{$template_row['template_path']}$pathfile$file", 'r')))
{
return $this->umil_end('FILE_COULD_NOT_READ', "{$phpbb_root_path}styles/{$template_row['template_path']}$pathfile$file");
}
$template_data = fread($fp, filesize("{$phpbb_root_path}styles/{$template_row['template_path']}$pathfile$file"));
fclose($fp);
if (preg_match_all('#<!-- INCLUDE (.*?\.html) -->#is', $template_data, $matches))
{
foreach ($matches[1] as $match)
{
$includes[trim($match)][] = $file;
}
}
}
}
foreach ($filelist as $pathfile => $file_ary)
{
foreach ($file_ary as $file)
{
// Skip index.
if (strpos($file, 'index.') === 0)
{
continue;
}
// We could do this using extended inserts ... but that could be one
// heck of a lot of data ...
$sql_ary = array(
'template_id' => (int) $style_id,
'template_filename' => "$pathfile$file",
'template_included' => (isset($includes[$file])) ? implode(':', $includes[$file]) . ':' : '',
'template_mtime' => (int) filemtime("{$phpbb_root_path}styles/{$template_row['template_path']}$pathfile$file"),
'template_data' => (string) file_get_contents("{$phpbb_root_path}styles/{$template_row['template_path']}$pathfile$file"),
);
$sql = 'UPDATE ' . STYLES_TEMPLATE_DATA_TABLE . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . "
WHERE template_id = $style_id
AND template_filename = '" . $this->db->sql_escape("$pathfile$file") . "'";
$this->db->sql_query($sql);
}
}
unset($filelist);
}
Dieser Code stammt ja eigentlich aus /includes/acp/acp_styles.php. Dort wird aber $template_path um '/template/' ergänzt:
Code: Alles auswählen
2551 function store_templates($mode, $style_id, $template_path, $filelist)
2552 {
2553 global $phpbb_root_path, $phpEx, $db;
2554
2555 $template_path = $template_path . '/template/';
2556 $includes = array();
2557 foreach ($filelist as $pathfile => $file_ary)
2558 {
2559 foreach ($file_ary as $file)
2560 {
2561 if (!($fp = @fopen("{$phpbb_root_path}styles/$template_path$pathfile$file", 'r')))
2562 {
2563 trigger_error("Could not open {$phpbb_root_path}styles/$template_path$pathfile$file", E_USER_ERROR);
2564 }
D.h. in umil müsste jeweils
durch
Code: Alles auswählen
{$template_row['template_path']}/template/$pathfile$file
ersetzt werden.
Die MOD läuft bei dir ohne Problem? Das verstehe ich dann aber nicht. Oder benutzt du noch einen anderen Style, der nicht in der Datenbank gespeichert wird?