Changeset 7352
- Timestamp:
- 11/14/2025 04:17:43 PM (4 months ago)
- Location:
- trunk
- Files:
-
- 42 edited
-
composer.json (modified) (1 diff)
-
phpcs.xml.dist (modified) (21 diffs)
-
src/includes/admin/classes/class-bbp-admin.php (modified) (1 diff)
-
src/includes/admin/classes/class-bbp-converter-base.php (modified) (2 diffs)
-
src/includes/admin/converters/AEF.php (modified) (1 diff)
-
src/includes/admin/converters/Drupal7.php (modified) (1 diff)
-
src/includes/admin/converters/Example.php (modified) (1 diff)
-
src/includes/admin/converters/FluxBB.php (modified) (1 diff)
-
src/includes/admin/converters/Invision.php (modified) (2 diffs)
-
src/includes/admin/converters/Kunena1.php (modified) (2 diffs)
-
src/includes/admin/converters/Kunena2.php (modified) (2 diffs)
-
src/includes/admin/converters/Kunena3.php (modified) (2 diffs)
-
src/includes/admin/converters/MyBB.php (modified) (1 diff)
-
src/includes/admin/converters/PHPFox3.php (modified) (1 diff)
-
src/includes/admin/converters/PHPWind.php (modified) (1 diff)
-
src/includes/admin/converters/Phorum.php (modified) (1 diff)
-
src/includes/admin/converters/PunBB.php (modified) (1 diff)
-
src/includes/admin/converters/SMF.php (modified) (1 diff)
-
src/includes/admin/converters/Vanilla.php (modified) (1 diff)
-
src/includes/admin/converters/XMB.php (modified) (1 diff)
-
src/includes/admin/converters/XenForo.php (modified) (1 diff)
-
src/includes/admin/converters/bbPress1.php (modified) (1 diff)
-
src/includes/admin/converters/e107v1.php (modified) (2 diffs)
-
src/includes/admin/converters/vBulletin.php (modified) (2 diffs)
-
src/includes/admin/converters/vBulletin3.php (modified) (2 diffs)
-
src/includes/admin/forums.php (modified) (3 diffs)
-
src/includes/admin/replies.php (modified) (6 diffs)
-
src/includes/admin/tools/repair.php (modified) (1 diff)
-
src/includes/admin/topics.php (modified) (11 diffs)
-
src/includes/common/formatting.php (modified) (1 diff)
-
src/includes/common/locks.php (modified) (1 diff)
-
src/includes/common/template.php (modified) (4 diffs)
-
src/includes/core/abstraction.php (modified) (1 diff)
-
src/includes/core/update.php (modified) (2 diffs)
-
src/includes/extend/akismet.php (modified) (2 diffs)
-
src/includes/forums/functions.php (modified) (2 diffs)
-
src/includes/forums/template.php (modified) (4 diffs)
-
src/includes/replies/functions.php (modified) (3 diffs)
-
src/includes/replies/template.php (modified) (2 diffs)
-
src/includes/topics/functions.php (modified) (3 diffs)
-
src/includes/topics/template.php (modified) (2 diffs)
-
src/includes/users/template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/composer.json
r7106 r7352 4 4 "description": "bbPress is forum software with a twist from the creators of WordPress.", 5 5 "require-dev": { 6 "squizlabs/php_codesniffer": "^3.7.2", 6 7 "phpcompatibility/phpcompatibility-wp": "^2.1", 7 "wp-coding-standards/wpcs": "^2.3", 8 "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2" 8 "wp-coding-standards/wpcs": "^3.0", 9 "dealerdirect/phpcodesniffer-composer-installer": "^1.0", 10 "phpunit/phpunit": "^9", 11 "yoast/phpunit-polyfills": "^3.0" 9 12 }, 10 13 "minimum-stability": "dev", -
trunk/phpcs.xml.dist
r7050 r7352 106 106 </rule> 107 107 108 <rule ref="WordPress.PHP.NoSilencedErrors">109 <properties>110 <property name="use_default_whitelist" value="true"/>111 </properties>112 </rule>113 114 108 115 109 <!-- … … 157 151 </rule> 158 152 159 <rule ref="WordPress.Arrays.CommaAfterArrayItem.NoComma">160 <exclude-pattern>/src/*</exclude-pattern>161 </rule>162 163 153 164 154 <!-- … … 168 158 ############################################################################# 169 159 --> 170 171 <!-- Rules that require further review, partially reviewed --> 160 161 <rule ref="Generic.CodeAnalysis.AssignmentInCondition.Found"> 162 <exclude-pattern>/src/*</exclude-pattern> 163 </rule> 164 165 <rule ref="Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition"> 166 <exclude-pattern>/src/*</exclude-pattern> 167 </rule> 168 169 <rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedElseif"> 170 <exclude-pattern>/src/*</exclude-pattern> 171 </rule> 172 173 <rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedIf"> 174 <exclude-pattern>/src/*</exclude-pattern> 175 </rule> 176 177 <rule ref="Generic.CodeAnalysis.RequireExplicitBooleanOperatorPrecedence.MissingParentheses"> 178 <exclude-pattern>/src/*</exclude-pattern> 179 </rule> 180 181 <rule ref="Generic.CodeAnalysis.UselessOverridingMethod.Found"> 182 <exclude-pattern>/src/*</exclude-pattern> 183 </rule> 184 185 <rule ref="Generic.ControlStructures.InlineControlStructure.NotAllowed"> 186 <exclude-pattern>/src/*</exclude-pattern> 187 </rule> 188 189 <rule ref="Generic.Files.LineEndings.InvalidEOLChar"> 190 <exclude-pattern>/src/*</exclude-pattern> 191 </rule> 192 193 <rule ref="Generic.Files.OneObjectStructurePerFile.MultipleFound"> 194 <exclude-pattern>/src/*</exclude-pattern> 195 </rule> 172 196 173 197 <rule ref="Generic.Formatting.DisallowMultipleStatements.SameLine"> … … 187 211 </rule> 188 212 189 <rule ref="PEAR.Functions.FunctionCallSignature.Indent"> 190 <exclude-pattern>/src/*</exclude-pattern> 191 </rule> 192 193 <rule ref="PEAR.Functions.FunctionCallSignature.EmptyLine"> 194 <exclude-pattern>/src/*</exclude-pattern> 195 </rule> 196 197 <rule ref="PSR2.ControlStructures.SwitchDeclaration.BreakIndent"> 198 <exclude-pattern>/src/*</exclude-pattern> 199 </rule> 200 201 <!-- Rules that require further review, not yet reviewed --> 202 203 <rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedElseif"> 204 <exclude-pattern>/src/*</exclude-pattern> 205 </rule> 206 207 <rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedIf"> 208 <exclude-pattern>/src/*</exclude-pattern> 209 </rule> 210 211 <rule ref="Generic.CodeAnalysis.UselessOverridingMethod.Found"> 212 <exclude-pattern>/src/*</exclude-pattern> 213 </rule> 214 215 <rule ref="Generic.ControlStructures.InlineControlStructure.NotAllowed"> 216 <exclude-pattern>/src/*</exclude-pattern> 217 </rule> 218 219 <rule ref="Generic.Files.LineEndings.InvalidEOLChar"> 220 <exclude-pattern>/src/*</exclude-pattern> 221 </rule> 222 223 <rule ref="Generic.Files.OneObjectStructurePerFile.MultipleFound"> 213 <rule ref="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed"> 214 <exclude-pattern>/src/*</exclude-pattern> 215 </rule> 216 217 <rule ref="NormalizedArrays.Arrays.ArrayBraceSpacing.SpaceAfterArrayOpenerMultiLine"> 218 <exclude-pattern>/src/*</exclude-pattern> 219 </rule> 220 221 <rule ref="NormalizedArrays.Arrays.ArrayBraceSpacing.SpaceAfterArrayOpenerSingleLine"> 222 <exclude-pattern>/src/*</exclude-pattern> 223 </rule> 224 225 <rule ref="NormalizedArrays.Arrays.ArrayBraceSpacing.SpaceBeforeArrayCloserMultiLine"> 226 <exclude-pattern>/src/*</exclude-pattern> 227 </rule> 228 229 <rule ref="NormalizedArrays.Arrays.ArrayBraceSpacing.SpaceBeforeArrayCloserSingleLine"> 230 <exclude-pattern>/src/*</exclude-pattern> 231 </rule> 232 233 <rule ref="NormalizedArrays.Arrays.CommaAfterLast.MissingMultiLine"> 234 <exclude-pattern>/src/*</exclude-pattern> 235 </rule> 236 237 <rule ref="NormalizedArrays.Arrays.CommaAfterLast.MissingMultiLineCloserSameLine"> 224 238 <exclude-pattern>/src/*</exclude-pattern> 225 239 </rule> … … 238 252 </rule> 239 253 254 <rule ref="PEAR.Functions.FunctionCallSignature.EmptyLine"> 255 <exclude-pattern>/src/*</exclude-pattern> 256 </rule> 257 240 258 <rule ref="PEAR.Functions.FunctionCallSignature.FirstArgumentPosition"> 241 259 <exclude-pattern>/src/*</exclude-pattern> 242 260 </rule> 243 261 262 <rule ref="PEAR.Functions.FunctionCallSignature.Indent"> 263 <exclude-pattern>/src/*</exclude-pattern> 264 </rule> 265 244 266 <rule ref="PEAR.Functions.FunctionCallSignature.MultipleArguments"> 245 267 <exclude-pattern>/src/*</exclude-pattern> … … 270 292 </rule> 271 293 294 <rule ref="PSR2.Classes.ClassDeclaration.CloseBraceAfterBody"> 295 <exclude-pattern>/src/*</exclude-pattern> 296 </rule> 297 272 298 <rule ref="PSR2.Classes.PropertyDeclaration.ScopeMissing"> 273 299 <exclude-pattern>/src/*</exclude-pattern> … … 294 320 </rule> 295 321 322 <rule ref="PSR2.ControlStructures.SwitchDeclaration.BreakIndent"> 323 <exclude-pattern>/src/*</exclude-pattern> 324 </rule> 325 296 326 <rule ref="PSR2.ControlStructures.SwitchDeclaration.SpaceBeforeColonCASE"> 297 327 <exclude-pattern>/src/*</exclude-pattern> … … 302 332 </rule> 303 333 334 <rule ref="PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose"> 335 <exclude-pattern>/src/*</exclude-pattern> 336 </rule> 337 304 338 <rule ref="PSR2.Methods.MethodDeclaration.Underscore"> 305 339 <exclude-pattern>/src/*</exclude-pattern> … … 318 352 </rule> 319 353 354 <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingBeforeClose"> 355 <exclude-pattern>/src/*</exclude-pattern> 356 </rule> 357 358 <rule ref="Squiz.Functions.MultiLineFunctionDeclaration.ContentAfterBrace"> 359 <exclude-pattern>/src/*</exclude-pattern> 360 </rule> 361 320 362 <rule ref="Squiz.PHP.CommentedOutCode.Found"> 321 363 <exclude-pattern>/src/*</exclude-pattern> … … 362 404 </rule> 363 405 406 <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine"> 407 <exclude-pattern>/src/*</exclude-pattern> 408 </rule> 409 410 <rule ref="Universal.Arrays.DuplicateArrayKey.Found"> 411 <exclude-pattern>/src/*</exclude-pattern> 412 </rule> 413 414 <rule ref="Universal.ControlStructures.DisallowLonelyIf.Found"> 415 <exclude-pattern>/src/*</exclude-pattern> 416 </rule> 417 418 <rule ref="Universal.Files.SeparateFunctionsFromOO.Mixed"> 419 <exclude-pattern>/src/*</exclude-pattern> 420 </rule> 421 422 <rule ref="Universal.NamingConventions.NoReservedKeywordParameterNames.arrayFound"> 423 <exclude-pattern>/src/*</exclude-pattern> 424 </rule> 425 426 <rule ref="Universal.NamingConventions.NoReservedKeywordParameterNames.classFound"> 427 <exclude-pattern>/src/*</exclude-pattern> 428 </rule> 429 430 <rule ref="Universal.NamingConventions.NoReservedKeywordParameterNames.defaultFound"> 431 <exclude-pattern>/src/*</exclude-pattern> 432 </rule> 433 434 <rule ref="Universal.NamingConventions.NoReservedKeywordParameterNames.echoFound"> 435 <exclude-pattern>/src/*</exclude-pattern> 436 </rule> 437 438 <rule ref="Universal.NamingConventions.NoReservedKeywordParameterNames.objectFound"> 439 <exclude-pattern>/src/*</exclude-pattern> 440 </rule> 441 442 <rule ref="Universal.NamingConventions.NoReservedKeywordParameterNames.parentFound"> 443 <exclude-pattern>/src/*</exclude-pattern> 444 </rule> 445 446 <rule ref="Universal.NamingConventions.NoReservedKeywordParameterNames.require_onceFound"> 447 <exclude-pattern>/src/*</exclude-pattern> 448 </rule> 449 450 <rule ref="Universal.NamingConventions.NoReservedKeywordParameterNames.stringFound"> 451 <exclude-pattern>/src/*</exclude-pattern> 452 </rule> 453 454 <rule ref="Universal.Operators.DisallowStandalonePostIncrementDecrement.PostDecrementFound"> 455 <exclude-pattern>/src/*</exclude-pattern> 456 </rule> 457 458 <rule ref="Universal.Operators.DisallowStandalonePostIncrementDecrement.PostIncrementFound"> 459 <exclude-pattern>/src/*</exclude-pattern> 460 </rule> 461 462 <rule ref="Universal.Operators.StrictComparisons.LooseEqual"> 463 <exclude-pattern>/src/*</exclude-pattern> 464 </rule> 465 466 <rule ref="Universal.Operators.StrictComparisons.LooseNotEqual"> 467 <exclude-pattern>/src/*</exclude-pattern> 468 </rule> 469 470 <rule ref="Universal.WhiteSpace.CommaSpacing.TooMuchSpaceAfter"> 471 <exclude-pattern>/src/*</exclude-pattern> 472 </rule> 473 474 <rule ref="Universal.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed"> 475 <exclude-pattern>/src/*</exclude-pattern> 476 </rule> 477 478 <rule ref="Universal.WhiteSpace.PrecisionAlignment.Found"> 479 <exclude-pattern>/src/*</exclude-pattern> 480 </rule> 481 364 482 <rule ref="WordPress.Arrays.ArrayDeclarationSpacing.ArrayItemNoNewLine"> 365 483 <exclude-pattern>/src/*</exclude-pattern> … … 370 488 </rule> 371 489 372 <rule ref="WordPress.Arrays.ArrayDeclarationSpacing.CloseBraceNewLine">373 <exclude-pattern>/src/*</exclude-pattern>374 </rule>375 376 <rule ref="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceAfterArrayOpener">377 <exclude-pattern>/src/*</exclude-pattern>378 </rule>379 380 <rule ref="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceBeforeArrayCloser">381 <exclude-pattern>/src/*</exclude-pattern>382 </rule>383 384 <rule ref="WordPress.Arrays.ArrayDeclarationSpacing.SpaceBeforeArrayCloser">385 <exclude-pattern>/src/*</exclude-pattern>386 </rule>387 388 490 <rule ref="WordPress.Arrays.ArrayIndentation.CloseBraceNotAligned"> 389 491 <exclude-pattern>/src/*</exclude-pattern> … … 410 512 </rule> 411 513 412 <rule ref="WordPress.Arrays.CommaAfterArrayItem.SpaceAfterComma">413 <exclude-pattern>/src/*</exclude-pattern>414 </rule>415 416 514 <rule ref="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned"> 417 515 <exclude-pattern>/src/*</exclude-pattern> … … 426 524 </rule> 427 525 428 <rule ref="WordPress. CodeAnalysis.AssignmentInCondition.FoundInWhileCondition">429 <exclude-pattern>/src/*</exclude-pattern>430 </rule> 431 432 <rule ref="WordPress. CodeAnalysis.AssignmentInCondition.Found">433 <exclude-pattern>/src/*</exclude-pattern> 434 </rule> 435 436 <rule ref="WordPress. CodeAnalysis.EmptyStatement">526 <rule ref="WordPress.DB.PreparedSQL.InterpolatedNotPrepared"> 527 <exclude-pattern>/src/*</exclude-pattern> 528 </rule> 529 530 <rule ref="WordPress.DB.PreparedSQL.NotPrepared"> 531 <exclude-pattern>/src/*</exclude-pattern> 532 </rule> 533 534 <rule ref="WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare"> 437 535 <exclude-pattern>/src/*</exclude-pattern> 438 536 </rule> … … 446 544 </rule> 447 545 448 <rule ref="WordPress.DB.PreparedSQL.InterpolatedNotPrepared">449 <exclude-pattern>/src/*</exclude-pattern>450 </rule>451 452 <rule ref="WordPress.DB.PreparedSQL.NotPrepared">453 <exclude-pattern>/src/*</exclude-pattern>454 </rule>455 456 546 <rule ref="WordPress.Files.FileName.InvalidClassFileName"> 457 <exclude-pattern>/src/*</exclude-pattern>547 <exclude-pattern>/src/*</exclude-pattern> 458 548 </rule> 459 549 … … 471 561 472 562 <rule ref="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound"> 473 <exclude-pattern>/src/*</exclude-pattern>563 <exclude-pattern>/src/*</exclude-pattern> 474 564 </rule> 475 565 … … 486 576 </rule> 487 577 488 <rule ref="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid">489 <exclude-pattern>/src/*</exclude-pattern>490 </rule>491 492 578 <rule ref="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase"> 493 579 <exclude-pattern>/src/*</exclude-pattern> … … 518 604 </rule> 519 605 520 <rule ref="WordPress.PHP.StrictComparisons.LooseComparison">521 <exclude-pattern>/src/*</exclude-pattern>522 </rule>523 524 606 <rule ref="WordPress.PHP.StrictInArray.MissingTrueStrict"> 525 607 <exclude-pattern>/src/*</exclude-pattern> 526 608 </rule> 527 609 528 <rule ref="WordPress.PHP.YodaConditions.NotYoda">529 <exclude-pattern>/src/*</exclude-pattern>530 </rule>531 532 610 <rule ref="WordPress.Security.EscapeOutput.OutputNotEscaped"> 533 611 <exclude-pattern>/src/*</exclude-pattern> … … 546 624 </rule> 547 625 548 <rule ref="WordPress.WhiteSpace.ControlStructureSpacing.ExtraSpaceAfterCloseParenthesis"> 626 <rule ref="WordPress.WP.AlternativeFunctions.json_encode_json_encode"> 627 <exclude-pattern>/src/*</exclude-pattern> 628 </rule> 629 630 <rule ref="WordPress.WP.AlternativeFunctions.parse_url_parse_url"> 631 <exclude-pattern>/src/*</exclude-pattern> 632 </rule> 633 634 <rule ref="WordPress.WP.AlternativeFunctions.rand_mt_rand"> 635 <exclude-pattern>/src/*</exclude-pattern> 636 </rule> 637 638 <rule ref="WordPress.WP.AlternativeFunctions.strip_tags_strip_tag"> 639 <exclude-pattern>/src/*</exclude-pattern> 640 </rule> 641 642 <rule ref="WordPress.WP.AlternativeFunctions.strip_tags_strip_tags"> 643 <exclude-pattern>/src/*</exclude-pattern> 644 </rule> 645 646 <rule ref="WordPress.WP.Capabilities.Unknown"> 647 <exclude-pattern>/src/*</exclude-pattern> 648 </rule> 649 650 <rule ref="WordPress.WP.DeprecatedParameters.Get_termsParam2Found"> 651 <exclude-pattern>/src/*</exclude-pattern> 652 </rule> 653 654 <rule ref="WordPress.WP.DeprecatedParameters.Wp_count_termsParam2Found"> 655 <exclude-pattern>/src/*</exclude-pattern> 656 </rule> 657 658 <rule ref="WordPress.WP.DiscouragedFunctions.query_posts_query_posts"> 659 <exclude-pattern>/src/*</exclude-pattern> 660 </rule> 661 662 <rule ref="WordPress.WP.DiscouragedFunctions.wp_reset_query_wp_reset_query"> 663 <exclude-pattern>/src/*</exclude-pattern> 664 </rule> 665 666 <rule ref="WordPress.WP.EnqueuedResourceParameters.NotInFooter"> 667 <exclude-pattern>/src/*</exclude-pattern> 668 </rule> 669 670 <rule ref="WordPress.WP.GlobalVariablesOverride.Prohibited"> 671 <exclude-pattern>/src/*</exclude-pattern> 672 </rule> 673 674 <rule ref="WordPress.WP.I18n.LowLevelTranslationFunction"> 675 <exclude-pattern>/src/*</exclude-pattern> 676 </rule> 677 678 <rule ref="WordPress.WP.I18n.MissingTranslatorsComment"> 679 <exclude-pattern>/src/*</exclude-pattern> 680 </rule> 681 682 <rule ref="WordPress.WP.I18n.NonSingularStringLiteralText"> 683 <exclude-pattern>/src/*</exclude-pattern> 684 </rule> 685 686 <rule ref="WordPress.WP.PostsPerPage.posts_per_page_posts_per_page"> 549 687 <exclude-pattern>/src/*</exclude-pattern> 550 688 </rule> … … 554 692 </rule> 555 693 694 <rule ref="WordPress.WhiteSpace.ControlStructureSpacing.ExtraSpaceBeforeCloseParenthesis"> 695 <exclude-pattern>/src/*</exclude-pattern> 696 </rule> 697 556 698 <rule ref="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis"> 557 699 <exclude-pattern>/src/*</exclude-pattern> … … 562 704 </rule> 563 705 564 <rule ref="WordPress.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed">565 <exclude-pattern>/src/*</exclude-pattern>566 </rule>567 568 706 <rule ref="WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter"> 569 707 <exclude-pattern>/src/*</exclude-pattern> … … 581 719 <exclude-pattern>/src/*</exclude-pattern> 582 720 </rule> 583 584 <rule ref="WordPress.WhiteSpace.PrecisionAlignment.Found"> 585 <exclude-pattern>/src/*</exclude-pattern> 586 </rule> 587 588 <rule ref="WordPress.WP.AlternativeFunctions.json_encode_json_encode"> 589 <exclude-pattern>/src/*</exclude-pattern> 590 </rule> 591 592 <rule ref="WordPress.WP.AlternativeFunctions.parse_url_parse_url"> 593 <exclude-pattern>/src/*</exclude-pattern> 594 </rule> 595 596 <rule ref="WordPress.WP.AlternativeFunctions.rand_mt_rand"> 597 <exclude-pattern>/src/*</exclude-pattern> 598 </rule> 599 600 <rule ref="WordPress.WP.AlternativeFunctions.strip_tags_strip_tags"> 601 <exclude-pattern>/src/*</exclude-pattern> 602 </rule> 603 604 <rule ref="WordPress.WP.DiscouragedFunctions.query_posts_query_posts"> 605 <exclude-pattern>/src/*</exclude-pattern> 606 </rule> 607 608 <rule ref="WordPress.WP.DiscouragedFunctions.wp_reset_query_wp_reset_query"> 609 <exclude-pattern>/src/*</exclude-pattern> 610 </rule> 611 612 <rule ref="WordPress.WP.EnqueuedResourceParameters.NotInFooter"> 613 <exclude-pattern>/src/*</exclude-pattern> 614 </rule> 615 616 <rule ref="WordPress.WP.GlobalVariablesOverride.Prohibited"> 617 <exclude-pattern>/src/*</exclude-pattern> 618 </rule> 619 620 <rule ref="WordPress.WP.I18n.LowLevelTranslationFunction"> 621 <exclude-pattern>/src/*</exclude-pattern> 622 </rule> 623 624 <rule ref="WordPress.WP.I18n.MissingTranslatorsComment"> 625 <exclude-pattern>/src/*</exclude-pattern> 626 </rule> 627 628 <rule ref="WordPress.WP.I18n.NonSingularStringLiteralText"> 629 <exclude-pattern>/src/*</exclude-pattern> 630 </rule> 631 721 632 722 </ruleset> -
trunk/src/includes/admin/classes/class-bbp-admin.php
r7345 r7352 973 973 974 974 // Forum Archive 975 } elseif ( $post->post_name === bbp_get_root_slug()) {975 } elseif ( bbp_get_root_slug() === $post->post_name ) { 976 976 $retval[] = esc_html_x( 'Forum Archive', 'page label', 'bbpress' ); 977 977 978 978 // Topic Archive 979 } elseif ( $post->post_name === bbp_get_topic_archive_slug()) {979 } elseif ( bbp_get_topic_archive_slug() === $post->post_name ) { 980 980 $retval[] = esc_html_x( 'Topic Archive', 'page label', 'bbpress' ); 981 981 } -
trunk/src/includes/admin/classes/class-bbp-converter-base.php
r7244 r7352 473 473 // Translates a field from the old forum. 474 474 } elseif ( isset( $row['callback_method'] ) ) { 475 if ( ( $row['callback_method'] === 'callback_userid') && ( false === $this->convert_users ) ) {475 if ( ( 'callback_userid' === $row['callback_method'] ) && ( false === $this->convert_users ) ) { 476 476 $insert_postmeta[ $row['to_fieldname'] ] = $forum[ $row['from_fieldname'] ]; 477 477 } else { … … 490 490 491 491 // Something to insert into the destination field 492 if ( count( $insert_post ) > 0 || ( $to_type == 'tags'&& count( $insert_postmeta ) > 0 ) ) {492 if ( count( $insert_post ) > 0 || ( 'tags' === $to_type && count( $insert_postmeta ) > 0 ) ) { 493 493 494 494 switch ( $to_type ) { -
trunk/src/includes/admin/converters/AEF.php
r6670 r7352 588 588 public function authenticate_pass( $password, $serialized_pass ) { 589 589 $pass_array = unserialize( $serialized_pass ); 590 return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ));590 return ( md5( md5( $password ). $pass_array['salt'] ) == $pass_array['hash'] ); 591 591 } 592 592 -
trunk/src/includes/admin/converters/Drupal7.php
r6670 r7352 586 586 public function authenticate_pass( $password, $serialized_pass ) { 587 587 $pass_array = unserialize( $serialized_pass ); 588 return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ));588 return ( md5( md5( $password ). $pass_array['salt'] ) == $pass_array['hash'] ); 589 589 } 590 590 -
trunk/src/includes/admin/converters/Example.php
r7056 r7352 707 707 public function authenticate_pass( $password, $serialized_pass ) { 708 708 $pass_array = unserialize( $serialized_pass ); 709 return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ));709 return ( md5( md5( $password ). $pass_array['salt'] ) == $pass_array['hash'] ); 710 710 } 711 711 } -
trunk/src/includes/admin/converters/FluxBB.php
r6670 r7352 609 609 public function authenticate_pass( $password, $serialized_pass ) { 610 610 $pass_array = unserialize( $serialized_pass ); 611 return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ));611 return ( md5( md5( $password ). $pass_array['salt'] ) == $pass_array['hash'] ); 612 612 } 613 613 -
trunk/src/includes/admin/converters/Invision.php
r7056 r7352 483 483 */ 484 484 public function callback_forum_type( $status = 0 ) { 485 if ( $status == -1) {485 if ( -1 == $status ) { 486 486 $status = 'category'; 487 487 } else { … … 537 537 public function authenticate_pass( $password, $serialized_pass ) { 538 538 $pass_array = unserialize( $serialized_pass ); 539 return ( $pass_array['hash'] == md5( md5( $pass_array['salt'] ) . md5( $this->to_char( $password ) ) ));539 return ( md5( md5( $pass_array['salt'] ) . md5( $this->to_char( $password ) ) ) == $pass_array['hash'] ); 540 540 } 541 541 -
trunk/src/includes/admin/converters/Kunena1.php
r6670 r7352 464 464 public function authenticate_pass($password, $serialized_pass) { 465 465 $pass_array = unserialize($serialized_pass); 466 return ( $pass_array['hash'] == md5(md5($password) . $pass_array['salt']));466 return ( md5(md5($password) . $pass_array['salt']) == $pass_array['hash'] ); 467 467 } 468 468 … … 474 474 */ 475 475 public function callback_forum_type( $status = 0 ) { 476 if ( $status == 0) {476 if ( 0 == $status ) { 477 477 $status = 'category'; 478 478 } else { -
trunk/src/includes/admin/converters/Kunena2.php
r7006 r7352 495 495 public function authenticate_pass($password, $serialized_pass) { 496 496 $pass_array = unserialize($serialized_pass); 497 return ( $pass_array['hash'] == md5(md5($password) . $pass_array['salt']));497 return ( md5(md5($password) . $pass_array['salt']) == $pass_array['hash'] ); 498 498 } 499 499 /** … … 504 504 */ 505 505 public function callback_forum_type( $status = 0 ) { 506 if ( $status == 0) {506 if ( 0 == $status ) { 507 507 $status = 'category'; 508 508 } else { -
trunk/src/includes/admin/converters/Kunena3.php
r6670 r7352 719 719 public function authenticate_pass( $password, $serialized_pass ) { 720 720 $pass_array = unserialize( $serialized_pass ); 721 return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ));721 return ( md5( md5( $password ). $pass_array['salt'] ) == $pass_array['hash'] ); 722 722 } 723 723 … … 729 729 */ 730 730 public function callback_forum_type( $status = 0 ) { 731 if ( $status == 0) {731 if ( 0 == $status ) { 732 732 $status = 'category'; 733 733 } else { -
trunk/src/includes/admin/converters/MyBB.php
r6670 r7352 535 535 public function authenticate_pass( $password, $serialized_pass ) { 536 536 $pass_array = unserialize( $serialized_pass ); 537 return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ));537 return ( md5( md5( $password ). $pass_array['salt'] ) == $pass_array['hash'] ); 538 538 } 539 539 -
trunk/src/includes/admin/converters/PHPFox3.php
r6670 r7352 525 525 public function authenticate_pass( $password, $serialized_pass ) { 526 526 $pass_array = unserialize( $serialized_pass ); 527 return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ));527 return ( md5( md5( $password ). $pass_array['salt'] ) == $pass_array['hash'] ); 528 528 } 529 529 -
trunk/src/includes/admin/converters/PHPWind.php
r6670 r7352 505 505 public function authenticate_pass( $password, $serialized_pass ) { 506 506 $pass_array = unserialize( $serialized_pass ); 507 return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ));507 return ( md5( md5( $password ). $pass_array['salt'] ) == $pass_array['hash'] ); 508 508 } 509 509 -
trunk/src/includes/admin/converters/Phorum.php
r6670 r7352 535 535 public function authenticate_pass( $password, $serialized_pass ) { 536 536 $pass_array = unserialize( $serialized_pass ); 537 return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ));537 return ( md5( md5( $password ). $pass_array['salt'] ) == $pass_array['hash'] ); 538 538 } 539 539 -
trunk/src/includes/admin/converters/PunBB.php
r6670 r7352 682 682 public function authenticate_pass( $password, $serialized_pass ) { 683 683 $pass_array = unserialize( $serialized_pass ); 684 return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ));684 return ( md5( md5( $password ). $pass_array['salt'] ) == $pass_array['hash'] ); 685 685 } 686 686 -
trunk/src/includes/admin/converters/SMF.php
r7006 r7352 677 677 public function authenticate_pass( $password, $serialized_pass ) { 678 678 $pass_array = unserialize( $serialized_pass ); 679 return ( $pass_array['hash'] === sha1( strtolower( $pass_array['username'] ) . $password )? true : false );679 return ( sha1( strtolower( $pass_array['username'] ) . $password ) === $pass_array['hash'] ? true : false ); 680 680 } 681 681 -
trunk/src/includes/admin/converters/Vanilla.php
r7056 r7352 572 572 */ 573 573 public function callback_forum_parent( $parent = 0 ) { 574 if ( $parent == -1) {574 if ( -1 == $parent ) { 575 575 return 0; 576 576 } else { -
trunk/src/includes/admin/converters/XMB.php
r6670 r7352 642 642 public function authenticate_pass( $password, $serialized_pass ) { 643 643 $pass_array = unserialize( $serialized_pass ); 644 return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );644 return ( md5( md5( $password ). $pass_array['salt'] == $pass_array['hash'] ) ); 645 645 } 646 646 -
trunk/src/includes/admin/converters/XenForo.php
r7056 r7352 700 700 switch ( $pass_array['hashFunc'] ) { 701 701 case 'sha256': 702 return ( $pass_array['hash'] == hash( 'sha256', hash( 'sha256', $password ) . $pass_array['salt'] ));702 return ( hash( 'sha256', hash( 'sha256', $password ) . $pass_array['salt'] ) == $pass_array['hash'] ); 703 703 case 'sha1': 704 return ( $pass_array['hash'] == sha1( sha1( $password ) . $pass_array['salt'] ));704 return ( sha1( sha1( $password ) . $pass_array['salt'] ) == $pass_array['hash'] ); 705 705 } 706 706 } -
trunk/src/includes/admin/converters/bbPress1.php
r7056 r7352 662 662 */ 663 663 public function callback_forum_type( $status = 0 ) { 664 if ( $status == 1) {664 if ( 1 == $status ) { 665 665 $status = 'category'; 666 666 } else { -
trunk/src/includes/admin/converters/e107v1.php
r7006 r7352 490 490 public function authenticate_pass( $password, $serialized_pass ) { 491 491 $pass_array = unserialize( $serialized_pass ); 492 return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ));492 return ( md5( md5( $password ). $pass_array['salt'] ) == $pass_array['hash'] ); 493 493 } 494 494 … … 500 500 */ 501 501 public function callback_forum_type( $status = 0 ) { 502 if ( $status == 0) {502 if ( 0 == $status ) { 503 503 $status = 'category'; 504 504 } else { -
trunk/src/includes/admin/converters/vBulletin.php
r7056 r7352 652 652 public function authenticate_pass( $password, $serialized_pass ) { 653 653 $pass_array = unserialize( $serialized_pass ); 654 return ( $pass_array['hash'] == md5( md5( $password ) . $pass_array['salt'] ));654 return ( md5( md5( $password ) . $pass_array['salt'] ) == $pass_array['hash'] ); 655 655 } 656 656 … … 662 662 */ 663 663 public function callback_forum_type( $status = 0 ) { 664 if ( $status == -1) {664 if ( -1 == $status ) { 665 665 $status = 'category'; 666 666 } else { -
trunk/src/includes/admin/converters/vBulletin3.php
r7056 r7352 656 656 public function authenticate_pass( $password, $serialized_pass ) { 657 657 $pass_array = unserialize( $serialized_pass ); 658 return ( $pass_array['hash'] == md5( md5( $password ) . $pass_array['salt'] ));658 return ( md5( md5( $password ) . $pass_array['salt'] ) == $pass_array['hash'] ); 659 659 } 660 660 … … 666 666 */ 667 667 public function callback_forum_type( $status = 0 ) { 668 if ( $status == -1) {668 if ( -1 == $status ) { 669 669 $status = 'category'; 670 670 } else { -
trunk/src/includes/admin/forums.php
r7190 r7352 448 448 switch ( $notice ) { 449 449 case 'opened' : 450 $message = ( $is_failure === true )450 $message = ( true === $is_failure ) 451 451 ? sprintf( esc_html__( 'There was a problem opening the forum "%1$s".', 'bbpress' ), $forum_title ) 452 452 : sprintf( esc_html__( 'Forum "%1$s" successfully opened.', 'bbpress' ), $forum_title ); … … 454 454 455 455 case 'closed' : 456 $message = ( $is_failure === true )456 $message = ( true === $is_failure ) 457 457 ? sprintf( esc_html__( 'There was a problem closing the forum "%1$s".', 'bbpress' ), $forum_title ) 458 458 : sprintf( esc_html__( 'Forum "%1$s" successfully closed.', 'bbpress' ), $forum_title ); … … 462 462 // Do additional forum toggle notice filters (admin side) 463 463 $message = apply_filters( 'bbp_toggle_forum_notice_admin', $message, $forum_id, $notice, $is_failure ); 464 $class = ( $is_failure === true )464 $class = ( true === $is_failure ) 465 465 ? 'error' 466 466 : 'updated'; -
trunk/src/includes/admin/replies.php
r7190 r7352 422 422 $anonymous_data = bbp_filter_anonymous_post_data(); 423 423 $author_id = bbp_get_reply_author_id( $reply_id ); 424 $is_edit = ( isset( $_POST['hidden_post_status'] ) && ( $_POST['hidden_post_status'] !== 'draft') );424 $is_edit = ( isset( $_POST['hidden_post_status'] ) && ( 'draft' !== $_POST['hidden_post_status'] ) ); 425 425 426 426 // Formally update the reply … … 559 559 switch ( $notice ) { 560 560 case 'spammed' : 561 $message = ( $is_failure === true )561 $message = ( true === $is_failure ) 562 562 ? sprintf( esc_html__( 'There was a problem marking the reply "%1$s" as spam.', 'bbpress' ), $reply_title ) 563 563 : sprintf( esc_html__( 'Reply "%1$s" successfully marked as spam.', 'bbpress' ), $reply_title ); … … 565 565 566 566 case 'unspammed' : 567 $message = ( $is_failure === true)567 $message = ( true === $is_failure ) 568 568 ? sprintf( esc_html__( 'There was a problem unmarking the reply "%1$s" as spam.', 'bbpress' ), $reply_title ) 569 569 : sprintf( esc_html__( 'Reply "%1$s" successfully unmarked as spam.', 'bbpress' ), $reply_title ); … … 571 571 572 572 case 'approved' : 573 $message = ( $is_failure === true)573 $message = ( true === $is_failure ) 574 574 ? sprintf( esc_html__( 'There was a problem approving the reply "%1$s".', 'bbpress' ), $reply_title ) 575 575 : sprintf( esc_html__( 'Reply "%1$s" successfully approved.', 'bbpress' ), $reply_title ); … … 577 577 578 578 case 'unapproved' : 579 $message = ( $is_failure === true )579 $message = ( true === $is_failure ) 580 580 ? sprintf( esc_html__( 'There was a problem unapproving the reply "%1$s".', 'bbpress' ), $reply_title ) 581 581 : sprintf( esc_html__( 'Reply "%1$s" successfully unapproved.', 'bbpress' ), $reply_title ); … … 585 585 // Do additional reply toggle notice filters (admin side) 586 586 $message = apply_filters( 'bbp_toggle_reply_notice_admin', $message, $reply_id, $notice, $is_failure ); 587 $class = ( $is_failure === true )587 $class = ( true === $is_failure ) 588 588 ? 'error' 589 589 : 'updated'; -
trunk/src/includes/admin/tools/repair.php
r7344 r7352 1067 1067 // If the topic is not a super sticky, and the forum ID does not 1068 1068 // match the topic's forum ID, unset the forum's sticky meta. 1069 if ( ! bbp_is_topic_super_sticky( $topic_id ) && ( $forum_id !== bbp_get_topic_forum_id( $topic_id ) )) {1069 if ( ! bbp_is_topic_super_sticky( $topic_id ) && ( bbp_get_topic_forum_id( $topic_id ) ) !== $forum_id ) { 1070 1070 unset( $forum_stickies[ $forum_id ][ $id ] ); 1071 1071 } -
trunk/src/includes/admin/topics.php
r7190 r7352 539 539 $anonymous_data = bbp_filter_anonymous_post_data(); 540 540 $author_id = bbp_get_topic_author_id( $topic_id ); 541 $is_edit = ( isset( $_POST['hidden_post_status'] ) && ( $_POST['hidden_post_status'] !== 'draft') );541 $is_edit = ( isset( $_POST['hidden_post_status'] ) && ( 'draft' !== $_POST['hidden_post_status'] ) ); 542 542 543 543 // Formally update the topic … … 710 710 switch ( $notice ) { 711 711 case 'opened' : 712 $message = ( $is_failure === true )712 $message = ( true === $is_failure ) 713 713 ? sprintf( esc_html__( 'There was a problem opening the topic "%1$s".', 'bbpress' ), $topic_title ) 714 714 : sprintf( esc_html__( 'Topic "%1$s" successfully opened.', 'bbpress' ), $topic_title ); … … 716 716 717 717 case 'closed' : 718 $message = ( $is_failure === true )718 $message = ( true === $is_failure ) 719 719 ? sprintf( esc_html__( 'There was a problem closing the topic "%1$s".', 'bbpress' ), $topic_title ) 720 720 : sprintf( esc_html__( 'Topic "%1$s" successfully closed.', 'bbpress' ), $topic_title ); … … 722 722 723 723 case 'super_sticky' : 724 $message = ( $is_failure === true )724 $message = ( true === $is_failure ) 725 725 ? sprintf( esc_html__( 'There was a problem sticking the topic "%1$s" to front.', 'bbpress' ), $topic_title ) 726 726 : sprintf( esc_html__( 'Topic "%1$s" successfully stuck to front.', 'bbpress' ), $topic_title ); … … 728 728 729 729 case 'stuck' : 730 $message = ( $is_failure === true )730 $message = ( true === $is_failure ) 731 731 ? sprintf( esc_html__( 'There was a problem sticking the topic "%1$s".', 'bbpress' ), $topic_title ) 732 732 : sprintf( esc_html__( 'Topic "%1$s" successfully stuck.', 'bbpress' ), $topic_title ); … … 734 734 735 735 case 'unstuck' : 736 $message = ( $is_failure === true)736 $message = ( true === $is_failure ) 737 737 ? sprintf( esc_html__( 'There was a problem unsticking the topic "%1$s".', 'bbpress' ), $topic_title ) 738 738 : sprintf( esc_html__( 'Topic "%1$s" successfully unstuck.', 'bbpress' ), $topic_title ); … … 740 740 741 741 case 'spammed' : 742 $message = ( $is_failure === true )742 $message = ( true === $is_failure ) 743 743 ? sprintf( esc_html__( 'There was a problem marking the topic "%1$s" as spam.', 'bbpress' ), $topic_title ) 744 744 : sprintf( esc_html__( 'Topic "%1$s" successfully marked as spam.', 'bbpress' ), $topic_title ); … … 746 746 747 747 case 'unspammed' : 748 $message = ( $is_failure === true )748 $message = ( true === $is_failure ) 749 749 ? sprintf( esc_html__( 'There was a problem unmarking the topic "%1$s" as spam.', 'bbpress' ), $topic_title ) 750 750 : sprintf( esc_html__( 'Topic "%1$s" successfully unmarked as spam.', 'bbpress' ), $topic_title ); … … 752 752 753 753 case 'approved' : 754 $message = ( $is_failure === true )754 $message = ( true === $is_failure ) 755 755 ? sprintf( esc_html__( 'There was a problem approving the topic "%1$s".', 'bbpress' ), $topic_title ) 756 756 : sprintf( esc_html__( 'Topic "%1$s" successfully approved.', 'bbpress' ), $topic_title ); … … 758 758 759 759 case 'unapproved' : 760 $message = ( $is_failure === true )760 $message = ( true === $is_failure ) 761 761 ? sprintf( esc_html__( 'There was a problem unapproving the topic "%1$s".', 'bbpress' ), $topic_title ) 762 762 : sprintf( esc_html__( 'Topic "%1$s" successfully unapproved.', 'bbpress' ), $topic_title ); … … 766 766 // Do additional topic toggle notice filters (admin side) 767 767 $message = apply_filters( 'bbp_toggle_topic_notice_admin', $message, $topic_id, $notice, $is_failure ); 768 $class = ( $is_failure === true )768 $class = ( true === $is_failure ) 769 769 ? 'error' 770 770 : 'updated'; -
trunk/src/includes/common/formatting.php
r7335 r7352 369 369 } 370 370 371 if ( $nested_code_pre || empty( $piece ) || ( $piece[0] === '<'&& ! preg_match( '|^<\s*[\w]{1,20}+://|', $piece ) ) ) {371 if ( $nested_code_pre || empty( $piece ) || ( '<' === $piece[0] && ! preg_match( '|^<\s*[\w]{1,20}+://|', $piece ) ) ) { 372 372 $r .= $piece; 373 373 continue; -
trunk/src/includes/common/locks.php
r6344 r7352 44 44 45 45 // Return user who is or last edited 46 if ( ! empty( $time ) && ( $time > ( time() - $time_window ) ) && ( $user !== bbp_get_current_user_id() )) {46 if ( ! empty( $time ) && ( $time > ( time() - $time_window ) ) && ( bbp_get_current_user_id() ) !== $user ) { 47 47 return (int) $user; 48 48 } -
trunk/src/includes/common/template.php
r7312 r7352 196 196 197 197 // Check query 198 if ( ! empty( $wp_query->bbp_is_forum_edit ) && ( $wp_query->bbp_is_forum_edit === true) ) {198 if ( ! empty( $wp_query->bbp_is_forum_edit ) && ( true === $wp_query->bbp_is_forum_edit ) ) { 199 199 $retval = true; 200 200 … … 296 296 297 297 // Check query 298 if ( ! empty( $wp_query->bbp_is_topic_edit ) && ( $wp_query->bbp_is_topic_edit === true) ) {298 if ( ! empty( $wp_query->bbp_is_topic_edit ) && ( true === $wp_query->bbp_is_topic_edit ) ) { 299 299 $retval = true; 300 300 … … 958 958 959 959 // Check query 960 if ( ! empty( $wp_query->bbp_is_edit ) && ( $wp_query->bbp_is_edit === true) ) {960 if ( ! empty( $wp_query->bbp_is_edit ) && ( true === $wp_query->bbp_is_edit ) ) { 961 961 $retval = true; 962 962 } … … 2318 2318 2319 2319 // Don't show root if viewing page in place of forum archive 2320 if ( ! empty( $root_id ) && ( ( is_single() || is_page() ) && ( $root_id === get_the_ID()) ) ) {2320 if ( ! empty( $root_id ) && ( ( is_single() || is_page() ) && ( get_the_ID() === $root_id ) ) ) { 2321 2321 $pre_include_root = false; 2322 2322 } -
trunk/src/includes/core/abstraction.php
r7099 r7352 472 472 473 473 // Return filtered value, or default if not intercepted 474 return ( $filtered === reset( $r ))474 return ( reset( $r ) === $filtered ) 475 475 ? $default 476 476 : $filtered; -
trunk/src/includes/core/update.php
r7344 r7352 71 71 72 72 // The plugin(s) being activated 73 if ( $action === 'activate') {73 if ( 'activate' === $action ) { 74 74 $plugins = isset( $_GET['plugin'] ) ? array( $_GET['plugin'] ) : array(); 75 75 } else { … … 123 123 124 124 // The plugin(s) being deactivated 125 if ( $action === 'deactivate') {125 if ( 'deactivate' === $action ) { 126 126 $plugins = isset( $_GET['plugin'] ) ? array( $_GET['plugin'] ) : array(); 127 127 } else { -
trunk/src/includes/extend/akismet.php
r7325 r7352 596 596 597 597 // Normal result: true 598 if ( ! empty( $this->last_post['bbp_akismet_result'] ) && ( $this->last_post['bbp_akismet_result'] === 'true') ) {598 if ( ! empty( $this->last_post['bbp_akismet_result'] ) && ( 'true' === $this->last_post['bbp_akismet_result'] ) ) { 599 599 600 600 // Leave a trail so other's know what we did … … 619 619 620 620 // Normal result: false 621 } elseif ( ! empty( $this->last_post['bbp_akismet_result'] ) && ( $this->last_post['bbp_akismet_result'] === 'false') ) {621 } elseif ( ! empty( $this->last_post['bbp_akismet_result'] ) && ( 'false' === $this->last_post['bbp_akismet_result'] ) ) { 622 622 623 623 // Leave a trail so other's know what we did -
trunk/src/includes/forums/functions.php
r7350 r7352 287 287 // If the forum is trash, or the forum_status is switched to 288 288 // trash, trash it properly 289 if ( ( get_post_field( 'post_status', $forum_id ) === bbp_get_trash_status_id() ) || ( $forum_data['post_status'] === bbp_get_trash_status_id()) ) {289 if ( ( get_post_field( 'post_status', $forum_id ) === bbp_get_trash_status_id() ) || ( bbp_get_trash_status_id() === $forum_data['post_status'] ) ) { 290 290 291 291 // Trash the reply … … 299 299 300 300 // If reply or forum are spam, officially spam this reply 301 if ( $forum_data['post_status'] === bbp_get_spam_status_id()) {301 if ( bbp_get_spam_status_id() === $forum_data['post_status'] ) { 302 302 add_post_meta( $forum_id, '_bbp_spam_meta_status', bbp_get_public_status_id() ); 303 303 -
trunk/src/includes/forums/template.php
r7347 r7352 294 294 295 295 // Bail if not correct post type 296 if ( $forum->post_type !== bbp_get_forum_post_type()) {296 if ( bbp_get_forum_post_type() !== $forum->post_type ) { 297 297 return null; 298 298 } … … 302 302 303 303 // Array A 304 if ( $output === ARRAY_A) {304 if ( ARRAY_A === $output ) { 305 305 $retval = get_object_vars( $forum ); 306 306 307 307 // Array N 308 } elseif ( $output === ARRAY_N) {308 } elseif ( ARRAY_N === $output ) { 309 309 $retval = array_values( get_object_vars( $forum ) ); 310 310 } … … 1600 1600 1601 1601 // Break when it reach the max count 1602 if ( ( $operator === 'OR') && ( $count >= 1 ) ) {1602 if ( ( 'OR' === $operator ) && ( $count >= 1 ) ) { 1603 1603 break; 1604 1604 } … … 1737 1737 1738 1738 // Break when it reach the max count 1739 if ( ( $operator === 'OR') && ( $count >= 1 ) ) {1739 if ( ( 'OR' === $operator ) && ( $count >= 1 ) ) { 1740 1740 break; 1741 1741 } -
trunk/src/includes/replies/functions.php
r7350 r7352 431 431 // If this reply starts as trash, add it to pre_trashed_replies 432 432 // for the topic, so it is properly restored. 433 if ( bbp_is_topic_trash( $topic_id ) || ( $reply_data['post_status'] === bbp_get_trash_status_id()) ) {433 if ( bbp_is_topic_trash( $topic_id ) || ( bbp_get_trash_status_id() === $reply_data['post_status'] ) ) { 434 434 435 435 // Trash the reply … … 457 457 458 458 // If reply or topic are spam, officially spam this reply 459 } elseif ( bbp_is_topic_spam( $topic_id ) || ( $reply_data['post_status'] === bbp_get_spam_status_id()) ) {459 } elseif ( bbp_is_topic_spam( $topic_id ) || ( bbp_get_spam_status_id() === $reply_data['post_status'] ) ) { 460 460 add_post_meta( $reply_id, '_bbp_spam_meta_status', bbp_get_public_status_id() ); 461 461 … … 603 603 604 604 // Forum exists 605 if ( ! empty( $forum_id ) && ( $forum_id !== bbp_get_reply_forum_id( $reply_id )) ) {605 if ( ! empty( $forum_id ) && ( bbp_get_reply_forum_id( $reply_id ) !== $forum_id ) ) { 606 606 607 607 // Forum is a category -
trunk/src/includes/replies/template.php
r7347 r7352 367 367 368 368 // Bail if not correct post type 369 if ( $reply->post_type !== bbp_get_reply_post_type()) {369 if ( bbp_get_reply_post_type() !== $reply->post_type ) { 370 370 return null; 371 371 } … … 375 375 376 376 // Array A 377 if ( $output === ARRAY_A) {377 if ( ARRAY_A === $output ) { 378 378 $retval = get_object_vars( $reply ); 379 379 380 380 // Array N 381 } elseif ( $output === ARRAY_N) {381 } elseif ( ARRAY_N === $output ) { 382 382 $retval = array_values( get_object_vars( $reply ) ); 383 383 } -
trunk/src/includes/topics/functions.php
r7350 r7352 343 343 344 344 // If the topic is closed, close it properly 345 if ( ( get_post_field( 'post_status', $topic_id ) === bbp_get_closed_status_id() ) || ( $topic_data['post_status'] === bbp_get_closed_status_id()) ) {345 if ( ( get_post_field( 'post_status', $topic_id ) === bbp_get_closed_status_id() ) || bbp_get_closed_status_id() === ( $topic_data['post_status'] ) ) { 346 346 347 347 // Close the topic … … 353 353 // If the forum is trash, or the topic_status is switched to 354 354 // trash, trash the topic properly 355 if ( ( get_post_field( 'post_status', $forum_id ) === bbp_get_trash_status_id() ) || ( $topic_data['post_status'] === bbp_get_trash_status_id()) ) {355 if ( ( get_post_field( 'post_status', $forum_id ) === bbp_get_trash_status_id() ) || bbp_get_trash_status_id() === ( $topic_data['post_status'] ) ) { 356 356 357 357 // Trash the topic … … 365 365 366 366 // If the topic is spam, officially spam this topic 367 if ( $topic_data['post_status'] === bbp_get_spam_status_id()) {367 if ( bbp_get_spam_status_id() === $topic_data['post_status'] ) { 368 368 add_post_meta( $topic_id, '_bbp_spam_meta_status', bbp_get_public_status_id() ); 369 369 -
trunk/src/includes/topics/template.php
r7349 r7352 523 523 524 524 // Bail if not correct post type 525 if ( $topic->post_type !== bbp_get_topic_post_type()) {525 if ( bbp_get_topic_post_type() !== $topic->post_type ) { 526 526 return null; 527 527 } … … 531 531 532 532 // Array A 533 if ( $output === ARRAY_A) {533 if ( ARRAY_A === $output ) { 534 534 $retval = get_object_vars( $topic ); 535 535 536 536 // Array N 537 } elseif ( $output === ARRAY_N) {537 } elseif ( ARRAY_N === $output ) { 538 538 $retval = array_values( get_object_vars( $topic ) ); 539 539 } -
trunk/src/includes/users/template.php
r7214 r7352 101 101 102 102 // loop has just started 103 if ( $this->current_user === -1) {103 if ( -1 === $this->current_user ) { 104 104 105 105 /**
Note: See TracChangeset
for help on using the changeset viewer.