[geeklog-cvs] Geeklog-1.x/plugins/staticpages services.inc.php, 1.7, 1.8
Dirk Haun
dhaun at qs1489.pair.com
Thu Jan 3 15:01:20 EST 2008
Update of /cvsroot/geeklog/Geeklog-1.x/plugins/staticpages
In directory qs1489.pair.com:/tmp/cvs-serv11361/plugins/staticpages
Modified Files:
services.inc.php
Log Message:
We need to know the max. length of sp_id so that we can handle overly long IDs ...
Index: services.inc.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/plugins/staticpages/services.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** services.inc.php 3 Jan 2008 16:23:01 -0000 1.7
--- services.inc.php 3 Jan 2008 20:01:18 -0000 1.8
***************
*** 36,39 ****
--- 36,42 ----
// $Id$
+ // this must be kept in synch with the actual size of 'sp_id' in the db ...
+ define('STATICPAGE_MAX_ID_LENGTH', 40);
+
/**
* Submit static page. The page is updated if it exists, or a new one is created
***************
*** 117,120 ****
--- 120,128 ----
$args['sp_id'] = COM_sanitizeID($args['sp_id']);
+ if (!$gl_edit) {
+ if (strlen($args['sp_id']) > STATICPAGE_MAX_ID_LENGTH) {
+ $args['sp_id'] = COM_makeSid();
+ }
+ }
// Apply filters to the parameters passed by the webservice
More information about the geeklog-cvs
mailing list