[vhffs-dev] [svn] commit: r60 - trunk/vhffs-api/src/Vhffs/Services/Mailing.pm trunk/vhffs-backend/src/pgsql/create_boxes.sql trunk/vhffs-backend/src/pgsql/create_object.sql trunk/vhffs-backend/src/pgsql/migrate_db.sh |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
- To: vhffs-dev@xxxxxxxxx
- Subject: [vhffs-dev] [svn] commit: r60 - trunk/vhffs-api/src/Vhffs/Services/Mailing.pm trunk/vhffs-backend/src/pgsql/create_boxes.sql trunk/vhffs-backend/src/pgsql/create_object.sql trunk/vhffs-backend/src/pgsql/migrate_db.sh
- From: vhffs-dev@xxxxxxxxx
- Date: Mon Jul 18 21:03:17 2005 +00
Author: soda
Date: Mon Jul 18 23:03:13 2005
New Revision: 60
Log:
- Fix description bug
- Fix Services::Mailing bug
Added:
trunk/vhffs-backend/src/pgsql/migrate_db.sh (with props)
Modified:
trunk/vhffs-api/src/Vhffs/Services/Mailing.pm
trunk/vhffs-backend/src/pgsql/create_boxes.sql
trunk/vhffs-backend/src/pgsql/create_object.sql
Modified: trunk/vhffs-api/src/Vhffs/Services/Mailing.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Services/Mailing.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Services/Mailing.pm Mon Jul 18 23:03:13 2005
@@ -592,13 +592,15 @@
$query = "SELECT * FROM vhffs_ml ml, vhffs_object o WHERE o.object_id=ml.object_id";
}
+ $query .= " AND ( ( local LIKE '%".$name."%' ) OR (domain LIKE '%".$name."'% ) )" if( defined $name );
+
my $request = $vhffs->get_db_object->{'DB_WRITE'}->prepare( $query );
- $request->execute() or return -3;
+ my $rows = $request->execute() or return -3;
+ return undef if( $rows <= 0 );
my $result = $request->fetchall_hashref('ml_id');
my $object;
my @plop;
- $query .= " AND ( ( local LIKE '%".$name."%' ) OR (domain LIKE '%".$name."'% ) )" if( defined $name );
foreach( keys %{$result} )
Modified: trunk/vhffs-backend/src/pgsql/create_boxes.sql
==============================================================================
--- trunk/vhffs-backend/src/pgsql/create_boxes.sql (original)
+++ trunk/vhffs-backend/src/pgsql/create_boxes.sql Mon Jul 18 23:03:13 2005
@@ -1,10 +1,10 @@
CREATE TABLE vhffs_boxes
(
- domain varchar NOT NULL,
- local_part varchar NOT NULL,
+ domain varchar,
+ local_part varchar,
domain_hash varchar NOT NULL,
password_hash varchar NOT NULL,
mbox_name varchar NOT NULL,
password varchar NOT NULL,
- CONSTRAINT vhffs_box_pkey PRIMARY KEY (domain,local_part)
+ PRIMARY KEY (domain,local_part)
) WITH OIDS;
Modified: trunk/vhffs-backend/src/pgsql/create_object.sql
==============================================================================
--- trunk/vhffs-backend/src/pgsql/create_object.sql (original)
+++ trunk/vhffs-backend/src/pgsql/create_object.sql Mon Jul 18 23:03:13 2005
@@ -11,6 +11,6 @@
owner_uid int4 NOT NULL,
date_creation timestamp,
state varchar NOT NULL,
- description varchar(500),
+ description TEXT,
CONSTRAINT vhffs_object_pkey PRIMARY KEY (object_id)
) WITH OIDS;