Content deleted Content added
DAMNIT! |
m →top: Replaced deprecated <source> tags with <syntaxhighlight> |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1:
{{collapse top|title=Source code}}
<
<?php
$query = "select user_name, user_id from user join user_groups on ug_user = user_id where ug_group = 'sysop';";
Line 24:
$overall[$name] = 0;
$mwonly[$name] = 0;
$newQ = "select page_title, page_namespace, rev_comment from page join revision_userindex on rev_page = page_id where (page_namespace = 2 OR page_namespace = 8) and rev_user = '$uid' and page_title rlike '^.*\.(css|js)$';";
$newR = mysqli_query( $mysqli, $newQ );
while( $uRow = mysqli_fetch_assoc( $newR ) ) {
$comment = $uRow['rev_comment'];
$title = $uRow['page_title'];
$namespace = $uRow['page_namespace'];
$moves = '/moved page \[\[(?!.*?WP:AFCH)|moved \[\[.*?\]\] to \[\[/i';
$protects = '/^(Protected|Changed protection).*?\[[Ee]dit=|^Removed protection from|^Configured pending changes.*?\[[Aa]uto-accept|^Reset pending changes settings/i';
if( preg_match( "/^.*\.(css|js)$/i", $title ) == 1 && preg_match( $moves, $comment ) == 0 && preg_match( $protects, $comment ) ) {
if( $namespace == 2 ) {
//$title was in userspace
Line 127 ⟶ 130:
echo "\n\n$table\n\n";
?>
</syntaxhighlight>
{{collapse bottom}}
Line 134 ⟶ 137:
The thing is - we need to look in the context of editing '''other users''' css/js as well - as this will be part of the restriction. Admins won't be able to edit or delete other users js/css (won't be able to help with scripts). It's unclear at this point if oversighters will be able to remove revisions from css/js.
My script presents '''far''' different (and more complete) numbers: ('''Script is currently running to calculate edits, and not just pages edited, as well as to filter out protections and moves''')
{| class='wikitable'
Line 2,610 ⟶ 2,613:
| 0
| 1
|}
== 1 Year ==
Edits 1 year and newer
{| class='wikitable'
|-
! 0
! >= 1 <= 10
! >= 11 <= 50
! >= 51 <= 100
! >= 101 <= 250
! >= 251 <= 1000
! >= 1000 <= 2500
! >= 2501
|-
| 1152
| 47
| 10
| 1
| 0
| 1
| 0
| 0
|}
{| class='wikitable sortable'
|-
! Name
! Overall JS/CSS Edits
! MW JS/CSS Edits
! Userspace JS/CSS Edits
|-
| [[User:
|
|
|
|-
| [[User:
|
|
|
|-
| [[User:
|
|
|
|-
| [[User:
|
|
| 0
|-
| [[User:
|
|
| 0
|-
| [[User:
|
|
|
|-
| [[User:
|
|
|
|-
| [[User:
|
|
|
|-
| [[User:
|
| 0
| 23
|-
| [[User:
|
|
|
|-
| [[User:
|
|
| 0
|-
| [[User:
|
|
|
|-
| [[User:
|
| 0
| 9
|-
| [[User:
|
|
| 0
|-
| [[User:
|
|
| 0
|-
| [[User:
|
| 0
| 6
|-
| [[User:
|
|
| 0
|-
| [[User:
|
| 0
| 4
|-
| [[User:
|
|
| 0
|-
| [[User:
|
| 0
| 4
|-
| [[User:
|
| 0
| 4
|-
| [[User:
|
|
|
|-
| [[User:
|
|
|
|-
| [[User:
|
| 0
| 3
|-
| [[User:
|
| 0
| 3
|-
| [[User:
|
|
| 0
|-
| [[User:
|
| 0
| 2
|-
| [[User:
|
| 0
| 2
|-
| [[User:
|
| 0
| 2
|-
| [[User:
|
|
| 0
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
|
| 0
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
|
| 0
|-
| [[User:
|
|
| 0
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
|
| 0
|-
| [[User:
|
|
| 0
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
|
| 0
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
|
| 0
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
|
| 0
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
|
| 0
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
| 0
| 1
|-
| [[User:
|
| 0
| 1
|}
== 3 Years ==
Edits 3 years and newer
'''Script running'''
|