[wellwell-devel] [SCM] Interchange wellwell catalog branch, master, updated. 2cd04850f78ff056652d19055a2d56a687f2af31
Stefan Hornburg
racke at rt.icdevgroup.org
Sun Mar 22 11:49:27 UTC 2009
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Interchange wellwell catalog".
The branch, master has been updated
via 2cd04850f78ff056652d19055a2d56a687f2af31 (commit)
via c61116cc01798acaf0099f81f2bbf89b03b72840 (commit)
from 67e8c7783bf8bc454129d67154da991c66d1f962 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2cd04850f78ff056652d19055a2d56a687f2af31
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date: Sun Mar 22 12:49:10 2009 +0100
check whether file exists
commit c61116cc01798acaf0099f81f2bbf89b03b72840
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date: Sun Mar 22 12:48:09 2009 +0100
consider passed type for selection of category
don't avoid database with empty URIs
-----------------------------------------------------------------------
Summary of changes and diff:
code/category_master.tag | 15 +++++++++++++--
lib/Vend/Table/AnyData.pm | 4 ++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/code/category_master.tag b/code/category_master.tag
index 4f291bd..2a333bf 100644
--- a/code/category_master.tag
+++ b/code/category_master.tag
@@ -11,7 +11,13 @@ sub {
$Tag->perl({tables => 'categories'});
$cat_q = $Db{categories}->quote($name);
- $set = $Db{categories}->query(qq{select code from categories where name = $cat_q and parent = $parent});
+
+ if ($type) {
+ $set = $Db{categories}->query(qq{select code from categories where name = $cat_q and type = '$type' and parent = $parent});
+ }
+ else {
+ $set = $Db{categories}->query(qq{select code from categories where name = $cat_q and parent = $parent});
+ }
if (@$set) {
return $set->[0]->[0];
@@ -23,7 +29,12 @@ sub {
# determine URI for category
$uri = $Tag->category_path({code => $code, showname => 1,
filter => 'category_uri', joiner => '/', prefix => $opt->{prefix}});
- $Db{categories}->set_field($code, 'uri', $uri);
+ if ($uri) {
+ $Db{categories}->set_field($code, 'uri', $uri);
+ }
+ else {
+ Log("Empty URI for name $name.");
+ }
return $code;
}
diff --git a/lib/Vend/Table/AnyData.pm b/lib/Vend/Table/AnyData.pm
index f4ef901..2dbb72f 100644
--- a/lib/Vend/Table/AnyData.pm
+++ b/lib/Vend/Table/AnyData.pm
@@ -37,6 +37,10 @@ sub anydata {
die ::errmsg("Access to file '%s' not allowed.", $name);
}
+ unless (-f $name) {
+ die ::errmsg("File '%s' not found.", $name);
+ }
+
# check whether table name is in use
if (database_exists_ref($table)) {
die ::errmsg("Database name '%s' already in use.", $table);
hooks/post-receive
--
Interchange wellwell catalog
More information about the wellwell-devel
mailing list