remove deprecated theme_image()

This commit is contained in:
Joschasa 2013-03-20 22:59:08 +01:00
parent 4e4048024a
commit 2a3b6de0ef
17 changed files with 33 additions and 44 deletions

View File

@ -236,8 +236,7 @@ class Dlg extends Handler_Protected {
print "<div style='float : right'> print "<div style='float : right'>
<img style='display : none' <img style='display : none'
id='feed_add_spinner' src='". id='feed_add_spinner' src='images/indicator_white.gif'></div>";
theme_image($this->link, 'images/indicator_white.gif')."'></div>";
print "<input style=\"font-size : 16px; width : 20em;\" print "<input style=\"font-size : 16px; width : 20em;\"
placeHolder=\"".__("Feed or site URL")."\" placeHolder=\"".__("Feed or site URL")."\"
@ -311,8 +310,7 @@ class Dlg extends Handler_Protected {
print "<div dojoType=\"dijit.Toolbar\"> print "<div dojoType=\"dijit.Toolbar\">
<div style='float : right'> <div style='float : right'>
<img style='display : none' <img style='display : none'
id='feed_browser_spinner' src='". id='feed_browser_spinner' src='images/indicator_white.gif'>
theme_image($this->link, 'images/indicator_white.gif')."'>
<input name=\"search\" dojoType=\"dijit.form.TextBox\" size=\"20\" type=\"search\" <input name=\"search\" dojoType=\"dijit.form.TextBox\" size=\"20\" type=\"search\"
onchange=\"dijit.byId('feedBrowserDlg').update()\" value=\"$browser_search\"> onchange=\"dijit.byId('feedBrowserDlg').update()\" value=\"$browser_search\">
<button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('feedBrowserDlg').update()\">".__('Search')."</button> <button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('feedBrowserDlg').update()\">".__('Search')."</button>

View File

@ -321,24 +321,22 @@ class Feeds extends Handler_Protected {
if ($line["marked"] == "t" || $line["marked"] == "1") { if ($line["marked"] == "t" || $line["marked"] == "1") {
$marked_pic = "<img id=\"FMPIC-$id\" $marked_pic = "<img id=\"FMPIC-$id\"
src=\"".theme_image($this->link, 'images/mark_set.svg')."\" src=\"images/mark_set.svg\"
class=\"markedPic\" alt=\"Unstar article\" class=\"markedPic\" alt=\"Unstar article\"
onclick='javascript:toggleMark($id)'>"; onclick='javascript:toggleMark($id)'>";
} else { } else {
$marked_pic = "<img id=\"FMPIC-$id\" $marked_pic = "<img id=\"FMPIC-$id\"
src=\"".theme_image($this->link, 'images/mark_unset.svg')."\" src=\"images/mark_unset.svg\"
class=\"markedPic\" alt=\"Star article\" class=\"markedPic\" alt=\"Star article\"
onclick='javascript:toggleMark($id)'>"; onclick='javascript:toggleMark($id)'>";
} }
if ($line["published"] == "t" || $line["published"] == "1") { if ($line["published"] == "t" || $line["published"] == "1") {
$published_pic = "<img id=\"FPPIC-$id\" src=\"".theme_image($this->link, $published_pic = "<img id=\"FPPIC-$id\" src=\"images/pub_set.svg\"
'images/pub_set.svg')."\"
class=\"markedPic\" class=\"markedPic\"
alt=\"Unpublish article\" onclick='javascript:togglePub($id)'>"; alt=\"Unpublish article\" onclick='javascript:togglePub($id)'>";
} else { } else {
$published_pic = "<img id=\"FPPIC-$id\" src=\"".theme_image($this->link, $published_pic = "<img id=\"FPPIC-$id\" src=\"images/pub_unset.svg\"
'images/pub_unset.svg')."\"
class=\"markedPic\" class=\"markedPic\"
alt=\"Publish article\" onclick='javascript:togglePub($id)'>"; alt=\"Publish article\" onclick='javascript:togglePub($id)'>";
} }
@ -363,8 +361,7 @@ class Feeds extends Handler_Protected {
$score = $line["score"]; $score = $line["score"];
$score_pic = theme_image($this->link, $score_pic = "images/" . get_score_pic($score);
"images/" . get_score_pic($score));
/* $score_title = __("(Click to change)"); /* $score_title = __("(Click to change)");
$score_pic = "<img class='hlScorePic' src=\"images/$score_pic\" $score_pic = "<img class='hlScorePic' src=\"images/$score_pic\"
@ -650,8 +647,7 @@ class Feeds extends Handler_Protected {
$tags_str = format_tags_string($line["tags"], $id); $tags_str = format_tags_string($line["tags"], $id);
$reply['content'] .= "<img src='".theme_image($this->link, $reply['content'] .= "<img src='images/tag.png' alt='Tags' title='Tags'>
'images/tag.png')."' alt='Tags' title='Tags'>
<span id=\"ATSTR-$id\">$tags_str</span> <span id=\"ATSTR-$id\">$tags_str</span>
<a title=\"".__('Edit tags for this article')."\" <a title=\"".__('Edit tags for this article')."\"
href=\"#\" onclick=\"editArticleTags($id, $feed_id, true)\">(+)</a>"; href=\"#\" onclick=\"editArticleTags($id, $feed_id, true)\">(+)</a>";

View File

@ -663,7 +663,7 @@ class RPC extends Handler_Protected {
score = '$score' WHERE ref_id IN ($ids) AND owner_uid = " . $_SESSION["uid"]); score = '$score' WHERE ref_id IN ($ids) AND owner_uid = " . $_SESSION["uid"]);
print json_encode(array("id" => $id, print json_encode(array("id" => $id,
"score_pic" => theme_image($link, get_score_pic($score)))); "score_pic" => get_score_pic($score)));
} }
function setpanelmode() { function setpanelmode() {

View File

@ -786,11 +786,6 @@
} }
} }
// Deprecated, TODO: remove
function theme_image($link, $filename) {
return $filename;
}
function convert_timestamp($timestamp, $source_tz, $dest_tz) { function convert_timestamp($timestamp, $source_tz, $dest_tz) {
try { try {
@ -1825,10 +1820,10 @@
function make_init_params($link) { function make_init_params($link) {
$params = array(); $params = array();
$params["sign_progress"] = theme_image($link, "images/indicator_white.gif"); $params["sign_progress"] = "images/indicator_white.gif";
$params["sign_progress_tiny"] = theme_image($link, "images/indicator_tiny.gif"); $params["sign_progress_tiny"] = "images/indicator_tiny.gif";
$params["sign_excl"] = theme_image($link, "images/sign_excl.svg"); $params["sign_excl"] = "images/sign_excl.svg";
$params["sign_info"] = theme_image($link, "images/sign_info.svg"); $params["sign_info"] = "images/sign_info.svg";
foreach (array("ON_CATCHUP_SHOW_NEXT_FEED", "HIDE_READ_FEEDS", foreach (array("ON_CATCHUP_SHOW_NEXT_FEED", "HIDE_READ_FEEDS",
"ENABLE_FEED_CATS", "FEEDS_SORT_BY_UNREAD", "CONFIRM_FEED_CATCHUP", "ENABLE_FEED_CATS", "FEEDS_SORT_BY_UNREAD", "CONFIRM_FEED_CATCHUP",
@ -2839,19 +2834,19 @@
function format_warning($msg, $id = "") { function format_warning($msg, $id = "") {
global $link; global $link;
return "<div class=\"warning\" id=\"$id\"> return "<div class=\"warning\" id=\"$id\">
<img src=\"".theme_image($link, "images/sign_excl.svg")."\">$msg</div>"; <img src=\"images/sign_excl.svg\">$msg</div>";
} }
function format_notice($msg, $id = "") { function format_notice($msg, $id = "") {
global $link; global $link;
return "<div class=\"notice\" id=\"$id\"> return "<div class=\"notice\" id=\"$id\">
<img src=\"".theme_image($link, "images/sign_info.svg")."\">$msg</div>"; <img src=\"images/sign_info.svg\">$msg</div>";
} }
function format_error($msg, $id = "") { function format_error($msg, $id = "") {
global $link; global $link;
return "<div class=\"error\" id=\"$id\"> return "<div class=\"error\" id=\"$id\">
<img src=\"".theme_image($link, "images/sign_excl.svg")."\">$msg</div>"; <img src=\"images/sign_excl.svg\">$msg</div>";
} }
function print_notice($msg) { function print_notice($msg) {
@ -3040,7 +3035,7 @@
if (!$entry_comments) $entry_comments = "&nbsp;"; # placeholder if (!$entry_comments) $entry_comments = "&nbsp;"; # placeholder
$rv['content'] .= "<div class='postTags' style='float : right'> $rv['content'] .= "<div class='postTags' style='float : right'>
<img src='".theme_image($link, 'images/tag.png')."' <img src='images/tag.png'
class='tagsPic' alt='Tags' title='Tags'>&nbsp;"; class='tagsPic' alt='Tags' title='Tags'>&nbsp;";
if (!$zoom_mode) { if (!$zoom_mode) {

View File

@ -128,11 +128,11 @@
<div id="header"> <div id="header">
<img id="net-alert" style="display : none" <img id="net-alert" style="display : none"
title="<?php echo __("Communication problem with server.") ?>" title="<?php echo __("Communication problem with server.") ?>"
src="<?php echo theme_image($link, 'images/alert.png') ?>"/> src="images/alert.png"/>
<img id="newVersionIcon" style="display:none" onclick="newVersionDlg()" <img id="newVersionIcon" style="display:none" onclick="newVersionDlg()"
width="13" height="13" width="13" height="13"
src="<?php echo theme_image($link, 'images/new_version.png') ?>" src="images/new_version.png"
title="<?php echo __('New version of Tiny Tiny RSS is available!') ?>" title="<?php echo __('New version of Tiny Tiny RSS is available!') ?>"
alt="new_version_icon"/> alt="new_version_icon"/>
</div> </div>
@ -201,12 +201,12 @@
<button id="net-alert" dojoType="dijit.form.Button" style="display : none" disabled="true" <button id="net-alert" dojoType="dijit.form.Button" style="display : none" disabled="true"
title="<?php echo __("Communication problem with server.") ?>"> title="<?php echo __("Communication problem with server.") ?>">
<img <img
src="<?php echo theme_image($link, 'images/alert.png') ?>" /> src="images/alert.png" />
</button> </button>
<button id="newVersionIcon" dojoType="dijit.form.Button" style="display : none"> <button id="newVersionIcon" dojoType="dijit.form.Button" style="display : none">
<img onclick="newVersionDlg()" <img onclick="newVersionDlg()"
src="<?php echo theme_image($link, 'images/new_version.png') ?>" src="images/new_version.png"
title="<?php echo __('New version of Tiny Tiny RSS is available!') ?>" /> title="<?php echo __('New version of Tiny Tiny RSS is available!') ?>" />
</button> </button>

View File

@ -18,7 +18,7 @@ class Close_Button extends Plugin {
function hook_article_button($line) { function hook_article_button($line) {
if (!get_pref($this->link, "COMBINED_DISPLAY_MODE")) { if (!get_pref($this->link, "COMBINED_DISPLAY_MODE")) {
$rv = "<img src=\"".theme_image($this->link, 'plugins/close_button/button.png')."\" $rv = "<img src=\"plugins/close_button/button.png\"
class='tagsPic' style=\"cursor : pointer\" class='tagsPic' style=\"cursor : pointer\"
onclick=\"closeArticlePanel()\" onclick=\"closeArticlePanel()\"
title='".__('Close article')."'>"; title='".__('Close article')."'>";

View File

@ -25,7 +25,7 @@ class Flattr extends Plugin {
$encoded = urlencode($article_link); $encoded = urlencode($article_link);
$r = file_get_contents("https://api.flattr.com/rest/v2/things/lookup/?url=$encoded"); $r = file_get_contents("https://api.flattr.com/rest/v2/things/lookup/?url=$encoded");
$response = json_decode($r, true); $response = json_decode($r, true);
$image = "<img src=\"".theme_image($this->link, 'plugins/flattr/flattr.png')."\" $image = "<img src=\"plugins/flattr/flattr.png\"
class='tagsPic' style=\"cursor : pointer\" class='tagsPic' style=\"cursor : pointer\"
title='".__('Flattr this article.')."'>"; title='".__('Flattr this article.')."'>";
// if Flattr has it in the catalogue, we display the button // if Flattr has it in the catalogue, we display the button

View File

@ -23,7 +23,7 @@ class GooglePlus extends Plugin {
function hook_article_button($line) { function hook_article_button($line) {
$article_id = $line["id"]; $article_id = $line["id"];
$rv = "<img src=\"".theme_image($this->link, 'plugins/googleplus/googleplus.png')."\" $rv = "<img src=\"plugins/googleplus/googleplus.png\"
class='tagsPic' style=\"cursor : pointer\" class='tagsPic' style=\"cursor : pointer\"
onclick=\"shareArticleToGooglePlus($article_id)\" onclick=\"shareArticleToGooglePlus($article_id)\"
title='".__('Share on Google+')."'>"; title='".__('Share on Google+')."'>";

View File

@ -23,7 +23,7 @@ class Identica extends Plugin {
function hook_article_button($line) { function hook_article_button($line) {
$article_id = $line["id"]; $article_id = $line["id"];
$rv = "<img src=\"".theme_image($this->link, 'plugins/identica/identica.png')."\" $rv = "<img src=\"plugins/identica/identica.png\"
class='tagsPic' style=\"cursor : pointer\" class='tagsPic' style=\"cursor : pointer\"
onclick=\"shareArticleToIdentica($article_id)\" onclick=\"shareArticleToIdentica($article_id)\"
title='".__('Share on identi.ca')."'>"; title='".__('Share on identi.ca')."'>";

View File

@ -22,7 +22,7 @@ class Mail extends Plugin {
} }
function hook_article_button($line) { function hook_article_button($line) {
return "<img src=\"".theme_image($link, 'plugins/mail/mail.png')."\" return "<img src=\"plugins/mail/mail.png\"
class='tagsPic' style=\"cursor : pointer\" class='tagsPic' style=\"cursor : pointer\"
onclick=\"emailArticle(".$line["id"].")\" onclick=\"emailArticle(".$line["id"].")\"
alt='Zoom' title='".__('Forward by email')."'>"; alt='Zoom' title='".__('Forward by email')."'>";

View File

@ -22,7 +22,7 @@ class MailTo extends Plugin {
} }
function hook_article_button($line) { function hook_article_button($line) {
return "<img src=\"".theme_image($link, 'plugins/mailto/mail.png')."\" return "<img src=\"plugins/mailto/mail.png\"
class='tagsPic' style=\"cursor : pointer\" class='tagsPic' style=\"cursor : pointer\"
onclick=\"mailtoArticle(".$line["id"].")\" onclick=\"mailtoArticle(".$line["id"].")\"
alt='Zoom' title='".__('Forward by email')."'>"; alt='Zoom' title='".__('Forward by email')."'>";

View File

@ -22,7 +22,7 @@ class Note extends Plugin {
function hook_article_button($line) { function hook_article_button($line) {
return "<img src=\"".theme_image($this->link, "plugins/note/note.png")."\" return "<img src=\"plugins/note/note.png\"
style=\"cursor : pointer\" style=\"cursor : pointer\" style=\"cursor : pointer\" style=\"cursor : pointer\"
onclick=\"editArticleNote(".$line["id"].")\" onclick=\"editArticleNote(".$line["id"].")\"
class='tagsPic' title='".__('Edit article note')."'>"; class='tagsPic' title='".__('Edit article note')."'>";

View File

@ -68,7 +68,7 @@ class OwnCloud extends Plugin {
} }
function hook_article_button($line) { function hook_article_button($line) {
return "<img src=\"".theme_image($this->link, "plugins/owncloud/owncloud.png")."\" return "<img src=\"plugins/owncloud/owncloud.png\"
style=\"cursor : pointer\" style=\"cursor : pointer\" style=\"cursor : pointer\" style=\"cursor : pointer\"
onclick=\"ownArticle(".$line["id"].")\" onclick=\"ownArticle(".$line["id"].")\"
class='tagsPic' title='".__('Bookmark on OwnCloud ')."'>"; class='tagsPic' title='".__('Bookmark on OwnCloud ')."'>";

View File

@ -23,7 +23,7 @@ class Pinterest extends Plugin {
function hook_article_button($line) { function hook_article_button($line) {
$article_id = $line["id"]; $article_id = $line["id"];
$rv = "<img src=\"".theme_image($this->link, 'plugins/pinterest/pinterest.png')."\" $rv = "<img src=\"plugins/pinterest/pinterest.png\"
class='tagsPic' style=\"cursor : pointer\" class='tagsPic' style=\"cursor : pointer\"
onclick=\"pinterest($article_id)\" onclick=\"pinterest($article_id)\"
title='".__('Pinterest')."'>"; title='".__('Pinterest')."'>";

View File

@ -24,7 +24,7 @@ class Pocket extends Plugin {
function hook_article_button($line) { function hook_article_button($line) {
$article_id = $line["id"]; $article_id = $line["id"];
$rv = "<img src=\"".theme_image($this->link, 'plugins/pocket/pocket.png')."\" $rv = "<img src=\"plugins/pocket/pocket.png\"
class='tagsPic' style=\"cursor : pointer\" class='tagsPic' style=\"cursor : pointer\"
onclick=\"shareArticleToPocket($article_id)\" onclick=\"shareArticleToPocket($article_id)\"
title='".__('Pocket')."'>"; title='".__('Pocket')."'>";

View File

@ -21,7 +21,7 @@ class Share extends Plugin {
} }
function hook_article_button($line) { function hook_article_button($line) {
return "<img src=\"".theme_image($this->link, 'plugins/share/share.png')."\" return "<img src=\"plugins/share/share.png\"
class='tagsPic' style=\"cursor : pointer\" class='tagsPic' style=\"cursor : pointer\"
onclick=\"shareArticle(".$line['int_id'].")\" onclick=\"shareArticle(".$line['int_id'].")\"
title='".__('Share by URL')."'>"; title='".__('Share by URL')."'>";

View File

@ -23,7 +23,7 @@ class Tweet extends Plugin {
function hook_article_button($line) { function hook_article_button($line) {
$article_id = $line["id"]; $article_id = $line["id"];
$rv = "<img src=\"".theme_image($this->link, 'plugins/tweet/tweet.png')."\" $rv = "<img src=\"plugins/tweet/tweet.png\"
class='tagsPic' style=\"cursor : pointer\" class='tagsPic' style=\"cursor : pointer\"
onclick=\"tweetArticle($article_id)\" onclick=\"tweetArticle($article_id)\"
title='".__('Share on Twitter')."'>"; title='".__('Share on Twitter')."'>";