Changeset 8130
- Timestamp:
- 03/14/2014 12:15:41 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-functions.php
r8129 r8130 576 576 return false; 577 577 } 578 579 // Legacy - Trim off whitespace580 $meta_value = trim( $meta_value );581 578 582 579 // Legacy - if no meta_key is passed, delete all for the item -
trunk/bp-blogs/bp-blogs-functions.php
r8129 r8130 862 862 } 863 863 864 // Legacy - trim meta_value865 $meta_value = trim( $meta_value );866 867 864 add_filter( 'query', 'bp_filter_metaid_column_name' ); 868 865 -
trunk/bp-xprofile/bp-xprofile-functions.php
r8129 r8130 601 601 } 602 602 603 // Legacy - trim meta_value604 $meta_value = trim( $meta_value );605 606 603 add_filter( 'query', 'bp_filter_metaid_column_name' ); 607 604 add_filter( 'query', 'bp_xprofile_filter_meta_query' ); -
trunk/tests/testcases/activity/functions.php
r8129 r8130 330 330 * @group activitymeta 331 331 * @group bp_activity_delete_meta 332 * @ticket BP5399 332 333 */ 333 334 public function test_bp_activity_delete_meta_trim_meta_value() { 334 // @todo Wtf?335 335 $a = $this->factory->activity->create(); 336 336 bp_activity_update_meta( $a, 'foo', 'bar' ); 337 $this->assertTrue( bp_activity_delete_meta( $a, 'foo', ' bar ' ));338 $this->assert False(bp_activity_get_meta( $a, 'foo' ) );337 bp_activity_delete_meta( $a, 'foo', ' bar ' ); 338 $this->assertSame( 'bar', bp_activity_get_meta( $a, 'foo' ) ); 339 339 } 340 340 -
trunk/tests/testcases/blogs/functions.php
r8129 r8130 29 29 * @group blogmeta 30 30 * @group bp_blogs_delete_blogmeta 31 * @ticket BP5399 31 32 */ 32 33 public function test_bp_blogs_delete_blogmeta_trim_meta_value() { 33 34 $this->assertTrue( bp_blogs_update_blogmeta( 1, 'foo', 'bar' ) ); 34 35 $this->assertSame( 'bar', bp_blogs_get_blogmeta( 1, 'foo' ) ); 35 $this->assertTrue( bp_blogs_delete_blogmeta( 1, 'foo', ' bar '));36 $this->assertSame( ' ', bp_blogs_get_blogmeta( 1, 'foo' ) );36 bp_blogs_delete_blogmeta( 1, 'foo', ' bar ' ); 37 $this->assertSame( 'bar', bp_blogs_get_blogmeta( 1, 'foo' ) ); 37 38 } 38 39 -
trunk/tests/testcases/xprofile/functions.php
r8129 r8130 201 201 * @group xprofilemeta 202 202 * @group bp_xprofile_delete_meta 203 * @ticket BP5399 203 204 */ 204 205 public function test_bp_xprofile_delete_meta_trim_meta_value() { … … 207 208 $this->assertSame( 'bar', bp_xprofile_get_meta( $g, 'group', 'foo' ) ); 208 209 209 $this->assertTrue( bp_xprofile_delete_meta( $g, 'group', 'foo', ' bar ' ));210 $this->assert Equals( '', bp_xprofile_get_meta( $g, 'group', 'foo' ) );210 bp_xprofile_delete_meta( $g, 'group', 'foo', ' bar ' ); 211 $this->assertSame( 'bar', bp_xprofile_get_meta( $g, 'group', 'foo' ) ); 211 212 } 212 213
Note: See TracChangeset
for help on using the changeset viewer.