Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-7744

Coding guidelines / viewtopic.php

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 3.0.3
    • 3.0.x
    • Other
    • None
    • PHP Environment:
      Database:

      In viewtopic.php, changes mostly made in revision 8775.

      ~ Line 479

      if (check_link_hash(request_var('hash', ''),"topic_$topic_id")) 

      should be

      if (check_link_hash(request_var('hash', ''), "topic_$topic_id")) 

      Note the space.

      ~ Line 501

          }    meta_refresh(3, $viewtopic_url);    trigger_error($message); 

      is mostly written as

          }    meta_refresh(3, $viewtopic_url);    trigger_error($message); 

      Also, maybe you want to add an empty line before $message, as you normally do (e.g. ~ line 711).

      $message = (($topic_data['bookmarked']) ? $user->lang['BOOKMARK_REMOVED'] : $user->lang['BOOKMARK_ADDED']) . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $viewtopic_url . '">', '</a>'); 

      ~ Line 691 is empty

          if ($update && $s_can_vote)    {        if (!sizeof($voted_id) || sizeof($voted_id) > $topic_data['poll_max_options'] || in_array(VOTE_CONVERTED, $cur_voted_id))        { 

            Acyd Burn Meik Sievertsen [X] (Inactive)
            bantu Andreas Fischer [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: