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:
@@ -97,15 +97,18 @@ class portal_clock_module
|
||||
{
|
||||
global $db, $phpbb_root_path, $phpEx, $user;
|
||||
|
||||
$sql = 'SELECT style_name
|
||||
FROM ' . STYLES_TABLE . '
|
||||
WHERE style_active = 1';
|
||||
$sql = 'SELECT st.theme_path
|
||||
FROM ' . STYLES_THEME_TABLE . ' st
|
||||
LEFT JOIN ' . STYLES_TABLE . ' s
|
||||
ON (st.theme_id = s.style_id)
|
||||
WHERE s.style_active = 1';
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user