]> git.wh0rd.org Git - tt-rss.git/commitdiff
remove update on checksum change (updated status has been removed); rtl stuff (unused)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 26 Feb 2013 15:20:58 +0000 (19:20 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 26 Feb 2013 15:20:58 +0000 (19:20 +0400)
classes/feeds.php
classes/pref/feeds.php
include/functions.php
include/rssfuncs.php
js/prefs.js

index cc6d27330cadc0434dc3dfab8cfa1456ae23ca8a..fed960565406c4a94adf5df4d2bcf5be16335a03 100644 (file)
@@ -198,27 +198,6 @@ class Feeds extends Handler_Protected {
                        }
                }
 
-               if (is_numeric($feed) && $feed > 0) {
-
-                       $result = db_query($this->link, "SELECT rtl_content FROM ttrss_feeds
-                               WHERE id = '$feed' AND owner_uid = " . $_SESSION["uid"]);
-
-                       if (db_num_rows($result) == 1) {
-                               $rtl_content = sql_bool_to_bool(db_fetch_result($result, 0, "rtl_content"));
-                       } else {
-                               $rtl_content = false;
-                       }
-
-                       if ($rtl_content) {
-                               $rtl_tag = "dir=\"RTL\"";
-                       } else {
-                               $rtl_tag = "";
-                       }
-               } else {
-                       $rtl_tag = "";
-                       $rtl_content = false;
-               }
-
                @$search = db_escape_string($_REQUEST["query"]);
 
                if ($search) {
index 52d5e89aa7ce4874da8b0107c344115439064a25..aa2ae6615e17ca6e3f80070acdff6d872be653cf 100644 (file)
@@ -592,17 +592,6 @@ class Pref_Feeds extends Handler_Protected {
                print "<input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"private\" id=\"private\"
                        $checked>&nbsp;<label for=\"private\">".__('Hide from Popular feeds')."</label>";
 
-               $rtl_content = sql_bool_to_bool(db_fetch_result($result, 0, "rtl_content"));
-
-               if ($rtl_content) {
-                       $checked = "checked=\"1\"";
-               } else {
-                       $checked = "";
-               }
-
-               print "<hr/><input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" id=\"rtl_content\" name=\"rtl_content\"
-                       $checked>&nbsp;<label for=\"rtl_content\">".__('Right-to-left content')."</label>";
-
                $include_in_digest = sql_bool_to_bool(db_fetch_result($result, 0, "include_in_digest"));
 
                if ($include_in_digest) {
@@ -654,18 +643,6 @@ class Pref_Feeds extends Handler_Protected {
                        name=\"mark_unread_on_update\"
                        $checked>&nbsp;<label for=\"mark_unread_on_update\">".__('Mark updated articles as unread')."</label>";
 
-               $update_on_checksum_change = sql_bool_to_bool(db_fetch_result($result, 0, "update_on_checksum_change"));
-
-               if ($update_on_checksum_change) {
-                       $checked = "checked";
-               } else {
-                       $checked = "";
-               }
-
-               print "<hr/><input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" id=\"update_on_checksum_change\"
-                       name=\"update_on_checksum_change\"
-                       $checked>&nbsp;<label for=\"update_on_checksum_change\">".__('Mark posts as updated on content change')."</label>";
-
                print "</div>";
 
                /* Icon */
@@ -819,11 +796,6 @@ class Pref_Feeds extends Handler_Protected {
 
                print "&nbsp;"; $this->batch_edit_cbox("private", "private_l");
 
-               print "<br/><input disabled=\"1\" type=\"checkbox\" id=\"rtl_content\" name=\"rtl_content\"
-                       dojoType=\"dijit.form.CheckBox\">&nbsp;<label class='insensitive' id=\"rtl_content_l\" for=\"rtl_content\">".__('Right-to-left content')."</label>";
-
-               print "&nbsp;"; $this->batch_edit_cbox("rtl_content", "rtl_content_l");
-
                print "<br/><input disabled=\"1\" type=\"checkbox\" id=\"include_in_digest\"
                        name=\"include_in_digest\"
                        dojoType=\"dijit.form.CheckBox\">&nbsp;<label id=\"include_in_digest_l\" class='insensitive' for=\"include_in_digest\">".__('Include in e-mail digest')."</label>";
@@ -850,12 +822,6 @@ class Pref_Feeds extends Handler_Protected {
 
                print "&nbsp;"; $this->batch_edit_cbox("mark_unread_on_update", "mark_unread_on_update_l");
 
-               print "<br/><input disabled=\"1\" type=\"checkbox\" id=\"update_on_checksum_change\"
-                       name=\"update_on_checksum_change\"
-                       dojoType=\"dijit.form.CheckBox\">&nbsp;<label id=\"update_on_checksum_change_l\" class='insensitive' for=\"update_on_checksum_change\">".__('Mark posts as updated on content change')."</label>";
-
-               print "&nbsp;"; $this->batch_edit_cbox("update_on_checksum_change", "update_on_checksum_change_l");
-
                print "</div>";
 
                print "<div class='dlgButtons'>
@@ -890,7 +856,6 @@ class Pref_Feeds extends Handler_Protected {
                $auth_login = db_escape_string(trim($_POST["auth_login"]));
                $auth_pass = db_escape_string(trim($_POST["auth_pass"]));
                $private = checkbox_to_sql_bool(db_escape_string($_POST["private"]));
-               $rtl_content = checkbox_to_sql_bool(db_escape_string($_POST["rtl_content"]));
                $include_in_digest = checkbox_to_sql_bool(
                        db_escape_string($_POST["include_in_digest"]));
                $cache_images = checkbox_to_sql_bool(
@@ -904,9 +869,6 @@ class Pref_Feeds extends Handler_Protected {
                $mark_unread_on_update = checkbox_to_sql_bool(
                        db_escape_string($_POST["mark_unread_on_update"]));
 
-               $update_on_checksum_change = checkbox_to_sql_bool(
-                       db_escape_string($_POST["update_on_checksum_change"]));
-
                if (get_pref($this->link, 'ENABLE_FEED_CATS')) {
                        if ($cat_id && $cat_id != 0) {
                                $category_qpart = "cat_id = '$cat_id',";
@@ -930,13 +892,11 @@ class Pref_Feeds extends Handler_Protected {
                                auth_login = '$auth_login',
                                auth_pass = '$auth_pass',
                                private = $private,
-                               rtl_content = $rtl_content,
                                cache_images = $cache_images,
                                cache_content = $cache_content,
                                include_in_digest = $include_in_digest,
                                always_display_enclosures = $always_display_enclosures,
-                               mark_unread_on_update = $mark_unread_on_update,
-                               update_on_checksum_change = $update_on_checksum_change
+                               mark_unread_on_update = $mark_unread_on_update
                        WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
 
                } else {
@@ -995,10 +955,6 @@ class Pref_Feeds extends Handler_Protected {
                                                $qpart = "mark_unread_on_update = $mark_unread_on_update";
                                                break;
 
-                                       case "update_on_checksum_change":
-                                               $qpart = "update_on_checksum_change = $update_on_checksum_change";
-                                               break;
-
                                        case "cache_images":
                                                $qpart = "cache_images = $cache_images";
                                                break;
@@ -1007,10 +963,6 @@ class Pref_Feeds extends Handler_Protected {
                                                $qpart = "cache_content = $cache_content";
                                                break;
 
-                                       case "rtl_content":
-                                               $qpart = "rtl_content = $rtl_content";
-                                               break;
-
                                        case "cat_id":
                                                $qpart = $category_qpart_nocomma;
                                                break;
index 572720787438248de478cc643d2a8032887385ee..4d3051a0c3c0c6fd878f0240228a69997b6aed25 100644 (file)
 
                //if (!$zoom_mode) { print "<article id='$id'><![CDATA["; };
 
-               $result = db_query($link, "SELECT rtl_content, always_display_enclosures, cache_content FROM ttrss_feeds
-                       WHERE id = '$feed_id' AND owner_uid = $owner_uid");
-
-               if (db_num_rows($result) == 1) {
-                       $rtl_content = sql_bool_to_bool(db_fetch_result($result, 0, "rtl_content"));
-                       $always_display_enclosures = sql_bool_to_bool(db_fetch_result($result, 0, "always_display_enclosures"));
-                       $cache_content = sql_bool_to_bool(db_fetch_result($result, 0, "cache_content"));
-               } else {
-                       $rtl_content = false;
-                       $always_display_enclosures = false;
-                       $cache_content = false;
-               }
-
-               if ($rtl_content) {
-                       $rtl_tag = "dir=\"RTL\"";
-                       $rtl_class = "RTL";
-               } else {
-                       $rtl_tag = "";
-                       $rtl_class = "";
-               }
-
                if ($mark_as_read) {
                        $result = db_query($link, "UPDATE ttrss_user_entries
                                SET unread = false,last_read = NOW()
                        $parsed_updated = make_local_datetime($link, $line["updated"], true,
                                $owner_uid, true);
 
-                       $rv['content'] .= "<div class=\"postDate$rtl_class\">$parsed_updated</div>";
+                       $rv['content'] .= "<div class=\"postDate\">$parsed_updated</div>";
 
                        if ($line["link"]) {
                                $rv['content'] .= "<div class='postTitle'><a target='_blank'
index bced183f49ab867aa579f32c29dd99c9b706d6bd..922b0ccb5f7f08a37a2b55a8074ddb3233b90ed2 100644 (file)
 
                $result = db_query($link, "SELECT id,update_interval,auth_login,
                        feed_url,auth_pass,cache_images,last_updated,
-                       mark_unread_on_update, owner_uid, update_on_checksum_change,
+                       mark_unread_on_update, owner_uid,
                        pubsub_state
                        FROM ttrss_feeds WHERE id = '$feed'");
 
                $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"));
-               $update_on_checksum_change = sql_bool_to_bool(db_fetch_result($result,
-                       0, "update_on_checksum_change"));
                $pubsub_state = db_fetch_result($result, 0, "pubsub_state");
 
                db_query($link, "UPDATE ttrss_feeds SET last_update_started = NOW()
                                                        if ($mark_unread_on_update) {
                                                                db_query($link, "UPDATE ttrss_user_entries
                                                                        SET last_read = null, unread = true WHERE ref_id = '$ref_id'");
-                                                       } else if ($update_on_checksum_change) {
-                                                               db_query($link, "UPDATE ttrss_user_entries
-                                                                       SET last_read = null WHERE ref_id = '$ref_id'
-                                                                               AND unread = false");
                                                        }
                                                }
                                        }
index 3f569a64468e851c682a20587b60d790614022e4..676fb914ae196b636f7ca9935df48746175ea359 100644 (file)
@@ -710,11 +710,6 @@ function editSelectedFeeds() {
 
                                                        /* Form.serialize ignores unchecked checkboxes */
 
-                                                       if (!query.match("&rtl_content=") &&
-                                                                       this.getChildByName('rtl_content').attr('disabled') == false) {
-                                                               query = query + "&rtl_content=false";
-                                                       }
-
                                                        if (!query.match("&private=") &&
                                                                        this.getChildByName('private').attr('disabled') == false) {
                                                                query = query + "&private=false";
@@ -742,11 +737,6 @@ function editSelectedFeeds() {
                                                                query = query + "&mark_unread_on_update=false";
                                                        }
 
-                                                       if (!query.match("&update_on_checksum_change=") &&
-                                                                       this.getChildByName('update_on_checksum_change').attr('disabled') == false) {
-                                                               query = query + "&update_on_checksum_change=false";
-                                                       }
-
                                                        console.log(query);
 
                                                        notify_progress("Saving data...", true);