[geeklog-cvs] Geeklog-1.x/system lib-story.php,1.118,1.119
Dirk Haun
dhaun at qs1489.pair.com
Thu Jan 3 15:01:59 EST 2008
Update of /cvsroot/geeklog/Geeklog-1.x/system
In directory qs1489.pair.com:/tmp/cvs-serv11410/system
Modified Files:
lib-story.php
Log Message:
We need to know the max. length of sid so that we can handle overly long IDs ...
Index: lib-story.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/system/lib-story.php,v
retrieving revision 1.118
retrieving revision 1.119
diff -C2 -d -r1.118 -r1.119
*** lib-story.php 3 Jan 2008 14:41:33 -0000 1.118
--- lib-story.php 3 Jan 2008 20:01:57 -0000 1.119
***************
*** 47,50 ****
--- 47,53 ----
}
+ // this must be kept in sync with the actual size of 'sid' in the db ...
+ define('STORY_MAX_ID_LENGTH', 40);
+
/**
* Takes an article class and renders HTML in the specified template and style.
***************
*** 992,996 ****
* @return bool True, if webservices are supported
*/
! function plugin_wsEnabled_story() {
return true;
}
--- 995,1000 ----
* @return bool True, if webservices are supported
*/
! function plugin_wsEnabled_story()
! {
return true;
}
***************
*** 1165,1168 ****
--- 1169,1177 ----
$args['sid'] = COM_sanitizeID($args['sid']);
+ if (!$gl_edit) {
+ if (strlen($args['sid']) > STORY_MAX_ID_LENGTH) {
+ $args['sid'] = COM_makeSid();
+ }
+ }
$story = new Story();
More information about the geeklog-cvs
mailing list