Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th December 2006, 13:07
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default Little cosmetic bug in check_disk.plugin.php

I just started to use ISPconfig (as a replacement for DirectAdmin) on a Ubuntu 6.10 server. Using several guidelines found (and modified accordingly), I have all up-n-running and it's looking good.

I did see a little off screen display in my filesystem overview, which is on many pages, so I dived into the system and found a little bug in /home/admispconfig/ispconfig/lib/plugins/check_disk.plugin.php. As the array df_out created in line 58 is dynamically updated (by the unset function), you cannot use the sizeof function in the <for> loop, as the value changes during execution. On my install, the last two lines were not presented correctly. I've patched my install like:

Code:
     53     $fd = popen ("df -h", "r");
     54     while (!feof($fd)) {
     55         $buffer .= fgets($fd, 4096);
     56     }
     57 
     58         $df_out = split("\n",$buffer);
     59         $df_num=sizeof($df_out);              <=== Added variable
     60         for($i=0;$i<$df_num;$i++){            <=== Changed for loop 
     61           if(ltrim($df_out[$i]) != $df_out[$i]){
     62             if(isset($df_out[($i-1)])){
     63               $df_out[($i-1)] .= $df_out[$i];
     64               unset($df_out[$i]);
     65             }
     66           }
     67         }
Well it's cosmetic, but anyway. Maybe one of the devs can enter this in the core? BTW, I use ISPconfig 2.2.8.

Martin
Reply With Quote
Sponsored Links
  #2  
Old 12th December 2006, 15:04
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,748 Times in 2,579 Posts
 
Default

Thanks. I've corrected this in the SVN repository, so it will be in the next release.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Statistics admin Bug???? AlexanderTheGr General 11 2nd September 2008 02:01
Bug creating zone files Davide General 4 12th August 2006 19:23
Bug in legacy Redhat setup AaronNGray Installation/Configuration 0 12th March 2006 20:15
Bug in ispconfig 2.1.1 Bruce General 4 19th November 2005 16:00
Bug on ISP User DarkBen Installation/Configuration 4 24th October 2005 17:27


All times are GMT +2. The time now is 10:07.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.