original_string: protected static function build_paths($force) {
          global $DB;
  
          // First update normal users.
          $path = $DB->sql_concat('?', 'id');
          $pathstart = '/' . SYSCONTEXTID . '/';
          $params = array($pathstart);
  
          if ($force) {
              $where = "depth <> 2 OR path IS NULL OR path <> ({$path})";
              $params[] = $pathstart;
          } else {
              $where = "depth = 0 OR path IS NULL";
          }
  
          $sql = "UPDATE {context}
                     SET depth = 2,
                         path = {$path}
                   WHERE contextlevel = " . CONTEXT_USER . "
                     AND ($where)";
          $DB->execute($sql, $params);
      }
code: protected static function build_paths($force) {
          global $DB;
  
          // First update normal users.
          $path = $DB->sql_concat('?', 'id');
          $pathstart = '/' . SYSCONTEXTID . '/';
          $params = array($pathstart);
  
          if ($force) {
              $where = "depth <> 2 OR path IS NULL OR path <> ({$path})";
              $params[] = $pathstart;
          } else {
              $where = "depth = 0 OR path IS NULL";
          }
  
          $sql = "UPDATE {context}
                     SET depth = 2,
                         path = {$path}
                   WHERE contextlevel = " . CONTEXT_USER . "
                     AND ($where)";
          $DB->execute($sql, $params);
      }
code_tokens: protected static function build_paths ( $ force ) { global $ DB ; // First update normal users. $ path = $ DB -> sql_concat ( '?' , 'id' ) ; $ pathstart = '/' . SYSCONTEXTID . '/' ; $ params = array ( $ pathstart ) ; if ( $ force ) { $ where = "depth <> 2 OR path IS NULL OR path <> ({$path})" ; $ params [ ] = $ pathstart ; } else { $ where = "depth = 0 OR path IS NULL" ; } $ sql = "UPDATE {context}
                     SET depth = 2,
                         path = {$path}
                   WHERE contextlevel = " . CONTEXT_USER . "
                     AND ($where)" ; $ DB -> execute ( $ sql , $ params ) ; }
docstring: Rebuild context paths and depths at user context level.
  
  @static
  @param bool $force
docstring_tokens: Rebuild context paths and depths at user context level .