summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-23 09:48:15 +0400
committerAndrew Dolgov <[email protected]>2013-03-23 09:48:15 +0400
commit9972b7cdd7b438f84b6ee6d8b30bc9124133b0c4 (patch)
tree7d1331733a7c2cc980a072c1efc32baf3cf75060
parentb68dce191f8f7b1d63444a83b8a38b927d4e66f0 (diff)
Revert "update SITE_TITLE customization to work without needing to be pre-defined, make it compatible with unread count now being at start of title"
This reverts commit 8d051fa0769922df69ac737eee9d13dff67095a9.
-rw-r--r--config.php-dist2
-rw-r--r--include/functions.php7
-rw-r--r--index.php2
-rw-r--r--js/tt-rss.js4
-rw-r--r--prefs.php2
-rw-r--r--register.php2
6 files changed, 6 insertions, 13 deletions
diff --git a/config.php-dist b/config.php-dist
index c66fb39fa..299f753ca 100644
--- a/config.php-dist
+++ b/config.php-dist
@@ -186,7 +186,7 @@
// Users may enable other user plugins from Preferences/Plugins but may not
// disable plugins specified in this list.
- define('SITE_TITLE', 'Tiny Tiny RSS');
+ define('PAGE_TITLE','Tiny Tiny RSS');
// Change this value to customize the HTML page title
define('CONFIG_VERSION', 26);
diff --git a/include/functions.php b/include/functions.php
index 00dc6a8fe..2329a2331 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -4085,11 +4085,4 @@
return $max_ts;
}
- function get_site_title() {
- $original_title = "Tiny Tiny RSS";
- if (defined("SITE_TITLE")) {
- return SITE_TITLE;
- }
- return $original_title;
- }
?>
diff --git a/index.php b/index.php
index 4669a2080..5a37c0e98 100644
--- a/index.php
+++ b/index.php
@@ -53,7 +53,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title><?php echo get_site_title() ?></title>
+ <title><?php echo PAGE_TITLE ?></title>
<?php echo stylesheet_tag("lib/dijit/themes/claro/claro.css"); ?>
<?php echo stylesheet_tag("tt-rss.css"); ?>
diff --git a/js/tt-rss.js b/js/tt-rss.js
index 91aff8b68..1d6540dbb 100644
--- a/js/tt-rss.js
+++ b/js/tt-rss.js
@@ -179,9 +179,9 @@ function search() {
function updateTitle() {
var tmp = document.title;
- if (tmp.indexOf(")") > 0)
+ if (tmp.indexOf('(')>0)
{
- tmp = tmp.substr(tmp.indexOf(")") + 1);
+ tmp = tmp.substr(0,tmp.lastIndexOf('('));
}
if (global_unread > 0) {
diff --git a/prefs.php b/prefs.php
index 0d27a6e81..9c59d6c4d 100644
--- a/prefs.php
+++ b/prefs.php
@@ -23,7 +23,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title><?php echo get_site_title() ?> : <?php echo __("Preferences") ?></title>
+ <title><?php echo PAGE_TITLE ?> : <?php echo __("Preferences") ?></title>
<?php echo stylesheet_tag("lib/dijit/themes/claro/claro.css"); ?>
<?php echo stylesheet_tag("tt-rss.css"); ?>
diff --git a/register.php b/register.php
index ce1b1ed51..733930327 100644
--- a/register.php
+++ b/register.php
@@ -27,7 +27,7 @@
print '<?xml version="1.0" encoding="utf-8"?>';
print "<feed xmlns=\"http://www.w3.org/2005/Atom\">
<id>".htmlspecialchars(SELF_URL_PATH . "/register.php")."</id>
- <title><?php echo get_site_title() ?> registration slots</title>
+ <title><?php echo PAGE_TITLE ?> registration slots</title>
<link rel=\"self\" href=\"".htmlspecialchars(SELF_URL_PATH . "/register.php?format=feed")."\"/>
<link rel=\"alternate\" href=\"".htmlspecialchars(SELF_URL_PATH)."\"/>";