Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295999

cleanup of docblock to UI text in update_get_update_list() is weak

$
0
0

Problem/Motivation

          // The description for an update comes from its Doxygen.
          $func = new ReflectionFunction($module . '_update_' . $update);
          $description = str_replace(array("\n", '*', '/'), '', $func->getDocComment());

My reading of this is that if the docblock text contains a slash that'll get zapped. So anything like 'either/or' or 'and/or' will be garbled.

Also, if the docblock has more than one line, we'll get too much whitespace in between the lines, as only the '*' is removed and there'll be at least one space either side of it.

Steps to reproduce

See #1.

Proposed resolution

Use regular expressions to modify the comment instead of a simple str_replace.

Remaining tasks

Review
Commit

User interface changes

Displayed update hook text can contain slashes and less extra spaces.


Viewing all articles
Browse latest Browse all 295999

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>