Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
2  classes/plugin.php
@@ -86,4 +86,4 @@ public function _help_plugin_ui_plugin( $plugin_id, $action )
86 86
87 87 }
88 88
89   -?>
  89 +?>
4 classes/posts.php
@@ -238,7 +238,7 @@ public static function get( $paramarray = array() )
238 238 // merge the two possibile calls together
239 239 $infos = array_merge( isset( $paramset['all:info'] ) ? $paramset['all:info'] : array(), isset( $paramset['info'] ) ? $paramset['info'] : array() );
240 240
241   - if ( is_array( $infos ) ) {
  241 + if ( is_array( $infos ) || $infos instanceof Traversable ) {
242 242 $pi_count = 0;
243 243 foreach ( $infos as $info_key => $info_value ) {
244 244 $pi_count++;
@@ -254,7 +254,7 @@ public static function get( $paramarray = array() )
254 254 }
255 255
256 256 if ( isset( $paramset['any:info'] ) ) {
257   - if ( is_array( $paramset['any:info'] ) ) {
  257 + if ( is_array( $paramset['any:info'] ) || $infos instanceof Traversable ) {
258 258 $pi_count = 0;
259 259 $pi_where = array();
260 260 foreach ( $paramset['any:info'] as $info_key => $info_value ) {
2  classes/rewriterule.php
@@ -247,4 +247,4 @@ public static function create_url_rule( $build_str, $handler, $action )
247 247 }
248 248
249 249 }
250   -?>
  250 +?>

0 comments on commit 95781b0

Please sign in to comment.
Something went wrong with that request. Please try again.