Index: trunk/phase3/skins/common/history.js |
— | — | @@ -87,9 +87,7 @@ |
88 | 88 | // Attach event handlers to the input elements on history page |
89 | 89 | function histrowinit() { |
90 | 90 | var hf = document.getElementById('pagehistory'); |
91 | | - if (!hf) { |
92 | | - return; |
93 | | - } |
| 91 | + if (!hf) return; |
94 | 92 | var df = document.getElementById('mw-history-revdeleteform'); |
95 | 93 | if( df ) df.style.visibility = 'visible'; // Enable JS form |
96 | 94 | var lis = hf.getElementsByTagName('li'); |
— | — | @@ -101,7 +99,7 @@ |
102 | 100 | } |
103 | 101 | var check = deleteCheck(lis[i]); |
104 | 102 | if( df && check ) { |
105 | | - check.style.visibility = 'visible'; // Enable JS form |
| 103 | + check.style.display = 'inline'; // Enable JS form |
106 | 104 | } |
107 | 105 | } |
108 | 106 | diffcheck(); |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1477,7 +1477,7 @@ |
1478 | 1478 | * to ensure that client-side caches don't keep obsolete copies of global |
1479 | 1479 | * styles. |
1480 | 1480 | */ |
1481 | | -$wgStyleVersion = '211'; |
| 1481 | +$wgStyleVersion = '212'; |
1482 | 1482 | |
1483 | 1483 | |
1484 | 1484 | # Server-side caching: |
Index: trunk/phase3/includes/PageHistory.php |
— | — | @@ -156,7 +156,7 @@ |
157 | 157 | global $wgUser, $wgScript, $wgEnableHtmlDiff; |
158 | 158 | $this->lastdate = ''; |
159 | 159 | $s = wfMsgExt( 'histlegend', array( 'parse') ); |
160 | | - if( $wgUser->isAllowed('deleterevision') ) { |
| 160 | + if( $this->linesonpage > 1 && $wgUser->isAllowed('deleterevision') ) { |
161 | 161 | $revdel = SpecialPage::getTitleFor( 'Revisiondelete' ); |
162 | 162 | $s .= Xml::openElement( 'form', |
163 | 163 | array( |
— | — | @@ -284,7 +284,7 @@ |
285 | 285 | |
286 | 286 | if( $wgUser->isAllowed( 'deleterevision' ) ) { |
287 | 287 | // Hide JS by default for non-JS browsing |
288 | | - $hidden = array( 'style' => 'visibility:hidden' ); |
| 288 | + $hidden = array( 'style' => 'display:none' ); |
289 | 289 | // If revision was hidden from sysops |
290 | 290 | if( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) { |
291 | 291 | $del = Xml::check( 'deleterevisions', false, |
Index: trunk/phase3/includes/LogPage.php |
— | — | @@ -91,7 +91,7 @@ |
92 | 92 | $this->type, $this->action, $this->target, $this->comment, $this->params, $newId ); |
93 | 93 | $rc->notifyRC2UDP(); |
94 | 94 | } |
95 | | - return true; |
| 95 | + return $newId; |
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
— | — | @@ -358,6 +358,16 @@ |
359 | 359 | |
360 | 360 | return $this->saveContent(); |
361 | 361 | } |
| 362 | + |
| 363 | + public function addRelations( $field, $values, $logid ) { |
| 364 | + $data = array(); |
| 365 | + foreach( $values as $value ) { |
| 366 | + $data[] = array('ls_field' => $field,'ls_value' => $value,'ls_log_id' => $logid); |
| 367 | + } |
| 368 | + $dbw = wfGetDB( DB_MASTER ); |
| 369 | + $dbw->insert( 'log_search', $data, __METHOD__ ); |
| 370 | + return true; |
| 371 | + } |
362 | 372 | |
363 | 373 | /** |
364 | 374 | * Create a blob from a parameter array |