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

$user->lang['COMMA_SEPARATOR'] is not uniformly used

    Details

    • Type: Improvement
    • Status: Unverified Fix
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-dev
    • Fix Version/s: 3.1.0-a1
    • Component/s: None
    • Labels:
      None

      Description

      $user->lang['COMMA_SEPARATOR'] is not used uniformly (some places use "implode(', ', $user_affected)" and some others "implode($user->lang['COMMA_SEPARATOR'], $user_affected)"

        Issue Links

          Activity

          Hide
          nickvergessen Joas Schilling added a comment - - edited

          Would it make sense, to put that into a function, so its easy to use and easier to remember?

          function implode_comma_separator($array)
          {
              global $user;
              return implode($user->lang['COMMA_SEPARATOR'], $array);
          }

          (or even put it into the user object)

          Show
          nickvergessen Joas Schilling added a comment - - edited Would it make sense, to put that into a function, so its easy to use and easier to remember? function implode_comma_separator($array) { global $user; return implode($user->lang['COMMA_SEPARATOR'], $array); } (or even put it into the user object)
          Hide
          EXreaction EXreaction [X] (Inactive) added a comment -

          I would think it might be good in the user object. It should be descriptive, but not too long...

          Perhaps $user->implode_list()?

          Show
          EXreaction EXreaction [X] (Inactive) added a comment - I would think it might be good in the user object. It should be descriptive, but not too long... Perhaps $user->implode_list()?
          Hide
          nickvergessen Joas Schilling added a comment -

          This fix is not really optimal. Currently it uses the comma separator of the user who triggers the log. but it should be imploded when the user reads the log, so that everyone sees his style then.

          Show
          nickvergessen Joas Schilling added a comment - This fix is not really optimal. Currently it uses the comma separator of the user who triggers the log. but it should be imploded when the user reads the log, so that everyone sees his style then.
          Hide
          rxu Ruslan Uzdenov added a comment -

          https://github.com/phpbb/phpbb/blob/develop/phpBB/styles/prosilver/template/forumlist_body.html#L42

          Comma is hardcoded here for subforums list:

          <!-- IF not forumrow.subforum.S_LAST_ROW -->,<!-- ENDIF -->

          Shouldn't it be replaced to separator token as well?

          Show
          rxu Ruslan Uzdenov added a comment - https://github.com/phpbb/phpbb/blob/develop/phpBB/styles/prosilver/template/forumlist_body.html#L42 Comma is hardcoded here for subforums list: <!-- IF not forumrow.subforum.S_LAST_ROW -->,<!-- ENDIF --> Shouldn't it be replaced to separator token as well?
          Hide
          bantu Andreas Fischer added a comment -

          Yes, probably. Create a new ticket and fit it.

          Show
          bantu Andreas Fischer added a comment - Yes, probably. Create a new ticket and fit it.

            People

            • Assignee:
              EXreaction EXreaction [X] (Inactive)
              Reporter:
              EXreaction EXreaction [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development