function check_clock_src:

binded the function to the real theme path, not the theme name. Sometimes they are different (e.g name: Board3Portal; path: board3portal) and "file_exists" is case sensitive - so we wont run into a "does not exist" loop.
This commit is contained in:
Kevin
2011-01-11 11:45:34 +00:00
parent 19c3163a2b
commit b334139ce6

View File

@@ -97,15 +97,18 @@ class portal_clock_module
{ {
global $db, $phpbb_root_path, $phpEx, $user; global $db, $phpbb_root_path, $phpEx, $user;
$sql = 'SELECT style_name $sql = 'SELECT st.theme_path
FROM ' . STYLES_TABLE . ' FROM ' . STYLES_THEME_TABLE . ' st
WHERE style_active = 1'; LEFT JOIN ' . STYLES_TABLE . ' s
ON (st.theme_id = s.style_id)
WHERE s.style_active = 1';
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
while($row = $db->sql_fetchrow($result)) while($row = $db->sql_fetchrow($result))
{ {
if(!file_exists($phpbb_root_path . 'styles/' . $row['style_name'] . '/theme/images/portal/' . $value)) if(!file_exists($phpbb_root_path . 'styles/' . $row['theme_path'] . '/theme/images/portal/' . $value))
{ {
$error .= $user->lang['B3P_FILE_NOT_FOUND'] . ': styles/' . $row['style_name'] . '/theme/images/portal/' . $value . '<br />'; $error = $user->lang['B3P_FILE_NOT_FOUND'] . ': styles/' . $row['theme_path'] . '/theme/images/portal/' . $value . '<br />';
} }
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);