diff -Naur --exclude=filestorage --exclude=config.inc.php --exclude=install --exclude=install.bak --exclude=log bh21z/administrator/index.php htdocs.patch/administrator/index.php --- bh21z/administrator/index.php 2009-07-22 23:55:12.000000000 -0500 +++ htdocs.patch/administrator/index.php 2009-10-07 14:04:32.000000000 -0500 @@ -95,4 +95,4 @@ # The End. -?> \ No newline at end of file +?> diff -Naur --exclude=filestorage --exclude=config.inc.php --exclude=install --exclude=install.bak --exclude=log bh21z/administrator/layout/filelinks.inc.php htdocs.patch/administrator/layout/filelinks.inc.php --- bh21z/administrator/layout/filelinks.inc.php 2009-07-22 23:55:12.000000000 -0500 +++ htdocs.patch/administrator/layout/filelinks.inc.php 2009-10-07 14:04:32.000000000 -0500 @@ -32,7 +32,7 @@ foreach ($codearray as $filecode=>$filearray) { $filepath = $filearray['filepath']; $expiresin = $filearray['expires']-time(); - $filelink = bh_folderdz_uri($filecode); + $filelink = bh_filelink_uri($filecode); $str .= "     $email$filepath".bh_humanise_time($expiresin)."".$bhlang['button:link']."   ".$bhlang['button:delete'].""; } } @@ -54,4 +54,4 @@ "; -?> \ No newline at end of file +?> diff -Naur --exclude=filestorage --exclude=config.inc.php --exclude=install --exclude=install.bak --exclude=log bh21z/administrator/layout/folderDZ.inc.php htdocs.patch/administrator/layout/folderDZ.inc.php --- bh21z/administrator/layout/folderDZ.inc.php 2009-07-22 23:55:12.000000000 -0500 +++ htdocs.patch/administrator/layout/folderDZ.inc.php 2009-10-07 14:04:32.000000000 -0500 @@ -33,7 +33,7 @@ $filepath = $filearray['filepath']; $expiresin = $filearray['expires']-time(); $filelink = bh_folderdz_uri($filecode); - $str .= "     $email$filepath".bh_humanise_time($expiresin)."".$bhlang['button:link']."   ".$bhlang['button:delete'].""; + $str .= "     $email$filepath".bh_humanise_time($expiresin)."".$bhlang['button:link']."   ".$bhlang['button:delete'].""; } } @@ -54,4 +54,4 @@ "; -?> \ No newline at end of file +?> diff -Naur --exclude=filestorage --exclude=config.inc.php --exclude=install --exclude=install.bak --exclude=log bh21z/administrator/layout/main.inc.php htdocs.patch/administrator/layout/main.inc.php --- bh21z/administrator/layout/main.inc.php 2009-07-22 23:55:12.000000000 -0500 +++ htdocs.patch/administrator/layout/main.inc.php 2009-10-07 14:04:32.000000000 -0500 @@ -203,4 +203,4 @@ } } -} \ No newline at end of file +} diff -Naur --exclude=filestorage --exclude=config.inc.php --exclude=install --exclude=install.bak --exclude=log bh21z/administrator/modules/adduser.inc.php htdocs.patch/administrator/modules/adduser.inc.php --- bh21z/administrator/modules/adduser.inc.php 2009-07-22 23:55:12.000000000 -0500 +++ htdocs.patch/administrator/modules/adduser.inc.php 2009-10-07 14:04:32.000000000 -0500 @@ -93,7 +93,7 @@ $groups = explode(",", $signup['groups']); foreach ($groups as $group) { $group = trim($group); - insert_bhdb("groups", array("username"=>$signup['username'], "group"=>$group, "status"=>"1")); + insert_bhdb("groupusers", array("username"=>$signup['username'], "group"=>$group, "status"=>"1")); } } @@ -109,4 +109,4 @@ $layout->title = $bhlang['title:add_user']; $layout->display(); -} \ No newline at end of file +} diff -Naur --exclude=filestorage --exclude=config.inc.php --exclude=install --exclude=install.bak --exclude=log bh21z/filelink.php htdocs.patch/filelink.php --- bh21z/filelink.php 2009-07-22 23:32:57.000000000 -0500 +++ htdocs.patch/filelink.php 2009-10-07 14:04:31.000000000 -0500 @@ -109,9 +109,9 @@ else { $dstr = $fullname." [".$emailfrom."]"; } # Display a page with information - $str = "".$bhlang['title:file_download']." - ".$bhlang['title:file_download']."

".$bhlang['label:from']."".$dstr."
".$bhlang['label:filename']."".$filename."
".$bhlang['label:filesize']."".bh_humanise_filesize($fileobj->fileinfo['filesize'])."
".$bhlang['label:md5']."".$fileobj->md5()."

".$bhlang['explain:filelink_download']."

".bh_parse_logvars($bhlang['button:download_file']).""; + $str = "".$bhlang['title:file_download']." + ".$bhlang['title:file_download']."

".$bhlang['label:from']."".$dstr."
".$bhlang['label:filename']."".$filename."
".$bhlang['label:filesize']."".bh_humanise_filesize($fileobj->fileinfo['filesize'])."
".$bhlang['label:md5']."".$fileobj->md5()."

".$bhlang['explain:filelink_download']."

".bh_parse_logvars($bhlang['button:download_file']).""; die($str); } -?> \ No newline at end of file +?> diff -Naur --exclude=filestorage --exclude=config.inc.php --exclude=install --exclude=install.bak --exclude=log bh21z/folderDZ.php htdocs.patch/folderDZ.php --- bh21z/folderDZ.php 2009-07-23 00:27:34.000000000 -0500 +++ htdocs.patch/folderDZ.php 2009-10-07 14:04:31.000000000 -0500 @@ -62,8 +62,7 @@ $filecode = $_GET['folderDZ']; $fileInfo = bh_folderDZ_destination($filecode); -if ($fileInfo == false) - { +if ($fileInfo == false) { bh_log(str_replace("#FILELINK", $filecode, $bhlang['log:filelink_denied']), "BH_FILELINK_ACCESSED"); bh_die("error:filecode_invalid"); } diff -Naur --exclude=filestorage --exclude=config.inc.php --exclude=install --exclude=install.bak --exclude=log bh21z/includes/db/mysql.inc.php htdocs.patch/includes/db/mysql.inc.php --- bh21z/includes/db/mysql.inc.php 2009-07-22 23:32:58.000000000 -0500 +++ htdocs.patch/includes/db/mysql.inc.php 2009-10-07 14:04:32.000000000 -0500 @@ -130,7 +130,6 @@ function select_bhdb($table, $where, $limit) { global $dbconfig; - # Create DSN $dsn = "mysql://".$dbconfig['username'].":".$dbconfig['password']."@".$dbconfig['host']."/".$dbconfig['db']; $db = NewADOConnection($dsn); @@ -332,4 +331,4 @@ } -?> \ No newline at end of file +?> diff -Naur --exclude=filestorage --exclude=config.inc.php --exclude=install --exclude=install.bak --exclude=log bh21z/includes/filelink.inc.php htdocs.patch/includes/filelink.inc.php --- bh21z/includes/filelink.inc.php 2009-07-22 23:58:12.000000000 -0500 +++ htdocs.patch/includes/filelink.inc.php 2009-10-07 14:04:32.000000000 -0500 @@ -114,4 +114,4 @@ function bh_filelink_get($filecode, $what) { $filecoderows = select_bhdb("filecodes", array("filecode"=>$filecode), ""); if (empty($filecoderows)) { return false; } else { return $filecoderows[0][$what]; } -} \ No newline at end of file +} diff -Naur --exclude=filestorage --exclude=config.inc.php --exclude=install --exclude=install.bak --exclude=log bh21z/includes/filesystem/database/filesystem.inc.php htdocs.patch/includes/filesystem/database/filesystem.inc.php --- bh21z/includes/filesystem/database/filesystem.inc.php 2009-07-22 23:32:58.000000000 -0500 +++ htdocs.patch/includes/filesystem/database/filesystem.inc.php 2009-10-07 14:04:32.000000000 -0500 @@ -621,4 +621,4 @@ } rename($absfilepath, ($bhconfig['fileroot'].bh_fpclean("/trash")."/".bh_get_filename($absfilepath))); -} \ No newline at end of file +} diff -Naur --exclude=filestorage --exclude=config.inc.php --exclude=install --exclude=install.bak --exclude=log bh21z/includes/filesystem/filesystem/filesystem.inc.php htdocs.patch/includes/filesystem/filesystem/filesystem.inc.php --- bh21z/includes/filesystem/filesystem/filesystem.inc.php 2009-07-22 23:32:58.000000000 -0500 +++ htdocs.patch/includes/filesystem/filesystem/filesystem.inc.php 2009-10-07 14:09:30.000000000 -0500 @@ -672,7 +672,8 @@ # Check their group rights $grouprows = select_bhdb("groupusers", array("username"=>$username), ""); foreach ($grouprows as $grouprow) { - if ($aclrows = select_bhdb("aclgroups", array("filepath"=>$filepath, "group"=>$group), "")) { + //if ($aclrows = select_bhdb("aclgroups", array("filepath"=>$filepath, "group"=>$group), "")) { + if ($aclrows = select_bhdb("aclgroups", array("filepath"=>$filepath, "group"=>$grouprow['group']), "")) { if ($aclrows[0]['status'] > $maxaccesslevel) { $maxaccesslevel = $aclrows[0]['status']; } } } diff -Naur --exclude=filestorage --exclude=config.inc.php --exclude=install --exclude=install.bak --exclude=log bh21z/modules/filelink.inc.php htdocs.patch/modules/filelink.inc.php --- bh21z/modules/filelink.inc.php 2009-07-22 23:55:25.000000000 -0500 +++ htdocs.patch/modules/filelink.inc.php 2009-10-07 14:04:32.000000000 -0500 @@ -34,10 +34,10 @@ if ($_POST['filemail']['notify'] == "on") { $notify = 1; } else { $notify = 0; } $expires = time() + round($expiresin*60*60*24); $filecode = bh_filelink_add($filepath, $expires, $bhsession['username'], "--none--", $notify); - $str = "
".str_replace("#EXPIRE#", $expiresin, $bhlang['text:link__expire_in_#EXPIRE#'])." ".bh_folderdz_uri($filecode)."


"; + $str = "
".str_replace("#EXPIRE#", $expiresin, $bhlang['text:link__expire_in_#EXPIRE#'])." ".bh_filelink_uri($filecode)."


"; if ((bh_get_extension($filepath) == "png")||(bh_get_extension($filepath) == "gif")||(bh_get_extension($filepath) == "jpg")||(bh_get_extension($filepath) == "jpeg")||(bh_get_extension($filepath) == "tif")||(bh_get_extension($filepath) == "tiff")||(bh_get_extension($filepath) == "bmp")) { - $str .= $bhlang['title:image_tags']."

".$bhlang['label:html']."
<img src=\"".bh_folderdz_uri($filecode)."&download=1\" />

"; - $str .= $bhlang['label:bbcode']."
[img]".bh_folderdz_uri($filecode)."&download=1[/img]
"; + $str .= $bhlang['title:image_tags']."

".$bhlang['label:html']."
<img src=\"".bh_filelink_uri($filecode)."&download=1\" />

"; + $str .= $bhlang['label:bbcode']."
[img]".bh_filelink_uri($filecode)."&download=1[/img]
"; } } } else { @@ -78,7 +78,7 @@ $findarr = array("#DATE#", "#LINK#", "#SYSTEMNAME#", "#FILENAME#", "#FILESIZE#", "#MD5#"); - $replarr = array(date("l dS F Y g:i A", $expires), bh_folderdz_uri($filecode), $bhconfig['sitename'], bh_get_filename($filepath), $filesize, $fileobj->md5()); + $replarr = array(date("l dS F Y g:i A", $expires), bh_filelink_uri($filecode), $bhconfig['sitename'], bh_get_filename($filepath), $filesize, $fileobj->md5()); $emailobj->message = $_POST['filemail']['message']."\n\n".str_replace($findarr, $replarr, $bhlang['email:filemail_footer']); if (!empty($emailfrom)) { $emailobj->from = $emailfrom; } @@ -115,4 +115,4 @@ $layoutobj->display(); } -?> \ No newline at end of file +?> diff -Naur --exclude=filestorage --exclude=config.inc.php --exclude=install --exclude=install.bak --exclude=log bh21z/modules/folderDZ.inc.php htdocs.patch/modules/folderDZ.inc.php --- bh21z/modules/folderDZ.inc.php 2009-07-22 23:55:25.000000000 -0500 +++ htdocs.patch/modules/folderDZ.inc.php 2009-10-07 14:04:32.000000000 -0500 @@ -15,13 +15,13 @@ # Test for include status if (IN_BH != 1) { header("Location: ../index.php"); die(); } - $filepath = $_GET['filepath']; if (empty($filepath)) { $filepath = $_POST['filepath']; } if (empty($filepath)) { bh_die("error:no_filepath"); } $filepath = bh_fpclean($filepath); # See if we have details passed to us in the POST if (!empty($_POST['folderdz'])) { + $folderQuota = $_POST['folderdz']['quota']; # Check to see if we email or not if ($_POST['folderdz']['linkonly'] == "on") { # Check quota @@ -81,7 +81,7 @@ $userobj = new bhuser($bhsession['username']); $emailfrom = $userobj->userinfo['email']; - $filecode = bh_folderDZ_add($filepath, $expires, $bhsession['username'], $email, $notify, $folderQuota); + $filecode = bh_folderDZ_add($filepath, $expires, $bhsession['username'], $email, $notify, $folderQuota*1000000); $emailobj = new bhemail($email); $emailobj->subject = $_POST['folderdz']['subject']; @@ -127,4 +127,4 @@ $layoutobj->display(); } -?> \ No newline at end of file +?>