From: <web...@bo...> - 2006-08-30 13:04:22
|
Hello to all of you guys and thank for the great work. I like very much SquirrelMail and its plugins. Also I have several installation on different machines and with some minor errors everything works great. Small errors I found in File Manager Version 2.0 Plugin. First of all, my machine, my SM, my plugin: 1) Gentoo Linux; 2) Apache/2.0.58; 3) PHP Version 5.1.4-pl0-gentoo; 4) SquirrelMail version: 1.4.8 (from source packet squirrelmail-1.4.8.tar.bz2); 5) Config file version: 1.4.0; 6) File Manager Version 2.0 Plugin (properly configured). Errors and solutions: 1) This error is connected with PHP5 behaviour (I think): Fatal error: Cannot re-assign $this in plugins/file_manager/functions.php on line 401 My fix is very simple. Change this in functions.php line 401: -------------------------------------------------------------------------= --------- foreach ($p_arr as $this) { $p_char =3D ( $i%3=3D=3D0 ? "r" : ( $i%3=3D=3D1 ? "w" : "x" ) ); $perms .=3D ( $this=3D=3D"1" ? $p_char : "-" ) . ( $i%3=3D=3D2 ?= " " : "" ); $i++; } -------------------------------------------------------------------------= --------- with this: -------------------------------------------------------------------------= --------- foreach ($p_arr as $value) { $p_char =3D ( $i%3=3D=3D0 ? "r" : ( $i%3=3D=3D1 ? "w" : "x" ) ); $perms .=3D ( $value=3D=3D"1" ? $p_char : "-" ) . ( $i%3=3D=3D2 = ? " " : "" ); $i++; } -------------------------------------------------------------------------= --------- This is because of $this :). $this is a reference to the calling object (http://www.php.net/manual/en/language.oop5.basic.php). 2) This is small error because of changed place of a file in SM: Warning: include_once(../src/validate.php) [function.include-once]: faile= d to open stream: No such file or directory in /var/www/www.reycon.com/htdocs/webmail/plugins/file_manager/file_manager.= php on line 21 Warning: include_once() [function.include]: Failed opening '../src/validate.php' for inclusion (include_path=3D'.:/usr/share/php5:/usr/share/php') in /var/www/www.reycon.com/htdocs/webmail/plugins/file_manager/file_manager.= php on line 21 .... ( and more because of the 2 warnings above ) And the solution - change this in file_manager.php line 21: -------------------------------------------------------------------------= --------- include_once(SM_PATH . 'src/validate.php'); -------------------------------------------------------------------------= --------- with this: -------------------------------------------------------------------------= --------- include_once(SM_PATH . 'include/validate.php'); -------------------------------------------------------------------------= --------- That's all. |