Avatar

7.3.3 ⇔ 5.2.6 (General)

by Alfie ⌂ @, Vienna, Austria, Sunday, April 14, 2019, 10:34 (4 days ago) @ Auge

Hallo Auge

Wenn Fragen aufkommen, frag' (auch) hier.

Ich muss doch noch einmal anklopfen. Zwar nur eine “Notice”, aber ich würde gerne verstehen warum.

funcs.output.php

/**
 * detects the status of $mark dependent of users role
 *
 * @param array $mark
 * @param string $user_type
 * @param string $connid
 * @return array $mark
 */
function outputStatusMark($mark, $user_type = '', $connid) {
global $settings;
 if (is_array($mark)) {
  $mark['admin'] = ($user_type === "admin" && $settings['admin_mod_highlight'] == 1) ? 1 : 0;
  $mark['mod'] = ($user_type === "mod" && $settings['admin_mod_highlight'] == 1) ? 1 : 0;
  $mark['user'] = ($user_type === "user" && $settings['user_highlight'] == 1) ? 1 : 0;
 } else {
  $mark = array('admin' => 0, 'mod' => 0, 'user' => 0); # deleted user has no user_id any more
 }
 return $mark;
}

mix.php

   # generate output of thread lists
   # highlight mods, admins and users:
   if (!empty($zeile['user_type']))
    { // account active
     if ($settings['admin_mod_highlight'] == 1 or $settings['user-highlight'] == 1)
      {
       $markA = outputStatusMark($mark, $zeile['user_type'], $connid); # Notice: Undefined variable: mark
      }
    }
   else
    { // workaround: otherwise, deleted user becomes admin
     $markA = '';
    }


Diese Notice bekomme ich unter 5.2.6 aber nicht unter 7.3.3.

--
Best regards,
Alfie (Helmut Schütz)
BEBA-Forum (v1.8β)


Complete thread:

 RSS Feed of thread

powered by my little forum