[Openfirst-cvscommit] members workspace.php,1.1,1.2
Brought to you by:
xtimg
From: <xt...@us...> - 2003-07-29 16:11:31
|
Update of /cvsroot/openfirst/members In directory sc8-pr-cvs1:/tmp/cvs-serv3587 Modified Files: workspace.php Log Message: Add some error trapping to workspace creation Index: workspace.php =================================================================== RCS file: /cvsroot/openfirst/members/workspace.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** workspace.php 28 Jul 2003 01:21:48 -0000 1.1 --- workspace.php 29 Jul 2003 16:11:28 -0000 1.2 *************** *** 344,350 **** } else { if($_GET["activate"] == true) { ! mysql_query("INSERT INTO ofirst_workspace_users (quota, user, virtfspath, frozen) VALUES('10', '$user->user', '" . getcwd() . "/virtfs/$user->user/', '0');"); ! mkdir(getcwd() . "/virtfs/$user->user/"); ! echo("Congratulations, your workspace has been created. [ <a href='workspace.php'>Continue</a> ]"); } else { echo("You do not have a workspace account. If you would like, you may <a href='workspace.php?activate=true'>Activate your workspace account.</a>"); --- 344,354 ---- } else { if($_GET["activate"] == true) { ! if(iswritable(getcwd() . "/virtfs/") == true) { ! mysql_query("INSERT INTO ofirst_workspace_users (quota, user, virtfspath, frozen) VALUES('10', '$user->user', '" . getcwd() . "/virtfs/$user->user/', '0');"); ! mkdir(getcwd() . "/virtfs/$user->user/"); ! echo("Congratulations, your workspace has been created. [ <a href='workspace.php'>Continue</a> ]"); ! } else { ! echo("You cannot setup a workspace because the administration has not enabled it.<br>To enable users to create work spaces, they must create an "virtfs" directory and set it to be writable by the web server user (typically using <code>chmod g+w,o+w virtfs</code>, on UNIX-based systems) [ <a href='workspace.php'>Continue</a> ]"); ! } } else { echo("You do not have a workspace account. If you would like, you may <a href='workspace.php?activate=true'>Activate your workspace account.</a>"); |