Update of /cvsroot/openfirst/members
In directory sc8-pr-cvs1:/tmp/cvs-serv22589
Modified Files:
workspace.php
Log Message:
Fix miscellaneous issues that may cause errors on systems with elevated debug levels.
Index: workspace.php
===================================================================
RCS file: /cvsroot/openfirst/members/workspace.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** workspace.php 12 Aug 2003 17:09:14 -0000 1.6
--- workspace.php 20 Aug 2003 15:17:27 -0000 1.7
***************
*** 29,34 ****
! if($_GET["filepath"] == "") { $filepath = "/"; } else {$filepath = $_GET["filepath"]; }
! if($_POST["filepath"] != "") { $filepath = $_POST["filepath"]; }
// Get important data used throughout this.
--- 29,35 ----
! if(isset($_GET["filepath"]) == true && $_GET["filepath"] == "") { $filepath = "/"; } else { $filepath = $_GET["filepath"]; }
! if(isset($_POST["filepath"]) == true && $_POST["filepath"] != "") { $filepath = $_POST["filepath"]; }
! if(isset($filepath) == false || $filepath = "") { $filepath = "/"; }
// Get important data used throughout this.
***************
*** 36,40 ****
$ws = mysql_fetch_object($wsu);
! if($_GET["action"] == "view" && isset($_GET["view"]) == true) {
if($_GET["owner"] == $user->user) {
$file = $ws->virtfspath . "/" . $_GET["file"];
--- 37,41 ----
$ws = mysql_fetch_object($wsu);
! if(isset($_GET["action"]) == true && $_GET["action"] == "view" && isset($_GET["view"]) == true) {
if($_GET["owner"] == $user->user) {
$file = $ws->virtfspath . "/" . $_GET["file"];
***************
*** 70,74 ****
if(isset($user->user)) {
! if($_POST["action"] == "modify") {
echo("Your modifications to "" . $_POST["file"] . "" have been made [ <a href='workspace.php'>Return to workspace</a> ]");
$vfs = mysql_fetch_object(mysql_query("SELECT virtfspath FROM ofirst_workspace_users WHERE user='" . $_POST["owner"] . "';"));
--- 71,75 ----
if(isset($user->user)) {
! if(isset($_POST["action"]) == true && $_POST["action"] == "modify") {
echo("Your modifications to "" . $_POST["file"] . "" have been made [ <a href='workspace.php'>Return to workspace</a> ]");
$vfs = mysql_fetch_object(mysql_query("SELECT virtfspath FROM ofirst_workspace_users WHERE user='" . $_POST["owner"] . "';"));
***************
*** 82,86 ****
die(include($footer));
}
! if($_POST["action"] == "makedirectory") {
mkdir(getcwd() . "/virtfs/$user->user/$filepath/" . $_POST["directory"]);
$uf = mysql_query("INSERT INTO ofirst_workspace_files (size, location, owner, permissions, date, description, filetype, name) VALUES('0', '$filepath', '$user->user', 'drw-------', '" . date('D M d Y h:m:s') . "', 'Sub Directory', 'dir-" . $_POST["directorytype"] . "', '" . $_POST["directory"] . "');");
--- 83,87 ----
die(include($footer));
}
! if(isset($_POST["action"]) == true && $_POST["action"] == "makedirectory") {
mkdir(getcwd() . "/virtfs/$user->user/$filepath/" . $_POST["directory"]);
$uf = mysql_query("INSERT INTO ofirst_workspace_files (size, location, owner, permissions, date, description, filetype, name) VALUES('0', '$filepath', '$user->user', 'drw-------', '" . date('D M d Y h:m:s') . "', 'Sub Directory', 'dir-" . $_POST["directorytype"] . "', '" . $_POST["directory"] . "');");
***************
*** 261,265 ****
<h1>Personal Workspace</h1>
<p><?php
- if($_GET["filepath"] == "") { $filepath = "/"; } else {$filepath = $_GET["filepath"]; }
$files = mysql_fetch_object(mysql_query("SELECT SUM(size) as used FROM ofirst_workspace_files WHERE owner='$user->user';"));
if(mysql_num_rows($wsu) == 1) {
--- 262,265 ----
***************
*** 434,438 ****
<?php
} else {
! if($_GET["activate"] == true) {
if(is_writable(getcwd() . "/virtfs/") == true) {
mysql_query("INSERT INTO ofirst_workspace_users (quota, user, virtfspath, frozen) VALUES('10', '$user->user', '" . getcwd() . "/virtfs/$user->user/', '0');");
--- 434,438 ----
<?php
} else {
! if(isset($_GET["activate"]) == true && $_GET["activate"] == true) {
if(is_writable(getcwd() . "/virtfs/") == true) {
mysql_query("INSERT INTO ofirst_workspace_users (quota, user, virtfspath, frozen) VALUES('10', '$user->user', '" . getcwd() . "/virtfs/$user->user/', '0');");
|