Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

28 Full name instead of user name

darcs-hash:20070116224217-89468-aa4f3ecd03173ec7c46aadaafba1d7c841f53919.gz
  • Loading branch information...
commit 9371d332af17da19827de295ccc13f1ab2f70599 1 parent 8bb147d
wikidesign authored
Showing with 12 additions and 3 deletions.
  1. +12 −3 helper.php
View
15 helper.php
@@ -13,7 +13,7 @@ function getInfo(){
return array(
'author' => 'Esther Brunner',
'email' => 'wikidesign@gmail.com',
- 'date' => '2007-01-15',
+ 'date' => '2007-01-16',
'name' => 'Editor Plugin (helper class)',
'desc' => 'Returns pages recently edited by a given user',
'url' => 'http://www.wikidesign.ch/en/plugin/editor/start',
@@ -102,7 +102,9 @@ function getEditor($ns = '', $num = NULL, $user = ''){
* @author Esther Brunner <wikidesign@gmail.com>
*/
function _handleRecent($line, $ns, $type, $user){
+ global $auth; // authentification class
static $seen = array(); // caches seen pages and skip them
+
if ($type == 'clear') $seen = array(); // clear seen pages cache
if (empty($line)) return false; // skip empty lines
@@ -147,9 +149,16 @@ function _handleRecent($line, $ns, $type, $user){
// check existance
$recent['file'] = wikiFN($recent['id']);
$recent['exists'] = @file_exists($recent['file']);
- $recent['desc'] = $recent['sum'];
if (!$recent['exists']) return false;
-
+
+ $recent['desc'] = $recent['sum'];
+ if ($recent['user']){
+ $userinfo = $auth->getUserData($recent['user']);
+ if ($userinfo) $recent['user'] = $userinfo['name'];
+ } else {
+ $recent['user'] = $recent['ip'];
+ }
+
return $recent;
}
Please sign in to comment.
Something went wrong with that request. Please try again.