From: Don S. <ri...@us...> - 2004-04-02 16:40:25
|
Update of /cvsroot/phpwsbb/phpwsbb/boost In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21985/boost Modified Files: install.php update.php Log Message: Copying images to images/phpwsbb to work with branches. Index: install.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/boost/install.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** install.php 2 Mar 2004 02:40:48 -0000 1.15 --- install.php 2 Apr 2004 16:27:46 -0000 1.16 *************** *** 34,36 **** --- 34,54 ---- } + /* Create image directory */ + mkdir($GLOBALS["core"]->home_dir . "images/phpwsbb"); + if (is_dir($GLOBALS["core"]->home_dir . "images/phpwsbb")) { + $content .= "phpwsBB image directory " . $GLOBALS["core"]->home_dir . "images/phpwsbb/ successfully created!<br />"; + /* Copy image files */ + $images = array(); + if($handle = opendir(PHPWS_SOURCE_DIR . "mod/phpwsbb/img/")) { + while (false !== ($file = readdir($handle))) { + //if ($file != "." && $file != "..") + if (is_file(PHPWS_SOURCE_DIR . "mod/phpwsbb/img/$file")) + if(!copy(PHPWS_SOURCE_DIR . "mod/phpwsbb/img/$file", $GLOBALS["core"]->home_dir . "images/phpwsbb/$file")) + $content .= "Failed to copy $file<br />\n"; + } + } + } else + $content .= "phpwsBB could not create the image directory: " . $GLOBALS["core"]->home_dir . "images/phpwsbb/<br />You will have to do this manually!<br />"; + + ?> Index: update.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/boost/update.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** update.php 18 Mar 2004 04:28:07 -0000 1.28 --- update.php 2 Apr 2004 16:27:46 -0000 1.29 *************** *** 213,215 **** --- 213,234 ---- } + if($currentVersion < "0.9.1") { + /* Create image directory */ + mkdir($GLOBALS["core"]->home_dir . "images/phpwsbb"); + if (is_dir($GLOBALS["core"]->home_dir . "images/phpwsbb")) { + $content .= "phpwsBB image directory " . $GLOBALS["core"]->home_dir . "images/phpwsbb/ successfully created!<br />"; + /* Copy image files */ + $images = array(); + if($handle = opendir(PHPWS_SOURCE_DIR . "mod/phpwsbb/img/")) { + while (false !== ($file = readdir($handle))) { + //if ($file != "." && $file != "..") + if (is_file(PHPWS_SOURCE_DIR . "mod/phpwsbb/img/$file")) + if(!copy(PHPWS_SOURCE_DIR . "mod/phpwsbb/img/$file", $GLOBALS["core"]->home_dir . "images/phpwsbb/$file")) + $content .= "Failed to copy $file<br />\n"; + } + } + } else + $content .= "phpwsBB could not create the image directory: " . $GLOBALS["core"]->home_dir . "images/phpwsbb/<br />You will have to do this manually!<br />"; + } + ?> |