Subversion Repositories oidplus

Rev

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

Rev 635 Rev 800
Line 58... Line 58...
58
} else {
58
} else {
59
        // It is a file in res/
59
        // It is a file in res/
60
        $file = $candidate2;
60
        $file = $candidate2;
61
}
61
}
62
 
62
 
63
if (($mode == 'treeicon_folder') || ($mode == 'treeicon_leaf_url') || ($mode == 'treeicon_leaf_doc')) {
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 (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__.'/'.$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));
71
        } else {
71
        } else {
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 == 'icon_leaf_url_big') || ($mode == 'icon_leaf_doc_big') || ($mode == 'icon_folder_big')) {
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 (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__.'/'.$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));
83
        } else {
83
        } else {
84
                httpOutWithETag(SPACER_PNG, 'image/png', 'spacer.png'); // should not happen
84
                httpOutWithETag(SPACER_PNG, 'image/png', 'spacer.png'); // should not happen
85
        }
85
        }
86
 
86