<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -9,7 +9,7 @@ if (!defined('DOKU_INC')) die();
 
 class helper_plugin_avatar extends DokuWiki_Plugin {
 
-  function getInfo(){
+  function getInfo() {
     return array(
       'author' =&gt; 'Gina H&#228;u&#223;ge, Michael Klier, Esther Brunner',
       'email'  =&gt; 'dokuwiki@chimeric.de',
@@ -20,7 +20,7 @@ class helper_plugin_avatar extends DokuWiki_Plugin {
     );
   }
   
-  function getMethods(){
+  function getMethods() {
     $result = array();
     $result[] = array(
       'name'   =&gt; 'getXHTML',
@@ -35,7 +35,7 @@ class helper_plugin_avatar extends DokuWiki_Plugin {
     return $result;
   }
   
-  function getXHTML($user, $title = '', $align = '', $size = NULL){
+  function getXHTML($user, $title = '', $align = '', $size = NULL) {
     
     // determine the URL of the avatar image
     $src = $this-&gt;_getAvatarURL($user, $title, $size);
@@ -49,18 +49,18 @@ class helper_plugin_avatar extends DokuWiki_Plugin {
   /**
    * Main function to determine the avatar to use
    */
-  function _getAvatarURL($user, &amp;$title, &amp;$size){
+  function _getAvatarURL($user, &amp;$title, &amp;$size) {
     global $auth;
     
     if (!$size || !is_int($size)) $size = $this-&gt;getConf('size');
     
     // check first if a local image for the given user exists
     $userinfo = $auth-&gt;getUserData($user);
-    if (is_array($userinfo)){
+    if (is_array($userinfo)) {
       if (($userinfo['name']) &amp;&amp; (!$title)) $title = hsc($userinfo['name']);
       $avatar = $this-&gt;getConf('namespace').':'.$user;
       $formats = array('.png', '.jpg', '.gif');
-      foreach ($formats as $format){
+      foreach ($formats as $format) {
         $img = mediaFN($avatar.$format);
         if (!@file_exists($img)) continue;
         $src = ml($avatar.$format, array('w' =&gt; $size, 'h' =&gt; $size));
@@ -71,16 +71,16 @@ class helper_plugin_avatar extends DokuWiki_Plugin {
       $mail = $user;
     }
     
-    if (!$src){
+    if (!$src) {
       $seed = md5($mail);
       
-      if (function_exists('imagecreatetruecolor')){
+      if (function_exists('imagecreatetruecolor')) {
         // we take the monster ID as default
         $file = 'monsterid.php?seed='.$seed.'&amp;size='.$size.'&amp;.png';
           
       } else {
         // GDlib is not availble - resort to default images
-        switch ($size){
+        switch ($size) {
         case 20: case 40: case 80:
           $file = 'images/default_'.$size.'.png';
           break;
@@ -91,7 +91,7 @@ class helper_plugin_avatar extends DokuWiki_Plugin {
       $default = ml(DOKU_URL.'/lib/plugins/avatar/'.$file, 'cache=recache', true, '&amp;', true);
       
       // do not pass invalid or empty emails to gravatar site...
-      if (isvalidemail($mail) &amp;&amp; ($size &lt;= 80)){
+      if (isvalidemail($mail) &amp;&amp; ($size &lt;= 80)) {
         $src = ml('http://www.gravatar.com/avatar.php?'.
           'gravatar_id='.$seed.
           '&amp;default='.urlencode($default).
@@ -109,7 +109,5 @@ class helper_plugin_avatar extends DokuWiki_Plugin {
     
     return $src;
   }
-        
 }
-  
-//Setup VIM: ex: et ts=4 enc=utf-8 :
+//vim:ts=4:sw=4:et:enc=utf-8:</diff>
      <filename>helper.php</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ build_monster($_REQUEST['seed'], $_REQUEST['size']);
  * Generates a monster for the given seed
  * GDlib is required!
  */
-function build_monster($seed='',$size=''){
+function build_monster($seed='',$size='') {
     // init random seed
     if($seed) srand( hexdec(substr(md5($seed),0,6)) );
 
@@ -31,7 +31,7 @@ function build_monster($seed='',$size=''){
     imagefill($monster,0,0,$white);
 
     // add parts
-    foreach($parts as $part =&gt; $num){
+    foreach($parts as $part =&gt; $num) {
         $file = dirname(__FILE__).'/parts/'.$part.'_'.$num.'.png';
 
         $im = @imagecreatefrompng($file);
@@ -41,7 +41,7 @@ function build_monster($seed='',$size=''){
         imagedestroy($im);
 
         // color the body
-        if($part == 'body'){
+        if($part == 'body') {
             $color = imagecolorallocate($monster, rand(20,235), rand(20,235), rand(20,235));
             imagefill($monster,60,60,$color);
         }
@@ -51,7 +51,7 @@ function build_monster($seed='',$size=''){
     if($seed) srand();
 
     // resize if needed, then output
-    if($size &amp;&amp; $size &lt; 400){
+    if($size &amp;&amp; $size &lt; 400) {
         $out = @imagecreatetruecolor($size,$size)
             or die(&quot;GD image create failed&quot;);
         imagecopyresampled($out,$monster,0,0,0,0,$size,$size,120,120);
@@ -65,5 +65,4 @@ function build_monster($seed='',$size=''){
         imagedestroy($monster);
     }
 }
-
-//Setup VIM: ex: et ts=4 enc=utf-8 :
+//vim:ts=4:sw=4:et:enc=utf-8:</diff>
      <filename>monsterid.php</filename>
    </modified>
    <modified>
      <diff>@@ -19,7 +19,7 @@ require_once(DOKU_PLUGIN.'syntax.php');
  
 class syntax_plugin_avatar extends DokuWiki_Syntax_Plugin {
 
-  function getInfo(){
+  function getInfo() {
     return array(
       'author' =&gt; 'Gina H&#228;u&#223;ge, Michael Klier, Esther Brunner',
       'email'  =&gt; 'dokuwiki@chimeric.de',
@@ -30,14 +30,14 @@ class syntax_plugin_avatar extends DokuWiki_Syntax_Plugin {
     );
   }
 
-  function getType(){ return 'substition'; }
-  function getSort(){ return 315; }
+  function getType() { return 'substition'; }
+  function getSort() { return 315; }
   
-  function connectTo($mode){
+  function connectTo($mode) {
     $this-&gt;Lexer-&gt;addSpecialPattern(&quot;{{(?:gr|)avatar&gt;.+?}}&quot;,$mode,'plugin_avatar');
   }
   
-  function handle($match, $state, $pos, &amp;$handler){
+  function handle($match, $state, $pos, &amp;$handler) {
     list($syntax, $match) = explode('&gt;', substr($match, 0, -2), 2); // strip markup
     list($user, $title) = explode('|', $match, 2); // split title from mail / username
     
@@ -60,8 +60,8 @@ class syntax_plugin_avatar extends DokuWiki_Syntax_Plugin {
     return array($user, $title, $align, $size);
   } 
  
-  function render($mode, &amp;$renderer, $data){  
-    if ($mode == 'xhtml'){      
+  function render($mode, &amp;$renderer, $data) {  
+    if ($mode == 'xhtml') {      
       if ($my =&amp; plugin_load('helper', 'avatar'))
         $renderer-&gt;doc .= '&lt;span class=&quot;vcard&quot;&gt;'.
           $my-&gt;getXHTML($data[0], $data[1], $data[2], $data[3]).
@@ -70,7 +70,5 @@ class syntax_plugin_avatar extends DokuWiki_Syntax_Plugin {
     }
     return false;
   }
-
 }
- 
-//Setup VIM: ex: et ts=4 enc=utf-8 :
+//vim:ts=4:sw=4:et:enc=utf-8: </diff>
      <filename>syntax.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>687b9208f4921c82329ddf8fe82f9d2756f2307e</id>
    </parent>
  </parents>
  <author>
    <name>Michael Klier</name>
    <login>chimeric</login>
    <email>chi@chimeric.de</email>
  </author>
  <url>http://github.com/dokufreaks/plugin-avatar/commit/21efa51e80d898dcdb6794b2fbb1647c2a666f44</url>
  <id>21efa51e80d898dcdb6794b2fbb1647c2a666f44</id>
  <committed-date>2008-06-07T10:23:34-07:00</committed-date>
  <authored-date>2008-06-07T10:23:34-07:00</authored-date>
  <message>fixed code style

darcs-hash:20080607172334-23886-ccdadc362b9134f36ee7e2e5467f81a3ebbd3502.gz</message>
  <tree>a2d9cae732f979db6d8a2b99da2bcd2e4559665b</tree>
  <committer>
    <name>Michael Klier</name>
    <login>chimeric</login>
    <email>chi@chimeric.de</email>
  </committer>
</commit>
