summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwjames5 <will@tekimaki.com>2008-10-25 01:24:04 +0000
committerwjames5 <will@tekimaki.com>2008-10-25 01:24:04 +0000
commit19c3894e82bdf0da607c7c2bf06a823bd80e4090 (patch)
treeffa2d0ec4e29a429db79c618a65c76d083fb1946
parent47839033d5fff0c07c936834245e6057ae6472dd (diff)
downloadliberty-19c3894e82bdf0da607c7c2bf06a823bd80e4090.tar.gz
liberty-19c3894e82bdf0da607c7c2bf06a823bd80e4090.tar.bz2
liberty-19c3894e82bdf0da607c7c2bf06a823bd80e4090.zip
if verify fails anywhere along the class chain then process parent verify checks so we get all errors in one shot - saving the user much headaches. also introduce verify service so services can report verification errors
-rw-r--r--LibertyAttachable.php7
-rw-r--r--LibertyContent.php5
-rw-r--r--LibertyMime.php8
3 files changed, 17 insertions, 3 deletions
diff --git a/LibertyAttachable.php b/LibertyAttachable.php
index 8faf4b9..75abbd7 100644
--- a/LibertyAttachable.php
+++ b/LibertyAttachable.php
@@ -3,7 +3,7 @@
* Management of Liberty Content
*
* @package liberty
- * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyAttachable.php,v 1.166 2008/10/19 08:14:21 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyAttachable.php,v 1.167 2008/10/25 01:24:04 wjames5 Exp $
* @author spider <spider@steelsun.com>
*/
// +----------------------------------------------------------------------+
@@ -679,6 +679,11 @@ class LibertyAttachable extends LibertyContent {
$pParamHash['liberty_attachments']['primary'] = NULL;
}
+ // if we have an error we get them all by checking parent classes for additional errors
+ if( count( $this->mErrors ) > 0 ){
+ parent::verify( $pParamHash );
+ }
+
return ( count( $this->mErrors ) == 0 );
}
diff --git a/LibertyContent.php b/LibertyContent.php
index 2da9f7a..056995f 100644
--- a/LibertyContent.php
+++ b/LibertyContent.php
@@ -3,7 +3,7 @@
* Management of Liberty content
*
* @package liberty
-* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyContent.php,v 1.384 2008/10/21 02:46:02 wjames5 Exp $
+* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyContent.php,v 1.385 2008/10/25 01:24:04 wjames5 Exp $
* @author spider <spider@steelsun.com>
*/
@@ -318,6 +318,9 @@ class LibertyContent extends LibertyBase {
$pParamHash['data_store']['summary'] = !empty( $pParamHash['summary'] ) ? $pParamHash['summary'] : NULL ;
+ // call verify service to see if any services have errors
+ $this->invokeServices( 'content_verify_function', $pParamHash );
+
return( count( $this->mErrors ) == 0 );
}
diff --git a/LibertyMime.php b/LibertyMime.php
index 26d1cd8..4331706 100644
--- a/LibertyMime.php
+++ b/LibertyMime.php
@@ -3,7 +3,7 @@
* Manages liberty Uploads
*
* @package liberty
- * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyMime.php,v 1.35 2008/10/13 18:41:13 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyMime.php,v 1.36 2008/10/25 01:24:04 wjames5 Exp $
*/
/**
@@ -241,6 +241,12 @@ class LibertyMime extends LibertyAttachable {
$pParamHash['liberty_attachments']['primary'] = NULL;
}
+ // if we have an error we get them all by checking parent classes for additional errors
+ if( count( $this->mErrors ) > 0 ){
+ // check errors of LibertyContent since LibertyMime means to override the parent verify
+ LibertyContent::verify( $pParamHash );
+ }
+
return ( count( $this->mErrors ) == 0 );
}