Index: trunk/extensions/OpenID/OpenID.setup.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | exit( 1 ); |
29 | 29 | } |
30 | 30 | |
31 | | -define( 'MEDIAWIKI_OPENID_VERSION', '0.925-beta' ); |
| 31 | +define( 'MEDIAWIKI_OPENID_VERSION', '0.926-beta' ); |
32 | 32 | |
33 | 33 | $path = dirname( __FILE__ ); |
34 | 34 | set_include_path( implode( PATH_SEPARATOR, array( $path ) ) . PATH_SEPARATOR . get_include_path() ); |
Index: trunk/extensions/OpenID/SpecialOpenIDDashboard.body.php |
— | — | @@ -66,6 +66,10 @@ |
67 | 67 | return; |
68 | 68 | } |
69 | 69 | |
| 70 | + $totalUsers = SiteStats::users(); |
| 71 | + $OpenIDdistinctUsers = $this->getOpenIDUsers( 'distinctusers' ); |
| 72 | + $OpenIDUsers = $this->getOpenIDUsers(); |
| 73 | + |
70 | 74 | $out = "<table class='openiddashboard wikitable'><tr><th>Parameter</th><th>Value</th></tr>"; |
71 | 75 | $out .= show( 'MEDIAWIKI_OPENID_VERSION', MEDIAWIKI_OPENID_VERSION ); |
72 | 76 | $out .= show( '$wgOpenIDOnly', $wgOpenIDOnly ); |
— | — | @@ -79,6 +83,11 @@ |
80 | 84 | $out .= show( '$wgOpenIDProposeUsernameFromSREG', $wgOpenIDProposeUsernameFromSREG ); |
81 | 85 | $out .= show( '$wgOpenIDShowUrlOnUserPage', $wgOpenIDShowUrlOnUserPage ); |
82 | 86 | $out .= show( '$wgOpenIDShowProviderIcons', $wgOpenIDShowProviderIcons ); |
| 87 | + |
| 88 | + $out .= show( 'Number of users (total)', $totalUsers ); |
| 89 | + $out .= show( 'Number of users with OpenID', $OpenIDdistinctUsers ); |
| 90 | + $out .= show( 'Number of OpenIDs (total)', $OpenIDUsers ); |
| 91 | + $out .= show( 'Number of users without OpenID', $totalUsers - $OpenIDdistinctUsers ); |
83 | 92 | $out .= '</table>'; |
84 | 93 | |
85 | 94 | $this->setHeaders(); |
— | — | @@ -93,4 +102,21 @@ |
94 | 103 | $wgOut->wrapWikiMsg( "<p class='error'>$1</p>", $args ); |
95 | 104 | } |
96 | 105 | |
| 106 | + |
| 107 | + function getOpenIDUsers ( $distinctusers = '' ) { |
| 108 | + wfProfileIn( __METHOD__ ); |
| 109 | + $distinct = ( $distinctusers == 'distinctusers' ) ? 'COUNT(DISTINCT uoi_user)' : 'COUNT(*)' ; |
| 110 | + |
| 111 | + $dbr = wfGetDB( DB_SLAVE ); |
| 112 | + $OpenIDUserCount = (int)$dbr->selectField( |
| 113 | + 'user_openid', |
| 114 | + $distinct, |
| 115 | + null, |
| 116 | + __METHOD__, |
| 117 | + null |
| 118 | + ); |
| 119 | + wfProfileOut( __METHOD__ ); |
| 120 | + return $OpenIDUserCount; |
| 121 | + } |
| 122 | + |
97 | 123 | } |