diff --git a/exit.php b/exit.php index fa6a013c..d8a09be5 100644 --- a/exit.php +++ b/exit.php @@ -1,4 +1,4 @@ - +?> \ No newline at end of file diff --git a/include/compat.inc.php b/include/compat.inc.php index da8d2e7d..e131407a 100644 --- a/include/compat.inc.php +++ b/include/compat.inc.php @@ -1,4 +1,4 @@ -' . $errStr . ' in ' . $errFile . ' on line ' . $errLine . '
'; #var_dump(headers_list()); if (headers_sent()) { - serendipity_die($str); // case HTTP headers: needs to halt with die() here, else it will path through and gets written underneath blog content, which hardly isn't seen by many users + serendipity_die($str); // case HTTP headers: needs to halt with die() here, else it will path through and gets written underneath blog content, or into streamed js files, which hardly isn't seen by many users } else { // see global include of function in plugin_api.inc.php // this also reacts on non eye-displayed errors with following small javascript, @@ -412,7 +412,7 @@ if (function_exists('date_default_timezone_get')) { /** * In PHP 5.4, the default encoding of htmlspecialchar changed to UTF-8 and it will emit empty strings when given * native encoded strings containing umlauts. This wrapper should to be used in the core until PHP 5.6 fixes the bug. - */ + */ function serendipity_specialchars($string, $flags = null, $encoding = LANG_CHARSET, $double_encode = true) { if ($flags == null) { if (defined('ENT_HTML401')) { @@ -429,13 +429,13 @@ function serendipity_specialchars($string, $flags = null, $encoding = LANG_CHARS // would kill s9y blogs sometimes (https://github.com/s9y/Serendipity/issues/236) $encoding = 'UTF-8'; } - + return htmlspecialchars($string, $flags, $encoding, $double_encode); } /** * see serendipity_specialchars - */ + */ function serendipity_entities($string, $flags = null, $encoding = LANG_CHARSET, $double_encode = true) { if ($flags == null) { if (defined('ENT_HTML401')) { @@ -454,7 +454,7 @@ function serendipity_entities($string, $flags = null, $encoding = LANG_CHARSET, /** * serendipity_specialchars - */ + */ function serendipity_entity_decode($string, $flags = null, $encoding = LANG_CHARSET, $double_encode = true) { if ($flags == null) { # NOTE: ENT_SUBSTITUTE does not exist for this function, and the documentation does not specify that it will diff --git a/include/functions_calendars.inc.php b/include/functions_calendars.inc.php index cdd1ab7a..72a15101 100644 --- a/include/functions_calendars.inc.php +++ b/include/functions_calendars.inc.php @@ -420,7 +420,7 @@ function persian_date_utf($format, $timestamp='') { $output_str.=$format[$i]; break; } - }else{ + } else { $i++; $output_str.=$format[$i]; } @@ -480,7 +480,7 @@ function persian_mktime($hour='', $min='', $sec='', $mon='', $day='', $year='', } */ - if($mon <= 0){ + if ($mon <= 0){ // change sign $mon = abs($mon); @@ -511,6 +511,6 @@ function persian_mktime($hour='', $min='', $sec='', $mon='', $day='', $year='', $day += $j_days_in_month[$temp_month]; } - list($year, $mon, $day)=p2g($year, $mon, $day); + list($year, $mon, $day) = p2g($year, $mon, $day); return mktime($hour, $min, $sec, $mon, $day, $year, $is_dst); } diff --git a/include/functions_comments.inc.php b/include/functions_comments.inc.php index a23e7445..b5d8ad5f 100644 --- a/include/functions_comments.inc.php +++ b/include/functions_comments.inc.php @@ -689,19 +689,19 @@ function serendipity_approveComment($cid, $entry_id, $force = false, $moderate = $counter_comments = serendipity_db_query("SELECT count(id) AS counter FROM {$serendipity['dbPrefix']}comments WHERE status = 'approved' - AND type = 'NORMAL' - AND entry_id = " . (int)$entry_id . " + AND type = 'NORMAL' + AND entry_id = " . (int)$entry_id . " GROUP BY entry_id", true); $counter_tb = serendipity_db_query("SELECT count(id) AS counter FROM {$serendipity['dbPrefix']}comments WHERE status = 'approved' - AND (type = 'TRACKBACK' or type = 'PINGBACK') - AND entry_id = " . (int)$entry_id . " + AND (type = 'TRACKBACK' or type = 'PINGBACK') + AND entry_id = " . (int)$entry_id . " GROUP BY entry_id", true); $query = "UPDATE {$serendipity['dbPrefix']}entries - SET comments = " . (int)$counter_comments['counter'] . ", + SET comments = " . (int)$counter_comments['counter'] . ", trackbacks = " . (int)$counter_tb['counter'] . ", last_modified = ". $lm ." WHERE id = ". (int)$entry_id; @@ -726,7 +726,7 @@ function serendipity_approveComment($cid, $entry_id, $force = false, $moderate = if ($moderate) return -1; // comment set to pending if (!$moderate) return 1; // comment set to approved } - + return true; } diff --git a/include/functions_config.inc.php b/include/functions_config.inc.php index 45fd4f38..ca0dfb62 100644 --- a/include/functions_config.inc.php +++ b/include/functions_config.inc.php @@ -620,14 +620,14 @@ function serendipity_authenticate_author($username = '', $password = '', $is_has $_SESSION['serendipityPassword'] = $serendipity['serendipityPassword'] = $password; } - $_SESSION['serendipityUser'] = $serendipity['serendipityUser'] = $username; - $_SESSION['serendipityRealname'] = $serendipity['serendipityRealname'] = $row['realname']; - $_SESSION['serendipityEmail'] = $serendipity['serendipityEmail'] = $row['email']; - $_SESSION['serendipityAuthorid'] = $serendipity['authorid'] = $row['authorid']; - $_SESSION['serendipityUserlevel'] = $serendipity['serendipityUserlevel'] = $row['userlevel']; - $_SESSION['serendipityAuthedUser'] = $serendipity['serendipityAuthedUser'] = true; - $_SESSION['serendipityRightPublish']= $serendipity['serendipityRightPublish'] = $row['right_publish']; - $_SESSION['serendipityHashType'] = $serendipity['serendipityHashType'] = $row['hashtype']; + $_SESSION['serendipityUser'] = $serendipity['serendipityUser'] = $username; + $_SESSION['serendipityRealname'] = $serendipity['serendipityRealname'] = $row['realname']; + $_SESSION['serendipityEmail'] = $serendipity['serendipityEmail'] = $row['email']; + $_SESSION['serendipityAuthorid'] = $serendipity['authorid'] = $row['authorid']; + $_SESSION['serendipityUserlevel'] = $serendipity['serendipityUserlevel'] = $row['userlevel']; + $_SESSION['serendipityAuthedUser'] = $serendipity['serendipityAuthedUser'] = true; + $_SESSION['serendipityRightPublish'] = $serendipity['serendipityRightPublish'] = $row['right_publish']; + $_SESSION['serendipityHashType'] = $serendipity['serendipityHashType'] = $row['hashtype']; serendipity_load_configuration($serendipity['authorid']); serendipity_setCookie('userDefLang', $serendipity['lang'], false); @@ -920,7 +920,7 @@ function serendipity_probeInstallation($item) { $res['sqlite3oo'] = 'SQLite3 (OO) (Preferrably use PDO-SQlite!)'; } else { $res['sqlite3oo'] = 'SQLite3 (OO)'; - } + } } if (function_exists('sqlrcon_alloc')) { $res['sqlrelay'] = 'SQLRelay'; @@ -1378,7 +1378,7 @@ function &serendipity_fetchGroup($groupid) { function &serendipity_getGroups($authorid, $sequence = false) { global $serendipity; - $_groups =& serendipity_db_query("SELECT g.id AS confkey, + $_groups =& serendipity_db_query("SELECT g.id AS confkey, g.name AS confvalue, g.id AS id, g.name AS name diff --git a/include/functions_installer.inc.php b/include/functions_installer.inc.php index 30a093e3..aaf564ce 100644 --- a/include/functions_installer.inc.php +++ b/include/functions_installer.inc.php @@ -1,4 +1,4 @@ - false, 'uriargs' => implode('/', serendipity_getUriArguments($uri, true)), 'view' => $serendipity['view'], 'viewtype' => $serendipity['viewtype'] ); + if ((empty($uri_addData['uriargs']) || trim($uri_addData['uriargs']) == $serendipity['indexFile']) && empty($serendipity['GET']['subpage'])) { $uri_addData['startpage'] = true; } diff --git a/include/lang.inc.php b/include/lang.inc.php index 0b9a08f3..9ead98dc 100644 --- a/include/lang.inc.php +++ b/include/lang.inc.php @@ -1,4 +1,4 @@ -\n"; ob_end_flush(); // This ends the started ob from index.php! } - + function serendipity_smarty_emulator_xml() { $this->__construct(); } @@ -265,7 +266,7 @@ class serendipity_smarty_emulator_xml extends serendipity_smarty_emulator { return true; } - + /** * Assign one or multiple template variable by reference - Smarty API Change > 3.0 * @@ -330,4 +331,3 @@ class serendipity_smarty_emulator_xml extends serendipity_smarty_emulator { } } } - diff --git a/include/tpl/config_local.inc.php b/include/tpl/config_local.inc.php index 7a95ffeb..b9f2a00b 100644 --- a/include/tpl/config_local.inc.php +++ b/include/tpl/config_local.inc.php @@ -725,4 +725,4 @@ )); return $res; -?> +?> \ No newline at end of file diff --git a/index.php b/index.php index a416e578..8ac4e7e6 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,4 @@ -