aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/www/include/share
diff options
context:
space:
mode:
authorM.Gergo2018-12-16 16:35:17 +0100
committerM.Gergo2018-12-16 16:35:17 +0100
commite6988247360fa98b85915a38803d018dd353df00 (patch)
tree24f42628f6cdaedacc06ce033378173a0e561be9 /mayor-orig/www/include/share
parent2a219b9ea312fb88703a33ea2450e32af40be64a (diff)
downloadmayor-e6988247360fa98b85915a38803d018dd353df00.tar.gz
mayor-e6988247360fa98b85915a38803d018dd353df00.zip
Rev: 4412
Diffstat (limited to 'mayor-orig/www/include/share')
-rw-r--r--mayor-orig/www/include/share/facebook/Exceptions/FacebookResponseException.php2
-rw-r--r--mayor-orig/www/include/share/facebook/Facebook.php2
-rw-r--r--mayor-orig/www/include/share/facebook/FacebookBatchRequest.php2
-rw-r--r--mayor-orig/www/include/share/facebook/GraphNodes/GraphNode.php3
-rw-r--r--mayor-orig/www/include/share/facebook/GraphNodes/GraphPage.php10
-rw-r--r--mayor-orig/www/include/share/facebook/GraphNodes/GraphUser.php2
-rw-r--r--mayor-orig/www/include/share/facebook/Helpers/FacebookRedirectLoginHelper.php4
-rw-r--r--mayor-orig/www/include/share/facebook/HttpClients/FacebookCurlHttpClient.php2
-rw-r--r--mayor-orig/www/include/share/ssl/ssl.php2
9 files changed, 21 insertions, 8 deletions
diff --git a/mayor-orig/www/include/share/facebook/Exceptions/FacebookResponseException.php b/mayor-orig/www/include/share/facebook/Exceptions/FacebookResponseException.php
index 60fd5cfc..4a135db1 100644
--- a/mayor-orig/www/include/share/facebook/Exceptions/FacebookResponseException.php
+++ b/mayor-orig/www/include/share/facebook/Exceptions/FacebookResponseException.php
@@ -113,7 +113,9 @@ class FacebookResponseException extends FacebookSDKException
// API Throttling
case 4:
case 17:
+ case 32:
case 341:
+ case 613:
return new static($response, new FacebookThrottleException($message, $code));
// Duplicate Post
diff --git a/mayor-orig/www/include/share/facebook/Facebook.php b/mayor-orig/www/include/share/facebook/Facebook.php
index 4b444530..2e789ca2 100644
--- a/mayor-orig/www/include/share/facebook/Facebook.php
+++ b/mayor-orig/www/include/share/facebook/Facebook.php
@@ -53,7 +53,7 @@ class Facebook
/**
* @const string Version number of the Facebook PHP SDK.
*/
- const VERSION = '5.6.1';
+ const VERSION = '5.6.3';
/**
* @const string Default Graph API version for requests.
diff --git a/mayor-orig/www/include/share/facebook/FacebookBatchRequest.php b/mayor-orig/www/include/share/facebook/FacebookBatchRequest.php
index 3d5d5d56..9297e77d 100644
--- a/mayor-orig/www/include/share/facebook/FacebookBatchRequest.php
+++ b/mayor-orig/www/include/share/facebook/FacebookBatchRequest.php
@@ -39,7 +39,7 @@ class FacebookBatchRequest extends FacebookRequest implements IteratorAggregate,
/**
* @var array An array of FacebookRequest entities to send.
*/
- protected $requests;
+ protected $requests = [];
/**
* @var array An array of files to upload.
diff --git a/mayor-orig/www/include/share/facebook/GraphNodes/GraphNode.php b/mayor-orig/www/include/share/facebook/GraphNodes/GraphNode.php
index 061e7449..a81c47b7 100644
--- a/mayor-orig/www/include/share/facebook/GraphNodes/GraphNode.php
+++ b/mayor-orig/www/include/share/facebook/GraphNodes/GraphNode.php
@@ -150,7 +150,8 @@ class GraphNode extends Collection
'backdated_time',
'issued_at',
'expires_at',
- 'publish_time'
+ 'publish_time',
+ 'joined'
], true);
}
diff --git a/mayor-orig/www/include/share/facebook/GraphNodes/GraphPage.php b/mayor-orig/www/include/share/facebook/GraphNodes/GraphPage.php
index 3dfb0e03..503b96b5 100644
--- a/mayor-orig/www/include/share/facebook/GraphNodes/GraphPage.php
+++ b/mayor-orig/www/include/share/facebook/GraphNodes/GraphPage.php
@@ -144,4 +144,14 @@ class GraphPage extends GraphNode
{
return $this->getField('perms');
}
+
+ /**
+ * Returns the `fan_count` (Number of people who likes to page) as int if present.
+ *
+ * @return int|null
+ */
+ public function getFanCount()
+ {
+ return $this->getField('fan_count');
+ }
}
diff --git a/mayor-orig/www/include/share/facebook/GraphNodes/GraphUser.php b/mayor-orig/www/include/share/facebook/GraphNodes/GraphUser.php
index c50d7efd..6e1ed8f5 100644
--- a/mayor-orig/www/include/share/facebook/GraphNodes/GraphUser.php
+++ b/mayor-orig/www/include/share/facebook/GraphNodes/GraphUser.php
@@ -123,7 +123,7 @@ class GraphUser extends GraphNode
/**
* Returns the users birthday, if available.
*
- * @return \DateTime|null
+ * @return Birthday|null
*/
public function getBirthday()
{
diff --git a/mayor-orig/www/include/share/facebook/Helpers/FacebookRedirectLoginHelper.php b/mayor-orig/www/include/share/facebook/Helpers/FacebookRedirectLoginHelper.php
index 4a0755a4..3240ba81 100644
--- a/mayor-orig/www/include/share/facebook/Helpers/FacebookRedirectLoginHelper.php
+++ b/mayor-orig/www/include/share/facebook/Helpers/FacebookRedirectLoginHelper.php
@@ -222,8 +222,8 @@ class FacebookRedirectLoginHelper
$this->resetCsrf();
$redirectUrl = $redirectUrl ?: $this->urlDetectionHandler->getCurrentUrl();
- // At minimum we need to remove the state param
- $redirectUrl = FacebookUrlManipulator::removeParamsFromUrl($redirectUrl, ['state']);
+ // At minimum we need to remove the 'state' and 'code' params
+ $redirectUrl = FacebookUrlManipulator::removeParamsFromUrl($redirectUrl, ['code', 'state']);
return $this->oAuth2Client->getAccessTokenFromCode($code, $redirectUrl);
}
diff --git a/mayor-orig/www/include/share/facebook/HttpClients/FacebookCurlHttpClient.php b/mayor-orig/www/include/share/facebook/HttpClients/FacebookCurlHttpClient.php
index 059e75a5..9516cc83 100644
--- a/mayor-orig/www/include/share/facebook/HttpClients/FacebookCurlHttpClient.php
+++ b/mayor-orig/www/include/share/facebook/HttpClients/FacebookCurlHttpClient.php
@@ -98,7 +98,7 @@ class FacebookCurlHttpClient implements FacebookHttpClientInterface
CURLOPT_URL => $url,
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_TIMEOUT => $timeOut,
- CURLOPT_RETURNTRANSFER => true, // Follow 301 redirects
+ CURLOPT_RETURNTRANSFER => true, // Return response as string
CURLOPT_HEADER => true, // Enable header processing
CURLOPT_SSL_VERIFYHOST => 2,
CURLOPT_SSL_VERIFYPEER => true,
diff --git a/mayor-orig/www/include/share/ssl/ssl.php b/mayor-orig/www/include/share/ssl/ssl.php
index 0b6e2e04..61b6ca1b 100644
--- a/mayor-orig/www/include/share/ssl/ssl.php
+++ b/mayor-orig/www/include/share/ssl/ssl.php
@@ -431,7 +431,7 @@ function random_str($length, $keyspace = '0123456789abcdefghijklmnopqrstuvwxyzAB
$this->sessionKey = $this->_sessionKeyDecode($PACKED['sessionKeyEncoded']);
if ($this->_verifyHash($PACKED)) {
$this->incomingRequest = $this->_unpackData($PACKED);
-openlog("MaYoR Interconnect", LOG_PID | LOG_PERROR, LOG_LOCAL0);
+openlog("MaYoR", LOG_PID | LOG_PERROR, LOG_LOCAL0);
syslog(LOG_WARNING, "Data unpacked: ".(json_encode($this->incomingRequest))." {$_SERVER['REMOTE_ADDR']} ({$_SERVER['HTTP_USER_AGENT']})");
closelog();
$this->status = 'ok:success request';