Skip to content

Commit 0e8345a

Browse files
pqrspqrs
pqrs
authored and
pqrs
committed
Corrected error in androidnotification() function parameters
1 parent 140d1e0 commit 0e8345a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Diff for: includes/functions.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Monolog\Logger;
88
use Monolog\Handler\StreamHandler;
99

10-
10+
1111
function post2telegram($user_id, $bot_token, $message) {
1212

1313
$tgLog = new TgLog($bot_token);
@@ -105,17 +105,17 @@ function post2facebookpersonalwall( $app_id, $app_secret, $linkData ) {
105105
function post2twitter( $consumer_key, $consumer_secret, $oauth_token, $oauth_secret, $message ) {
106106

107107
$connection = new TwitterOAuth( $consumer_key, $consumer_secret, $oauth_token, $oauth_secret );
108-
108+
109109
$content = $connection->get('account/verify_credentials');
110110

111111
$connection->post('statuses/update', array('status' => $message));
112112

113113
if ($connection->getLastHttpCode() == 200) {
114-
114+
115115
return true;
116116

117117
} else {
118-
118+
119119
return false;
120120

121121
}
@@ -127,7 +127,7 @@ function androidnotification( $api_access_key, $title, $to, $message ) {
127127

128128
// prep the bundle
129129
$msg = array (
130-
'body' => $texto,
130+
'body' => $message,
131131
'title' => $title,
132132
'priority' => 'high',
133133
'sound' => 'default',
@@ -157,14 +157,14 @@ function androidnotification( $api_access_key, $title, $to, $message ) {
157157

158158
curl_close($ch);
159159

160-
//Decoding json from result
160+
//Decoding json from result
161161
$res = json_decode($result);
162162

163163
$flag = $res->success;
164164

165-
//if success is 1 means message is sent
165+
//if success is 1 means message is sent
166166
if($flag == 1){
167-
167+
168168
return true;
169169

170170
} else {
@@ -195,7 +195,7 @@ function logit( $logger, $message, $type ) {
195195
break;
196196
}
197197

198-
198+
199199

200200
}
201201

0 commit comments

Comments
 (0)