Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 95781b0247192c8e094db0b350a17406e794cda5 1 parent b786088
Matt Read authored
View
2  classes/plugin.php
@@ -86,4 +86,4 @@ public function _help_plugin_ui_plugin( $plugin_id, $action )
}
-?>
+?>
View
4 classes/posts.php
@@ -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
2  classes/rewriterule.php
@@ -247,4 +247,4 @@ public static function create_url_rule( $build_str, $handler, $action )
}
}
-?>
+?>
Please sign in to comment.
Something went wrong with that request. Please try again.