dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "findHooks.php: Work also on .inc and .php5"
[lhc/web/wiklou.git]
/
maintenance
/
tidyUpBug37714.php
diff --git
a/maintenance/tidyUpBug37714.php
b/maintenance/tidyUpBug37714.php
index
eac7b3f
..
f47e13c
100644
(file)
--- a/
maintenance/tidyUpBug37714.php
+++ b/
maintenance/tidyUpBug37714.php
@@
-9,23
+9,22
@@
class TidyUpBug37714 extends Maintenance {
// Search for all log entries which are about changing the visability of other log entries.
$result = $this->getDB( DB_SLAVE )->select(
'logging',
// Search for all log entries which are about changing the visability of other log entries.
$result = $this->getDB( DB_SLAVE )->select(
'logging',
-
array( 'log_id', 'log_params' )
,
- array(
- 'log_type' =>
array( 'suppress', 'delete' )
,
+
[ 'log_id', 'log_params' ]
,
+ [
+ 'log_type' =>
[ 'suppress', 'delete' ]
,
'log_action' => 'event',
'log_namespace' => NS_SPECIAL,
'log_title' => SpecialPage::getTitleFor( 'Log' )->getText()
'log_action' => 'event',
'log_namespace' => NS_SPECIAL,
'log_title' => SpecialPage::getTitleFor( 'Log' )->getText()
-
)
,
+
]
,
__METHOD__
);
foreach ( $result as $row ) {
__METHOD__
);
foreach ( $result as $row ) {
- $paramLines = explode( "\n", $row->log_params );
- $ids = explode( ',', $paramLines[0] ); // Array dereferencing is PHP >= 5.4 :(
+ $ids = explode( ',', explode( "\n", $row->log_params )[0] );
$result = $this->getDB( DB_SLAVE )->select( // Work out what log entries were changed here.
'logging',
'log_type',
$result = $this->getDB( DB_SLAVE )->select( // Work out what log entries were changed here.
'logging',
'log_type',
-
array( 'log_id' => $ids )
,
+
[ 'log_id' => $ids ]
,
__METHOD__,
'DISTINCT'
);
__METHOD__,
'DISTINCT'
);
@@
-35,8
+34,8
@@
class TidyUpBug37714 extends Maintenance {
$this->output( 'Set log_title to "' . $logTitle . '" for log entry ' . $row->log_id . ".\n" );
$this->getDB( DB_MASTER )->update(
'logging',
$this->output( 'Set log_title to "' . $logTitle . '" for log entry ' . $row->log_id . ".\n" );
$this->getDB( DB_MASTER )->update(
'logging',
-
array( 'log_title' => $logTitle )
,
-
array( 'log_id' => $row->log_id )
,
+
[ 'log_title' => $logTitle ]
,
+
[ 'log_id' => $row->log_id ]
,
__METHOD__
);
wfWaitForSlaves();
__METHOD__
);
wfWaitForSlaves();