|
From: <sly...@us...> - 2008-08-11 06:05:44
|
Revision: 47
http://phpsqliteadmin.svn.sourceforge.net/phpsqliteadmin/?rev=47&view=rev
Author: slythfox
Date: 2008-08-11 06:05:54 +0000 (Mon, 11 Aug 2008)
Log Message:
-----------
Fixed phpsla db alias bugs.
Modified Paths:
--------------
trunk/phpsqliteadmin2/changelog.txt
trunk/phpsqliteadmin2/editdb.php
trunk/phpsqliteadmin2/todo.txt
Modified: trunk/phpsqliteadmin2/changelog.txt
===================================================================
--- trunk/phpsqliteadmin2/changelog.txt 2008-07-13 18:12:55 UTC (rev 46)
+++ trunk/phpsqliteadmin2/changelog.txt 2008-08-11 06:05:54 UTC (rev 47)
@@ -2,6 +2,8 @@
0.3 (xx.xx.2008)
+- An error will be returned if the alias name or path is not specified. (chale)
+- An error will be returned when trying to delete the phpsla.sqlite alias. (chale)
- Icons have been (temporarily?) embedded into the includes file. (chale)
- Added really basic multiquery support with the query page. This allows one to copy&paste a sql file and execute it in one go. (chale)
- The query page now displays "x rows affected/returned". Before there was not sort of confirmation when doing non SELECT queries. (chale)
Modified: trunk/phpsqliteadmin2/editdb.php
===================================================================
--- trunk/phpsqliteadmin2/editdb.php 2008-07-13 18:12:55 UTC (rev 46)
+++ trunk/phpsqliteadmin2/editdb.php 2008-08-11 06:05:54 UTC (rev 47)
@@ -15,6 +15,14 @@
if (isset($_POST['insert'])) {
// create the new db is case it does not exist
+ if ($alias->alias = "") {
+ print "An alias name needs to be provided.";
+ exit();
+ }
+ if ($alias->path = "") {
+ print "The path to the database needs to be provided.";
+ exit();
+ }
if (!file_exists($alias->path)) $newdb =& new SPSQLite($alias->path);
$sysdbh->query("insert into databases (user,alias,path,description) values ({$alias->user},'{$alias->alias}','{$alias->path}','{$alias->description}')");
// do we really want this?
@@ -45,8 +53,12 @@
if (isset($_POST['delete'])) {
- $sysdbh->query("delete from databases where user = {$alias->user} and alias = '{$alias->alias}'");
- //unlink($alias->path); nooooooo don't do that...
+ if ($alias->alias = "phpsla.sqlite") {
+ print "The configuration table phpsla.sqlite cannot be removed.";
+ exit();
+ }
+ $sysdbh->query("delete from databases where user = '{$alias->user}' and alias = '{$alias->alias}'");
+ //unlink($alias->path); nooooooo don't do that... No, that wouldn't be good.
$_SESSION['phpSQLiteAdmin_currentdb'] = '';
header("Location: dbconfig.php");
exit;
@@ -85,7 +97,7 @@
echo<<<EOT
<br /><br /><br /><br /><br />
<form name="delete" action="editdb.php" method="post" onsubmit="">
-<input type="hidden" name="use"r value="{$current_user}" />
+<input type="hidden" name="user" value="{$current_user}" />
<input type="hidden" name="alias" value="{$_GET[alias]}" />
<input type="submit" name="delete" value="Remove this alias" />
</form>
@@ -96,4 +108,4 @@
print "</body>\n";
print "</html>\n";
-?>
\ No newline at end of file
+?>
Modified: trunk/phpsqliteadmin2/todo.txt
===================================================================
--- trunk/phpsqliteadmin2/todo.txt 2008-07-13 18:12:55 UTC (rev 46)
+++ trunk/phpsqliteadmin2/todo.txt 2008-08-11 06:05:54 UTC (rev 47)
@@ -1,10 +1,8 @@
-Revised Todo (July, 10, 2008):
-
- - Don't allow the removal of the phpsla.sqlite alias.
+Revised Todo (July 25, 2008):
- Error checking for adding database aliases. How should general error handling work?
- - Add row adding/editing/deleting. (I have a basic implimentation. -chale)
+ - Add row adding/editing/deleting. (We have a basic implimentation currently.)
- When displaying the phpsqliteadmin version, it should display the number within the configuration table of the phpsla.sqlite database.
@@ -17,12 +15,9 @@
- Feel free to add more. I was unsure of a few of entries in the old todo's.
- Privilege checks for databases?
-
+
Old Todo:
-- you can add an alias database w/out the alias filled, which is bad...
-- you can remove phpsla.sqlite alias, which is bad as well
-
- "browse" should have navigation buttons
- display of indexes fails sometimes
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|