Subversion Repositories oidplus

Rev

Rev 800 | Rev 1050 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 800 Rev 1041
Line 42... Line 42...
42
} else {
42
} else {
43
        $mode = $_REQUEST['mode'];
43
        $mode = $_REQUEST['mode'];
44
}
44
}
45
 
45
 
46
if (!isset($_REQUEST['lang'])) {
46
if (!isset($_REQUEST['lang'])) {
47
        $lang = 'enus';
47
        $lang = '';
48
} else {
48
} else {
49
        $lang = $_REQUEST['lang'];
49
        $lang = $_REQUEST['lang'];
50
}
50
}
51
 
51
 
52
$candidate1 = __DIR__ . '/../../../../userdata/resources/' . $file;
52
$candidate1 = __DIR__ . '/../../../../userdata/resources/' . $file;
Line 60... Line 60...
60
        $file = $candidate2;
60
        $file = $candidate2;
61
}
61
}
62
 
62
 
63
if (($mode == 'leaf_url_icon16') || ($mode == 'leaf_doc_icon16') || ($mode == 'folder_icon16')) {
63
if (($mode == 'leaf_url_icon16') || ($mode == 'leaf_doc_icon16') || ($mode == 'folder_icon16')) {
64
 
64
 
65
        if (file_exists($icon_candidate = getIconCandidate($file, 'png', 'tree', $lang))) {
65
        if (!empty($lang) && file_exists($icon_candidate = getIconCandidate($file, 'png', 'tree', $lang))) {
66
                httpOutWithETag(file_get_contents($icon_candidate), 'image/png', basename($icon_candidate));
66
                httpOutWithETag(file_get_contents($icon_candidate), 'image/png', basename($icon_candidate));
67
        } else if (file_exists($icon_candidate = getIconCandidate($file, 'png', 'tree', ''))) {
67
        } else if (file_exists($icon_candidate = getIconCandidate($file, 'png', 'tree', ''))) {
68
                httpOutWithETag(file_get_contents($icon_candidate), 'image/png', basename($icon_candidate));
68
                httpOutWithETag(file_get_contents($icon_candidate), 'image/png', basename($icon_candidate));
69
        } else if (file_exists($icon_candidate = __DIR__.'/img/'.$mode.'.png')) { // default icon for mode
69
        } else if (file_exists($icon_candidate = __DIR__.'/img/'.$mode.'.png')) { // default icon for mode
70
                httpOutWithETag(file_get_contents($icon_candidate), 'image/png', basename($icon_candidate));
70
                httpOutWithETag(file_get_contents($icon_candidate), 'image/png', basename($icon_candidate));
Line 72... Line 72...
72
                httpOutWithETag(SPACER_PNG, 'image/png'); // should not happen
72
                httpOutWithETag(SPACER_PNG, 'image/png'); // should not happen
73
        }
73
        }
74
 
74
 
75
} else if (($mode == 'leaf_url_icon') || ($mode == 'leaf_doc_icon') || ($mode == 'folder_icon')) {
75
} else if (($mode == 'leaf_url_icon') || ($mode == 'leaf_doc_icon') || ($mode == 'folder_icon')) {
76
 
76
 
77
        if (file_exists($icon_candidate = getIconCandidate($file, 'png', 'big', $lang))) {
77
        if (!empty($lang) && file_exists($icon_candidate = getIconCandidate($file, 'png', 'big', $lang))) {
78
                httpOutWithETag(file_get_contents($icon_candidate), 'image/png', basename($icon_candidate));
78
                httpOutWithETag(file_get_contents($icon_candidate), 'image/png', basename($icon_candidate));
79
        } else if (file_exists($icon_candidate = getIconCandidate($file, 'png', 'big', ''))) {
79
        } else if (file_exists($icon_candidate = getIconCandidate($file, 'png', 'big', ''))) {
80
                httpOutWithETag(file_get_contents($icon_candidate), 'image/png', basename($icon_candidate));
80
                httpOutWithETag(file_get_contents($icon_candidate), 'image/png', basename($icon_candidate));
81
        } else if (file_exists($icon_candidate = __DIR__.'/img/'.$mode.'.png')) { // default icon for mode
81
        } else if (file_exists($icon_candidate = __DIR__.'/img/'.$mode.'.png')) { // default icon for mode
82
                httpOutWithETag(file_get_contents($icon_candidate), 'image/png', basename($icon_candidate));
82
                httpOutWithETag(file_get_contents($icon_candidate), 'image/png', basename($icon_candidate));