@@ -55,7 +55,7 @@ |
||
| 55 | 55 | * @throws VKException |
| 56 | 56 | */ |
| 57 | 57 | protected function isAllowed($requiredPermission = null) { |
| 58 | - if ($requiredPermission != null){ |
|
| 58 | + if ($requiredPermission != null) { |
|
| 59 | 59 | try { |
| 60 | 60 | $isValidPermission = $this->VKObject->getPermissionsMask() & $requiredPermission; |
| 61 | 61 | if (!$isValidPermission) { |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | $requestParameters = [ |
| 51 | - 'user_ids' => implode(',',$usersIDs), |
|
| 51 | + 'user_ids' => implode(',', $usersIDs), |
|
| 52 | 52 | 'fields' => $this->returnAllowedFields($requestFields), |
| 53 | 53 | 'name_case' => $this->returnAllowedNC($nameCase) |
| 54 | 54 | ]; |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | $allowedFields = [ 'photo_id', 'verified', 'sex', 'bdate', 'city', 'country', 'home_town', 'has_photo', 'photo_50', 'photo_100', 'photo_200_orig', 'photo_200', 'photo_400_orig', 'photo_max', 'photo_max_orig', 'online', 'lists', 'domain', 'has_mobile', 'contacts', 'site', 'education', 'universities', 'schools', 'status', 'last_seen', 'followers_count', 'common_count', 'occupation', 'nickname', 'relatives', 'relation', 'personal', 'connections', 'exports', 'wall_comments', 'activities', 'interests', 'music', 'movies', 'tv', 'books', 'games', 'about', 'quotes', 'can_post', 'can_see_all_posts', 'can_see_audio', 'can_write_private_message', 'can_send_friend_request', 'is_favorite', 'is_hidden_from_feed', 'timezone', 'screen_name', 'maiden_name', 'crop_photo', 'is_friend', 'friend_status', 'career', 'military', 'blacklisted', 'blacklisted_by_me' ]; |
| 176 | 176 | foreach ($fieldsArray as $fKey => $fValue) { |
| 177 | 177 | if (!in_array($fValue, $allowedFields)) { |
| 178 | - unset($fieldsArray[$fKey]); |
|
| 178 | + unset($fieldsArray[ $fKey ]); |
|
| 179 | 179 | } |
| 180 | 180 | } |
| 181 | 181 | |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | * @return string |
| 189 | 189 | */ |
| 190 | 190 | private function returnAllowedNC($ncValue) { |
| 191 | - $allowedNameCases = ['nom', 'gen', 'dat', 'acc', 'ins', 'abl']; |
|
| 191 | + $allowedNameCases = [ 'nom', 'gen', 'dat', 'acc', 'ins', 'abl' ]; |
|
| 192 | 192 | if (!in_array($ncValue, $allowedNameCases)) { |
| 193 | 193 | $ncValue = 'nom'; |
| 194 | 194 | } |
@@ -61,9 +61,9 @@ discard block |
||
| 61 | 61 | ]; |
| 62 | 62 | |
| 63 | 63 | if (is_array($groupID)) { |
| 64 | - $requestParameters['group_ids'] = implode(',', $groupID); |
|
| 64 | + $requestParameters[ 'group_ids' ] = implode(',', $groupID); |
|
| 65 | 65 | } else { |
| 66 | - $requestParameters['group_id'] = $groupID; |
|
| 66 | + $requestParameters[ 'group_id' ] = $groupID; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | return parent::executeQuery(__FUNCTION__, $requestParameters); |
@@ -78,14 +78,14 @@ discard block |
||
| 78 | 78 | * @return mixed |
| 79 | 79 | */ |
| 80 | 80 | public function get($userID, $isExtended = 0, $setFilter = null, $requestFields = self::defaultFields) { |
| 81 | - $allowedFilterTypes = ['admin', 'editor', 'moder', 'groups', 'publics', 'events']; |
|
| 81 | + $allowedFilterTypes = [ 'admin', 'editor', 'moder', 'groups', 'publics', 'events' ]; |
|
| 82 | 82 | $requestParameters = [ |
| 83 | 83 | 'user_id' => $userID, |
| 84 | 84 | 'extended' => ($isExtended > 1 || $isExtended < 0) ? 0 : $isExtended, |
| 85 | 85 | 'fields' => $this->getAllowedFields($requestFields) |
| 86 | 86 | ]; |
| 87 | 87 | if ($setFilter != null && in_array($setFilter, $allowedFilterTypes)) { |
| 88 | - $requestParameters['filter'] = $setFilter; |
|
| 88 | + $requestParameters[ 'filter' ] = $setFilter; |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | return parent::executeQuery(__FUNCTION__, $requestParameters); |
@@ -113,10 +113,10 @@ discard block |
||
| 113 | 113 | * @return mixed |
| 114 | 114 | */ |
| 115 | 115 | public function join($groupID, $ifMeeting = null) { |
| 116 | - $requestParameters['group_id'] = $groupID; |
|
| 117 | - if ($ifMeeting != null){ |
|
| 116 | + $requestParameters[ 'group_id' ] = $groupID; |
|
| 117 | + if ($ifMeeting != null) { |
|
| 118 | 118 | if ($ifMeeting == 1 || $ifMeeting == 0) { |
| 119 | - $requestParameters['not_sure'] = $ifMeeting; |
|
| 119 | + $requestParameters[ 'not_sure' ] = $ifMeeting; |
|
| 120 | 120 | } |
| 121 | 121 | } |
| 122 | 122 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | * @return mixed |
| 130 | 130 | */ |
| 131 | 131 | public function leave($groupID) { |
| 132 | - $requestParameters['group_id'] = $groupID; |
|
| 132 | + $requestParameters[ 'group_id' ] = $groupID; |
|
| 133 | 133 | |
| 134 | 134 | return parent::executeQuery(__FUNCTION__, $requestParameters); |
| 135 | 135 | } |
@@ -141,9 +141,9 @@ discard block |
||
| 141 | 141 | * @return mixed |
| 142 | 142 | */ |
| 143 | 143 | public function search($searchQuery, $groupType = null) { |
| 144 | - $requestParameters['q'] = $searchQuery; |
|
| 145 | - if ($groupType != null && in_array($groupType, ['group', 'page', 'event'])) { |
|
| 146 | - $requestParameters['type'] = $groupType; |
|
| 144 | + $requestParameters[ 'q' ] = $searchQuery; |
|
| 145 | + if ($groupType != null && in_array($groupType, [ 'group', 'page', 'event' ])) { |
|
| 146 | + $requestParameters[ 'type' ] = $groupType; |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | return parent::executeQuery(__FUNCTION__, $requestParameters); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | * @return mixed |
| 156 | 156 | */ |
| 157 | 157 | public function getInvites($isExtended = 0) { |
| 158 | - $requestParameters['extended'] = ($isExtended > 1 || $isExtended < 0) ? 0 : $isExtended; |
|
| 158 | + $requestParameters[ 'extended' ] = ($isExtended > 1 || $isExtended < 0) ? 0 : $isExtended; |
|
| 159 | 159 | return parent::executeQuery(__FUNCTION__, $requestParameters); |
| 160 | 160 | } |
| 161 | 161 | |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | * @return mixed |
| 216 | 216 | */ |
| 217 | 217 | public function getBanned($groupID) { |
| 218 | - return parent::executeQuery(__FUNCTION__, ['group_id' => $groupID]); |
|
| 218 | + return parent::executeQuery(__FUNCTION__, [ 'group_id' => $groupID ]); |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | /** |
@@ -227,16 +227,16 @@ discard block |
||
| 227 | 227 | * @return mixed |
| 228 | 228 | */ |
| 229 | 229 | public function create($groupTitle, $groupDescription, $groupType = 'group', $subType = null) { |
| 230 | - $allowedGroupTypes = ['group', 'event', 'public']; |
|
| 230 | + $allowedGroupTypes = [ 'group', 'event', 'public' ]; |
|
| 231 | 231 | $requestParameters = [ |
| 232 | 232 | 'title' => $groupTitle, |
| 233 | 233 | 'type' => (in_array($groupType, $allowedGroupTypes)) ? $groupType : 'group' |
| 234 | 234 | ]; |
| 235 | 235 | if ($groupType != 'public') { |
| 236 | - $requestParameters['description'] = $groupDescription; |
|
| 236 | + $requestParameters[ 'description' ] = $groupDescription; |
|
| 237 | 237 | } |
| 238 | 238 | if ($subType != null) { |
| 239 | - $requestParameters['subtype'] = ($subType > 4 || $subType < 1) ? 2 : $subType; |
|
| 239 | + $requestParameters[ 'subtype' ] = ($subType > 4 || $subType < 1) ? 2 : $subType; |
|
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | return parent::executeQuery(__FUNCTION__, $requestParameters); |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | * @return mixed |
| 273 | 273 | */ |
| 274 | 274 | public function getSettings($groupID) { |
| 275 | - return parent::executeQuery(__FUNCTION__, ['group_id' => $groupID]); |
|
| 275 | + return parent::executeQuery(__FUNCTION__, [ 'group_id' => $groupID ]); |
|
| 276 | 276 | } |
| 277 | 277 | |
| 278 | 278 | /** |
@@ -372,9 +372,9 @@ discard block |
||
| 372 | 372 | 'contacts' |
| 373 | 373 | ]; |
| 374 | 374 | |
| 375 | - foreach($fieldsArray as $fKey => $fValue) { |
|
| 375 | + foreach ($fieldsArray as $fKey => $fValue) { |
|
| 376 | 376 | if (!in_array($fValue, $groupsFields)) { |
| 377 | - unset($fieldsArray[$fKey]); |
|
| 377 | + unset($fieldsArray[ $fKey ]); |
|
| 378 | 378 | } |
| 379 | 379 | } |
| 380 | 380 | return implode(',', $fieldsArray); |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | if (!$this->isPermissionsMaskSet) { |
| 96 | 96 | $VKUser = new VKUsers($this); |
| 97 | 97 | $VKAccount = new VKAccount($this); |
| 98 | - $CurrentUser = $VKUser->get([ '' ])[ 'response' ][0][ 'uid' ]; |
|
| 98 | + $CurrentUser = $VKUser->get([ '' ])[ 'response' ][ 0 ][ 'uid' ]; |
|
| 99 | 99 | $this->setPermissionsMask($VKAccount->getAppPermissions($CurrentUser)[ 'response' ]); |
| 100 | 100 | $this->isPermissionsMaskSet = true; |
| 101 | 101 | unset($VKUser); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | * @return string |
| 127 | 127 | */ |
| 128 | 128 | public function getAPIUrl($apiMethod, $responseFormat = 'json') { |
| 129 | - return self::METHOD_URL . $apiMethod . '.' . $responseFormat; |
|
| 129 | + return self::METHOD_URL.$apiMethod.'.'.$responseFormat; |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | /** |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | |
| 177 | 177 | try { |
| 178 | 178 | if (isset($apiResponse[ 'error' ])) { |
| 179 | - throw new VKException($apiResponse[ 'error' ] . (!isset($apiResponse[ 'error_description' ]) ?: ': ' . $apiResponse[ 'error_description' ]), '0'); |
|
| 179 | + throw new VKException($apiResponse[ 'error' ].(!isset($apiResponse[ 'error_description' ]) ?: ': '.$apiResponse[ 'error_description' ]), '0'); |
|
| 180 | 180 | } else { |
| 181 | 181 | $this->authorizationStatus = true; |
| 182 | 182 | $this->accessToken = $apiResponse[ 'access_token' ]; |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | } |
| 185 | 185 | } catch (VKException $ex) { |
| 186 | 186 | echo $ex->getMessage(); |
| 187 | - return []; |
|
| 187 | + return [ ]; |
|
| 188 | 188 | } |
| 189 | 189 | } |
| 190 | 190 | |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | * @param string $requestMethod |
| 206 | 206 | * @return mixed |
| 207 | 207 | */ |
| 208 | - public function apiQuery($apiMethod, $requestParameters = [], $resultType = 'array', $requestMethod = 'get') { |
|
| 208 | + public function apiQuery($apiMethod, $requestParameters = [ ], $resultType = 'array', $requestMethod = 'get') { |
|
| 209 | 209 | $requestParameters[ 'timestamp' ] = time(); |
| 210 | 210 | $requestParameters[ 'api_id' ] = $this->applicationID; |
| 211 | 211 | $requestParameters[ 'random' ] = rand(0, 10000); |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | if (is_array($pValue)) { |
| 226 | 226 | $pValue = implode(', ', $pValue); |
| 227 | 227 | } |
| 228 | - $parametersSignature .= $pKey . '=' . $pValue; |
|
| 228 | + $parametersSignature .= $pKey.'='.$pValue; |
|
| 229 | 229 | } |
| 230 | 230 | $parametersSignature .= $this->APISecret; |
| 231 | 231 | |
@@ -244,9 +244,9 @@ discard block |
||
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | return $resultType == 'array' ? $decodedJSON : $apiResponse; |
| 247 | - } catch(VKException $ex) { |
|
| 247 | + } catch (VKException $ex) { |
|
| 248 | 248 | echo $ex->getMessage(); |
| 249 | - return []; |
|
| 249 | + return [ ]; |
|
| 250 | 250 | } |
| 251 | 251 | } |
| 252 | 252 | |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | * @return string |
| 274 | 274 | */ |
| 275 | 275 | private function createURL($urlString, $parametersArray) { |
| 276 | - $urlString .= '?' . http_build_query($parametersArray); |
|
| 276 | + $urlString .= '?'.http_build_query($parametersArray); |
|
| 277 | 277 | return $urlString; |
| 278 | 278 | } |
| 279 | 279 | |
@@ -284,9 +284,9 @@ discard block |
||
| 284 | 284 | * @param array $postFields |
| 285 | 285 | * @return string |
| 286 | 286 | */ |
| 287 | - private function performRequest($requestURL, $requestMethod = 'GET', $postFields = []) { |
|
| 287 | + private function performRequest($requestURL, $requestMethod = 'GET', $postFields = [ ]) { |
|
| 288 | 288 | curl_setopt_array($this->curlObject, [ |
| 289 | - CURLOPT_USERAGENT => 'FreedomCore/' . self::PACKAGE_VERSION . ' VK OAuth Client', |
|
| 289 | + CURLOPT_USERAGENT => 'FreedomCore/'.self::PACKAGE_VERSION.' VK OAuth Client', |
|
| 290 | 290 | CURLOPT_RETURNTRANSFER => true, |
| 291 | 291 | CURLOPT_SSL_VERIFYPEER => false, |
| 292 | 292 | CURLOPT_POST => ($requestMethod == 'POST'), |
@@ -341,42 +341,42 @@ discard block |
||
| 341 | 341 | */ |
| 342 | 342 | private function codeToErrorText($Code) { |
| 343 | 343 | $errorsData = [ |
| 344 | - 1 => [ 'title' => 'Unknown error occurred', 'description' => 'Try again later.' ], |
|
| 345 | - 2 => [ 'title' => 'Application is disabled. Enable your application or use test mode ', 'description' => 'You need to switch on the app in Settings (https://vk.com/editapp?id={Your API_ID} or use the test mode (test_mode=1).' ], |
|
| 346 | - 3 => [ 'title' => 'Unknown method passed ', 'description' => 'Check the method name: <a href="http://vk.com/dev/methods" target="_blank">http://vk.com/dev/methods</a> ' ], |
|
| 347 | - 4 => [ 'title' => 'Incorrect signature ', 'description' => 'Check if the signature has been formed correctly: <a href="https://vk.com/dev/api_nohttps" target="_blank"></a>' ], |
|
| 348 | - 5 => [ 'title' => 'User authorization failed ', 'description' => 'Make sure that you use a correct authorization type. To work with the methods without a secureprefix you need to authorize a user with one of these ways: http://vk.com/dev/auth_sites, http://vk.com/dev/auth_mobile.' ], |
|
| 349 | - 6 => [ 'title' => 'Too many requests per second ', 'description' => 'Decrease the request frequency or use the execute method. More details on frequency limits here: <a href="http://vk.com/dev/api_requests" target="_blank">http://vk.com/dev/api_requests</a>' ], |
|
| 350 | - 7 => [ 'title' => 'Permission to perform this action is denied ', 'description' => 'Make sure that your have received required permissions during the authorization. You can do it with the account.getAppPermissions method.' ], |
|
| 351 | - 8 => [ 'title' => 'Invalid request ', 'description' => 'Check the request syntax and used parameters list (it can be found on a method description page) ' ], |
|
| 352 | - 9 => [ 'title' => 'Flood control ', 'description' => 'You need to decrease the count of identical requests. For more efficient work you may use execute or JSONP.' ], |
|
| 353 | - 10 => [ 'title' => 'Internal server error', 'description' => 'Try again later.' ], |
|
| 354 | - 11 => [ 'title' => 'In test mode application should be disabled or user should be authorized', 'description' => 'Switch the app off in Settings: https://vk.com/editapp?id={Your API_ID}.' ], |
|
| 355 | - 14 => [ 'title' => 'Captcha needed ', 'description' => 'Work with this error is explained in detail on the <a href="https://vk.com/dev/need_confirmation" target="_blank">separate page</a>' ], |
|
| 356 | - 15 => [ 'title' => 'Access denied ', 'description' => 'Make sure that you use correct identifiers and the content is available for the user in the full version of the site.' ], |
|
| 357 | - 16 => [ 'title' => 'HTTP authorization failed', 'description' => 'To avoid this error check if a user has the \'Use secure connection\' option enabled with the account.getInfo method.' ], |
|
| 358 | - 17 => [ 'title' => 'Validation required ', 'description' => 'Make sure that you don\'t use a token received with http://vk.com/dev/auth_mobile for a request from the server. It\'s restricted. The validation process is described on the <a href="https://vk.com/dev/need_confirmation" target="_blank">separate page</a>.' ], |
|
| 359 | - 20 => [ 'title' => 'Permission to perform this action is denied for non-standalone applications ', 'description' => 'If you see this error despite your app has the Standalone type, make sure that you use redirect_uri=https://oauth.vk.com/blank.html. Details here: http://vk.com/dev/auth_mobile.' ], |
|
| 360 | - 21 => [ 'title' => 'Permission to perform this action is allowed only for Standalone and OpenAPI applications', 'description' => '' ], |
|
| 361 | - 23 => [ 'title' => 'This method was disabled ', 'description' => 'All the methods available now are listed here: <a href="http://vk.com/dev/methods" target="_blank">http://vk.com/dev/methods</a>' ], |
|
| 362 | - 24 => [ 'title' => 'Confirmation required ', 'description' => 'Confirmation process is described on the <a href="https://vk.com/dev/need_confirmation" target="_blank">separate page</a>' ], |
|
| 363 | - 100 => [ 'title' => 'One of the parameters specified was missing or invalid ', 'description' => 'Check the required parameters list and their format on a method description page.' ], |
|
| 364 | - 101 => [ 'title' => 'Invalid application API ID ', 'description' => 'Find the app in the administrated list in settings: <a href="http://vk.com/apps?act=settings" target="_blank">http://vk.com/apps?act=settings</a> And set the correct API_ID in the request.' ], |
|
| 344 | + 1 => [ 'title' => 'Unknown error occurred', 'description' => 'Try again later.' ], |
|
| 345 | + 2 => [ 'title' => 'Application is disabled. Enable your application or use test mode ', 'description' => 'You need to switch on the app in Settings (https://vk.com/editapp?id={Your API_ID} or use the test mode (test_mode=1).' ], |
|
| 346 | + 3 => [ 'title' => 'Unknown method passed ', 'description' => 'Check the method name: <a href="http://vk.com/dev/methods" target="_blank">http://vk.com/dev/methods</a> ' ], |
|
| 347 | + 4 => [ 'title' => 'Incorrect signature ', 'description' => 'Check if the signature has been formed correctly: <a href="https://vk.com/dev/api_nohttps" target="_blank"></a>' ], |
|
| 348 | + 5 => [ 'title' => 'User authorization failed ', 'description' => 'Make sure that you use a correct authorization type. To work with the methods without a secureprefix you need to authorize a user with one of these ways: http://vk.com/dev/auth_sites, http://vk.com/dev/auth_mobile.' ], |
|
| 349 | + 6 => [ 'title' => 'Too many requests per second ', 'description' => 'Decrease the request frequency or use the execute method. More details on frequency limits here: <a href="http://vk.com/dev/api_requests" target="_blank">http://vk.com/dev/api_requests</a>' ], |
|
| 350 | + 7 => [ 'title' => 'Permission to perform this action is denied ', 'description' => 'Make sure that your have received required permissions during the authorization. You can do it with the account.getAppPermissions method.' ], |
|
| 351 | + 8 => [ 'title' => 'Invalid request ', 'description' => 'Check the request syntax and used parameters list (it can be found on a method description page) ' ], |
|
| 352 | + 9 => [ 'title' => 'Flood control ', 'description' => 'You need to decrease the count of identical requests. For more efficient work you may use execute or JSONP.' ], |
|
| 353 | + 10 => [ 'title' => 'Internal server error', 'description' => 'Try again later.' ], |
|
| 354 | + 11 => [ 'title' => 'In test mode application should be disabled or user should be authorized', 'description' => 'Switch the app off in Settings: https://vk.com/editapp?id={Your API_ID}.' ], |
|
| 355 | + 14 => [ 'title' => 'Captcha needed ', 'description' => 'Work with this error is explained in detail on the <a href="https://vk.com/dev/need_confirmation" target="_blank">separate page</a>' ], |
|
| 356 | + 15 => [ 'title' => 'Access denied ', 'description' => 'Make sure that you use correct identifiers and the content is available for the user in the full version of the site.' ], |
|
| 357 | + 16 => [ 'title' => 'HTTP authorization failed', 'description' => 'To avoid this error check if a user has the \'Use secure connection\' option enabled with the account.getInfo method.' ], |
|
| 358 | + 17 => [ 'title' => 'Validation required ', 'description' => 'Make sure that you don\'t use a token received with http://vk.com/dev/auth_mobile for a request from the server. It\'s restricted. The validation process is described on the <a href="https://vk.com/dev/need_confirmation" target="_blank">separate page</a>.' ], |
|
| 359 | + 20 => [ 'title' => 'Permission to perform this action is denied for non-standalone applications ', 'description' => 'If you see this error despite your app has the Standalone type, make sure that you use redirect_uri=https://oauth.vk.com/blank.html. Details here: http://vk.com/dev/auth_mobile.' ], |
|
| 360 | + 21 => [ 'title' => 'Permission to perform this action is allowed only for Standalone and OpenAPI applications', 'description' => '' ], |
|
| 361 | + 23 => [ 'title' => 'This method was disabled ', 'description' => 'All the methods available now are listed here: <a href="http://vk.com/dev/methods" target="_blank">http://vk.com/dev/methods</a>' ], |
|
| 362 | + 24 => [ 'title' => 'Confirmation required ', 'description' => 'Confirmation process is described on the <a href="https://vk.com/dev/need_confirmation" target="_blank">separate page</a>' ], |
|
| 363 | + 100 => [ 'title' => 'One of the parameters specified was missing or invalid ', 'description' => 'Check the required parameters list and their format on a method description page.' ], |
|
| 364 | + 101 => [ 'title' => 'Invalid application API ID ', 'description' => 'Find the app in the administrated list in settings: <a href="http://vk.com/apps?act=settings" target="_blank">http://vk.com/apps?act=settings</a> And set the correct API_ID in the request.' ], |
|
| 365 | 365 | 103 => [ 'title' => 'Out of limits', 'description' => 'Out of limits' ], |
| 366 | 366 | 104 => [ 'title' => 'Not found', 'description' => 'Not found' ], |
| 367 | - 113 => [ 'title' => 'Invalid user id ', 'description' => 'Make sure that you use a correct id. You can get an id using a screen name with the utils.resolveScreenName method' ], |
|
| 368 | - 150 => [ 'title' => 'Invalid timestamp ', 'description' => 'You may get a correct value with the utils.getServerTime method.' ], |
|
| 369 | - 200 => [ 'title' => 'Access to album denied ', 'description' => 'Make sure you use correct ids (owner_id is always positive for users, negative for communities) and the current user has access to the requested content in the full version of the site.' ], |
|
| 370 | - 201 => [ 'title' => 'Access to audio denied ', 'description' => 'Make sure you use correct ids (owner_id is always positive for users, negative for communities) and the current user has access to the requested content in the full version of the site.' ], |
|
| 371 | - 203 => [ 'title' => 'Access to group denied ', 'description' => 'Make sure that the current user is a member or admin of the community (for closed and private groups and events).' ], |
|
| 372 | - 300 => [ 'title' => 'This album is full ', 'description' => 'You need to delete the odd objects from the album or use another album.' ], |
|
| 373 | - 500 => [ 'title' => 'Permission denied. You must enable votes processing in application settings', 'description' => 'Check the app settings: http://vk.com/editapp?id={Your API_ID}§ion=payments' ], |
|
| 374 | - 600 => [ 'title' => 'Permission denied. You have no access to operations specified with given object(s)', 'description' => '' ], |
|
| 375 | - 603 => [ 'title' => 'Some ads error occurred', 'description' => '' ], |
|
| 376 | - 1260 => [ 'title' => 'Invalid screen name', 'description' => 'This screen name is already in use or invalid' ], |
|
| 367 | + 113 => [ 'title' => 'Invalid user id ', 'description' => 'Make sure that you use a correct id. You can get an id using a screen name with the utils.resolveScreenName method' ], |
|
| 368 | + 150 => [ 'title' => 'Invalid timestamp ', 'description' => 'You may get a correct value with the utils.getServerTime method.' ], |
|
| 369 | + 200 => [ 'title' => 'Access to album denied ', 'description' => 'Make sure you use correct ids (owner_id is always positive for users, negative for communities) and the current user has access to the requested content in the full version of the site.' ], |
|
| 370 | + 201 => [ 'title' => 'Access to audio denied ', 'description' => 'Make sure you use correct ids (owner_id is always positive for users, negative for communities) and the current user has access to the requested content in the full version of the site.' ], |
|
| 371 | + 203 => [ 'title' => 'Access to group denied ', 'description' => 'Make sure that the current user is a member or admin of the community (for closed and private groups and events).' ], |
|
| 372 | + 300 => [ 'title' => 'This album is full ', 'description' => 'You need to delete the odd objects from the album or use another album.' ], |
|
| 373 | + 500 => [ 'title' => 'Permission denied. You must enable votes processing in application settings', 'description' => 'Check the app settings: http://vk.com/editapp?id={Your API_ID}§ion=payments' ], |
|
| 374 | + 600 => [ 'title' => 'Permission denied. You have no access to operations specified with given object(s)', 'description' => '' ], |
|
| 375 | + 603 => [ 'title' => 'Some ads error occurred', 'description' => '' ], |
|
| 376 | + 1260 => [ 'title' => 'Invalid screen name', 'description' => 'This screen name is already in use or invalid' ], |
|
| 377 | 377 | ]; |
| 378 | 378 | |
| 379 | - return (!array_key_exists($Code, $errorsData)) ? $errorsData[1] : $errorsData[$Code]; |
|
| 379 | + return (!array_key_exists($Code, $errorsData)) ? $errorsData[ 1 ] : $errorsData[ $Code ]; |
|
| 380 | 380 | } |
| 381 | 381 | |
| 382 | 382 | } |
| 383 | 383 | \ No newline at end of file |
@@ -122,7 +122,7 @@ |
||
| 122 | 122 | ]; |
| 123 | 123 | |
| 124 | 124 | foreach ($filtersArray as $fKey => $fValue) { |
| 125 | - if(!in_array($fValue, $existingFilters)) { |
|
| 125 | + if (!in_array($fValue, $existingFilters)) { |
|
| 126 | 126 | unset($filtersArray[ $fKey ]); |
| 127 | 127 | } |
| 128 | 128 | } |