]> git.wh0rd.org Git - tt-rss.git/commitdiff
Revert "update SITE_TITLE customization to work without needing to be pre-defined...
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 23 Mar 2013 05:48:15 +0000 (09:48 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 23 Mar 2013 05:48:15 +0000 (09:48 +0400)
This reverts commit 8d051fa0769922df69ac737eee9d13dff67095a9.

config.php-dist
include/functions.php
index.php
js/tt-rss.js
prefs.php
register.php

index c66fb39fac7486653cd827a7cb6fd8296393c151..299f753ca9963df2d5db62477e0f879cab87e6ac 100644 (file)
        // 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);
index 00dc6a8fefc852578a4de166eb65bec707140ed4..2329a2331c6acaa390e1bc0519e4641a84b9ea48 100644 (file)
                return $max_ts;
        }
 
-    function get_site_title() {
-        $original_title = "Tiny Tiny RSS";
-        if (defined("SITE_TITLE")) {
-            return SITE_TITLE;
-        }
-        return $original_title;
-    }
 ?>
index 4669a2080f540781652514504c29434f1e8f8e27..5a37c0e988a719282e4cda9363cdeb936162ddf8 100644 (file)
--- 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"); ?>
index 91aff8b6878ba55da30f8f8afbb38c2c5f79891c..1d6540dbb47e90c8b6a94551cda23d9e49bbf7e2 100644 (file)
@@ -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) {
index 0d27a6e814c246233c9cef8192b72f883cb5ce1b..9c59d6c4d6f651cc2fe1a54116b712a111e1bc33 100644 (file)
--- 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"); ?>
index ce1b1ed512592294986afd03425dee1b58803ce2..7339303273bda1e1e5058c34a2981a2b952db2fe 100644 (file)
@@ -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)."\"/>";