Revision: 49554 Author: aaron Date: 2009-04-16 04:51:43 +0000 (Thu, 16 Apr 2009)
Log Message: ----------- Tweaked r49408: Improved hiding and changed 1 revision case handling Modified Paths: -------------- trunk/phase3/includes/DefaultSettings.php trunk/phase3/includes/LogPage.php trunk/phase3/includes/PageHistory.php trunk/phase3/skins/common/history.js Modified: trunk/phase3/includes/DefaultSettings.php =================================================================== --- trunk/phase3/includes/DefaultSettings.php 2009-04-16 03:51:12 UTC (rev 49553) +++ trunk/phase3/includes/DefaultSettings.php 2009-04-16 04:51:43 UTC (rev 49554) @@ -1477,7 +1477,7 @@ * to ensure that client-side caches don't keep obsolete copies of global * styles. */ -$wgStyleVersion = '211'; +$wgStyleVersion = '212'; # Server-side caching: Modified: trunk/phase3/includes/LogPage.php =================================================================== --- trunk/phase3/includes/LogPage.php 2009-04-16 03:51:12 UTC (rev 49553) +++ trunk/phase3/includes/LogPage.php 2009-04-16 04:51:43 UTC (rev 49554) @@ -91,7 +91,7 @@ $this->type, $this->action, $this->target, $this->comment, $this->params, $newId ); $rc->notifyRC2UDP(); } - return true; + return $newId; } /** @@ -358,6 +358,16 @@ return $this->saveContent(); } + + public function addRelations( $field, $values, $logid ) { + $data = array(); + foreach( $values as $value ) { + $data[] = array('ls_field' => $field,'ls_value' => $value,'ls_log_id' => $logid); + } + $dbw = wfGetDB( DB_MASTER ); + $dbw->insert( 'log_search', $data, __METHOD__ ); + return true; + } /** * Create a blob from a parameter array Modified: trunk/phase3/includes/PageHistory.php =================================================================== --- trunk/phase3/includes/PageHistory.php 2009-04-16 03:51:12 UTC (rev 49553) +++ trunk/phase3/includes/PageHistory.php 2009-04-16 04:51:43 UTC (rev 49554) @@ -156,7 +156,7 @@ global $wgUser, $wgScript, $wgEnableHtmlDiff; $this->lastdate = ''; $s = wfMsgExt( 'histlegend', array( 'parse') ); - if( $wgUser->isAllowed('deleterevision') ) { + if( $this->linesonpage > 1 && $wgUser->isAllowed('deleterevision') ) { $revdel = SpecialPage::getTitleFor( 'Revisiondelete' ); $s .= Xml::openElement( 'form', array( @@ -284,7 +284,7 @@ if( $wgUser->isAllowed( 'deleterevision' ) ) { // Hide JS by default for non-JS browsing - $hidden = array( 'style' => 'visibility:hidden' ); + $hidden = array( 'style' => 'display:none' ); // If revision was hidden from sysops if( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) { $del = Xml::check( 'deleterevisions', false, Modified: trunk/phase3/skins/common/history.js =================================================================== --- trunk/phase3/skins/common/history.js 2009-04-16 03:51:12 UTC (rev 49553) +++ trunk/phase3/skins/common/history.js 2009-04-16 04:51:43 UTC (rev 49554) @@ -87,9 +87,7 @@ // Attach event handlers to the input elements on history page function histrowinit() { var hf = document.getElementById('pagehistory'); - if (!hf) { - return; - } + if (!hf) return; var df = document.getElementById('mw-history-revdeleteform'); if( df ) df.style.visibility = 'visible'; // Enable JS form var lis = hf.getElementsByTagName('li'); @@ -101,7 +99,7 @@ } var check = deleteCheck(lis[i]); if( df && check ) { - check.style.visibility = 'visible'; // Enable JS form + check.style.display = 'inline'; // Enable JS form } } diffcheck(); _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs