Changeset 94
- Timestamp:
- 04/14/11 17:14:23 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r91 r94 240 240 # Update an ACL entry 241 241 # Takes a db handle, type, owner-id, and hashref for the changed permissions. 242 ##fixme: Must handle case of changing object's permissions from custom to inherited243 242 sub changePermissions { 244 243 my $dbh = shift; … … 735 734 local $dbh->{RaiseError} = 1; 736 735 737 my $failmsg; 736 my $failmsg = ''; 737 738 738 # Wrap all the SQL in a transaction 739 739 eval { … … 746 746 747 747 # get the ID... 748 $sth = $dbh->prepare("select user_id from users where username=?"); 749 $sth->execute($username); 750 ($user_id) = $sth->fetchrow_array(); 748 ($user_id) = $dbh->selectrow_array("SELECT currval('users_user_id_seq')"); 751 749 752 750 # Permissions! Gotta set'em all! … … 788 786 789 787 ##fixme: add another table to hold name/email for log table? 790 #die "dying horribly ($permstring, $user_id)";791 788 792 789 # once we get here, we should have suceeded. … … 969 966 970 967 971 ## DNSDB::editRecord()972 # Change an existing record973 # Takes a database handle, default/live flag, record ID, and new data and updates the data fields for it974 sub editRecord {975 $errstr = '';976 my $dbh = shift;977 my $defflag = shift;978 my $recid = shift;979 my $host = shift;980 my $address = shift;981 my $distance = shift;982 my $weight = shift;983 my $port = shift;984 my $ttl = shift;985 }986 987 988 968 ## DNSDB::getSOA() 989 969 # Return all suitable fields from an SOA record in separate elements of a hash … … 1080 1060 } 1081 1061 $sql .= " AND NOT r.type=$reverse_typemap{SOA} ORDER BY r.$order $direction"; 1082 ##fixme: need to set nstart properly (offset is not internally multiplied with limit)1083 1062 $sql .= " LIMIT $nrecs OFFSET ".($nstart*$nrecs) if $nstart ne 'all'; 1084 1063
Note:
See TracChangeset
for help on using the changeset viewer.