[Openupload-svn-update] SF.net SVN: openupload:[231] trunk/www
Status: Beta
Brought to you by:
tsdogs
|
From: <ts...@us...> - 2009-02-05 15:43:24
|
Revision: 231
http://openupload.svn.sourceforge.net/openupload/?rev=231&view=rev
Author: tsdogs
Date: 2009-02-05 15:43:20 +0000 (Thu, 05 Feb 2009)
Log Message:
-----------
Add shorter links handling
Add options for configuring ids length and form
Modified Paths:
--------------
trunk/www/index.php
trunk/www/setup.inc.php
Modified: trunk/www/index.php
===================================================================
--- trunk/www/index.php 2009-02-05 15:42:46 UTC (rev 230)
+++ trunk/www/index.php 2009-02-05 15:43:20 UTC (rev 231)
@@ -32,15 +32,22 @@
define ('__VALID_CALLING_SCRIPT',true);
-/* check authentication */
-if (isset($_GET['action'])) {
+/* disable notice error reporting */
+ini_set('error_reporting','E_ALL & ~E_NOTICE');
+
+/* check action */
+if (isset($_GET['a'])) {
+ $action = $_GET['a'];
+} else if (isset($_GET['action'])) {
$action = $_GET['action'];
} else if (isset($_POST['action'])) {
$action = $_POST['action'];
} else {
$action = '';
}
-if (isset($_GET['step'])) {
+if (isset($_GET['s'])) {
+ $step = $_GET['s'];
+} else if (isset($_GET['step'])) {
$step = $_GET['step'];
} else if (isset($_POST['step'])) {
$step = $_POST['step'];
Modified: trunk/www/setup.inc.php
===================================================================
--- trunk/www/setup.inc.php 2009-02-05 15:42:46 UTC (rev 230)
+++ trunk/www/setup.inc.php 2009-02-05 15:43:20 UTC (rev 231)
@@ -695,6 +695,9 @@
$CONFIG['site']['footer']=str_replace('\"','"',$_POST['sitefooter']);
$CONFIG['registration']['email_confirm']=isset($_POST['confirmregistration'])?$_POST['confirmregistration']:'no';
$CONFIG['max_upload_size']=$_POST['max_upload_size'];
+ $CONFIG['use_short_links']=isset($_POST['use_short_links'])?$_POST['use_short_links']:'no';
+ $CONFIG['id_max_length']=$_POST['id_max_length'];
+ $CONFIG['id_use_alpha']=isset($_POST['id_use_alpha'])?$_POST['id_use_alpha']:'no';
$CONFIG['max_download_time']=$_POST['max_download_time'];
$CONFIG['multiupload']=$_POST['multiupload'];
$CONFIG['progress']=$_POST['progress'];
@@ -726,6 +729,10 @@
$error = true;
msg('Please insert a maximum download time','fail');
}
+ if ($CONFIG['id_max_length']=='') {
+ $error = true;
+ msg('Please insert the IDs length','fail');
+ }
if ($CONFIG['multiupload']<1) {
$error = true;
msg('Please insert a max number of uploaded files per upload','fail');
@@ -749,6 +756,9 @@
$CONFIG['site']['template'] = 'default';
$CONFIG['registration']['email_confirm']='yes';
$CONFIG['max_upload_size']=100;
+ $CONFIG['use_short_links']='yes';
+ $CONFIG['id_max_length']=10;
+ $CONFIG['id_use_alpha']='yes';
$CONFIG['max_download_time']=120;
$CONFIG['multiupload']=1;
$CONFIG['progress']=$_SESSION['progress_values'][count($_SESSION['progress_values'])-1];
@@ -798,6 +808,9 @@
<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>Use Short Links?:</td><td><input type="checkbox" name="use_short_links" value="yes" <?php if ($CONFIG['use_short_links']=='yes') echo 'checked'; ?> ></td></tr>
+<tr><td>Length of IDs (suggested min 6):</td><td><input type="text" name="id_max_length" value="<?php echo $CONFIG['id_max_length']; ?>"></td></tr>
+<tr><td>Use alphanumeric IDs?:</td><td><input type="checkbox" name="id_use_alpha" value="yes" <?php if ($CONFIG['id_use_alpha']=='yes') echo 'checked'; ?> ></td></tr>
<tr><td>Upload tracking method:</td><td><select name="progress">
<?php
foreach ($_SESSION['progress_values'] as $v) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|