This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before: | |
throw new RuntimeException(isset($content['message']) ? $content['message'] : $content, $response->getStatusCode()); | |
now: | |
try | |
{ | |
throw new RuntimeException(isset($content['message']) ? $content['message'] : $content, $response->getStatusCode()); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected function getAPIStatus() | |
{ | |
$apiUrl = 'https://status.github.com/api/status.json'; | |
$check = json_decode($this->fetch_web_data($apiUrl)); | |
if (empty($check)) | |
return false; | |
if (!empty($check) && is_object($check)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Doctrine | |
$sql = "SELECT * FROM articles WHERE id = ?"; | |
$stmt = $conn->prepare($sql); | |
$stmt->bindValue(1, $id); | |
$stmt->execute(); | |
// SMF | |
$result = $this->_smcFunc['db_query']('', ' | |
SELECT * | |
FROM articles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filter: function(query, data, search_key) { | |
var _this = this; | |
return $.map(data, function(item, i) { | |
var name; | |
name = $.isPlainObject(item) ? item[search_key] : item; | |
if (name.toLowerCase().indexOf(query) >= 0) { | |
return item; | |
} | |
}); | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected function returnResponse() | |
{ | |
global $modSettings; | |
// kill anything else | |
ob_end_clean(); | |
if (!empty($modSettings['enableCompressedOutput'])) | |
@ob_start('ob_gzhandler'); |
NewerOlder