cleanup cosmetics
This commit is contained in:
parent
ffe93c92fc
commit
aca77bd482
2
exit.php
2
exit.php
@ -1,4 +1,4 @@
|
||||
<?php # $Id$
|
||||
<?php
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php # $Id$
|
||||
<?php
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
|
||||
@ -135,7 +135,7 @@ if (!function_exists('errorToExceptionHandler')) {
|
||||
$str .= '<p>' . $errStr . ' in ' . $errFile . ' on line ' . $errLine . '</p>';
|
||||
#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,
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php # $Id$
|
||||
<?php
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
|
||||
|
@ -872,4 +872,3 @@ function is_utf8($string) {
|
||||
. '|\xF4[\x80-\x8F][\x80-\xBF]{2}' # plane 16
|
||||
. ')*$%xs', $string);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php # $Id$
|
||||
<?php
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php #
|
||||
<?php
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
|
||||
@ -8,16 +8,15 @@ if (IN_serendipity !== true) {
|
||||
|
||||
include_once('serendipity_config.inc.php');
|
||||
|
||||
|
||||
include_once(S9Y_INCLUDE_PATH . 'include/plugin_api.inc.php');
|
||||
|
||||
|
||||
$uri_addData = array(
|
||||
'startpage' => 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;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php # $Id$
|
||||
<?php
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php # $Id: plugin_api.inc.php 1168 2006-04-29 13:06:11Z garvinhicking $
|
||||
<?php
|
||||
# $Id: plugin_api.inc.php 1168 2006-04-29 13:06:11Z garvinhicking $
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php # $Id: plugin_api.inc.php 1228 2006-06-01 11:18:53Z garvinhicking $
|
||||
<?php
|
||||
# $Id: plugin_api.inc.php 1228 2006-06-01 11:18:53Z garvinhicking $
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
|
||||
@ -330,4 +331,3 @@ class serendipity_smarty_emulator_xml extends serendipity_smarty_emulator {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php # $Id$
|
||||
<?php
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
|
||||
|
83
rss.php
83
rss.php
@ -1,4 +1,4 @@
|
||||
<?php # $Id$
|
||||
<?php
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
|
||||
@ -9,10 +9,10 @@ session_cache_limiter('public');
|
||||
include('serendipity_config.inc.php');
|
||||
include(S9Y_INCLUDE_PATH . 'include/functions_rss.inc.php');
|
||||
|
||||
$version = $_GET['version'];
|
||||
$description = $serendipity['blogDescription'];
|
||||
$title = $serendipity['blogTitle'];
|
||||
$comments = FALSE;
|
||||
$version = $_GET['version'];
|
||||
$description = $serendipity['blogDescription'];
|
||||
$title = $serendipity['blogTitle'];
|
||||
$comments = FALSE;
|
||||
|
||||
if (empty($version)) {
|
||||
list($version) = serendipity_discover_rss($_GET['file'], $_GET['ext']);
|
||||
@ -87,27 +87,28 @@ if (isset($modified_since) &&
|
||||
}
|
||||
|
||||
switch ($_GET['type']) {
|
||||
case 'comments_and_trackbacks':
|
||||
case 'trackbacks':
|
||||
case 'comments':
|
||||
$entries = serendipity_fetchComments(isset($_GET['cid']) ? $_GET['cid'] : null, $serendipity['RSSfetchLimit'], 'co.id desc', false, $_GET['type']);
|
||||
$description = $title . ' - ' . $description;
|
||||
if (isset($_GET['cid'])) {
|
||||
$title = $title . ' - ' . COMMENTS_FROM . ' "' . $latest_entry[0]['title'] . '"';
|
||||
} else {
|
||||
$title = $title . ' - ' . COMMENTS;
|
||||
}
|
||||
$comments = TRUE;
|
||||
break;
|
||||
case 'content':
|
||||
default:
|
||||
if (isset($_GET['all']) && $_GET['all']) {
|
||||
// Fetch all entries in reverse order for later importing. Fetch sticky entries as normal entries.
|
||||
$entries = serendipity_fetchEntries(null, true, '', false, false, 'id ASC', '', false, true);
|
||||
} else {
|
||||
$entries = serendipity_fetchEntries(null, true, $serendipity['RSSfetchLimit'], false, (isset($modified_since) ? $modified_since : false), 'timestamp DESC', '', false, true);
|
||||
}
|
||||
break;
|
||||
case 'comments_and_trackbacks':
|
||||
case 'trackbacks':
|
||||
case 'comments':
|
||||
$entries = serendipity_fetchComments(isset($_GET['cid']) ? $_GET['cid'] : null, $serendipity['RSSfetchLimit'], 'co.id desc', false, $_GET['type']);
|
||||
$description = $title . ' - ' . $description;
|
||||
if (isset($_GET['cid'])) {
|
||||
$title = $title . ' - ' . COMMENTS_FROM . ' "' . $latest_entry[0]['title'] . '"';
|
||||
} else {
|
||||
$title = $title . ' - ' . COMMENTS;
|
||||
}
|
||||
$comments = TRUE;
|
||||
break;
|
||||
|
||||
case 'content':
|
||||
default:
|
||||
if (isset($_GET['all']) && $_GET['all']) {
|
||||
// Fetch all entries in reverse order for later importing. Fetch sticky entries as normal entries.
|
||||
$entries = serendipity_fetchEntries(null, true, '', false, false, 'id ASC', '', false, true);
|
||||
} else {
|
||||
$entries = serendipity_fetchEntries(null, true, $serendipity['RSSfetchLimit'], false, (isset($modified_since) ? $modified_since : false), 'timestamp DESC', '', false, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (isset($serendipity['serendipityRealname'])) {
|
||||
@ -139,21 +140,21 @@ $metadata = array(
|
||||
);
|
||||
|
||||
if (serendipity_get_config_var('feedBannerURL') != '') {
|
||||
$img = serendipity_get_config_var('feedBannerURL');
|
||||
$w = serendipity_get_config_var('feedBannerWidth');
|
||||
$h = serendipity_get_config_var('feedBannerHeight');
|
||||
$img = serendipity_get_config_var('feedBannerURL');
|
||||
$w = serendipity_get_config_var('feedBannerWidth');
|
||||
$h = serendipity_get_config_var('feedBannerHeight');
|
||||
} elseif (($banner = serendipity_getTemplateFile('img/rss_banner.png', 'serendipityPath'))) {
|
||||
$img = serendipity_getTemplateFile('img/rss_banner.png', 'baseURL');
|
||||
$i = getimagesize($banner);
|
||||
$w = $i[0];
|
||||
$h = $i[1];
|
||||
$i = getimagesize($banner);
|
||||
$w = $i[0];
|
||||
$h = $i[1];
|
||||
} else {
|
||||
$img = serendipity_getTemplateFile('img/s9y_banner_small.png', 'baseURL');
|
||||
$w = 100;
|
||||
$h = 21;
|
||||
$w = 100;
|
||||
$h = 21;
|
||||
}
|
||||
|
||||
$metadata['additional_fields']['image'] = <<<IMAGE
|
||||
$metadata['additional_fields']['image'] = <<<IMAGE
|
||||
<image>
|
||||
<url>$img</url>
|
||||
<title>RSS: $title - $description</title>
|
||||
@ -163,12 +164,12 @@ if (serendipity_get_config_var('feedBannerURL') != '') {
|
||||
</image>
|
||||
IMAGE;
|
||||
|
||||
$metadata['additional_fields']['image_atom1.0'] = <<<IMAGE
|
||||
$metadata['additional_fields']['image_atom1.0'] = <<<IMAGE
|
||||
<icon>$img</icon>
|
||||
IMAGE;
|
||||
|
||||
$metadata['additional_fields']['image_rss1.0_channel'] = '<image rdf:resource="' . $img . '" />';
|
||||
$metadata['additional_fields']['image_rss1.0_rdf'] = <<<IMAGE
|
||||
$metadata['additional_fields']['image_rss1.0_channel'] = '<image rdf:resource="' . $img . '" />';
|
||||
$metadata['additional_fields']['image_rss1.0_rdf'] = <<<IMAGE
|
||||
<image rdf:about="$img">
|
||||
<url>$img</url>
|
||||
<title>RSS: $title - $description</title>
|
||||
@ -212,7 +213,7 @@ if (is_array($metadata['additional_fields'])) {
|
||||
$metadata['additional_fields'][$aid] = $af;
|
||||
}
|
||||
}
|
||||
$metadata['fullFeed'] = serendipity_get_config_var('feedFull', false);
|
||||
$metadata['fullFeed'] = serendipity_get_config_var('feedFull', false);
|
||||
if ($metadata['fullFeed'] === 'client') {
|
||||
if ($_GET['fullFeed'] || $serendipity['GET']['fullFeed']) {
|
||||
$metadata['fullFeed'] = true;
|
||||
@ -221,7 +222,7 @@ if ($metadata['fullFeed'] === 'client') {
|
||||
}
|
||||
}
|
||||
|
||||
if ($_GET['type'] == 'content' &&
|
||||
if ($_GET['type'] == 'content' &&
|
||||
!isset($_GET['category']) &&
|
||||
!isset($serendipity['GET']['tag']) &&
|
||||
serendipity_db_bool(serendipity_get_config_var('feedForceCustom', false)) &&
|
||||
@ -232,7 +233,7 @@ if ($_GET['type'] == 'content' &&
|
||||
header('Location: ' . serendipity_get_config_var('feedCustom'));
|
||||
exit;
|
||||
}
|
||||
$metadata['showMail'] = serendipity_db_bool(serendipity_get_config_var('show_mail', $metadata['showMail']));
|
||||
$metadata['showMail'] = serendipity_db_bool(serendipity_get_config_var('show_mail', $metadata['showMail']));
|
||||
|
||||
$file_version = preg_replace('@[^0-9a-z\.-_]@i', '', $version);
|
||||
$metadata['template_file'] = serendipity_getTemplateFile('feed_' . $file_version . '.tpl', 'serendipityPath');
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php # $Id$
|
||||
<?php
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
|
||||
@ -51,7 +51,6 @@ function serendipity_printStylesheet($file, $dir = '') {
|
||||
@file_get_contents($file, 1));
|
||||
}
|
||||
|
||||
|
||||
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) {
|
||||
header('Cache-Control: no-cache');
|
||||
} else {
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php # $Id$
|
||||
<?php
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
|
||||
@ -252,7 +252,7 @@ if (!$use_installer) {
|
||||
$admin_vars['version_info'] = sprintf(ADMIN_FOOTER_POWERED_BY, '', '');
|
||||
}
|
||||
|
||||
if (!$serendipity['smarty']) serendipity_smarty_init();
|
||||
if (!is_object($serendipity['smarty'])) serendipity_smarty_init();
|
||||
$serendipity['smarty']->assignByRef('admin_vars', $admin_vars);
|
||||
$serendipity['smarty']->display(serendipity_getTemplateFile('admin/index.tpl', 'serendipityPath'));
|
||||
} else {
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php # $Id$
|
||||
<?php
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php # $Id$
|
||||
<?php
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
|
||||
@ -44,12 +44,12 @@ if (defined('USE_MEMSNAP')) {
|
||||
}
|
||||
|
||||
// The version string
|
||||
$serendipity['version'] = '2.0-rc1';
|
||||
$serendipity['version'] = '2.0-rc1';
|
||||
|
||||
|
||||
// Setting this to 'false' will enable debugging output. All alpha/beta/cvs snapshot versions will emit debug information by default. To increase the debug level (to enable Smarty debugging), set this flag to 'debug'.
|
||||
if (!isset($serendipity['production'])) {
|
||||
$serendipity['production'] = ! preg_match('@\-(alpha|beta|cvs|rc).*@', $serendipity['version']);
|
||||
$serendipity['production'] = ! preg_match('@\-(alpha|beta|cvs|rc).*@', $serendipity['version']);
|
||||
}
|
||||
|
||||
// Set error reporting
|
||||
@ -66,10 +66,10 @@ $serendipity['errorhandler'] = 'errorToExceptionHandler';
|
||||
|
||||
|
||||
// Default rewrite method
|
||||
$serendipity['rewrite'] = 'none';
|
||||
$serendipity['rewrite'] = 'none';
|
||||
|
||||
// Message container
|
||||
$serendipity['messagestack'] = array();
|
||||
$serendipity['messagestack'] = array();
|
||||
|
||||
// Can the user change the date of publishing for an entry?
|
||||
$serendipity['allowDateManipulation'] = true;
|
||||
@ -77,14 +77,14 @@ $serendipity['allowDateManipulation'] = true;
|
||||
// How much time is allowed to pass since the publising of an entry, so that a comment to that entry
|
||||
// will update it's LastModified stamp? If the time is passed, a comment to an old entry will no longer
|
||||
// push an article as being updated.
|
||||
$serendipity['max_last_modified'] = 60 * 60 * 24 * 7;
|
||||
$serendipity['max_last_modified'] = 60 * 60 * 24 * 7;
|
||||
|
||||
// Clients can send a If-Modified Header to the RSS Feed (Conditional Get) and receive all articles beyond
|
||||
// that date. However it is still limited by the number below of maximum entries
|
||||
$serendipity['max_fetch_limit'] = 50;
|
||||
$serendipity['max_fetch_limit'] = 50;
|
||||
|
||||
// How many bytes are allowed for fetching trackbacks, so that no binary files get accidently trackbacked?
|
||||
$serendipity['trackback_filelimit'] = 150 * 1024;
|
||||
$serendipity['trackback_filelimit'] = 150 * 1024;
|
||||
|
||||
if (!isset($serendipity['fetchLimit'])) {
|
||||
$serendipity['fetchLimit'] = 15;
|
||||
@ -128,7 +128,7 @@ if (!isset($serendipity['template_backend'])) {
|
||||
$serendipity['template_backend'] = '2k11';
|
||||
}
|
||||
|
||||
/* Availiable languages */
|
||||
/* Available languages */
|
||||
if (!isset($serendipity['languages'])) {
|
||||
$serendipity['languages'] = array('en' => 'English',
|
||||
'de' => 'German',
|
||||
@ -138,7 +138,7 @@ if (!isset($serendipity['languages'])) {
|
||||
'fi' => 'Finnish',
|
||||
'cs' => 'Czech (Win-1250)',
|
||||
'cz' => 'Czech (ISO-8859-2)',
|
||||
'sk' => 'Slovak',
|
||||
'sk' => 'Slovak',
|
||||
'nl' => 'Dutch',
|
||||
'is' => 'Icelandic',
|
||||
'tr' => 'Turkish',
|
||||
@ -411,7 +411,6 @@ $serendipity['permissionLevels'] = array(USERLEVEL_EDITOR => USERLEVEL_EDITOR_DE
|
||||
USERLEVEL_CHIEF => USERLEVEL_CHIEF_DESC,
|
||||
USERLEVEL_ADMIN => USERLEVEL_ADMIN_DESC);
|
||||
|
||||
|
||||
// Redirect to the upgrader
|
||||
if (IS_up2date === false && !defined('IN_upgrader')) {
|
||||
if (preg_match(PAT_CSS, $_SERVER['REQUEST_URI'], $matches)) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php # $Id$
|
||||
<?php
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php # $Id$
|
||||
<?php
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user