[geeklog-cvs] geeklog: Fixed parse error when saving a static page (reported b...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Jan 31 16:18:10 EST 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/39b5799ac006
changeset: 6741:39b5799ac006
user: Dirk Haun <dirk at haun-online.de>
date: Sat Jan 31 22:17:59 2009 +0100
description:
Fixed parse error when saving a static page (reported by greenteagod)
diffstat:
2 files changed, 22 insertions(+), 2 deletions(-)
plugins/staticpages/services.inc.php | 14 ++++++++++++--
public_html/docs/history | 10 ++++++++++
diffs (58 lines):
diff -r b2225a5cac1f -r 39b5799ac006 plugins/staticpages/services.inc.php
--- a/plugins/staticpages/services.inc.php Sat Jan 31 20:08:56 2009 +0100
+++ b/plugins/staticpages/services.inc.php Sat Jan 31 22:17:59 2009 +0100
@@ -33,6 +33,10 @@
// | |
// +---------------------------------------------------------------------------+
+if (strpos(strtolower($_SERVER['PHP_SELF']), 'services.inc.php') !== false) {
+ die('This file can not be used on its own.');
+}
+
// this must be kept in synch with the actual size of 'sp_id' in the db ...
define('STATICPAGE_MAX_ID_LENGTH', 40);
@@ -49,7 +53,9 @@
global $_CONF, $_TABLES, $_USER, $LANG_ACCESS, $LANG12, $LANG_STATIC,
$LANG_LOGIN, $_GROUPS, $_SP_CONF;
- require_once $_CONF['path_system'] . '/lib-webservices.php';
+ if ((PHP_VERSION > 4) && (! $_CONF['disable_webservices'])) {
+ require_once $_CONF['path_system'] . '/lib-webservices.php';
+ }
$output = '';
@@ -133,7 +139,11 @@
if (isset($args['slug'])) {
$slug = $args['slug'];
}
- $args['sp_id'] = WS_makeId($slug, STATICPAGE_MAX_ID_LENGTH);
+ if (function_exists('WS_makeId')) {
+ $args['sp_id'] = WS_makeId($slug, STATICPAGE_MAX_ID_LENGTH);
+ } else {
+ $args['sp_id'] = COM_makeSid();
+ }
}
}
diff -r b2225a5cac1f -r 39b5799ac006 public_html/docs/history
--- a/public_html/docs/history Sat Jan 31 20:08:56 2009 +0100
+++ b/public_html/docs/history Sat Jan 31 22:17:59 2009 +0100
@@ -68,6 +68,16 @@
now [Dirk]
- Display "successfully saved" and "successfully deleted" messages, just like
every other plugin and built-in function does (bug #0000644) [Dirk]
+
+
+Feb ??, 2009 (1.5.2)
+------------
+
+- Updated Japanese language file, provided by the Geeklog.jp group
+
+Static Pages plugin
+-------------------
+- Fixed parse error when saving a static page (reported by greenteagod) [Dirk]
Jan 24, 2009 (1.5.2rc1)
More information about the geeklog-cvs
mailing list