From 0e63fc49ab31db2ff61cae1b56c33431c9848c37 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 22 May 2012 08:08:50 +0400 Subject: [PATCH] remove obsolete stuff from utils/ --- utils/mysql_convert_unicode.php | 106 ------------------------- utils/stats.php | 136 -------------------------------- 2 files changed, 242 deletions(-) delete mode 100644 utils/mysql_convert_unicode.php delete mode 100644 utils/stats.php diff --git a/utils/mysql_convert_unicode.php b/utils/mysql_convert_unicode.php deleted file mode 100644 index acc1e77a..00000000 --- a/utils/mysql_convert_unicode.php +++ /dev/null @@ -1,106 +0,0 @@ - - - - -MySQL Charset Converter - - - - - - - - - - - -

- - - - "; - - } else if (!$op) { - - print_warning(__("Please backup your database before proceeding.")); - - print "

" . __("This script will convert your Tiny Tiny RSS database to UTF-8. - Depending on current database charset you may experience data corruption (lost accent characters, etc.). - After update, you'll have to set MYSQL_CHARSET option in config.php to 'utf8'.") . "

"; - - print "
- - -
"; - - } else if ($op == "do") { - - print "

".__("Converting database...")."

"; - - db_query($link, "BEGIN"); - db_query($link, "SET FOREIGN_KEY_CHECKS=0"); - - $result = db_query($link, "SHOW TABLES LIKE 'ttrss%'"); - - while ($line = db_fetch_assoc($result)) { - $vals = array_values($line); - $table = $vals[0]; - - $query = "ALTER TABLE $table CONVERT TO - CHARACTER SET 'utf8'"; - - print "

$query

"; - - db_query($link, $query); - } - - db_query($link, "SET FOREIGN_KEY_CHECKS=1"); - db_query($link, "COMMIT"); - - print "
- -
"; - - } - -?> - - - - diff --git a/utils/stats.php b/utils/stats.php deleted file mode 100644 index b8e6e06d..00000000 --- a/utils/stats.php +++ /dev/null @@ -1,136 +0,0 @@ -Error: your access level is insufficient to run this script.

"; - exit; - } -?> - - - - Tiny Tiny Statistics - - - - - -

Tiny Tiny Statistics

- -

Counters

- -Total articles stored: $total_articles (${articles_size}K)

"; - -/* $result = db_query($link, "SELECT COUNT(int_id) as cid,owner_uid,login - FROM ttrss_user_entries - LEFT JOIN ttrss_users ON (owner_uid = ttrss_users.id) - GROUP BY owner_uid,login ORDER BY cid DESC"); */ - - $result = db_query($link, "SELECT count(ttrss_entries.id) AS cid, - login FROM ttrss_entries - LEFT JOIN ttrss_user_entries ON (ref_id = ttrss_entries.id) - LEFT JOIN ttrss_users ON (ttrss_users.id = ttrss_user_entries.owner_uid) - GROUP BY login"); - - print "

Per-user storage

"; - - print ""; - - print " - - - "; - - while ($line = db_fetch_assoc($result)) { - print ""; - print ""; - print ""; - print ""; - } - - print "
ArticlesOwner
" . $line["cid"] . "" . $line["login"] . "
"; - - $result = db_query($link, "SELECT COUNT(ttrss_feeds.id) AS fc, - login FROM ttrss_users, ttrss_feeds - WHERE ttrss_users.id = ttrss_feeds.owner_uid - GROUP BY login ORDER BY fc DESC"); - - print "

Per-user subscriptions

"; - - print ""; - - print " - - - "; - - while ($line = db_fetch_assoc($result)) { - print ""; - print ""; - print ""; - print ""; - } - - print "
OwnerFeeds
" . $line["login"] . "" . $line["fc"] . "
"; - - print "

User subscriptions

"; - - $result = db_query($link, "SELECT title,feed_url,site_url,login, - (SELECT count(int_id) FROM ttrss_user_entries - WHERE feed_id = ttrss_feeds.id) AS num_articles, - (SELECT count(int_id) FROM ttrss_user_entries - WHERE feed_id = ttrss_feeds.id AND unread = true) AS num_articles_unread - FROM ttrss_feeds,ttrss_users - WHERE owner_uid = ttrss_users.id ORDER BY login"); - - print ""; - print " - - - - - - "; - - $cur_login = ""; - - while ($line = db_fetch_assoc($result)) { - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - - if ($cur_login != $line["login"] && $cur_login != "") { - print ""; - $cur_login = $line["login"]; - } - } - - print "
SiteFeedOwnerStored ArticlesUnread Articles
".$line["title"]."".$line["feed_url"]."" . $line["login"] . "" . $line["num_articles"] . "" . $line["num_articles_unread"] . "
 
"; - -?> - - - - -- 2.39.5