Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This patch is covering few issues I ran into.
While submitting one patch for several issues isn't the preferred method in Drupal, I rather doing it so, than not submitting a patch at all. Here goes:
- I modified the viewing permissions. There is a "view all favorite nodes" and "view own favorite nodes", so one can limit viewing favorite nodes only to the current user.
- Allow viewing of all favorite nodes, without specifying the type
- Allow a clean url (without uid ot type) to view own favorite nodes
- Replaced
print theme('page', $output);
by a simplereturn $output;
in the page function - Fixed wrong variable replacement in t() functions
This patch can be improved, but I think it is good enough, as is, to render the module just a bit more correct, syntax-wise.
Comment | File | Size | Author |
---|---|---|---|
#1 | favorite_nodes.module_1.patch | 15.47 KB | frjo |
favorite_nodes.module_0.patch | 1.66 KB | z.stolar |
Comments
Comment #1
frjo CreditAttribution: frjo commentedGood changes z.stolar! I added fixes from a number of other issues, se below, as well as my own changes and made a new patch.
Make the code follow Drupal coding standard, thanks Coder module. Profile page now use FAVORITE_NODES_PROFILE_LIMIT instead of FAVORITE_NODES_BLOCK_LIMIT setting. Removed all use of natcasesort(). Build and format the "more" links in the block the normal Drupal style.
http://drupal.org/node/112362
http://drupal.org/node/150420
http://drupal.org/node/166445
http://drupal.org/node/173658
http://drupal.org/node/183707