1
0

fix whitespaces and tabs

This commit is contained in:
Ian
2015-12-20 17:23:11 +01:00
parent 2c7cd731d9
commit 3eb59e9052
2 changed files with 9 additions and 7 deletions

View File

@ -329,7 +329,7 @@ class Cache_Lite
} }
if ($this->_onlyMemoryCaching) { if ($this->_onlyMemoryCaching) {
return false; return false;
} }
} }
if (($doNotTestCacheValidity) || (is_null($this->_refreshTime))) { if (($doNotTestCacheValidity) || (is_null($this->_refreshTime))) {
if (file_exists($this->_file)) { if (file_exists($this->_file)) {
@ -387,7 +387,7 @@ class Cache_Lite
// if $res if false, we need to invalidate the cache // if $res if false, we need to invalidate the cache
@touch($this->_file, time() - 2*abs($this->_lifeTime)); @touch($this->_file, time() - 2*abs($this->_lifeTime));
return false; return false;
} }
} else { } else {
$res = $this->_write($data); $res = $this->_write($data);
} }
@ -781,7 +781,7 @@ class Cache_Lite
if ($this->_fileLocking) @flock($fp, LOCK_UN); if ($this->_fileLocking) @flock($fp, LOCK_UN);
@fclose($fp); @fclose($fp);
return true; return true;
} }
return $this->raiseError('Cache_Lite : Unable to write cache file : '.$this->_file, -1); return $this->raiseError('Cache_Lite : Unable to write cache file : '.$this->_file, -1);
} }

View File

@ -235,7 +235,6 @@ function serveCategory($matches) {
$serendipity['GET']['action'] = 'read'; $serendipity['GET']['action'] = 'read';
$_args = locateHiddenVariables($serendipity['uriArguments']); $_args = locateHiddenVariables($serendipity['uriArguments']);
if (!$is_multicat) { if (!$is_multicat) {
@ -250,7 +249,7 @@ function serveCategory($matches) {
header('HTTP/1.0 404 Not found'); header('HTTP/1.0 404 Not found');
header('Status: 404 Not found'); header('Status: 404 Not found');
} else { } else {
$serendipity['head_title'] = $cInfo['category_name']; $serendipity['head_title'] = $cInfo['category_name'];
if (isset($serendipity['GET']['page'])) { if (isset($serendipity['GET']['page'])) {
$serendipity['head_title'] .= " - " . serendipity_specialchars($serendipity['GET']['page']); $serendipity['head_title'] .= " - " . serendipity_specialchars($serendipity['GET']['page']);
} }
@ -321,6 +320,7 @@ function serveFeed() {
function serveEntry($matches) { function serveEntry($matches) {
global $serendipity; global $serendipity;
$serendipity['view'] = 'entry'; $serendipity['view'] = 'entry';
if (isset($serendipity['GET']['id'])) { if (isset($serendipity['GET']['id'])) {
@ -333,12 +333,14 @@ function serveEntry($matches) {
serendipity_rememberComment(); serendipity_rememberComment();
if (!empty($serendipity['POST']['submit']) && !isset($_REQUEST['serendipity']['csuccess'])) { if (!empty($serendipity['POST']['submit']) && !isset($_REQUEST['serendipity']['csuccess'])) {
$comment['url'] = $serendipity['POST']['url']; $comment['url'] = $serendipity['POST']['url'];
$comment['comment'] = trim($serendipity['POST']['comment']); $comment['comment'] = trim($serendipity['POST']['comment']);
$comment['name'] = $serendipity['POST']['name']; $comment['name'] = $serendipity['POST']['name'];
$comment['email'] = $serendipity['POST']['email']; $comment['email'] = $serendipity['POST']['email'];
$comment['subscribe'] = $serendipity['POST']['subscribe']; $comment['subscribe'] = $serendipity['POST']['subscribe'];
$comment['parent_id'] = $serendipity['POST']['replyTo']; $comment['parent_id'] = $serendipity['POST']['replyTo'];
if (!empty($comment['comment'])) { if (!empty($comment['comment'])) {
if (serendipity_saveComment($serendipity['POST']['entry_id'], $comment, 'NORMAL')) { if (serendipity_saveComment($serendipity['POST']['entry_id'], $comment, 'NORMAL')) {
$sc_url = ($_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . (strstr($_SERVER['REQUEST_URI'], '?') ? '&' : '?') . 'serendipity[csuccess]=' . (isset($serendipity['csuccess']) ? $serendipity['csuccess'] : 'true'); $sc_url = ($_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . (strstr($_SERVER['REQUEST_URI'], '?') ? '&' : '?') . 'serendipity[csuccess]=' . (isset($serendipity['csuccess']) ? $serendipity['csuccess'] : 'true');
@ -351,7 +353,7 @@ function serveEntry($matches) {
$serendipity['messagestack']['comments'][] = COMMENT_NOT_ADDED; $serendipity['messagestack']['comments'][] = COMMENT_NOT_ADDED;
} }
} else { } else {
$serendipity['messagestack']['comments'][] = sprintf(EMPTY_COMMENT, '', ''); $serendipity['messagestack']['comments'][] = sprintf(EMPTY_COMMENT, '', '');
} }
} }
@ -487,7 +489,7 @@ function serveArchives() {
if ($serendipity['GET']['action'] == 'read') { if ($serendipity['GET']['action'] == 'read') {
if ($serendipity['GET']['category']) { if ($serendipity['GET']['category']) {
$cInfo = serendipity_fetchCategoryInfo($serendipity['GET']['category']); $cInfo = serendipity_fetchCategoryInfo($serendipity['GET']['category']);
$serendipity['head_title'] = $cInfo['category_name']; $serendipity['head_title'] = $cInfo['category_name'];
} }
$serendipity['head_subtitle'] .= sprintf(ENTRIES_FOR, $date); $serendipity['head_subtitle'] .= sprintf(ENTRIES_FOR, $date);
} }