r48571 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48570‎ | r48571 | r48572 >
Date:05:29, 19 March 2009
Author:nad
Status:deferred
Tags:
Comment:
use the "more entropy" option for the GUID's uniqid
Modified paths:
  • /trunk/extensions/RecordAdmin/RecordAdmin_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php
@@ -16,7 +16,7 @@
1717 function __construct() {
1818 # Name to use for creating a new record either via RecordAdmin or a public form
1919 # todo: should add a hook here for custom default-naming
20 - $this->guid = strftime( '%Y%m%d', time() ) . '-' . substr( strtoupper( uniqid() ), -5 );
 20+ $this->guid = strftime( '%Y%m%d', time() ) . '-' . substr( strtoupper( uniqid('', true) ), -5 );
2121 wfLoadExtensionMessages ( 'RecordAdmin' );
2222 SpecialPage::SpecialPage( 'RecordAdmin', 'recordadmin' );
2323 }
@@ -388,6 +388,7 @@
389389 $form = preg_replace( '#(<select.+?>)\s*(?!<option/>)#s', '$1<option selected/>', $form ); # ensure all select lists have default blank
390390 }
391391 else {
 392+
392393 # Create a red link to the form if it doesn't exist
393394 $form = '<b>' . wfMsg( 'recordadmin-noform', $type ) . '</b>'
394395 . '<br /><a href="' . $title->getLocalURL( 'action=edit' )

Status & tagging log