summaryrefslogtreecommitdiff
path: root/scire
diff options
context:
space:
mode:
authorPreston Cody <codeman@gentoo.org>2008-01-11 03:18:00 +0000
committerPreston Cody <codeman@gentoo.org>2008-01-11 03:18:00 +0000
commit52fb130639240dcdfee8ab6e0200739156accc2b (patch)
treed2e12bc6fb098db9d64290bc5028de238f82728f /scire
parentadding recurring_jobs_clients to hold the information for recurring jobs. (diff)
downloadscire-52fb130639240dcdfee8ab6e0200739156accc2b.tar.gz
scire-52fb130639240dcdfee8ab6e0200739156accc2b.tar.bz2
scire-52fb130639240dcdfee8ab6e0200739156accc2b.zip
wrap tags in if(tags) incase of no tags.
svn path=/trunk/; revision=346
Diffstat (limited to 'scire')
-rwxr-xr-xscire/.lib/DB_functions.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/scire/.lib/DB_functions.php b/scire/.lib/DB_functions.php
index b6b63ab..1278552 100755
--- a/scire/.lib/DB_functions.php
+++ b/scire/.lib/DB_functions.php
@@ -513,10 +513,12 @@ function scire_add_script($name, $desc, $location, $script_data, $log_location,
}
#Now add the tags.
- foreach ($script_tags as $name => $value) {
- $result = $db->insert('dyn_tags', array('scriptid' => $scriptid, 'tag' => $name, 'tag_value' => $value) );
- if (!$result) {
- return $db->error;
+ if ($script_tags) {
+ foreach ($script_tags as $name => $value) {
+ $result = $db->insert('dyn_tags', array('scriptid' => $scriptid, 'tag' => $name, 'tag_value' => $value) );
+ if (!$result) {
+ return $db->error;
+ }
}
}