Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1:/tmp/cvs-serv6935
Modified Files:
comment.php serendipity_admin.php
serendipity_admin_installer.inc.php serendipity_config.inc.php
serendipity_config_local.tpl serendipity_functions.inc.php
serendipity_genpage.inc.php serendipity_sidebar_items.php
serendipity_xmlrpc.php
Added Files:
htaccess.errordocs.tpl htaccess.normal.tpl
htaccess.rewrite.tpl
Removed Files:
htaccess.tpl
Log Message:
* ADD OPTION TO SELECT REWRITE RULE
* Switches a few things around in the templateParser
* We no-longer require Apache
* Save new htaccess file on each config-save, if the rewrite rule differs from l
* Add htaccess templates (normal, errordocs, rewrite)
* Add new `list` type to config template
* Change the !$serendipity['rewrite'] to $serendipity['rewrite'] == 'none'
* Set default rewrite to 'none'
--- NEW FILE: htaccess.errordocs.tpl ---
ErrorDocument 404 {PREFIX}{indexFile}
DirectoryIndex {PREFIX}{indexFile}
<Files *.tpl>
deny from all
</Files>
<Files *.sql>
deny from all
</Files>
<Files *.inc.php>
deny from all
</Files>
<Files sqlite.db>
deny from all
</Files>
--- NEW FILE: htaccess.normal.tpl ---
DirectoryIndex {PREFIX}{indexFile}
<Files *.tpl>
deny from all
</Files>
<Files *.sql>
deny from all
</Files>
<Files *.inc.php>
deny from all
</Files>
<Files sqlite.db>
deny from all
</Files>
--- NEW FILE: htaccess.rewrite.tpl ---
ErrorDocument 404 {PREFIX}{indexFile}
DirectoryIndex {PREFIX}{indexFile}
<Files *.tpl>
deny from all
</Files>
<Files *.sql>
deny from all
</Files>
<Files *.inc.php>
deny from all
</Files>
<Files sqlite.db>
deny from all
</Files>
Index: comment.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/comment.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- comment.php 6 Jan 2004 10:11:39 -0000 1.25
+++ comment.php 7 Jan 2004 17:45:38 -0000 1.26
@@ -73,7 +73,7 @@
$query = 'SELECT title FROM ' . $serendipity['dbPrefix'] . 'entries WHERE id = ' . $serendipity['GET']['entry_id'];
$entry = serendipity_db_query($query);
$entry = $serendipity['baseURL']
- . (!$serendipity['rewrite'] ? $serendipity['indexFile'] . '?/' : '')
+ . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '')
. 'archives/'
. $serendipity['GET']['entry_id']
. '_' . serendipity_makeFilename($entry[0]['title']) . '.html';
Index: serendipity_admin.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- serendipity_admin.php 6 Jan 2004 10:11:44 -0000 1.24
+++ serendipity_admin.php 7 Jan 2004 17:45:44 -0000 1.25
@@ -66,7 +66,7 @@
</div>
<div class="serendipitySideBarContent">
- • <a href="<?php echo $serendipity['serendipityHTTPPath'] . (!$serendipity['rewrite'] ? $serendipity['indexFile'] . '?/' : ''); ?>entries"><?php echo AUTHOR_SUITE; ?></a><br />
+ • <a href="<?php echo $serendipity['serendipityHTTPPath'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : ''); ?>entries"><?php echo AUTHOR_SUITE; ?></a><br />
• <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>"><?php echo BACK_TO_BLOG; ?></a><br />
• <a href="?serendipity[adminModule]=logout"><?php echo LOGOUT; ?></a><br />
</div>
Index: serendipity_admin_installer.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_installer.inc.php,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- serendipity_admin_installer.inc.php 11 Nov 2003 16:17:04 -0000 1.46
+++ serendipity_admin_installer.inc.php 7 Jan 2004 17:45:46 -0000 1.47
@@ -103,17 +103,27 @@
switch ($type) {
case 'bool' :
echo '<input id="radio_cfg_' . $name . '_yes" type="radio" name="' . $name . '" value="true" ';
- echo (($default == true) ? 'checked="checked"' : ''). ' /><label for="radio_cfg_' . $name . '_yes"> ' . YES . '</label> ';
+ echo (($value == true) ? 'checked="checked"' : ''). ' /><label for="radio_cfg_' . $name . '_yes"> ' . YES . '</label> ';
echo '<input id="radio_cfg_' . $name . '_yes" type="radio" name="' . $name . '" value="false" ';
- echo (($default == true) ? '' : 'checked="checked"'). ' /><label for="radio_cfg_' . $name . '_yes"> ' . NO . '</label>';
+ echo (($value == true) ? '' : 'checked="checked"'). ' /><label for="radio_cfg_' . $name . '_yes"> ' . NO . '</label>';
break;
case 'protected' :
- echo '<input type="password" size="30" name="' . $name . '" value="' . htmlentities($default) . '" />';
+ echo '<input type="password" size="30" name="' . $name . '" value="' . htmlentities($value) . '" />';
+ break;
+ case 'list' :
+ preg_match_all("/([^\=]+)\=\>([^\,]+)\,?/i", $default, $res);
+ echo '<select name="'. $name .'">';
+ for ($x=0; $x<sizeof($res[1]); $x++) {
+ printf('<option value="%s"%s>%s</option>'. "\n",
+ $res[1][$x],
+ (($res[1][$x] == $value) ? ' SELECTED' : ''),
+ $res[2][$x]);
+ }
+ echo '</select>';
break;
-
default :
- echo '<input type="text" size="30" name="' . $name . '" value="' . htmlentities($default) . '" />';
+ echo '<input type="text" size="30" name="' . $name . '" value="' . htmlentities($value) . '" />';
break;
}
}
@@ -186,7 +196,7 @@
<?php
for ($x=0; $x<count($value); $x++) {
if (@is_array($from)) {
- $value[$x]['default'] = $from[$value[$x]['name']];
+ $value[$x]['value'] = $from[$value[$x]['name']];
}
?>
<tr>
@@ -195,9 +205,8 @@
<br />
<span style="color: #5E7A94; font-size: 8pt;"><?php echo '(' . $value[$x]['type'] . ') ' . $value[$x]['desc']; ?></span>
</td>
-
<td style="border-bottom: 1px #000000 solid; font-size: 8pt" align="left" valign="middle" width="25%">
- <?php echo ($serendipity['XHTML11'] ? '<span style="white-space: nowrap">' : '<nobr>'); ?><?php echo serendipity_guessInput($value[$x]['type'], $value[$x]['name'], $from[$value[$x]['name']], $value[$x]['default']); ?><?php echo ($serendipity['XHTML11'] ? '</span>' : '</nobr>'); ?>
+ <?php echo ($serendipity['XHTML11'] ? '<span style="white-space: nowrap">' : '<nobr>'); ?><?php echo serendipity_guessInput($value[$x]['type'], $value[$x]['name'], $value[$x]['value'], $value[$x]['distdefault']); ?><?php echo ($serendipity['XHTML11'] ? '</span>' : '</nobr>'); ?>
</td>
</tr>
<?php
@@ -343,7 +352,16 @@
}
function serendipity_installFiles() {
- $a = file('./htaccess.tpl');
+ if ( $_POST['rewrite'] == 'rewrite') {
+ $template = 'htaccess.rewrite.tpl';
+ } elseif ( $_POST['rewrite'] == 'errordocs' ) {
+ $template = 'htaccess.errordocs.tpl';
+ } else {
+ $template = 'htaccess.normal.tpl';
+ }
+ if ( !($a = file('./'. $template)) ) {
+ $err[] = 'Unable to open template file, please update serendipity!';
+ }
$fp = @fopen('./.htaccess', 'w');
$content = str_replace(
@@ -483,7 +501,17 @@
echo DIAGNOSTIC_ERROR;
echo '<span style="color: #FF0000">- ' . implode('<br />', $res) . '</span><br /><br />';
} else {
- echo WRITTEN_N_SAVED;
+ /* If we have new rewrite rules, then install them */
+ if ( $serendipity['rewrite'] != $_POST['rewrite'] ) {
+ printf(ATTEMPT_WRITE_FILE, '.htaccess');
+ $res = serendipity_installFiles();
+ if ( is_array($res) ) {
+ echo implode('<br />'. $res);
+ } else {
+ echo DONE .'<br />';
+ }
+ }
+ echo '<br /><strong>'. WRITTEN_N_SAVED .'</strong>';
}
break;
@@ -493,11 +521,6 @@
if ( file_exists('./serendipity_config_local.inc.php') ) {
$from = &$serendipity;
} else {
- /* Do check for non-apache servers */
- if ( !eregi('apache', $_SERVER['SERVER_SOFTWARE']) ) {
- echo '<br /><font color="#FF000">WARNING!<br />You are about to attempt to install Serendipity on a non-apache webserver.<br />Serendipity requires the Apache Werbserver to function correctly!</font>';
- }
-
define('VERSION_REQUIRED', '4.2.1');
/* Do check for required PHP version */
Index: serendipity_config.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_config.inc.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- serendipity_config.inc.php 23 Dec 2003 08:48:21 -0000 1.43
+++ serendipity_config.inc.php 7 Jan 2004 17:45:48 -0000 1.44
@@ -11,7 +11,7 @@
$serendipity['version'] = '0.5-CVS';
$serendipity['production'] = 1;
-$serendipity['rewrite'] = true;
+$serendipity['rewrite'] = 'none';
if ( $serendipity['production'] == 1 ) {
error_reporting(E_ALL & ~E_NOTICE);
Index: serendipity_config_local.tpl
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_config_local.tpl,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- serendipity_config_local.tpl 2 Oct 2003 17:19:49 -0000 1.21
+++ serendipity_config_local.tpl 7 Jan 2004 17:45:50 -0000 1.22
@@ -26,7 +26,6 @@
$serendipity['email'] = '{Admin email|email|string|jo...@ex...}'; // Email for admin login
$serendipity['want_mail'] = '{Send mails to admin?|want_mail|bool|1}'; // Do you want to receive emails when comments are posted to your entries?
$serendipity['allowSubscriptions'] = '{Allow users to subscribe to entries?|allowSubscriptions|bool|1}' // Allow users to subscribe to an entry and thereby receive a mail when new comments are made to that entry
-
$serendipity['blogTitle'] = '{Blog name|blogTitle|string|John Doe's personal blog}'; // The title of your blog
$serendipity['blogDescription'] = '{Blog description|blogDescription|string|Welcome to my blog...}'; // Description of your blog
$serendipity['lang'] = '{Language file|lang|string|en}'; // Language (for 'en' you need serendipity_lang_en.inc.php).
@@ -37,8 +36,9 @@
$serendipity['wysiwyg'] = '{Use WYSIWYG editor|wysiwyg|bool|0}'; // Do you want to use the experimental WYSIWYG editor?
$serendipity['XHTML11'] = '{Force XHTML 1.1 compliance|XHTML11|bool|0}'; // Do you want to force XHTML 1.1 compliance (may cause problems for back-/frontend on older 4th generation browsers)
$serendipity['embed'] = '{Is serendipity embedded?|embed|bool|0}'; // If you want to embed serendipity within a regular page, set to true to discard any headers and just print the contents. You can make use of the indexFile option to use a wrapper class where you put your normal webpage headers. See the INSTALL file for more information!
-$serendipity['track_exits'] = '{Track exit URLs|track_exits|bool|1}'; // Do you want to track exit targets?
-$serendipity['blockReferer'] = '{Blocked Referers|blockReferer|string|;}'; // Are there any special hosts you want not to show up in the referers list? Separate the list of hostnames with ';' and note that the host is blocked by substring matches!
+$serendipity['track_exits'] = '{Track exit URLs|track_exits|bool|1}'; // Do you want to track exit targets?
+$serendipity['blockReferer'] = '{Blocked Referers|blockReferer|string|;}'; // Are there any special hosts you want not to show up in the referers list? Separate the list of hostnames with ';' and note that the host is blocked by substring matches!
+$serendipity['rewrite'] = '{URL Rewriting|rewrite|list|none=>Disable URL Rewriting,errordocs=>Use Apache errorhandling,rewrite=>Use Apache mod_rewrite}'; // Select which rules you wish to use when generating URLs. Enabling rewrite rules will make petty URLs for your blog. If you don't know what this is, then you don't need it
// Imageconversion Settings
# Enter general information about how serendipity should handle Images
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.174
retrieving revision 1.175
diff -u -d -r1.174 -r1.175
--- serendipity_functions.inc.php 6 Jan 2004 10:11:44 -0000 1.174
+++ serendipity_functions.inc.php 7 Jan 2004 17:45:52 -0000 1.175
@@ -328,7 +328,7 @@
}
// Prepare the table
- $link = $serendipity['serendipityHTTPPath'] . (!$serendipity['rewrite'] ? $serendipity['indexFile'] . '?/' : '') . 'archives/' . $year . sprintf('%02d', $month) . '.html?' . $base_query;
+ $link = $serendipity['serendipityHTTPPath'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'archives/' . $year . sprintf('%02d', $month) . '.html?' . $base_query;
?>
<table width="100%" class="serendipity_calendar" cellspacing="1">
<tr>
@@ -404,7 +404,7 @@
}
// Print day
- $link = $serendipity['serendipityHTTPPath'] . (!$serendipity['rewrite'] ? $serendipity['indexFile'] . '?/' : '') . 'archives/' . date('Ymd', mktime(0,0,0, $month, $currDay, $year)) . '.html?' . $base_query;
+ $link = $serendipity['serendipityHTTPPath'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'archives/' . date('Ymd', mktime(0,0,0, $month, $currDay, $year)) . '.html?' . $base_query;
if (date('m') == $month
&& date('Y') == $year
@@ -740,7 +740,7 @@
<div class='serendipity_entryFooter'>
<?php
- echo ' ' . POSTED_BY . ' ' . htmlentities($entry['username']) . ($entry['category_name'] ? ' ' . IN . ' <a href="' . $serendipity['serendipityHTTPPath'] . (!$serendipity['rewrite'] ? $serendipity['indexFile'] . '?/' : '') . 'categories/' . $entry['categoryid'] . '_' . serendipity_makeFilename($entry['category_name']) . '">' . $entry['category_name'] . '</a> ' : ' ') . AT . ' <a href="' . $entryLink . '">' . date('H:i', $entry['timestamp']) . '</a>'. "\n";
+ echo ' ' . POSTED_BY . ' ' . htmlentities($entry['username']) . ($entry['category_name'] ? ' ' . IN . ' <a href="' . $serendipity['serendipityHTTPPath'] . ($serendipity['rewrite'] == 'true' ? $serendipity['indexFile'] . '?/' : '') . 'categories/' . $entry['categoryid'] . '_' . serendipity_makeFilename($entry['category_name']) . '">' . $entry['category_name'] . '</a> ' : ' ') . AT . ' <a href="' . $entryLink . '">' . date('H:i', $entry['timestamp']) . '</a>'. "\n";
if ($entry['allow_comments'] === true || $entry['allow_comments'] == 'true' || !isset($entry['allow_comments']) || $entry['comments'] > 0) {
if (!isset($serendipity['GET']['id'])) {
@@ -765,7 +765,7 @@
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description
- rdf:about="<?php echo $serendipity['baseURL'] . (!$serendipity['rewrite'] ? $serendipity['indexFile'] . '?/' : ''); ?>feeds/ei_<?php echo $entry['id']; ?>.rdf"
+ rdf:about="<?php echo $serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : ''); ?>feeds/ei_<?php echo $entry['id']; ?>.rdf"
trackback:ping="<?php echo $serendipity['baseURL']; ?>comment.php?type=trackback&entry_id=<?php echo $entry['id']; ?>"
dc:title="<?php echo $entry['title']; ?>"
dc:identifier="<?php echo serendipity_archiveURL($entry['id'], $entry['title']); ?>" />
@@ -1109,7 +1109,7 @@
$title,
$poster,
$entryURI,
- $serendipity['baseURL'] . (!$serendipity['rewrite'] ? $serendipity['indexFile'] . '?/' : '') . 'unsubscribe/' . urlencode($subscriber['email']) . '/' . $entry_id
+ $serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'unsubscribe/' . urlencode($subscriber['email']) . '/' . $entry_id
);
} else {
$text = sprintf(
@@ -1120,7 +1120,7 @@
$title,
$poster,
$entryURI,
- $serendipity['baseURL'] . (!$serendipity['rewrite'] ? $serendipity['indexFile'] . '?/' : '') . 'unsubscribe/' . urlencode($subscriber['email']) . '/' . $entry_id
+ $serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'unsubscribe/' . urlencode($subscriber['email']) . '/' . $entry_id
);
}
@@ -1681,7 +1681,7 @@
function serendipity_archiveURL($id, $title, $key = 'baseURL') {
global $serendipity;
- return $serendipity[$key] . (!$serendipity['rewrite'] ? $serendipity['indexFile'] . '?/' : '') . 'archives/' . $id . '_' . serendipity_makeFilename($title) . '.html';
+ return $serendipity[$key] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'archives/' . $id . '_' . serendipity_makeFilename($title) . '.html';
}
/**
@@ -2427,10 +2427,10 @@
for($x=1; $x<13; $x++) {
$entries = serendipity_postAmount($currYear, $x);
if ($entries > 0) {
- $a = "<a href='{$serendipity['serendipityHTTPPath']}" . (!$serendipity['rewrite'] ? $serendipity['indexFile'] . '?/' : '') . "archives/$currYear" . sprintf('%02s', $x) . '.html\'>';
+ $a = "<a href='{$serendipity['serendipityHTTPPath']}" . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . "archives/$currYear" . sprintf('%02s', $x) . '.html\'>';
$b = '</a>';
- $c = "<a href='{$serendipity['serendipityHTTPPath']}" . (!$serendipity['rewrite'] ? $serendipity['indexFile'] . '?/' : '') . "archives/$currYear" . sprintf('%02s', $x) . '_short.html\'>';
- $d = "<a href='{$serendipity['serendipityHTTPPath']}" . (!$serendipity['rewrite'] ? $serendipity['indexFile'] . '?/' : '') . "archives/$currYear" . sprintf('%02s', $x) . '.html\'>';
+ $c = "<a href='{$serendipity['serendipityHTTPPath']}" . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . "archives/$currYear" . sprintf('%02s', $x) . '_short.html\'>';
+ $d = "<a href='{$serendipity['serendipityHTTPPath']}" . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . "archives/$currYear" . sprintf('%02s', $x) . '.html\'>';
} else {
$a = $c = '<span style="color: #CDCDCD">';
$b = $d = '</span>';
Index: serendipity_genpage.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_genpage.inc.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- serendipity_genpage.inc.php 6 Jan 2004 10:11:44 -0000 1.21
+++ serendipity_genpage.inc.php 7 Jan 2004 17:45:54 -0000 1.22
@@ -18,7 +18,7 @@
<title><?php echo htmlentities($serendipity['blogTitle']); ?></title>
<meta name="Powered-By" content="Serendipity v.<?php echo $serendipity['version'] ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo $serendipity['serendipityHTTPPath']; ?>serendipity.css.php" />
- <link rel="alternate" type="application/rss+xml" title="RSS" href="<?php echo $serendipity['baseURL'] . (!$serendipity['rewrite'] ? $serendipity['indexFile'] . '?/' : ''); ?>feeds/index.rss" />
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="<?php echo $serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : ''); ?>feeds/index.rss" />
<script language="Javascript" type="text/javascript" src="<?php echo $serendipity['serendipityHTTPPath']; ?>serendipity.js"></script>
<?php
if (strtolower($serendipity['extCSS'])!='none') {
Index: serendipity_sidebar_items.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_sidebar_items.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- serendipity_sidebar_items.php 6 Jan 2004 22:01:52 -0000 1.35
+++ serendipity_sidebar_items.php 7 Jan 2004 17:45:55 -0000 1.36
@@ -77,7 +77,7 @@
for($x = 0; $x < 3; $x++) {
$ts -= 1;
- $link = $serendipity['serendipityHTTPPath'] . (!$serendipity['rewrite'] ? $serendipity['indexFile'] . '?/' : '') . 'archives/' . date('Ym', $ts) . '.html';
+ $link = $serendipity['serendipityHTTPPath'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'archives/' . date('Ym', $ts) . '.html';
$ts_title = $serendipity['months'][date('n', $ts)] . ' ' . date('Y', $ts);
@@ -87,7 +87,7 @@
}
echo "<a href='{$serendipity['serendipityHTTPPath']}'>" . RECENT . "</a><br />\n";
- echo "<a href='{$serendipity['serendipityHTTPPath']}" . (!$serendipity['rewrite'] ? $serendipity['indexFile'] . '?/' : '') . "archive'>" . OLDER . "</a>\n";
+ echo "<a href='{$serendipity['serendipityHTTPPath']}" . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . "archive'>" . OLDER . "</a>\n";
}
}
@@ -339,7 +339,7 @@
global $serendipity;
$title = SUPERUSER . ':';
- echo "<a href=\"{$serendipity['serendipityHTTPPath']}" . (!$serendipity['rewrite'] ? $serendipity['indexFile'] . '?/' : '') . "entries\" title=\"$title\">\$ su -</a>";
+ echo "<a href=\"{$serendipity['serendipityHTTPPath']}" . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . "entries\" title=\"$title\">\$ su -</a>";
}
}
@@ -464,7 +464,7 @@
$serendipity['serendipityHTTPPath'] . 'rss.php?category=' . $category['categoryid'] . '_' . $category_id,
htmlentities($category['category_description']),
$serendipity['serendipityHTTPPath'] . 'xml.gif',
- $serendipity['serendipityHTTPPath'] . (!$serendipity['rewrite'] ? $serendipity['indexFile'] . '?/' : '') . 'categories/' . $category['categoryid'] . '_' . $category_id,
+ $serendipity['serendipityHTTPPath'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'categories/' . $category['categoryid'] . '_' . $category_id,
htmlentities($category['category_description']),
$category['category_name']
);
Index: serendipity_xmlrpc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_xmlrpc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- serendipity_xmlrpc.php 6 Jan 2004 10:11:45 -0000 1.12
+++ serendipity_xmlrpc.php 7 Jan 2004 17:45:55 -0000 1.13
@@ -250,8 +250,8 @@
'mt_convert_breaks' => new XML_RPC_Value('', 'string'),
'mt_keywords' => new XML_RPC_Value('', 'string'),
'title' => new XML_RPC_Value($entry['title'],'string'),
- 'permalink' => new XML_RPC_Value($serendipity['baseURL'] . (!$serendipity['rewrite'] ? '/' . $serendipity['indexFile'] . '?' : '') . '/archives/' . $postid . '_.html', 'string'),
- 'link' => new XML_RPC_Value($serendipity['baseURL'] . (!$serendipity['rewrite'] ? '/' . $serendipity['indexFile'] . '?' : '') . '/archives/' . $postid . '_.html', 'string'));
+ 'permalink' => new XML_RPC_Value($serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? '/' . $serendipity['indexFile'] . '?' : '') . '/archives/' . $postid . '_.html', 'string'),
+ 'link' => new XML_RPC_Value($serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? '/' . $serendipity['indexFile'] . '?' : '') . '/archives/' . $postid . '_.html', 'string'));
$entry = new XML_RPC_Value($tmp, 'struct');
return new XML_RPC_Response($entry);
}
--- htaccess.tpl DELETED ---
|