[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.377,1.378
dhaun at iowaoutdoors.org
dhaun at iowaoutdoors.org
Sat Sep 25 07:42:22 EDT 2004
Update of /var/cvs/geeklog-1.3/public_html
In directory www:/tmp/cvs-serv28544/public_html
Modified Files:
lib-common.php
Log Message:
Bugfix: The Upcoming Events block didn't use the help URL.
Index: lib-common.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.377
retrieving revision 1.378
diff -C2 -d -r1.377 -r1.378
*** lib-common.php 24 Sep 2004 10:25:32 -0000 1.377
--- lib-common.php 25 Sep 2004 11:42:18 -0000 1.378
***************
*** 3668,3672 ****
if( SEC_hasAccess( $A['owner_id'], $A['group_id'], $A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon']) > 0 )
{
! $retval .= COM_formatBlock($A,$U['noboxes']);
}
}
--- 3668,3672 ----
if( SEC_hasAccess( $A['owner_id'], $A['group_id'], $A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon']) > 0 )
{
! $retval .= COM_formatBlock( $A, $U['noboxes'] );
}
}
***************
*** 4080,4084 ****
}
! $retval = COM_startBlock( $title, '',
COM_getBlockTemplate( 'events_block', 'header' ));
--- 4080,4084 ----
}
! $retval = COM_startBlock( $title, $help,
COM_getBlockTemplate( 'events_block', 'header' ));
***************
*** 5859,5862 ****
--- 5859,5881 ----
}
+ /**
+ * Ensure an ID contains only alphanumeric characters (or '-')
+ *
+ * @param string $id the ID to sanitize
+ * @param boolean $new_id true = create a new ID in case we end up with an empty string
+ * @return string the sanitized ID
+ */
+ function COM_sanitizeID ($id, $new_id = true)
+ {
+ $id = str_replace (' ', '', $id);
+ $id = str_replace (array ('_', '/', '\\', ':', '+'), '-', $id);
+ $id = preg_replace('/[^a-zA-Z0-9\-]/', '', $id);
+ if (empty ($id) && $new_id) {
+ $id = COM_makesid ();
+ }
+
+ return $id;
+ }
+
// Now include all plugin functions
foreach( $_PLUGINS as $pi_name )
More information about the geeklog-cvs
mailing list