1
0
Fork 0

Merge remote-tracking branch 'upstream/develop' into rewrites/coding-convention-split2-6-2

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2017-06-13 23:26:06 +02:00
commit 4e49939421
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
165 changed files with 63565 additions and 40577 deletions

View file

@ -293,7 +293,7 @@ function paginate_data(App $a, $count = null) {
$stripped = trim($stripped, '/');
$pagenum = $a->pager['page'];
if (($a->page_offset != '') AND !preg_match('/[?&].offset=/', $stripped)) {
if (($a->page_offset != '') && !preg_match('/[?&].offset=/', $stripped)) {
$stripped .= '&offset=' . urlencode($a->page_offset);
}
@ -1276,8 +1276,8 @@ function redir_private_images($a, &$item)
function put_item_in_cache(&$item, $update = false) {
if (($item["rendered-hash"] != hash("md5", $item["body"])) OR ($item["rendered-hash"] == "") OR
($item["rendered-html"] == "") OR get_config("system", "ignore_cache")) {
if (($item["rendered-hash"] != hash("md5", $item["body"])) || ($item["rendered-hash"] == "") ||
($item["rendered-html"] == "") || get_config("system", "ignore_cache")) {
// The function "redir_private_images" changes the body.
// I'm not sure if we should store it permanently, so we save the old value.
@ -1290,7 +1290,7 @@ function put_item_in_cache(&$item, $update = false) {
$item["rendered-hash"] = hash("md5", $item["body"]);
$item["body"] = $body;
if ($update AND ($item["id"] != 0)) {
if ($update && ($item["id"] != 0)) {
q("UPDATE `item` SET `rendered-html` = '%s', `rendered-hash` = '%s' WHERE `id` = %d",
dbesc($item["rendered-html"]), dbesc($item["rendered-hash"]), intval($item["id"]));
}
@ -1352,7 +1352,7 @@ function prepare_body(&$item, $attach = false, $preview = false) {
$update = (!local_user() and !remote_user() and ($item["uid"] == 0));
// Or update it if the current viewer is the intented viewer
if (($item["uid"] == local_user()) AND ($item["uid"] != 0)) {
if (($item["uid"] == local_user()) && ($item["uid"] != 0)) {
$update = true;
}