Ignore:
Timestamp:
Mar 3, 2006, 5:32:21 AM (18 years ago)
Author:
rvelices
Message:

optimization: in sessions write 1 less sql query (except during login)

bug: corrected algorithm for pretty calendar month view

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/calendar_monthly.class.php

    r1062 r1063  
    453453        $ratio_h = $tn_height/$cell_height;
    454454
     455
    455456        $pos_top=$pos_left=0;
    456457        $img_width=$img_height='';
     
    462463            $img_height = 'height="'.$cell_height.'"';
    463464            $browser_img_width = $cell_height*$tn_width/$tn_height;
    464             $pos_left = ($tn_width-$browser_img_width)/2;
     465            $pos_left = ($browser_img_width-$cell_width)/2;
    465466          }
    466467          else
     
    468469            $img_width = 'width="'.$cell_width.'"';
    469470            $browser_img_height = $cell_width*$tn_height/$tn_width;
    470             $pos_top = ($tn_height-$browser_img_height)/2;
     471            $pos_top = ($browser_img_height-$cell_height)/2;
    471472          }
    472473        }
Note: See TracChangeset for help on using the changeset viewer.