Permalink
Browse files

allow traversable objects for infos

git-svn-id: https://svn.habariproject.org/habari/trunk/htdocs/system@3952 653ae4dd-d31e-0410-96ef-6bf7bf53c507
  • Loading branch information...
1 parent b786088 commit 95781b0247192c8e094db0b350a17406e794cda5 Matt Read committed Jan 8, 2010
Showing with 4 additions and 4 deletions.
  1. +1 −1 classes/plugin.php
  2. +2 −2 classes/posts.php
  3. +1 −1 classes/rewriterule.php
View
@@ -86,4 +86,4 @@ public function _help_plugin_ui_plugin( $plugin_id, $action )
}
-?>
+?>
View
@@ -238,7 +238,7 @@ public static function get( $paramarray = array() )
// merge the two possibile calls together
$infos = array_merge( isset( $paramset['all:info'] ) ? $paramset['all:info'] : array(), isset( $paramset['info'] ) ? $paramset['info'] : array() );
- if ( is_array( $infos ) ) {
+ if ( is_array( $infos ) || $infos instanceof Traversable ) {
$pi_count = 0;
foreach ( $infos as $info_key => $info_value ) {
$pi_count++;
@@ -254,7 +254,7 @@ public static function get( $paramarray = array() )
}
if ( isset( $paramset['any:info'] ) ) {
- if ( is_array( $paramset['any:info'] ) ) {
+ if ( is_array( $paramset['any:info'] ) || $infos instanceof Traversable ) {
$pi_count = 0;
$pi_where = array();
foreach ( $paramset['any:info'] as $info_key => $info_value ) {
View
@@ -247,4 +247,4 @@ public static function create_url_rule( $build_str, $handler, $action )
}
}
-?>
+?>

0 comments on commit 95781b0

Please sign in to comment.