]> git.wh0rd.org - tt-rss.git/blobdiff - include/functions.php
fix ttrss_feeds.last_update defaulting to 0 on mysql, set to null instead
[tt-rss.git] / include / functions.php
index 6d183abaa9420ea03684bc2c553ad692c2f6cdbf..92d6e9790b7d8a055d1c721ba2a10faa003c6106 100644 (file)
@@ -1,6 +1,6 @@
 <?php
        define('EXPECTED_CONFIG_VERSION', 26);
-       define('SCHEMA_VERSION', 129);
+       define('SCHEMA_VERSION', 130);
 
        define('LABEL_BASE_INDEX', -1024);
        define('PLUGIN_FEED_BASE_INDEX', -128);
                        curl_setopt($ch, CURLOPT_MAXREDIRS, 20);
                        curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
                        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
-                       curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                        curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
                        curl_setopt($ch, CURLOPT_USERAGENT, $useragent ? $useragent :
                                SELF_USER_AGENT);
                        }
 
                        if (!$post_query && $timestamp) {
-                               $context = stream_context_create(array(
-                                       'http' => array(
-                                               'method' => 'GET',
-                                               'header' => "If-Modified-Since: ".gmdate("D, d M Y H:i:s \\G\\M\\T\r\n", $timestamp)
-                                       )));
+                                $context = stream_context_create(array(
+                                         'http' => array(
+                                                       'method' => 'GET',
+                                                       'protocol_version'=> 1.1,
+                                                       'header' => "If-Modified-Since: ".gmdate("D, d M Y H:i:s \\G\\M\\T\r\n", $timestamp)
+                                         )));
                        } else {
-                               $context = NULL;
+                                $context = stream_context_create(array(
+                                         'http' => array(
+                                                       'method' => 'GET',
+                                                       'protocol_version'=> 1.1
+                                         )));
                        }
 
                        $old_error = error_get_last();
                        FROM ttrss_labels2 LEFT JOIN ttrss_user_labels2 ON
                                (ttrss_labels2.id = label_id)
                                LEFT JOIN ttrss_user_entries AS u1 ON u1.ref_id = article_id
-                               WHERE ttrss_labels2.owner_uid = $owner_uid GROUP BY ttrss_labels2.id,
+                               WHERE ttrss_labels2.owner_uid = $owner_uid AND u1.owner_uid = $owner_uid
+                               GROUP BY ttrss_labels2.id,
                                        ttrss_labels2.caption");
 
                while ($line = db_fetch_assoc($result)) {