openupload-svn-update Mailing List for Open Upload (Page 12)
Status: Beta
Brought to you by:
tsdogs
You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(100) |
Nov
(72) |
Dec
(44) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(7) |
Feb
(47) |
Mar
(30) |
Apr
(11) |
May
(10) |
Jun
(8) |
Jul
(1) |
Aug
(22) |
Sep
|
Oct
|
Nov
(13) |
Dec
|
| 2010 |
Jan
|
Feb
|
Mar
(17) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(10) |
Dec
(1) |
| 2011 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ts...@us...> - 2008-11-06 12:40:04
|
Revision: 121
http://openupload.svn.sourceforge.net/openupload/?rev=121&view=rev
Author: tsdogs
Date: 2008-11-06 12:39:52 +0000 (Thu, 06 Nov 2008)
Log Message:
-----------
Add initial language administration
Modified Paths:
--------------
trunk/templates/default/modules/admin/adminmenu.tpl
Modified: trunk/templates/default/modules/admin/adminmenu.tpl
===================================================================
--- trunk/templates/default/modules/admin/adminmenu.tpl 2008-11-06 12:39:41 UTC (rev 120)
+++ trunk/templates/default/modules/admin/adminmenu.tpl 2008-11-06 12:39:52 UTC (rev 121)
@@ -6,7 +6,8 @@
<li><a href="{$script}?action=adminusers">{tr}Users{/tr}</a></li>
<li><a href="{$script}?action=admingroups">{tr}Groups{/tr}</a></li>
<li><a href="{$script}?action=adminrights">{tr}Rights{/tr}</a></li>
+ <li><a href="{$script}?action=adminlangs">{tr}Languages{/tr}</a></li>
<li style="border-right: 0px;"><a href="{$script}?action=adminbanned">{tr}Banned{/tr}</a></li>
</ul>
</div>
-<hr>
\ No newline at end of file
+<br>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-06 12:39:50
|
Revision: 120
http://openupload.svn.sourceforge.net/openupload/?rev=120&view=rev
Author: tsdogs
Date: 2008-11-06 12:39:41 +0000 (Thu, 06 Nov 2008)
Log Message:
-----------
Add initial language administration
Modified Paths:
--------------
trunk/templates/default/modules/admin/admin.tpl
Modified: trunk/templates/default/modules/admin/admin.tpl
===================================================================
--- trunk/templates/default/modules/admin/admin.tpl 2008-11-06 12:39:02 UTC (rev 119)
+++ trunk/templates/default/modules/admin/admin.tpl 2008-11-06 12:39:41 UTC (rev 120)
@@ -11,7 +11,7 @@
<td align="center"><a href="{$script}?action=adminrights"><img src="{tpl file=/img/admin/rights.png}" border="0" ><br>{tr}Rights{/tr}</a></td>
</tr>
<tr>
- <td align="center"> </td>
+ <td align="center"><a href="{$script}?action=adminlangs"><img src="{tpl file=/img/admin/langs.png}" border="0" ><br>{tr}Languages{/tr}</a></td>
<td align="center"><a href="{$script}?action=adminbanned"><img src="{tpl file=/img/admin/banned.png}" border="0" ><br>{tr}Banned IPs{/tr}</a></td>
<td align="center"> </td>
</tr>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-06 12:39:12
|
Revision: 119
http://openupload.svn.sourceforge.net/openupload/?rev=119&view=rev
Author: tsdogs
Date: 2008-11-06 12:39:02 +0000 (Thu, 06 Nov 2008)
Log Message:
-----------
Add initial language administration
fix bug #2225762 (group editing)
fix bug #2229204 (user password change admin)
Modified Paths:
--------------
trunk/lib/modules/default/admin.inc.php
Modified: trunk/lib/modules/default/admin.inc.php
===================================================================
--- trunk/lib/modules/default/admin.inc.php 2008-11-06 12:36:44 UTC (rev 118)
+++ trunk/lib/modules/default/admin.inc.php 2008-11-06 12:39:02 UTC (rev 119)
@@ -51,6 +51,13 @@
3 => "bannededit",
4 => "banneddel",
),
+ "adminlangs" => array (
+ 1 => "langs",
+ 2 => "langadd",
+ 3 => "langedit",
+ 4 => "langdel",
+ 5 => "langtoggle",
+ ),
);
var $page;
@@ -156,8 +163,9 @@
$groups = app()->auth->groupinfo();
$this->tpl->assign('groups',$groups);
if (isset($_POST['login'])) {
+ $pwd = false;
$user = app()->auth->userinfo($_POST['login']);
- $user = $user[0];
+ //$user = $user[0];
$user['name']=$_POST['editusername'];
$user['group_name']=$_POST['editusergroup'];
$user['email']=$_POST['edituseremail'];
@@ -172,15 +180,17 @@
app()->error('Passwords do not correspond!');
$error = true;
}
- if (!$error)
- $user['password']=crypt($_POST['edituserpassword']);
+ if (!$error) {
+ $user['password']=$_POST['edituserpassword'];
+ $pwd = true;
+ }
}
if (!validEmail($_POST['edituseremail'])) {
app()->error('e-mail is not a valid address!');
$error = true;
}
if (!$error) {
- app()->auth->useredit($user);
+ app()->auth->useredit($user,$pwd);
/* redirect */
$this->nextStep(1);
}
@@ -202,31 +212,40 @@
function groupadd() {
global $_POST;
- if (isset($_POST['addgroupname'])) {
- $group['name']=$_POST['addgroupname'];
- $group['description']=$_POST['addgroupdescription'];
- if ($group['name']!='') {
- app()->auth->groupadd($group);
- $this->nextStep(1);
- } else {
- app()->error(tr('Please provide a valid group name!'));
+ if (app()->auth->features['groupadmin']=='yes') {
+ if (isset($_POST['addgroupname'])) {
+ $group['name']=$_POST['addgroupname'];
+ $group['description']=$_POST['addgroupdescription'];
+ if ($group['name']!='') {
+ app()->auth->groupadd($group);
+ $this->nextStep(1);
+ } else {
+ app()->error(tr('Please provide a valid group name!'));
+ }
}
+ app()->tpl->assign('group',$group);
+ } else {
+ app()->error(tr('Group administration not supported by Auth Module'));
}
- app()->tpl->assign('group',$group);
}
function groupedit() {
global $_POST;
global $_GET;
- $group = app()->auth->groupinfo();
- $group = $group[0];
- if (isset($_POST['editgroupname'])) {
- $group['name']=$_POST['editgroupname'];
- $group['description']=$_POST['editgroupdescription'];
- $this->nextStep(1);
+ if (app()->auth->features['groupadmin']=='yes') {
+ $id = isset($_POST['editgroupname'])?$_POST['editgroupname']:$_GET['id'];
+ $group = app()->auth->groupinfo($id);
+ if (isset($_POST['editgroupname'])) {
+ $group['name']=$_POST['editgroupname'];
+ $group['description']=$_POST['editgroupdescription'];
+ app()->auth->groupedit($group);
+ $this->nextStep(1);
+ }
+ app()->tpl->assign('group',$group);
+ } else {
+ app()->error(tr('Group administration not supported by Auth Module'));
}
- app()->tpl->assign('group',$group);
}
function groupdel() {
@@ -562,6 +581,53 @@
}
function banneddown() {
}
-
+
+ function langs() {
+ $langs = app()->db->read('langs');
+ $this->tpl->assign('langlist',$langs);
+ }
+
+ function langadd() {
+ }
+
+ function langedit() {
+ global $_GET;
+
+ if (isset($_POST['id'])) {
+ $lang = app()->db->read('langs',array('id' => $_POST['id']));
+ $lang = $lang[0];
+ $lang['name']=$_POST['editlangname'];
+ $lang['locale']=$_POST['editlanglocale'];
+ $lang['browser']=$_POST['editlangbrowser'];
+ $lang['charset']=$_POST['editlangcharset'];
+ $lang['active']=isset($_POST['editlangactive'])?1:0;
+ //$this->tpl->assign('lang' , $lang[0]);
+ app()->db->update('langs',$lang,array('id' => $_POST['id']));
+ $this->nextStep(1);
+ } else if (isset($_GET['id'])) {
+ $lang = app()->db->read('langs',array('id' => $_GET['id']));
+ $this->tpl->assign('lang', $lang[0]);
+ } else {
+ $this->nextStep(1);
+ }
+ }
+
+ function langdel() {
+ }
+
+ function langtoggle() {
+ global $_GET;
+
+ if (isset($_GET['id'])) {
+ $active=$_GET['active']==1?0:1;
+ $lang = app()->db->read('langs',array('id' => $_GET['id']));
+ $lang = $lang[0];
+ if ($lang['id']==$_GET['id']) {
+ $lang['active']=$active;
+ app()->db->update('langs',$lang,array('id' => $_GET['id']),array('active'));
+ }
+ }
+ $this->nextStep(1);
+ }
}
?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-06 12:36:54
|
Revision: 118
http://openupload.svn.sourceforge.net/openupload/?rev=118&view=rev
Author: tsdogs
Date: 2008-11-06 12:36:44 +0000 (Thu, 06 Nov 2008)
Log Message:
-----------
return correct group info (fix bug #2225762)
Modified Paths:
--------------
trunk/lib/modules/auth/default.inc.php
Modified: trunk/lib/modules/auth/default.inc.php
===================================================================
--- trunk/lib/modules/auth/default.inc.php 2008-11-06 12:35:53 UTC (rev 117)
+++ trunk/lib/modules/auth/default.inc.php 2008-11-06 12:36:44 UTC (rev 118)
@@ -31,9 +31,9 @@
function groupinfo($group = '') {
if ($group != '') {
$result = $this->db->read('groups',array('name' => $group));
- return $result[0]['name'];
+ return $result[0];
} else {
- $result = $this->db->read('groups');
+ $result = $this->db->read('groups',array(),array('name'));
return $result;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-06 12:36:03
|
Revision: 117
http://openupload.svn.sourceforge.net/openupload/?rev=117&view=rev
Author: tsdogs
Date: 2008-11-06 12:35:53 +0000 (Thu, 06 Nov 2008)
Log Message:
-----------
Enable only active languages
Modified Paths:
--------------
trunk/lib/main.inc.php
Modified: trunk/lib/main.inc.php
===================================================================
--- trunk/lib/main.inc.php 2008-11-06 12:12:13 UTC (rev 116)
+++ trunk/lib/main.inc.php 2008-11-06 12:35:53 UTC (rev 117)
@@ -59,7 +59,7 @@
$tr = $trname.'Translator';
$this->tr = new $tr();
- $this->langs = $this->db->read('langs',array(),array('id'),'',array('id'));
+ $this->langs = $this->db->read('langs',array('active' => '1'),array('id'),'',array('id'));
/* check if it was forced */
if (isset($_GET['lang'])) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-06 12:12:33
|
Revision: 116
http://openupload.svn.sourceforge.net/openupload/?rev=116&view=rev
Author: tsdogs
Date: 2008-11-06 12:12:13 +0000 (Thu, 06 Nov 2008)
Log Message:
-----------
update to better work with IE / Firefox
Modified Paths:
--------------
trunk/templates/default/modules/admin/plugins.tpl
Modified: trunk/templates/default/modules/admin/plugins.tpl
===================================================================
--- trunk/templates/default/modules/admin/plugins.tpl 2008-11-06 12:11:47 UTC (rev 115)
+++ trunk/templates/default/modules/admin/plugins.tpl 2008-11-06 12:12:13 UTC (rev 116)
@@ -1,9 +1,11 @@
{include file="default/modules/admin/adminmenu.tpl"}
<br>
+<center>
<table border="0" width="400" height="200">
<tr>
<td align="center"><a href="{$script}?action=adminpluginsacl"><img src="{tpl file=/img/admin/plugins.png}" border="0" ><br>{tr}Plugins ACL{/tr}</a></td>
<td align="center"><a href="{$script}?action=adminpluginsoptions"><img src="{tpl file=/img/admin/plugins.png}" border="0" align="center"><br>{tr}Plugins Options{/tr}</a></td>
</tr>
{$plugins}
-</table>
\ No newline at end of file
+</table>
+</center>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-06 12:11:59
|
Revision: 115
http://openupload.svn.sourceforge.net/openupload/?rev=115&view=rev
Author: tsdogs
Date: 2008-11-06 12:11:47 +0000 (Thu, 06 Nov 2008)
Log Message:
-----------
update to better work with IE / Firefox
Modified Paths:
--------------
trunk/templates/default/modules/files/uploadForm.tpl
Modified: trunk/templates/default/modules/files/uploadForm.tpl
===================================================================
--- trunk/templates/default/modules/files/uploadForm.tpl 2008-11-06 12:11:30 UTC (rev 114)
+++ trunk/templates/default/modules/files/uploadForm.tpl 2008-11-06 12:11:47 UTC (rev 115)
@@ -14,7 +14,7 @@
<input type="hidden" name="MAX_FILE_SIZE" value="{$user.max_upload_size}">
{/if}
{tr}Select the file to be uploaded{/tr}<br>
- <input type="file" class="file" size="50" name="upload" onchange="if (this.value!='') unhide();"><br>
+ <input type="file" class="file" size="60" name="upload" onchange="if (this.value!='') unhide();"><br>
{if isset($user.max_upload_size)}
<div id="msg">{tr}Maximum allowed upload size{/tr}: {$user.max_upload_size|fsize_format:"MB":0}</div>
{/if}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-06 12:11:40
|
Revision: 114
http://openupload.svn.sourceforge.net/openupload/?rev=114&view=rev
Author: tsdogs
Date: 2008-11-06 12:11:30 +0000 (Thu, 06 Nov 2008)
Log Message:
-----------
update to better work with IE / Firefox
Modified Paths:
--------------
trunk/templates/default/index.tpl
Modified: trunk/templates/default/index.tpl
===================================================================
--- trunk/templates/default/index.tpl 2008-11-06 12:09:04 UTC (rev 113)
+++ trunk/templates/default/index.tpl 2008-11-06 12:11:30 UTC (rev 114)
@@ -8,11 +8,13 @@
<div id="header">
<div id="logo"><img src="{tpl file=/img/openupload.jpg}" border="0"></div>
<div id="langs">
+{if count($langs)>1}
<ul>
{foreach from=$langs item=l name=c}
<li {if $smarty.foreach.c.last} style="border: 0px"{/if}><a href="{$script}?lang={$l.id}">{$l.name}</a></li>
{/foreach}
</ul>
+{/if}
</div>
<div id="userinfo">
{$user.name}
@@ -29,12 +31,12 @@
<!-- menu -->
<!-- content -->
<div id="wrapper">
-<div id="content">
+<div id="content" align="center">
{foreach from=$user.messages item=m}
<div id="message">{$m}</div>
{/foreach}
{foreach from=$user.errors item=e}
-<div id="error" style="color: #ff0000; font-weight: bold;">{$e}</div>
+<div id="error">{$e}</div>
{/foreach}
{$page.content}
</div> <!-- content end -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-06 12:09:16
|
Revision: 113
http://openupload.svn.sourceforge.net/openupload/?rev=113&view=rev
Author: tsdogs
Date: 2008-11-06 12:09:04 +0000 (Thu, 06 Nov 2008)
Log Message:
-----------
update to better work with IE / Firefox
Modified Paths:
--------------
trunk/www/templates/default/main.css
Modified: trunk/www/templates/default/main.css
===================================================================
--- trunk/www/templates/default/main.css 2008-11-06 11:20:52 UTC (rev 112)
+++ trunk/www/templates/default/main.css 2008-11-06 12:09:04 UTC (rev 113)
@@ -1,7 +1,8 @@
body {
- font-family: Helvetica, Arial;
+ font-family: Arial,Helvetica;
font-size: 10pt;
margin: auto;
+ text-align: center;
}
#logo {
float:left;
@@ -32,6 +33,7 @@
padding-left: 8px;
border-right: 1px solid #000000;
}
+
#title {
background-color: #3161cf;
color: #ffffff;
@@ -41,6 +43,7 @@
padding-left: 160px;
padding-top: 3px;
padding-bottom:3px;
+ text-align: left;
}
#menu {
bottom: 0px;
@@ -61,15 +64,23 @@
#wrapper {
clear: both;
margin: 0 auto;
- text-align: center;
- padding-top: 50px;
- overflow: auto;
+ display: inline-block;
+ padding-top: 5px;
+ padding-bottom: 20px;
+ height: -200px;
}
#content {
- margin: 0 auto;
- display: inline-block;
- text-align: left;
+ display: table;
+ text-align: center;
+ padding: 10px;
+ padding-top: 20px;
}
+#upload {
+ display: table-cell;
+ width: 500px;
+ text-align: left;
+ padding-top: 20px;
+}
#uploadbutton {
text-align: center;
margin: 0 auto;
@@ -136,7 +147,7 @@
}
fieldset {
border: 1px solid #2d55b4;
- width: 30em
+ width: 25em
}
legend {
color: #ffffff;
@@ -178,4 +189,20 @@
background-color: #ededed;
text-align: center;
vertical-align: middle;
+}
+#message {
+ text-align: left;
+}
+#error {
+ color: #ff0000;
+ font-weight: bold;
+ text-align: left;
+}
+#toolbar {
+ display: block;
+ text-align: left;
+}
+
+td {
+ font-size: 10pt;
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-06 11:21:03
|
Revision: 112
http://openupload.svn.sourceforge.net/openupload/?rev=112&view=rev
Author: tsdogs
Date: 2008-11-06 11:20:52 +0000 (Thu, 06 Nov 2008)
Log Message:
-----------
Fix bug #2229163 user password change now works again
Modified Paths:
--------------
trunk/lib/modules/default/auth.inc.php
Modified: trunk/lib/modules/default/auth.inc.php
===================================================================
--- trunk/lib/modules/default/auth.inc.php 2008-11-04 18:52:30 UTC (rev 111)
+++ trunk/lib/modules/default/auth.inc.php 2008-11-06 11:20:52 UTC (rev 112)
@@ -262,7 +262,7 @@
}
}
if (!$error) {
- app()->auth->useredit($user);
+ app()->auth->useredit($user,true);
app()->user->set($user);
$this->nextStep(1);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-04 18:52:44
|
Revision: 111
http://openupload.svn.sourceforge.net/openupload/?rev=111&view=rev
Author: tsdogs
Date: 2008-11-04 18:52:30 +0000 (Tue, 04 Nov 2008)
Log Message:
-----------
fix footer transparency
Modified Paths:
--------------
trunk/www/templates/default/main.css
Modified: trunk/www/templates/default/main.css
===================================================================
--- trunk/www/templates/default/main.css 2008-11-04 18:51:42 UTC (rev 110)
+++ trunk/www/templates/default/main.css 2008-11-04 18:52:30 UTC (rev 111)
@@ -63,6 +63,7 @@
margin: 0 auto;
text-align: center;
padding-top: 50px;
+ overflow: auto;
}
#content {
margin: 0 auto;
@@ -88,6 +89,7 @@
font-size: 9pt;
border-top: 1px solid #000000;
text-align: center;
+ background-color: #ffffff;
}
#footer a {
color: #3161cf;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-04 18:51:52
|
Revision: 110
http://openupload.svn.sourceforge.net/openupload/?rev=110&view=rev
Author: tsdogs
Date: 2008-11-04 18:51:42 +0000 (Tue, 04 Nov 2008)
Log Message:
-----------
Change rights administration
Modified Paths:
--------------
trunk/templates/default/modules/admin/rightedit.tpl
trunk/templates/default/modules/admin/rights.tpl
Modified: trunk/templates/default/modules/admin/rightedit.tpl
===================================================================
--- trunk/templates/default/modules/admin/rightedit.tpl 2008-11-04 18:50:53 UTC (rev 109)
+++ trunk/templates/default/modules/admin/rightedit.tpl 2008-11-04 18:51:42 UTC (rev 110)
@@ -1,29 +1,44 @@
{include file="default/modules/admin/adminmenu.tpl"}
-
-<form action="{$script}" method="post">
+<div id="message" style="color: #ffaa00; font-size: 11pt; font-weight: bold;">{tr}PLEASE BE CAREFULL WHEN MODIFING THE RIGHTS!{/tr}</div><br>
+<div id="message" style="color: #000000; font-size: 12pt; font-weight: bold;">{tr}Editing rights for group{/tr}:
+{if $group=='*'}[{tr}Any{/tr}]{else}{$group}{/if}</div>
+<br>
+<form action="{$script}" method="POST">
<input type="hidden" name="action" value="{$action}">
<input type="hidden" name="step" value="{$step}">
-<input type="hidden" name="editaclid" value="{$right.id}">
-<table border="0">
-<tr><td>{tr}Group{/tr}:</td><td>
-<select name="editrightgroup">
-{foreach from=$groups item=g}
-<option value="{$g.name}" {if $g.name==$right.group_name}selected{/if}>{$g.name}</option>
+<input type="hidden" name="id" value="{$group}">
+<table border="0" id="dbtable">
+<tr>
+ <th>{tr}Module{/tr}</th>
+ <th>{tr}Action{/tr}</th>
+ <th>{tr}Right{/tr}</th>
+ <th>{tr}Resulting ACL{/tr}</th>
+ <th>{tr}From ACL{/tr}</th>
+</tr>
+{foreach from=$modules key=mk item=m}
+ {cycle values="row1,row2" advance=false assign=rid1}
+<tr>
+ <td id="{$rid1}" width="150" style="vertical-align: top;" rowspan="{$m.actions|@count}">{$m.name}</td>
+ {foreach from=$m.actions key=ak item=ai}
+ {cycle values="row1,row2" advance=true assign=rid2}
+ <td width="200" id="{$rid2}" style="text-align: left; vertical-align: top;">
+ {if $ak=='*'}[{tr}default{/tr}]{else}{$ak}{/if}
+ </td>
+ <td id="{$rid2}" style="text-align: left;">
+ <select name="right_{$mk}_{$ak}">
+ {html_options options=$access selected=$rights[$group][$mk][$ak].access}</select>
+ </td>
+ <td width="100" id="{$rid2}" style="text-align: center; vertical-align: top;">{$rights[$group][$mk][$ak].result}
+ </td>
+ <td id="{$rid2}" style="text-align: left;">
+ {tr}Group{/tr}: {$rights[$group][$mk][$ak].comb.group} |
+ {tr}Module{/tr}: {$rights[$group][$mk][$ak].comb.module} |
+ {tr}Action{/tr}: {$rights[$group][$mk][$ak].comb.action}
+ </td>
+</tr>
+ {/foreach}
{/foreach}
-</select></td></tr>
-<tr><td>{tr}Module{/tr}:</td><td>
-<select name="editrightmodule">
-{foreach from=$modules item=m}
-<option value="{$m}" {if $m==$right.module}selected{/if}>{$m}</option>
-{/foreach}
-</select></td></tr>
-<tr><td>{tr}Action{/tr}:</td><td><input type="text" name="editrightaction" value="{$right.action}"></td></tr>
-<tr><td>{tr}Access{/tr}:</td><td>
-<select name="editrightaccess">
-{foreach from=$access item=a key=k}
-<option value="{$k}" {if $k==$right.access}selected{/if}>{$a}</option>
-{/foreach}
-</select></td></tr>
-<tr><td colspan="2" align=right><input type="submit" class="submit" value="{tr}Confirm{/tr}"></td></tr>
-</table>
-</form>
\ No newline at end of file
+</table><br>
+<input type="button" class="submit" value="{tr}<< Back{/tr}" onclick="document.location='{$script}?action={$action}';">
+<input type="submit" class="submit" value="{tr}Apply changes{/tr}">
+</form>
Modified: trunk/templates/default/modules/admin/rights.tpl
===================================================================
--- trunk/templates/default/modules/admin/rights.tpl 2008-11-04 18:50:53 UTC (rev 109)
+++ trunk/templates/default/modules/admin/rights.tpl 2008-11-04 18:51:42 UTC (rev 110)
@@ -1,32 +1,17 @@
{include file="default/modules/admin/adminmenu.tpl"}
-<div id="toolbar">
-<a href="{$script}?action={$action}&step=2&id={$u.id}"><img src="{tpl file=/img/admin/tadd_right.png}"></a>
-<img src="{tpl file=/img/admin/tdelete.png}">
-</div>
<br>
<table border="0" id="dbtable">
<tr>
- <th width="10">S</th>
- <th width="50">Id</th>
- <th width="200">Group</th>
- <th width="100">Module</th>
- <th width="100">Action</th>
- <th width="200">Right</th>
- <th width="100">Actions</th>
+ <th width="100">Name</th>
+ <th width="200">Description</th>
+ <th width="100">Rights set?</th>
</tr>
-{foreach from=$rights item=r}
+{foreach from=$groups item=g}
{cycle values="row1,row2" advance=true assign=rid}
<tr>
- <td id="{$rid}"><input type="checkbox" name="right_{$r.id}" value="1"></td>
- <td id="{$rid}"><a href="{$script}?action={$action}&step=3&id={$r.id}">{$r.id}</a></td>
- <td id="{$rid}">{$r.group_name}</td>
- <td id="{$rid}">{$r.module}</td>
- <td id="{$rid}">{$r.action}</td>
- <td id="{$rid}">{$r.access}</td>
- <td id="{$rid}">
- <a href="{$script}?action={$action}&step=3&id={$r.id}"><img src="{tpl file=/img/admin/edit_right.png}"></a>
-
- <a href="{$script}?action={$action}&step=4&id={$r.id}"><img src="{tpl file=/img/admin/delete.png}"></a></td>
+ <td id="{$rid}" style="text-align:left"><a href="{$script}?action=adminrights&step=2&id={$g.name}">{if $g.name=='*'}[{tr}Any{/tr}]{else}{$g.name}{/if}</a></td>
+ <td id="{$rid}">{$g.description}</td>
+ <td id="{$rid}">{if isset($rights[$g.name])}{tr}Yes{/tr}{else}{tr}No{/tr}{/if}</td>
</tr>
{/foreach}
</table>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-04 18:50:57
|
Revision: 109
http://openupload.svn.sourceforge.net/openupload/?rev=109&view=rev
Author: tsdogs
Date: 2008-11-04 18:50:53 +0000 (Tue, 04 Nov 2008)
Log Message:
-----------
delete files now works bug: #2221934
Modified Paths:
--------------
trunk/templates/default/modules/admin/files.tpl
Modified: trunk/templates/default/modules/admin/files.tpl
===================================================================
--- trunk/templates/default/modules/admin/files.tpl 2008-11-04 18:49:48 UTC (rev 108)
+++ trunk/templates/default/modules/admin/files.tpl 2008-11-04 18:50:53 UTC (rev 109)
@@ -32,7 +32,7 @@
<img align="right" src="{tpl file=/img/admin/ban.png}" ></a>{$f.ip} </td>
<td id="{$rid}">{$f.upload_date}</td>
<td id="{$rid}">
- <a title="delete" href="{$script}?action={$action}&step=4&id={$f.id}"><img src="{tpl file=/img/admin/delete.png}"></a></td>
+ <a title="delete" href="{$script}?action={$action}&step=2&id={$f.id}"><img src="{tpl file=/img/admin/delete.png}"></a></td>
</tr>
{/foreach}
</table>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-04 18:49:52
|
Revision: 108
http://openupload.svn.sourceforge.net/openupload/?rev=108&view=rev
Author: tsdogs
Date: 2008-11-04 18:49:48 +0000 (Tue, 04 Nov 2008)
Log Message:
-----------
fix footer overriding content
Modified Paths:
--------------
trunk/templates/default/index.tpl
Modified: trunk/templates/default/index.tpl
===================================================================
--- trunk/templates/default/index.tpl 2008-11-04 18:46:28 UTC (rev 107)
+++ trunk/templates/default/index.tpl 2008-11-04 18:49:48 UTC (rev 108)
@@ -39,6 +39,7 @@
{$page.content}
</div> <!-- content end -->
</div>
+<br> <br>
<!-- footer -->
<div id="footer">{$site.footer}</div>
</body>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-04 18:46:37
|
Revision: 107
http://openupload.svn.sourceforge.net/openupload/?rev=107&view=rev
Author: tsdogs
Date: 2008-11-04 18:46:28 +0000 (Tue, 04 Nov 2008)
Log Message:
-----------
Change rights administration
delete files now works
Modified Paths:
--------------
trunk/lib/modules/default/admin.inc.php
Modified: trunk/lib/modules/default/admin.inc.php
===================================================================
--- trunk/lib/modules/default/admin.inc.php 2008-11-04 18:00:26 UTC (rev 106)
+++ trunk/lib/modules/default/admin.inc.php 2008-11-04 18:46:28 UTC (rev 107)
@@ -19,6 +19,9 @@
),
"adminpluginsoptions" => array (
1 => "pluginoptions",
+ 2 => "pluginoptionadd",
+ 3 => "pluginoptionedit",
+ 4 => "pluginoptiondelete",
),
"adminfiles" => array (
1 => "files",
@@ -40,9 +43,7 @@
),
"adminrights" => array (
1 => "rights",
- 2 => "rightadd",
- 3 => "rightedit",
- 4 => "rightdel",
+ 2 => "rightedit",
),
"adminbanned" => array (
1 => "banned",
@@ -242,73 +243,104 @@
function rights() {
$groups = app()->auth->groupinfo();
+ array_unshift($groups,array('name' => '*','description' => tr('Any group')));
$this->tpl->assign('groups',$groups);
- $rights = app()->db->read('acl',array(),array('group_name','module'));
+ $rights = app()->db->read('acl',array(),array('group_name','module'),'',array('group_name','module','action'));
$this->tpl->assign('rights',$rights);
}
- function rightadd() {
- global $_POST;
-
- $modules = app()->config['modules'];
- $modules['*']='*';
- $this->tpl->assign('modules',$modules);
- $groups = app()->auth->groupinfo();
- $groups[]='*';
- $this->tpl->assign('groups',$groups);
- $access['allow']=tr('Allow');
- $access['deny']=tr('Deny');
- $this->tpl->assign('access',$access);
- $right['module']='*';
- $right['group_name']='*';
- $right['action']='*';
- $right['access']='deny';
- if (isset($_POST['addrightgroup'])) {
- $right['group_name']=$_POST['addrightgroup'];
- $right['module']=$_POST['addrightmodule'];
- $right['action']=$_POST['addrightaction'];
- $right['access']=$_POST['addrightaccess'];
- app()->db->insert('acl',$right);
- $this->nextStep(1);
+ function checkAcl($acl,$group,$module,$action,&$comb) {
+ $result = 'deny'; /* not defined are denyed by default */
+ $comb['group']=$group;
+ $comb['module']=$module;
+ $comb['action']=$action;
+ if (isset($acl[$group][$module][$action])) {
+ $result = $acl[$group][$module][$action]['access'];
+ } else if (isset($acl[$group][$module]['*'])) {
+ $result = $acl[$group][$module]['*']['access'];
+ $comb['action']='*';
+ } else if (isset($acl[$group]['*']['*'])) {
+ $result = $acl[$group]['*']['*']['access'];
+ $comb['module']='*';
+ $comb['action']='*';
+ } else if (isset($acl['*'][$module][$action])) {
+ $result = $acl['*'][$module][$action];
+ $comb['group']='*';
+ } else if (isset($acl['*'][$module]['*'])) {
+ $result = $acl['*'][$module]['*']['access'];
+ $comb['group']='*';
+ $comb['action']='*';
+ } else if (isset($acl['*']['*']['*'])) {
+ $result = $acl['*']['*']['*']['access']; /* this should be avoided imho */
+ $comb['group']='*';
+ $comb['module']='*';
+ $comb['action']='*';
}
- app()->tpl->assign('right',$right);
+ return $result;
}
function rightedit() {
+ global $_GET;
global $_POST;
- global $_GET;
- $right = app()->db->read('acl',array('id' => $_GET['id']));
- $right = $right[0];
- $modules = app()->config['modules'];
- $modules['*']='*';
+
+ if (isset($_POST['id'])) {
+ $id = $_POST['id'];
+ foreach ($_POST as $k => $v) {
+ if (strpos($k,'right_')!==FALSE) {
+ $key = explode('_',$k);
+ /* delete and reinsert the right */
+ app()->db->delete('acl',array('group_name' => $id, 'module' => $key[1], 'action' => $key[2]));
+ if ($v != '') {
+ $acl['group_name']=$id;
+ $acl['module']=$key[1];
+ $acl['action']=$key[2];
+ $acl['access']=$v;
+ app()->db->insert('acl',$acl);
+ }
+ }
+ }
+ redirect('?action=adminrights&step=2&id='.$id);
+ } else {
+ $id = $_GET['id'];
+ }
+ $this->tpl->assign('group',$id);
+ $tmpmodules = app()->config['modules'];
+ foreach ($tmpmodules as $k => $m) {
+ if ($m != 'admin') {
+ $modules[$m]['name'] = $m;
+ $modules[$m]['actions'] = array_merge(app()->modules[$m]->actions,array('*' => array()));
+ }
+ }
+ $modules['admin']['name'] = 'admin';
+ $modules['admin']['actions'] = array('*' => array());
+ $modules = array_merge($modules,array('*'=> array('name' => '['.tr('ANY').']','actions' => array('*'=> array()))));
$this->tpl->assign('modules',$modules);
- $groups = app()->auth->groupinfo();
- $groups[]='*';
- $this->tpl->assign('groups',$groups);
+ $access['']='-';
$access['allow']=tr('Allow');
$access['deny']=tr('Deny');
$this->tpl->assign('access',$access);
- if (isset($_POST['editaclid'])) {
- $right = app()->db->read('acl',array('id' => $_POST['editaclid']));
- $right = $right[0];
- $right['group_name']=$_POST['editrightgroup'];
- $right['module']=$_POST['editrightmodule'];
- $right['action']=$_POST['editrightaction'];
- $right['access']=$_POST['editrightaccess'];
- app()->db->update('acl',$right,array('id' => $_POST['editaclid']));
- $this->nextStep(1);
- }
- app()->tpl->assign('right',$right);
- }
- function rightdel() {
- global $_GET;
- /* should check if sub users exsist */
- if (isset($_GET['id'])) {
- app()->db->delete('acl',array('id' => $_GET['id']));
- $this->nextStep(1);
+ $acl = array_merge(app()->db->read('acl',array('group_name' => $id),array('module','action'),'',
+ array('group_name','module','action')),
+ app()->db->read('acl',array('group_name' => '*'),array('module','action'),'',
+ array('group_name','module','action')));
+ foreach ($modules as $mk => $m) {
+ foreach ($m['actions'] as $a => $av) {
+ $res = $this->checkAcl($acl,$id,$mk,$a,$comb);
+ if ($res == 'allow') {
+ $rightlist[$id][$mk][$a]['access']=$acl[$id][$mk][$a]['access'];
+ $rightlist[$id][$mk][$a]['result']=tr('Allow');
+ $rightlist[$id][$mk][$a]['comb']=$comb;
+ } else {
+ $rightlist[$id][$mk][$a]['access']=$acl[$id][$mk][$a]['access'];
+ $rightlist[$id][$mk][$a]['result']=tr('Deny');
+ $rightlist[$id][$mk][$a]['comb']=$comb;
+ }
+ }
}
+ $this->tpl->assign('rights',$rightlist);
+ $this->tpl->assign('defaultgroup',app()->config['nologingroup']);
}
function files() {
@@ -330,9 +362,13 @@
global $_GET;
if ($_GET['id']!='') {
- app()->db->delete('files',array('id' => $_GET['id']));
- /* TODO: remove the file */
+ $f = app()->db->read('files',array('id'=>$_GET['id']));
+ if ($f[0]['id']==$_GET['id']) {
+ app()->db->delete('files',array('id' => $_GET['id']));
+ unlink(app()->config['DATA_PATH'].'/'.$_GET['id']);
+ }
}
+ $this->nextStep(1);
}
function filesplugin() {
@@ -409,8 +445,27 @@
}
function pluginoptions() {
+ /* list the plugins */
+ foreach (app()->config['plugins'] as $p) {
+ $list[$p]['name']=$p;
+ $list[$p]['description']=app()->plugins[$p]->description;
+ }
+ $this->tpl->assign('pluginlist',$list);
}
+ function pluginoptiondetail() {
+ }
+
+
+ function pluginoptionadd() {
+ }
+
+ function pluginoptionedit() {
+ }
+
+ function pluginoptiondelete() {
+ }
+
function settings() {
$this->tpl->assign('config',app()->config);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-04 18:00:32
|
Revision: 106
http://openupload.svn.sourceforge.net/openupload/?rev=106&view=rev
Author: tsdogs
Date: 2008-11-04 18:00:26 +0000 (Tue, 04 Nov 2008)
Log Message:
-----------
fix bug #2220935 trailing slashes
Modified Paths:
--------------
trunk/lib/general.inc.php
Modified: trunk/lib/general.inc.php
===================================================================
--- trunk/lib/general.inc.php 2008-11-04 17:55:26 UTC (rev 105)
+++ trunk/lib/general.inc.php 2008-11-04 18:00:26 UTC (rev 106)
@@ -19,6 +19,10 @@
if (strrpos($CONFIG['WWW_ROOT'],'/')===strlen($CONFIG['WWW_ROOT'])-1)
$CONFIG['WWW_ROOT']=substr($CONFIG['WWW_ROOT'],0,strlen($CONFIG['WWW_ROOT'])-1);
+/* remove trailing slash from WWW_SERVER */
+if (strrpos($CONFIG['WWW_SERVER'],'/')===strlen($CONFIG['WWW_SERVER'])-1)
+ $CONFIG['WWW_SERVER']=substr($CONFIG['WWW_SERVER'],0,strlen($CONFIG['WWW_SERVER'])-1);
+
/*************************************************************************************
* GLOBAL FUNCTIONS *
*************************************************************************************/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-04 17:55:32
|
Revision: 105
http://openupload.svn.sourceforge.net/openupload/?rev=105&view=rev
Author: tsdogs
Date: 2008-11-04 17:55:26 +0000 (Tue, 04 Nov 2008)
Log Message:
-----------
remove leading slash from requested files from templates WWW_ROOT
Modified Paths:
--------------
trunk/lib/general.inc.php
Modified: trunk/lib/general.inc.php
===================================================================
--- trunk/lib/general.inc.php 2008-11-04 17:41:57 UTC (rev 104)
+++ trunk/lib/general.inc.php 2008-11-04 17:55:26 UTC (rev 105)
@@ -15,6 +15,10 @@
include ($CONFIG['INSTALL_ROOT'].'/templates/'.$CONFIG['site']['template'].'/init.inc.php');
}
+/* remove trailing slash from WWW_ROOT */
+if (strrpos($CONFIG['WWW_ROOT'],'/')===strlen($CONFIG['WWW_ROOT'])-1)
+ $CONFIG['WWW_ROOT']=substr($CONFIG['WWW_ROOT'],0,strlen($CONFIG['WWW_ROOT'])-1);
+
/*************************************************************************************
* GLOBAL FUNCTIONS *
*************************************************************************************/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-04 17:42:05
|
Revision: 104
http://openupload.svn.sourceforge.net/openupload/?rev=104&view=rev
Author: tsdogs
Date: 2008-11-04 17:41:57 +0000 (Tue, 04 Nov 2008)
Log Message:
-----------
remove leasing slash from requested files from templates
Modified Paths:
--------------
trunk/lib/general.inc.php
Modified: trunk/lib/general.inc.php
===================================================================
--- trunk/lib/general.inc.php 2008-11-04 17:41:13 UTC (rev 103)
+++ trunk/lib/general.inc.php 2008-11-04 17:41:57 UTC (rev 104)
@@ -87,6 +87,9 @@
if ($file == '') return '';
+ if (strpos($file,'/')===0) { /* remove leading slash */
+ $file = substr($file,1,strlen($file)-1);
+ }
if (file_exists($CONFIG['WEB_ROOT'].'/templates/'.$CONFIG['site']['template'].'/'.$file))
return $CONFIG['WWW_ROOT'].'/templates/'.$CONFIG['site']['template'].'/'.$file;
else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-04 17:41:19
|
Revision: 103
http://openupload.svn.sourceforge.net/openupload/?rev=103&view=rev
Author: tsdogs
Date: 2008-11-04 17:41:13 +0000 (Tue, 04 Nov 2008)
Log Message:
-----------
change default value for WWW_ROOT which caused troubles on sites where is was main application
Modified Paths:
--------------
trunk/www/config.inc.php.example
Modified: trunk/www/config.inc.php.example
===================================================================
--- trunk/www/config.inc.php.example 2008-11-03 16:42:19 UTC (rev 102)
+++ trunk/www/config.inc.php.example 2008-11-04 17:41:13 UTC (rev 103)
@@ -9,8 +9,8 @@
/* define http:// address */
$CONFIG['WWW_SERVER']='http://yourdomain.com';
-/* define the additional web path */
-$CONFIG['WWW_ROOT']='/';
+/* define the additional web path i.e. /openupload */
+$CONFIG['WWW_ROOT']='';
/* Define where to store the uploaded files */
$CONFIG['DATA_PATH']=$CONFIG['INSTALL_ROOT'].'/data';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-03 19:25:02
|
Revision: 102
http://openupload.svn.sourceforge.net/openupload/?rev=102&view=rev
Author: tsdogs
Date: 2008-11-03 16:42:19 +0000 (Mon, 03 Nov 2008)
Log Message:
-----------
fix initialization name
Modified Paths:
--------------
trunk/plugins/mimetypes.inc.php
Modified: trunk/plugins/mimetypes.inc.php
===================================================================
--- trunk/plugins/mimetypes.inc.php 2008-11-03 14:23:37 UTC (rev 101)
+++ trunk/plugins/mimetypes.inc.php 2008-11-03 16:42:19 UTC (rev 102)
@@ -2,8 +2,8 @@
class MimeTypesPlugin extends OpenUploadPlugin {
- function MimeTypes() {
- $this->description = tr('Limit the mimetypes a user can upload');
+ function MimeTypesPlugin() {
+ $this->description = tr('Limit the mimetypes a user can upload');
}
function uploadForm(&$finfo,$acl) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-03 14:23:39
|
Revision: 101
http://openupload.svn.sourceforge.net/openupload/?rev=101&view=rev
Author: tsdogs
Date: 2008-11-03 14:23:37 +0000 (Mon, 03 Nov 2008)
Log Message:
-----------
status update
Modified Paths:
--------------
trunk/CHANGELOG
trunk/TODO
Modified: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG 2008-11-03 12:16:02 UTC (rev 100)
+++ trunk/CHANGELOG 2008-11-03 14:23:37 UTC (rev 101)
@@ -1,3 +1,13 @@
+Changelog from release 0.3 to 0.4
+
+* Fixed BUGS
+ - Registration wasn't working 'cause of a api rename bug
+
+* Database
+ - Added PostgreSQL support
+ - Added PostgreSQL db structures
+
+
Changelog for release 0.3 (updated on 2008.10.28).
* General
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2008-11-03 12:16:02 UTC (rev 100)
+++ trunk/TODO 2008-11-03 14:23:37 UTC (rev 101)
@@ -1,21 +1,36 @@
TODO list not priority ordered.
-******* MUST BE DONE BEFORE RELEASE *******
-All seems to be done.
+******* MUST BE DONE BEFORE RELEASE 0.4 *******
+General
+- Review the logo.
-******* POSTPONED FOR NEXT RELEASE *******
+Bugs
+- Fix all bugs I find in 0.3 (I hope somebody else will report some if they exsist)
+
Upload
- Display upload progress (a bit too triky and workarounds ain't really nice)
Database
-- pgsql module
+- pgsql module deep testing
+- txtdb deep testing
Plugins
- Upload different filesize limiting depending on group (needs plugin options based on groups)
+- Plugin configuration options
Maintainence
- Create a script to clean up the files/tmpfiles.
+Setup
+- Add setup script
+- Config administration
+
+Administration
+- Language table admin.
+- Plugin options
+- Enable multiple table operations (deletion mainly)
+- Rights with better administration...
+
******* OTHER THINGS/IDEAS *******
General
@@ -30,10 +45,7 @@
Administration
- Review the general administration module
-- First setup script
- Config administration
-- Language table admin.
-- Plugin options
- Rights switch mode (to switch from 1 mode to the other)
- Rights better admin tool.
@@ -42,13 +54,12 @@
User
- e-mail change should need a confirmation e-mail too!
+- Authentication with NTLM (mainly on LDAP module)
-Download
+Download (bug)
- Fix double click on no blockings for download
Plugins
-- Plugin configuration options
-- banned ip probably is better in the main app and not as a plugin.
- (Following are some ideas)
Download bandwith limiting depending on group (of upload user probably better)
Download wait time (is this really needed?)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-03 12:16:06
|
Revision: 100
http://openupload.svn.sourceforge.net/openupload/?rev=100&view=rev
Author: tsdogs
Date: 2008-11-03 12:16:02 +0000 (Mon, 03 Nov 2008)
Log Message:
-----------
add notification about v0.3a bugfix release
Modified Paths:
--------------
web/index.html
Modified: web/index.html
===================================================================
--- web/index.html 2008-11-03 11:59:31 UTC (rev 99)
+++ web/index.html 2008-11-03 12:16:02 UTC (rev 100)
@@ -64,6 +64,7 @@
font-size: 9pt;
border-top: 1px solid #000000;
text-align: center;
+ background-color: #ffffff;
}
#footer a {
color: #3161cf;
@@ -139,6 +140,9 @@
</div>
<div id="section">
<div id="title">Download</div>
+<div id="text">2008.11.03<br><b>As there were a couple of bugs I decided to release a bug fix version.</b><br>Release 0.3a
+Click <a target="_new" href="http://sourceforge.net/project/showfiles.php?group_id=242018&package_id=294593&release_id=636546">here</a> to download.</div>
+<br>
<div id="text">2008.10.28<br>It ain't perfect but I think it's pretty usable.<br>Release 0.3 is out.
Click <a target="_new" href="http://sourceforge.net/project/showfiles.php?group_id=242018&package_id=294593&release_id=636546">here</a> to download.</div>
</div>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-11-03 11:59:34
|
Revision: 99
http://openupload.svn.sourceforge.net/openupload/?rev=99&view=rev
Author: tsdogs
Date: 2008-11-03 11:59:31 +0000 (Mon, 03 Nov 2008)
Log Message:
-----------
fix bug #2216829 - remove link not working
Modified Paths:
--------------
trunk/lib/modules/default/files.inc.php
Modified: trunk/lib/modules/default/files.inc.php
===================================================================
--- trunk/lib/modules/default/files.inc.php 2008-10-31 16:41:05 UTC (rev 98)
+++ trunk/lib/modules/default/files.inc.php 2008-11-03 11:59:31 UTC (rev 99)
@@ -309,7 +309,8 @@
if (!$result)
$this->prevStep();
/* now we can remove the file */
- app()->db->removeFile($finfo['id']);
+ app()->db->delete('files',array('id' => $finfo['id']));
+ app()->db->delete('file_options',array('file_id' => $finfo['id']));
$file = app()->config['DATA_PATH'].'/'.$finfo['id'];
unlink($file);
/* display removal confirmation */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-10-31 16:41:14
|
Revision: 98
http://openupload.svn.sourceforge.net/openupload/?rev=98&view=rev
Author: tsdogs
Date: 2008-10-31 16:41:05 +0000 (Fri, 31 Oct 2008)
Log Message:
-----------
first pgsql db api implementation
Added Paths:
-----------
trunk/lib/modules/db/pgsql.inc.php
Added: trunk/lib/modules/db/pgsql.inc.php
===================================================================
--- trunk/lib/modules/db/pgsql.inc.php (rev 0)
+++ trunk/lib/modules/db/pgsql.inc.php 2008-10-31 16:41:05 UTC (rev 98)
@@ -0,0 +1,174 @@
+<?php
+
+
+/* to be implemented soon */
+
+class pgsqlDB extends dbBase {
+var $config;
+var $db;
+var $prefix;
+
+
+ function pgsqlDB($config = array()) {
+ $this->config = $config;
+ $this->prefix = $config['prefix'];
+ }
+
+ function init() {
+ $str = "host=".$this->config['host'];
+ $str .= " port=".($this->config['port']!=''?$this->config['port']:'5432');
+ $str .= " dbname=".$this->config['name'];
+ $str .= " user=".$this->config['user'];
+ $str .= " password=".$this->config['password'];
+ $this->db = pg_connect($str) or die('ERROR: connection to db failed!');
+ }
+
+ function newId($tbl,$field = 'id',$keys = array ()) {
+ $sql = 'SELECT max("'.$field.'") as newid FROM "'.$this->prefix.$tbl.'"';
+ if (count($keys)>0) {
+ $where = '';
+ foreach ($keys as $k => $v) {
+ if ($where != '') $where .= ' AND ';
+ $where .= '"'.$k.'"=\''.(pg_escape_string($v)).'\'';
+ }
+ $sql .= ' WHERE '.$where;
+ }
+ $res = pg_query($sql);
+ $newid = pg_fetch_assoc($res);
+ pg_free_result($res);
+ return $id['newid']+1;
+ }
+
+ function newRandomId($tbl,$field = 'id') {
+ $found = true;
+ while ($found) {
+ $id = randomName(30,30);
+ $sql = 'SELECT '.$field.' FROM "'.$this->prefix.$tbl.'" WHERE "'.$field.'"=\''.$id.'\'';
+ $res = pg_query($sql);
+ $found = pg_num_rows($res)>0;
+ pg_free_result($res);
+ }
+ return $id;
+ }
+
+ function count($tbl,$keys = array()) {
+ $sql = 'SELECT count(*) AS num FROM "'.$this->prefix.$tbl.'"';
+ if (count($keys)>0) {
+ $where = '';
+ foreach ($keys as $k => $v) {
+ if ($where != '') $where .= ' AND ';
+ $where .= '"'.$k.'"=\''.(pg_escape_string($v)).'\'';
+ }
+ $sql .= ' WHERE '.$where;
+ }
+ $res = pg_query($sql);
+ $row = pg_fetch_assoc($res);
+ pg_free_result($res);
+ return $row['num'];
+ }
+
+ function read($tbl,$keys = array(), $sort = array(), $limit = '', $assoc = array()) {
+ $sql = 'SELECT * FROM "'.$this->prefix.$tbl.'"';
+ if (count($keys)>0) {
+ $where = '';
+ foreach ($keys as $k => $v) {
+ if ($where != '') $where .= ' AND ';
+ $where .= '"'.$k.'"=\''.(pg_escape_string($v)).'\'';
+ }
+ $sql .= ' WHERE '.$where;
+ }
+ if (count($sort)>0) {
+ $sorting = '';
+ foreach ($sort as $s) {
+ if ($sorting!='') $sorting.=',';
+ $sorting .= $s;
+ }
+ $sql .= ' ORDER BY '.$sorting;
+ }
+ if ($limit != '') {
+ $l = explode(',',$limit);
+ $sql .= ' LIMIT '.$l[1].' OFFSET '.$l[0];
+ }
+ $res = pg_query($sql);
+ if (!$res) { die('query failed: '.$sql); }
+ $result = array();
+ while ($row = pg_fetch_assoc($res)) {
+ if (count($assoc)) { /* maybe there is a better way to do this? */
+ $str = '$result';
+ foreach ($assoc as $k) {
+ $str .= '[\''.$row[$k].'\']';
+ }
+ $str .= '=$row;';
+ eval($str);
+ } else {
+ $result[] = $row;
+ }
+ }
+ pg_free_result($res);
+ return $result;
+ }
+
+ function insert($tbl,$values,$fields = array()) {
+ $sql = 'INSERT INTO "'.$this->prefix.$tbl.'"';
+ $flist = '';
+ $vlist = '';
+ if (count($fields)>0) {
+ foreach ($fields as $f) {
+ if ($flist!='') $flist .= ',';
+ if ($vlist!='') $vlist .= ',';
+ $flist .= '"'.$f.'"';
+ $vlist .= '\''.pg_escape_string($values[$f]).'\'';
+ }
+ } else {
+ foreach ($values as $k => $v) {
+ if ($flist!='') $flist .= ',';
+ if ($vlist!='') $vlist .= ',';
+ $flist .= '"'.$k.'"';
+ $vlist .= '\''.pg_escape_string($v).'\'';
+ }
+ }
+ $sql .= ' ('.$flist.') VALUES ('.$vlist.')';
+ pg_query($sql) or die("ERROR: query failed: ".$sql);
+ }
+
+ function update($tbl,$values,$keys = array(),$fields = array()) {
+ $sql = 'UPDATE "'.$this->prefix.$tbl.'"';
+ $set = '';
+ if (count($fields)>0) {
+ foreach ($fields as $f) {
+ if ($set!='') $set .= ',';
+ $set .= '"'.$f.'"=\''.pg_escape_string($values[$f]).'\'';
+ }
+ } else {
+ foreach ($values as $k => $v) {
+ if ($set!='') $set .= ',';
+ $set .= '"'.$k.'"=\''.pg_escape_string($v).'\'';
+ }
+ }
+ $sql .= ' SET '.$set;
+ if (count($keys)>0) { /* should always be */
+ $where = '';
+ foreach ($keys as $k => $v) {
+ if ($where != '') $where .= ' AND ';
+ $where .= '"'.$k.'"=\''.pg_escape_string($v).'\'';
+ }
+ $sql .= ' WHERE '.$where;
+ }
+ pg_query($sql);
+ }
+
+ function delete($tbl,$keys = array()) {
+ $sql = 'DELETE FROM "'.$this->prefix.$tbl.'"';
+ if (count($keys)>0) {
+ $where = '';
+ foreach ($keys as $k => $v) {
+ if ($where != '') $where .= ' AND ';
+ $where .= '"'.$k.'"=\''.pg_escape_string($v).'\'';
+ }
+ $sql .= ' WHERE '.$where;
+ }
+ pg_query($sql);
+ }
+}
+
+?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-10-31 16:40:31
|
Revision: 97
http://openupload.svn.sourceforge.net/openupload/?rev=97&view=rev
Author: tsdogs
Date: 2008-10-31 16:40:22 +0000 (Fri, 31 Oct 2008)
Log Message:
-----------
fix registration bug for renamed functions, some db changes
Modified Paths:
--------------
trunk/lib/modules/default/auth.inc.php
Modified: trunk/lib/modules/default/auth.inc.php
===================================================================
--- trunk/lib/modules/default/auth.inc.php 2008-10-31 16:40:01 UTC (rev 96)
+++ trunk/lib/modules/default/auth.inc.php 2008-10-31 16:40:22 UTC (rev 97)
@@ -118,7 +118,7 @@
if (isset($_POST['registerlogin'])) {
/* check for the unique login */
- $u = app()->auth->info($_POST['registerlogin']);
+ $u = app()->auth->userinfo($_POST['registerlogin']);
if ($u['login']!='') {
app()->error(tr('Username already taken, choose a new value'));
$failed = true;
@@ -173,7 +173,7 @@
} else {
$user['active'] = 1;
}
- app()->auth->add($user);
+ app()->auth->useradd($user);
} else {
$this->prevStep(1); /* back to registration form */
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|