summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/colors.php17
-rw-r--r--include/digest.php2
-rw-r--r--include/errorhandler.php6
-rw-r--r--include/functions.php97
-rw-r--r--include/login_form.php6
-rw-r--r--include/rssfuncs.php153
-rw-r--r--include/sanity_check.php2
-rw-r--r--include/version.php2
8 files changed, 120 insertions, 165 deletions
diff --git a/include/colors.php b/include/colors.php
index 7cf1a6af0..91eaa2dc2 100644
--- a/include/colors.php
+++ b/include/colors.php
@@ -1,6 +1,8 @@
<?php
-require_once "lib/floIcon.php";
+if (file_exists("lib/floIcon.php")) {
+ require_once "lib/floIcon.php";
+}
function _resolve_htmlcolor($color) {
$htmlcolors = array ("aliceblue" => "#f0f8ff",
@@ -237,16 +239,16 @@ function rgb2hsl($arr) {
} else {
$s = $del_Max / $var_Max;
- $del_R = ((($max - $var_R ) / 6 ) + ($del_Max / 2 ) ) / $del_Max;
- $del_G = ((($max - $var_G ) / 6 ) + ($del_Max / 2 ) ) / $del_Max;
- $del_B = ((($max - $var_B ) / 6 ) + ($del_Max / 2 ) ) / $del_Max;
+ $del_R = ((($var_Max - $var_R ) / 6 ) + ($del_Max / 2 ) ) / $del_Max;
+ $del_G = ((($var_Max - $var_G ) / 6 ) + ($del_Max / 2 ) ) / $del_Max;
+ $del_B = ((($var_Max - $var_B ) / 6 ) + ($del_Max / 2 ) ) / $del_Max;
if ($var_R == $var_Max) $h = $del_B - $del_G;
else if ($var_G == $var_Max) $h = (1 / 3 ) + $del_R - $del_B;
else if ($var_B == $var_Max) $h = (2 / 3 ) + $del_G - $del_R;
- if ($H < 0) $h++;
- if ($H > 1) $h--;
+ if ($h < 0) $h++;
+ if ($h > 1) $h--;
}
return array($h, $s, $v);
@@ -286,7 +288,8 @@ function hsl2rgb($arr) {
$size = @getimagesize($imageFile);
- if (!defined('_DISABLE_FLOICON') && strtolower($size['mime']) == 'image/vnd.microsoft.icon') {
+ if (strtolower($size['mime']) == 'image/vnd.microsoft.icon' && class_exists("floIcon")) {
+
$ico = new floIcon();
@$ico->readICO($imageFile);
diff --git a/include/digest.php b/include/digest.php
index 965fd1a79..4427936e5 100644
--- a/include/digest.php
+++ b/include/digest.php
@@ -26,7 +26,7 @@
while ($line = db_fetch_assoc($result)) {
- if (get_pref('DIGEST_ENABLE', $line['id'], false)) {
+ if (@get_pref('DIGEST_ENABLE', $line['id'], false)) {
$preferred_ts = strtotime(get_pref('DIGEST_PREFERRED_TIME', $line['id'], '00:00'));
// try to send digests within 2 hours of preferred time
diff --git a/include/errorhandler.php b/include/errorhandler.php
index 9acef2357..52431c2de 100644
--- a/include/errorhandler.php
+++ b/include/errorhandler.php
@@ -6,7 +6,8 @@ function ttrss_error_handler($errno, $errstr, $file, $line, $context) {
$file = substr(str_replace(dirname(dirname(__FILE__)), "", $file), 1);
- return Logger::get()->log_error($errno, $errstr, $file, $line, $context);
+ if (class_exists("Logger"))
+ return Logger::get()->log_error($errno, $errstr, $file, $line, $context);
}
function ttrss_fatal_handler() {
@@ -26,7 +27,8 @@ function ttrss_fatal_handler() {
$file = substr(str_replace(dirname(dirname(__FILE__)), "", $file), 1);
- return Logger::get()->log_error($errno, $errstr, $file, $line, $context);
+ if (class_exists("Logger"))
+ return Logger::get()->log_error($errno, $errstr, $file, $line, $context);
}
return false;
diff --git a/include/functions.php b/include/functions.php
index c39b4938c..7db040d04 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1162,7 +1162,7 @@
$data = array_merge($data, getVirtCounters());
$data = array_merge($data, getLabelCounters());
- $data = array_merge($data, getFeedCounters($active_feed));
+ $data = array_merge($data, getFeedCounters());
$data = array_merge($data, getCategoryCounters());
return $data;
@@ -1286,7 +1286,7 @@
return $unread;
} else if ($cat == -1) {
- return getFeedUnread(-1) + getFeedUnread($link, -2) + getFeedUnread($link, -3) + getFeedUnread($link, 0);
+ return getFeedUnread(-1) + getFeedUnread(-2) + getFeedUnread(-3) + getFeedUnread(0);
} else if ($cat == -2) {
$result = db_query("
@@ -1459,8 +1459,14 @@
$count = getFeedUnread($i);
+ if ($i == 0 || $i == -1 || $i == -2)
+ $auxctr = getFeedArticles($i, false);
+ else
+ $auxctr = 0;
+
$cv = array("id" => $i,
- "counter" => (int) $count);
+ "counter" => (int) $count,
+ "auxcounter" => $auxctr);
// if (get_pref('EXTENDED_FEEDLIST'))
// $cv["xmsg"] = getFeedArticles($i)." ".__("total");
@@ -1487,11 +1493,13 @@
$owner_uid = $_SESSION["uid"];
- $result = db_query("SELECT id,caption,COUNT(unread) AS unread
+ $result = db_query("SELECT id,caption,COUNT(u1.unread) AS unread,COUNT(u2.unread) AS total
FROM ttrss_labels2 LEFT JOIN ttrss_user_labels2 ON
(ttrss_labels2.id = label_id)
- LEFT JOIN ttrss_user_entries ON (ref_id = article_id AND unread = true
- AND ttrss_user_entries.owner_uid = $owner_uid)
+ LEFT JOIN ttrss_user_entries AS u1 ON (u1.ref_id = article_id AND u1.unread = true
+ AND u1.owner_uid = $owner_uid)
+ LEFT JOIN ttrss_user_entries AS u2 ON (u2.ref_id = article_id AND u2.unread = false
+ AND u2.owner_uid = $owner_uid)
WHERE ttrss_labels2.owner_uid = $owner_uid GROUP BY ttrss_labels2.id,
ttrss_labels2.caption");
@@ -1499,17 +1507,12 @@
$id = label_to_feed_id($line["id"]);
- $label_name = $line["caption"];
- $count = $line["unread"];
-
$cv = array("id" => $id,
- "counter" => (int) $count);
+ "counter" => (int) $line["unread"],
+ "auxcounter" => (int) $line["total"]);
if ($descriptions)
- $cv["description"] = $label_name;
-
-// if (get_pref('EXTENDED_FEEDLIST'))
-// $cv["xmsg"] = getFeedArticles($id)." ".__("total");
+ $cv["description"] = $line["caption"];
array_push($ret_arr, $cv);
}
@@ -1726,7 +1729,8 @@
}
if (!$root_id) {
- $is_selected = ($default_id == "CAT:0") ? "selected=\"1\"" : "";
+ $default_is_cat = ($default_id == "CAT:0");
+ $is_selected = $default_is_cat ? "selected=\"1\"" : "";
printf("<option $is_selected value='CAT:0'>%s</option>",
__("Uncategorized"));
@@ -2327,8 +2331,10 @@
$filter_query_part = filter_to_sql($filter, $owner_uid);
// Try to check if SQL regexp implementation chokes on a valid regexp
+
+
$result = db_query("SELECT true AS true_val FROM ttrss_entries,
- ttrss_user_entries, ttrss_feeds, ttrss_feed_categories
+ ttrss_user_entries, ttrss_feeds
WHERE $filter_query_part LIMIT 1", false);
if ($result) {
@@ -2844,8 +2850,7 @@
if ($version_data) {
$version_data = json_decode($version_data, true);
if ($version_data && $version_data['version']) {
-
- if (version_compare(VERSION, $version_data['version']) == -1) {
+ if (version_compare(VERSION_STATIC, $version_data['version']) == -1) {
return $version_data;
}
}
@@ -2902,7 +2907,6 @@
ttrss_tags WHERE post_int_id = (SELECT int_id FROM ttrss_user_entries WHERE
ref_id = '$a_id' AND owner_uid = '$owner_uid' LIMIT 1) ORDER BY tag_name";
- $obj_id = md5("TAGS:$owner_uid:$id");
$tags = array();
/* check cache first */
@@ -3119,7 +3123,7 @@
$rv['content'] .= "<html><head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>
<title>Tiny Tiny RSS - ".$line["title"]."</title>
- <link rel=\"stylesheet\" type=\"text/css\" href=\"tt-rss.css\">
+ <link rel=\"stylesheet\" type=\"text/css\" href=\"css/tt-rss.css\">
</head><body id=\"ttrssZoom\">";
}
@@ -3249,7 +3253,7 @@
function print_checkpoint($n, $s) {
$ts = microtime(true);
- echo sprintf("<!-- CP[$n] %.4f seconds -->", $ts - $s);
+ echo sprintf("<!-- CP[$n] %.4f seconds -->\n", $ts - $s);
return $ts;
}
@@ -3392,47 +3396,22 @@
}
function format_tags_string($tags, $id) {
+ if (!is_array($tags) || count($tags) == 0) {
+ return __("no tags");
+ } else {
+ $maxtags = min(5, count($tags));
- $tags_str = "";
- $tags_nolinks_str = "";
-
- $num_tags = 0;
-
- $tag_limit = 6;
-
- $formatted_tags = array();
-
- foreach ($tags as $tag) {
- $num_tags++;
- $tag_escaped = str_replace("'", "\\'", $tag);
-
- if (mb_strlen($tag) > 30) {
- $tag = truncate_string($tag, 30);
- }
-
- $tag_str = "<a href=\"javascript:viewfeed('$tag_escaped')\">$tag</a>";
-
- array_push($formatted_tags, $tag_str);
-
- $tmp_tags_str = implode(", ", $formatted_tags);
-
- if ($num_tags == $tag_limit || mb_strlen($tmp_tags_str) > 150) {
- break;
+ for ($i = 0; $i < $maxtags; $i++) {
+ $tags_str .= "<a class=\"tag\" href=\"#\" onclick=\"viewfeed('".$tags[$i]."'\")>" . $tags[$i] . "</a>, ";
}
- }
- $tags_str = implode(", ", $formatted_tags);
+ $tags_str = mb_substr($tags_str, 0, mb_strlen($tags_str)-2);
- if ($num_tags < count($tags)) {
- $tags_str .= ", &hellip;";
- }
+ if (count($tags) > $maxtags)
+ $tags_str .= ", &hellip;";
- if ($num_tags == 0) {
- $tags_str = __("no tags");
+ return $tags_str;
}
-
- return $tags_str;
-
}
function format_article_labels($labels, $id) {
@@ -4125,7 +4104,7 @@
preg_match("/(Location:|URI:)[^(\n)]*/", $header, $matches);
$url = trim(str_replace($matches[1],"",$matches[0]));
$url_parsed = parse_url($url);
- return (isset($url_parsed))? geturl($url, $referer):'';
+ return (isset($url_parsed))? geturl($url):'';
}
$oline='';
foreach($status as $key=>$eline){$oline.='['.$key.']'.$eline.' ';}
@@ -4144,7 +4123,7 @@
foreach ($files as $js) {
if (!isset($_GET['debug'])) {
- $cached_file = CACHE_DIR . "/js/$js.js";
+ $cached_file = CACHE_DIR . "/js/".basename($js).".js";
if (file_exists($cached_file) &&
is_readable($cached_file) &&
@@ -4187,7 +4166,7 @@
}
function calculate_dep_timestamp() {
- $files = array_merge(glob("js/*.js"), glob("*.css"));
+ $files = array_merge(glob("js/*.js"), glob("css/*.css"));
$max_ts = -1;
diff --git a/include/login_form.php b/include/login_form.php
index b7dae1016..0637c453a 100644
--- a/include/login_form.php
+++ b/include/login_form.php
@@ -2,7 +2,7 @@
<head>
<title>Tiny Tiny RSS : Login</title>
<link rel="stylesheet" type="text/css" href="lib/dijit/themes/claro/claro.css"/>
- <link rel="stylesheet" type="text/css" href="tt-rss.css">
+ <link rel="stylesheet" type="text/css" href="css/tt-rss.css">
<link rel="shortcut icon" type="image/png" href="images/favicon.png">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="lib/dojo/dojo.js"></script>
@@ -188,7 +188,6 @@ function bwLimitChange(elem) {
value="<?php echo $_SESSION["fake_login"] ?>" />
</div>
- <?php if (strpos(PLUGINS, "auth_internal") !== FALSE) { ?>
<div class="row">
<label><?php echo __("Password:") ?></label>
@@ -196,10 +195,11 @@ function bwLimitChange(elem) {
style="width : 220px" class="input"
value="<?php echo $_SESSION["fake_password"] ?>"/>
<label></label>
+ <?php if (strpos(PLUGINS, "auth_internal") !== FALSE) { ?>
<a class='forgotpass' href="public.php?op=forgotpass"><?php echo __("I forgot my password") ?></a>
+ <?php } ?>
</div>
- <?php } ?>
<div class="row">
<label><?php echo __("Profile:") ?></label>
diff --git a/include/rssfuncs.php b/include/rssfuncs.php
index a5d3898ce..4c3e86123 100644
--- a/include/rssfuncs.php
+++ b/include/rssfuncs.php
@@ -160,7 +160,7 @@
// since we have the data cached, we can deal with other feeds with the same url
- $tmp_result = db_query("SELECT DISTINCT ttrss_feeds.id,last_updated
+ $tmp_result = db_query("SELECT DISTINCT ttrss_feeds.id,last_updated,ttrss_feeds.owner_uid
FROM ttrss_feeds, ttrss_users, ttrss_user_prefs WHERE
ttrss_user_prefs.owner_uid = ttrss_feeds.owner_uid AND
ttrss_users.id = ttrss_user_prefs.owner_uid AND
@@ -173,7 +173,7 @@
if (db_num_rows($tmp_result) > 0) {
while ($tline = db_fetch_assoc($tmp_result)) {
- if($debug) _debug(" => " . $tline["last_updated"] . ", " . $tline["id"]);
+ if($debug) _debug(" => " . $tline["last_updated"] . ", " . $tline["id"] . " " . $tline["owner_uid"]);
update_rss_feed($tline["id"], true);
++$nf;
}
@@ -190,10 +190,7 @@
} // function update_daemon_common
// ignore_daemon is not used
- function update_rss_feed($feed, $ignore_daemon = false, $no_cache = false,
- $override_url = false) {
-
- require_once "lib/simplepie/simplepie.inc";
+ function update_rss_feed($feed, $ignore_daemon = false, $no_cache = false) {
$debug_enabled = defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug'];
@@ -214,6 +211,10 @@
$last_updated = db_fetch_result($result, 0, "last_updated");
$last_article_timestamp = @strtotime(db_fetch_result($result, 0, "last_article_timestamp"));
+
+ if (defined('_DISABLE_HTTP_304'))
+ $last_article_timestamp = 0;
+
$owner_uid = db_fetch_result($result, 0, "owner_uid");
$mark_unread_on_update = sql_bool_to_bool(db_fetch_result($result,
0, "mark_unread_on_update"));
@@ -237,50 +238,46 @@
$feed = db_escape_string($feed);
- if ($override_url) $fetch_url = $override_url;
-
$date_feed_processed = date('Y-m-d H:i');
- $cache_filename = CACHE_DIR . "/simplepie/" . sha1($fetch_url) . ".feed";
-
- // Ignore cache if new feed or manual update.
- $cache_age = ($no_cache || is_null($last_updated) || strpos($last_updated, '1970-01-01') === 0) ? 30 : get_feed_update_interval($feed) * 60;
+ $cache_filename = CACHE_DIR . "/simplepie/" . sha1($fetch_url) . ".xml";
- _debug("cache filename: $cache_filename exists: " . file_exists($cache_filename), $debug_enabled);
- _debug("cache age: $cache_age; no cache: $no_cache", $debug_enabled);
+ $pluginhost = new PluginHost();
+ $pluginhost->set_debug($debug_enabled);
+ $user_plugins = get_pref("_ENABLED_PLUGINS", $owner_uid);
- $cached_feed_data_hash = false;
+ $pluginhost->load(PLUGINS, PluginHost::KIND_ALL);
+ $pluginhost->load($user_plugins, PluginHost::KIND_USER, $owner_uid);
+ $pluginhost->load_data();
$rss = false;
$rss_hash = false;
- $cache_timestamp = file_exists($cache_filename) ? filemtime($cache_filename) : 0;
$force_refetch = isset($_REQUEST["force_refetch"]);
if (file_exists($cache_filename) &&
is_readable($cache_filename) &&
!$auth_login && !$auth_pass &&
- filemtime($cache_filename) > time() - $cache_age) {
+ filemtime($cache_filename) > time() - 30) {
- _debug("using local cache.", $debug_enabled);
+ _debug("using local cache.", $debug_enabled);
- if ($cache_timestamp > $last_article_timestamp) {
- @$rss_data = file_get_contents($cache_filename);
+ @$feed_data = file_get_contents($cache_filename);
+
+ if ($feed_data) {
+ $rss_hash = sha1($feed_data);
+ }
- if ($rss_data) {
- $rss_hash = sha1($rss_data);
- @$rss = unserialize($rss_data);
- }
- } else if (!$force_refetch) {
- _debug("local cache valid and older than last_updated, nothing to do.", $debug_enabled);
- return;
- }
} else {
_debug("local cache will not be used for this feed", $debug_enabled);
}
if (!$rss) {
+ foreach ($pluginhost->get_hooks(PluginHost::HOOK_FETCH_FEED) as $plugin) {
+ $feed_data = $plugin->hook_fetch_feed($feed_data, $fetch_url, $owner_uid, $feed);
+ }
+
if (!$feed_data) {
_debug("fetching [$fetch_url]...", $debug_enabled);
_debug("If-Modified-Since: ".gmdate('D, d M Y H:i:s \G\M\T', $last_article_timestamp), $debug_enabled);
@@ -302,7 +299,7 @@
_debug("fetch done.", $debug_enabled);
- if ($feed_data) {
+ /* if ($feed_data) {
$error = verify_feed_xml($feed_data);
if ($error) {
@@ -318,7 +315,7 @@
if ($error) $feed_data = '';
}
}
- }
+ } */
}
if (!$feed_data) {
@@ -344,29 +341,17 @@
}
}
- $pluginhost = new PluginHost();
- $pluginhost->set_debug($debug_enabled, $debug_enabled);
- $user_plugins = get_pref("_ENABLED_PLUGINS", $owner_uid);
-
- $pluginhost->load(PLUGINS, PluginHost::KIND_ALL);
- $pluginhost->load($user_plugins, PluginHost::KIND_USER, $owner_uid);
- $pluginhost->load_data();
-
foreach ($pluginhost->get_hooks(PluginHost::HOOK_FEED_FETCHED) as $plugin) {
- $feed_data = $plugin->hook_feed_fetched($feed_data);
+ $feed_data = $plugin->hook_feed_fetched($feed_data, $fetch_url, $owner_uid, $feed);
}
+ // set last update to now so if anything *simplepie* crashes later we won't be
+ // continuously failing on the same feed
+ //db_query("UPDATE ttrss_feeds SET last_updated = NOW() WHERE id = '$feed'");
+
if (!$rss) {
- $rss = new SimplePie();
- $rss->set_sanitize_class("SanitizeDummy");
- // simplepie ignores the above and creates default sanitizer anyway,
- // so let's override it...
- $rss->sanitize = new SanitizeDummy();
- $rss->set_output_encoding('UTF-8');
- $rss->set_raw_data($feed_data);
- $rss->enable_cache(false);
-
- @$rss->init();
+ $rss = new FeedParser($feed_data);
+ $rss->init();
}
// print_r($rss);
@@ -377,12 +362,11 @@
// cache data for later
if (!$auth_pass && !$auth_login && is_writable(CACHE_DIR . "/simplepie")) {
- $rss_data = serialize($rss);
$new_rss_hash = sha1($rss_data);
- if ($new_rss_hash != $rss_hash) {
+ if ($new_rss_hash != $rss_hash && count($rss->get_items()) > 0 ) {
_debug("saving $cache_filename", $debug_enabled);
- @file_put_contents($cache_filename, serialize($rss));
+ @file_put_contents($cache_filename, $feed_data);
}
}
@@ -414,6 +398,9 @@
$site_url = db_escape_string(mb_substr(rewrite_relative_url($fetch_url, $rss->get_link()), 0, 245));
+ _debug("site_url: $site_url", $debug_enabled);
+ _debug("feed_title: " . $rss->get_title(), $debug_enabled);
+
if ($favicon_needs_check || $force_refetch) {
/* terrible hack: if we crash on floicon shit here, we won't check
@@ -424,7 +411,7 @@
_debug("checking favicon...", $debug_enabled);
- check_feed_favicon($site_url, $feed, $link);
+ check_feed_favicon($site_url, $feed);
$favicon_modified_new = @filemtime($favicon_file);
if ($favicon_modified_new > $favicon_modified)
@@ -453,10 +440,12 @@
$feed_title = db_escape_string($rss->get_title());
- _debug("registering title: $feed_title", $debug_enabled);
+ if ($feed_title) {
+ _debug("registering title: $feed_title", $debug_enabled);
- db_query("UPDATE ttrss_feeds SET
- title = '$feed_title' WHERE id = '$feed'");
+ db_query("UPDATE ttrss_feeds SET
+ title = '$feed_title' WHERE id = '$feed'");
+ }
}
if ($site_url && $orig_site_url != $site_url) {
@@ -529,6 +518,8 @@
if (!$entry_guid) $entry_guid = $item->get_link();
if (!$entry_guid) $entry_guid = make_guid_from_title($item->get_title());
+ _debug("f_guid $entry_guid", $debug_enabled);
+
if (!$entry_guid) continue;
$entry_guid = "$owner_uid,$entry_guid";
@@ -539,7 +530,9 @@
$entry_timestamp = "";
- $entry_timestamp = strtotime($item->get_date());
+ $entry_timestamp = $item->get_date();
+
+ _debug("orig date: " . $item->get_date(), $debug_enabled);
if ($entry_timestamp == -1 || !$entry_timestamp || $entry_timestamp > time()) {
$entry_timestamp = time();
@@ -552,8 +545,9 @@
_debug("date $entry_timestamp [$entry_timestamp_fmt]", $debug_enabled);
- $entry_title = html_entity_decode($item->get_title(), ENT_COMPAT, 'UTF-8');
- $entry_title = decode_numeric_entities($entry_title);
+// $entry_title = html_entity_decode($item->get_title(), ENT_COMPAT, 'UTF-8');
+// $entry_title = decode_numeric_entities($entry_title);
+ $entry_title = $item->get_title();
$entry_link = rewrite_relative_url($site_url, $item->get_link());
@@ -571,30 +565,19 @@
print "\n";
}
- $entry_comments = $item->data["comments"];
-
- if ($item->get_author()) {
- $entry_author_item = $item->get_author();
- $entry_author = $entry_author_item->get_name();
- if (!$entry_author) $entry_author = $entry_author_item->get_email();
- }
+ $entry_comments = $item->get_comments_url();
+ $entry_author = $item->get_author();
$entry_guid = db_escape_string(mb_substr($entry_guid, 0, 245));
$entry_comments = db_escape_string(mb_substr(trim($entry_comments), 0, 245));
$entry_author = db_escape_string(mb_substr(trim($entry_author), 0, 245));
- $num_comments = $item->get_item_tags('http://purl.org/rss/1.0/modules/slash/', 'comments');
-
- if (is_array($num_comments) && is_array($num_comments[0])) {
- $num_comments = (int) $num_comments[0]["data"];
- } else {
- $num_comments = 0;
- }
+ $num_comments = (int) $item->get_comments_count();
_debug("author $entry_author", $debug_enabled);
_debug("num_comments: $num_comments", $debug_enabled);
- _debug("looking for tags [1]...", $debug_enabled);
+ _debug("looking for tags...", $debug_enabled);
// parse <category> entries into tags
@@ -604,18 +587,17 @@
if (is_array($additional_tags_src)) {
foreach ($additional_tags_src as $tobj) {
- array_push($additional_tags, $tobj->get_term());
+ array_push($additional_tags, $tobj);
}
}
- _debug("category tags:", $debug_enabled);
- _debug("looking for tags [2]...", $debug_enabled);
-
$entry_tags = array_unique($additional_tags);
for ($i = 0; $i < count($entry_tags); $i++)
$entry_tags[$i] = mb_strtolower($entry_tags[$i], 'utf-8');
+ _debug("tags found: " . join(",", $entry_tags), $debug_enabled);
+
_debug("done collecting data.", $debug_enabled);
// TODO: less memory-hungry implementation
@@ -1367,14 +1349,14 @@
mb_strtolower(strip_tags($title), 'utf-8'));
}
- function verify_feed_xml($feed_data) {
+ /* function verify_feed_xml($feed_data) {
libxml_use_internal_errors(true);
$doc = new DOMDocument();
$doc->loadXML($feed_data);
$error = libxml_get_last_error();
libxml_clear_errors();
return $error;
- }
+ } */
function housekeeping_common($debug) {
expire_cached_files($debug);
@@ -1389,15 +1371,4 @@
_debug("Cleaned $rc cached tags.");
}
-
- function utf8_entity_decode($entity){
- $convmap = array(0x0, 0x10000, 0, 0xfffff);
- return mb_decode_numericentity($entity, $convmap, 'UTF-8');
- }
-
- function decode_numeric_entities($body) {
- $body = preg_replace('/&#\d{2,5};/ue', "utf8_entity_decode('$0')", $body );
- $body = preg_replace('/&#x([a-fA-F0-7]{2,8});/ue', "utf8_entity_decode('&#'.hexdec('$1').';')", $body );
- return $body;
- }
?>
diff --git a/include/sanity_check.php b/include/sanity_check.php
index b2888b1d7..29e53fa33 100644
--- a/include/sanity_check.php
+++ b/include/sanity_check.php
@@ -160,7 +160,7 @@
<head>
<title>Startup failed</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <link rel="stylesheet" type="text/css" href="utility.css">
+ <link rel="stylesheet" type="text/css" href="css/utility.css">
</head>
<body>
<div class="floatingLogo"><img src="images/logo_small.png"></div>
diff --git a/include/version.php b/include/version.php
index 0e583f9ec..7396f81e0 100644
--- a/include/version.php
+++ b/include/version.php
@@ -1,5 +1,5 @@
<?php
- define('VERSION_STATIC', '1.7.8');
+ define('VERSION_STATIC', '1.7.9');
function get_version() {
date_default_timezone_set('UTC');