summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBarak Korren <[email protected]>2013-04-02 20:38:07 +0300
committerBarak Korren <[email protected]>2013-04-02 20:38:07 +0300
commit58a2577d48790c79adfd44bcfd662c980ce6cfe4 (patch)
tree523d814ea0b7b6f617fe515b186099c6e83fed72 /include
parente470a273cf09562fb2f9c0c899002303f19c8d16 (diff)
parentcc332603431102a682feda22b9cf0093a29f0176 (diff)
Merge branch 'master' of https://github.com/gothfox/Tiny-Tiny-RSS.git
Diffstat (limited to 'include')
-rw-r--r--include/db-prefs.php4
-rw-r--r--include/functions.php12
-rw-r--r--include/labels.php2
-rw-r--r--include/localized_schema.php67
-rw-r--r--include/login_form.php2
-rw-r--r--include/sessions.php4
6 files changed, 15 insertions, 76 deletions
diff --git a/include/db-prefs.php b/include/db-prefs.php
index f6a78939b..1ee3d609a 100644
--- a/include/db-prefs.php
+++ b/include/db-prefs.php
@@ -166,10 +166,6 @@
$value = sprintf("%d", $value);
}
- if ($pref_name == 'DEFAULT_ARTICLE_LIMIT' && $value == 0) {
- $value = 30;
- }
-
if ($pref_name == 'USER_TIMEZONE' && $value == '') {
$value = 'UTC';
}
diff --git a/include/functions.php b/include/functions.php
index 039048095..d99f6a64b 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1,6 +1,6 @@
<?php
define('EXPECTED_CONFIG_VERSION', 26);
- define('SCHEMA_VERSION', 114);
+ define('SCHEMA_VERSION', 115);
define('LABEL_BASE_INDEX', -1024);
define('PLUGIN_FEED_BASE_INDEX', -128);
@@ -84,6 +84,7 @@
"ru_RU" => "Русский",
"pt_BR" => "Portuguese/Brazil",
"zh_CN" => "Simplified Chinese",
+ "sv_SE" => "Svenska",
"fi_FI" => "Suomi");
return $tr;
@@ -1860,7 +1861,7 @@
foreach (array("ON_CATCHUP_SHOW_NEXT_FEED", "HIDE_READ_FEEDS",
"ENABLE_FEED_CATS", "FEEDS_SORT_BY_UNREAD", "CONFIRM_FEED_CATCHUP",
- "CDM_AUTO_CATCHUP", "FRESH_ARTICLE_MAX_AGE", "DEFAULT_ARTICLE_LIMIT",
+ "CDM_AUTO_CATCHUP", "FRESH_ARTICLE_MAX_AGE",
"HIDE_READ_SHOWS_SPECIAL", "COMBINED_DISPLAY_MODE") as $param) {
$params[strtolower($param)] = (int) get_pref($link, $param);
@@ -1954,6 +1955,11 @@
"help_dialog" => __("Show help dialog"))
);
+ global $pluginhost;
+ foreach ($pluginhost->get_hooks($pluginhost::HOOK_HOTKEY_INFO) as $plugin) {
+ $hotkeys = $plugin->hook_hotkey_info($hotkeys);
+ }
+
return $hotkeys;
}
@@ -3426,6 +3432,8 @@
$parent_insert = "NULL";
}
+ $feed_cat = mb_substr($feed_cat, 0, 250);
+
$result = db_query($link,
"SELECT id FROM ttrss_feed_categories
WHERE $parent_qpart AND title = '$feed_cat' AND owner_uid = ".$_SESSION["uid"]);
diff --git a/include/labels.php b/include/labels.php
index 5ac8794d9..655b51555 100644
--- a/include/labels.php
+++ b/include/labels.php
@@ -173,7 +173,7 @@
db_query($link, "COMMIT");
}
- function label_create($link, $caption, $fg_color = '', $bg_color = '', $owner_uid) {
+ function label_create($link, $caption, $fg_color = '', $bg_color = '', $owner_uid = false) {
if (!$owner_uid) $owner_uid = $_SESSION['uid'];
diff --git a/include/localized_schema.php b/include/localized_schema.php
deleted file mode 100644
index 51d11f79a..000000000
--- a/include/localized_schema.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php # This file has been generated at: Mon Apr 1 19:15:55 MSK 2013
-
-__("Title");
-__("Title or Content");
-__("Link");
-__("Content");
-__("Article Date");
-
-__("Delete article");
-__("Mark as read");
-__("Set starred");
-__("Publish article");
-__("Assign tags");
-__("Assign label");
-__("Modify score");
-
-__("General");
-__("Interface");
-__("Advanced");
-
-__('This option is useful when you are reading several planet-type aggregators with partially colliding userbase. When disabled, it forces same posts from different feeds to appear only once.');
-__('Display expanded list of feed articles, instead of separate displays for headlines and article content');
-__('Automatically open next feed with unread articles after marking one as read');
-__('This option enables sending daily digest of new (and unread) headlines on your configured e-mail address');
-__('This option enables marking articles as read automatically while you scroll article list.');
-__('Strip all but most common HTML tags when reading articles.');
-__('When auto-detecting tags in articles these tags will not be applied (comma-separated list).');
-__('When this option is enabled, headlines in Special feeds and Labels are grouped by feeds');
-__('Customize CSS stylesheet to your liking');
-__('Use feed-specified date to sort headlines instead of local import date.');
-__('Click to register your SSL client certificate with tt-rss');
-__('Uses UTC timezone');
-__('Select one of the available CSS themes');
-__('Purge articles after this number of days (0 - disables)');
-__('Default interval between feed updates');
-__('Amount of articles to display at once');
-__('Allow duplicate posts');
-__('Enable feed categories');
-__('Show content preview in headlines list');
-__('Short date format');
-__('Long date format');
-__('Combined feed display');
-__('Hide feeds with no unread articles');
-__('On catchup show next feed');
-__('Sort feeds by unread articles count');
-__('Reverse headline order (oldest first)');
-__('Enable e-mail digest');
-__('Confirm marking feed as read');
-__('Automatically mark articles as read');
-__('Strip unsafe tags from articles');
-__('Blacklisted tags');
-__('Maximum age of fresh articles (in hours)');
-__('Mark articles in e-mail digest as read');
-__('Automatically expand articles in combined mode');
-__('Purge unread articles');
-__('Show special feeds when hiding read feeds');
-__('Group headlines in virtual feeds');
-__('Do not embed images in articles');
-__('Enable external API');
-__('User timezone');
-__('Customize stylesheet');
-__('Sort headlines by feed date');
-__('Login with an SSL certificate');
-__('Try to send digests around specified time');
-__('Assign articles to labels automatically');
-__('Select theme');
-?>
diff --git a/include/login_form.php b/include/login_form.php
index 4fc08261a..7ac7111c8 100644
--- a/include/login_form.php
+++ b/include/login_form.php
@@ -122,7 +122,7 @@ function init() {
function fetchProfiles() {
try {
- var query = "?op=getProfiles&login=" + param_escape(document.forms["loginForm"].login.value);
+ var query = "op=getProfiles&login=" + param_escape(document.forms["loginForm"].login.value);
if (query) {
new Ajax.Request("public.php", {
diff --git a/include/sessions.php b/include/sessions.php
index dd1ca663d..539b81a06 100644
--- a/include/sessions.php
+++ b/include/sessions.php
@@ -19,6 +19,8 @@
ini_set("session.use_only_cookies", true);
ini_set("session.gc_maxlifetime", $session_expire);
+ global $session_connection;
+
function session_get_schema_version($link, $nocache = false) {
global $schema_version;
@@ -34,6 +36,7 @@
function validate_session($link) {
if (SINGLE_USER_MODE) return true;
+ if (!$link) return false;
$check_ip = $_SESSION['ip_address'];
@@ -92,7 +95,6 @@
function ttrss_open ($s, $n) {
-
global $session_connection;
$session_connection = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);