Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-9754

Template variable S_USER_POSTED always set to false in search.php


    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.7-PL1
    • Fix Version/s: 3.0.8-RC1
    • Component/s: Search
    • Labels:
    • Environment:
      My testing machine:
      Mac OS X 10.6.4 running PHP 5.3.1, MySQL(i) 5.0.38, phpBB 3.0.7 PL1 viewed on Safari 5.0

      My live server:
      Linux server running PHP 5.2.1, MySQL(i) 5.0.38, phpBB 3.0.7 PL1 viewed on Safari 5.0


      In the root of the phpBB 3.0.7 install, file search.php, line 899 the code reads:

      'S_USER_POSTED' => (!empty($row['mark_type'])) ? true : false,

      This basically creates a variable called "S_USER_POSTED" for use in the templates. The variable is set to 'true' if a user has posted in a topic and 'false' if they have not. However, in the database, there is no such column as 'mark_type' in the tables relating to topic-user-posting relationships. The correct column name is 'topic_posted'. Amending the above line therefore allows the variable to be correctly assigned a value of true or false depending on whether a user has replied in a topic or not. Prior to the amendment, the template variable S_USER_POSTED always returns false.

      The corrected line at 899 in search.php should read:

      'S_USER_POSTED' => (!empty($row['topic_posted'])) ? true : false,


          Issue Links



              • Assignee:
                bantu Andreas Fischer
                donottumbledry donottumbledry
              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created: