[Openupload-svn-update] SF.net SVN: openupload:[161] trunk/www/setup.inc.php
Status: Beta
Brought to you by:
tsdogs
|
From: <ts...@us...> - 2008-11-20 15:09:44
|
Revision: 161
http://openupload.svn.sourceforge.net/openupload/?rev=161&view=rev
Author: tsdogs
Date: 2008-11-20 15:09:40 +0000 (Thu, 20 Nov 2008)
Log Message:
-----------
fix number of uploads, and add progress tracking method.
Modified Paths:
--------------
trunk/www/setup.inc.php
Modified: trunk/www/setup.inc.php
===================================================================
--- trunk/www/setup.inc.php 2008-11-19 20:17:54 UTC (rev 160)
+++ trunk/www/setup.inc.php 2008-11-20 15:09:40 UTC (rev 161)
@@ -277,6 +277,7 @@
function setupcheck($step) {
global $_POST;
+ global $_SESSION;
$message = 'Let\'s check your php installation';
if (isset($_POST['check'])) {
@@ -323,7 +324,32 @@
msg('GD Support: not found','fail');
msg('GD is needed for captcha plugin');
}
+ echo '<div id="message"><b>Upload progress traking (only one is needed)</b></div>';
+ $progress_values = array('none');
+ if (function_exists('uploadprogress_get_info')) {
+ msg('UploadProgress Support: exsists','ok');
+ $progress_values[]='uploadprogress';
+ } else {
+ msg('UploadProgress: not found','fail');
+ }
+ if (function_exists('apc_fetch')) {
+ $msg = 'APC Support: exsists';
+ if (ini_get('apc.enabled')) {
+ $msg .= ', Enabled: yes';
+ if (ini_get('apc.rfc1867')) {
+ $progress_values[]='apc';
+ msg($msg.', rfc1867 enabled: yes','ok');
+ } else {
+ msg($msg.', rfc1867 enabled: NO','fail');
+ }
+ } else {
+ msg($msg.', Enabled: NO','fail');
+ }
+ } else {
+ msg('APC: not found','fail');
+ }
echo '<hr>';
+ $_SESSION['progress_values']=$progress_values;
$checked = true;
$message ='If everything looks good proceed!';
}
@@ -558,6 +584,7 @@
function options($step) {
global $_POST;
global $CONFIG;
+ global $_SESSION;
$tr = listModules($CONFIG['INSTALL_ROOT'].'/lib/modules/tr');
$auth = listModules($CONFIG['INSTALL_ROOT'].'/lib/modules/auth');
@@ -575,7 +602,8 @@
$CONFIG['registration']['email_confirm']=isset($_POST['confirmregistration'])?$_POST['confirmregistration']:'no';
$CONFIG['max_upload_size']=$_POST['max_upload_size'];
$CONFIG['max_download_time']=$_POST['max_download_time'];
- $CONFIG['multiupload']=$_POST['max_download_time'];
+ $CONFIG['multiupload']=$_POST['multiupload'];
+ $CONFIG['progress']=$_POST['progress'];
if ($CONFIG['translator']=='') {
$error = true;
@@ -605,6 +633,10 @@
$error = true;
msg('Please insert a max number of uploaded files per upload','fail');
}
+ if ($CONFIG['progress']=='') {
+ $error = true;
+ msg('Please select a method to trak the uploaded files','fail');
+ }
if (!$error) {
return $step+1;
}
@@ -621,6 +653,7 @@
$CONFIG['max_upload_size']=100;
$CONFIG['max_download_time']=120;
$CONFIG['multiupload']=1;
+ $CONFIG['progress']=$_SESSION['progress_values'][count($_SESSION['progress_values'])-1];
}
?>
<form method="POST" action="index.php">
@@ -664,6 +697,14 @@
<tr><td>Maximum upload size (in MB):</td><td><input type="text" name="max_upload_size" value="<?php echo $CONFIG['max_upload_size']; ?>"></td></tr>
<tr><td>Maximum download time (in Min)<br>0 disables it:</td><td><input type="text" name="max_download_time" value="<?php echo $CONFIG['max_download_time']; ?>"></td></tr>
<tr><td>Max num. of file uploaded per upload:</td><td><input type="text" name="multiupload" value="<?php echo $CONFIG['multiupload']; ?>"></td></tr>
+<tr><td>Upload tracking method:</td><td><select name="progress">
+<?php
+ foreach ($_SESSION['progress_values'] as $v) {
+ $sel = $CONFIG['progress']==$v?'selected':'';
+ echo '<option value="'.$v.'" '.$sel.'>'.$v.'</option>';
+ }
+?>
+</select></td></tr>
<TR><TD colspan="2"><input type="submit" value="Next >>"></TD></TR>
</table>
</form>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|