Version Description
Download this release
Release Info
Developer | Disqus |
Plugin | Disqus Comment System |
Version | 2.52 |
Comparing to | |
See all releases |
Code changes from version 2.51 to 2.52
- disqus.php +2 -2
- lib/api/disqus/disqus.php +8 -5
- lib/api/disqus/json.php +4 -3
- lib/api/disqus/url.php +10 -0
- readme.txt +5 -1
disqus.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Disqus Comment System
|
|
4 |
Plugin URI: http://disqus.com/
|
5 |
Description: The Disqus comment system replaces your WordPress comment system with your comments hosted and powered by Disqus. Head over to the Comments admin page to set up your DISQUS Comment System.
|
6 |
Author: Disqus <team@disqus.com>
|
7 |
-
Version: 2.
|
8 |
Author URI: http://disqus.com/
|
9 |
*/
|
10 |
|
@@ -24,7 +24,7 @@ define('DISQUS_CAN_EXPORT', is_file(dirname(__FILE__) . '/export.php'));
|
|
24 |
if (!defined('DISQUS_DEBUG')) {
|
25 |
define('DISQUS_DEBUG', false);
|
26 |
}
|
27 |
-
define('DISQUS_VERSION', '2.
|
28 |
|
29 |
/**
|
30 |
* Returns an array of all option identifiers used by DISQUS.
|
4 |
Plugin URI: http://disqus.com/
|
5 |
Description: The Disqus comment system replaces your WordPress comment system with your comments hosted and powered by Disqus. Head over to the Comments admin page to set up your DISQUS Comment System.
|
6 |
Author: Disqus <team@disqus.com>
|
7 |
+
Version: 2.52
|
8 |
Author URI: http://disqus.com/
|
9 |
*/
|
10 |
|
24 |
if (!defined('DISQUS_DEBUG')) {
|
25 |
define('DISQUS_DEBUG', false);
|
26 |
}
|
27 |
+
define('DISQUS_VERSION', '2.52');
|
28 |
|
29 |
/**
|
30 |
* Returns an array of all option identifiers used by DISQUS.
|
lib/api/disqus/disqus.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
* @version 1.1
|
12 |
*/
|
13 |
|
14 |
-
require_once('url.php');
|
15 |
|
16 |
/** @#+
|
17 |
* Constants
|
@@ -37,7 +37,7 @@ define('DISQUS_ACTION_DELETE', 'delete');
|
|
37 |
define('DISQUS_ACTION_KILL', 'kill');
|
38 |
|
39 |
if (!extension_loaded('json')) {
|
40 |
-
require_once('json.php');
|
41 |
function dsq_json_decode($data) {
|
42 |
$json = new JSON;
|
43 |
return $json->unserialize($data);
|
@@ -115,8 +115,11 @@ class DisqusAPI {
|
|
115 |
$args = null;
|
116 |
}
|
117 |
|
118 |
-
$response = dsq_urlopen($url, $args)
|
119 |
-
|
|
|
|
|
|
|
120 |
$data = dsq_json_decode($response['data']);
|
121 |
|
122 |
if(!$data || !$data->succeeded) {
|
@@ -325,7 +328,7 @@ class DisqusAPI {
|
|
325 |
$params['identifier'] = $identifier;
|
326 |
$params['title'] = $title;
|
327 |
|
328 |
-
return $this->call('
|
329 |
}
|
330 |
|
331 |
/**
|
11 |
* @version 1.1
|
12 |
*/
|
13 |
|
14 |
+
require_once(dirname(__FILE__) . '/url.php');
|
15 |
|
16 |
/** @#+
|
17 |
* Constants
|
37 |
define('DISQUS_ACTION_KILL', 'kill');
|
38 |
|
39 |
if (!extension_loaded('json')) {
|
40 |
+
require_once(dirname(__FILE__) . '/json.php');
|
41 |
function dsq_json_decode($data) {
|
42 |
$json = new JSON;
|
43 |
return $json->unserialize($data);
|
115 |
$args = null;
|
116 |
}
|
117 |
|
118 |
+
if (!($response = dsq_urlopen($url, $args)) || !$response['code']) {
|
119 |
+
$this->last_error = 'Unable to connect to the Disqus API servers';
|
120 |
+
return false;
|
121 |
+
}
|
122 |
+
|
123 |
$data = dsq_json_decode($response['data']);
|
124 |
|
125 |
if(!$data || !$data->succeeded) {
|
328 |
$params['identifier'] = $identifier;
|
329 |
$params['title'] = $title;
|
330 |
|
331 |
+
return $this->call('thread_by_identifier', $params, true);
|
332 |
}
|
333 |
|
334 |
/**
|
lib/api/disqus/json.php
CHANGED
@@ -273,12 +273,13 @@ class JSON
|
|
273 |
$state = IN_ATOMIC;
|
274 |
$i=$i+4;
|
275 |
return true;
|
276 |
-
}
|
|
|
277 |
break;
|
278 |
case "f":
|
279 |
-
if ( substr($e,$i,
|
280 |
$state = IN_ATOMIC;
|
281 |
-
$i=$i+
|
282 |
return false;
|
283 |
}
|
284 |
else break 2; /* exit from switch and while */
|
273 |
$state = IN_ATOMIC;
|
274 |
$i=$i+4;
|
275 |
return true;
|
276 |
+
}
|
277 |
+
else break 2; /* exit from switch and while */
|
278 |
break;
|
279 |
case "f":
|
280 |
+
if ( substr($e,$i,5) == "false") {
|
281 |
$state = IN_ATOMIC;
|
282 |
+
$i=$i+5;
|
283 |
return false;
|
284 |
}
|
285 |
else break 2; /* exit from switch and while */
|
lib/api/disqus/url.php
CHANGED
@@ -267,4 +267,14 @@ function dsq_urlopen($url, $postdata=false, $file=false) {
|
|
267 |
|
268 |
return $response;
|
269 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
?>
|
267 |
|
268 |
return $response;
|
269 |
}
|
270 |
+
|
271 |
+
function dsq_url_method() {
|
272 |
+
if(function_exists('curl_init')) {
|
273 |
+
return 'curl';
|
274 |
+
} else if(ini_get('allow_url_fopen') && function_exists('stream_get_contents')) {
|
275 |
+
return 'fopen';
|
276 |
+
} else {
|
277 |
+
return 'fsockopen';
|
278 |
+
}
|
279 |
+
}
|
280 |
?>
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: disqus, alexkingorg, crowdfavorite
|
|
3 |
Tags: comments, threaded, email, notification, spam, avatars, community, profile, widget, disqus
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 3.0
|
6 |
-
Stable tag: 2.
|
7 |
|
8 |
The Disqus comment system replaces your WordPress comment system with your comments hosted and powered by Disqus.
|
9 |
|
@@ -62,6 +62,10 @@ you should remove it, and the new plugin should be stored in 'disqus'.
|
|
62 |
|
63 |
== Changes ==
|
64 |
|
|
|
|
|
|
|
|
|
65 |
2.51
|
66 |
|
67 |
* Added CDATA comments for JavaScript.
|
3 |
Tags: comments, threaded, email, notification, spam, avatars, community, profile, widget, disqus
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 3.0
|
6 |
+
Stable tag: 2.52
|
7 |
|
8 |
The Disqus comment system replaces your WordPress comment system with your comments hosted and powered by Disqus.
|
9 |
|
62 |
|
63 |
== Changes ==
|
64 |
|
65 |
+
2.52
|
66 |
+
|
67 |
+
* Fixed issue with Disqus-API package not getting updated (only affecting PHP4).
|
68 |
+
|
69 |
2.51
|
70 |
|
71 |
* Added CDATA comments for JavaScript.
|