Download & Extend

Various issues: permissions, string replacement, page output

Project:Favorite Nodes
Version:5.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

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 simple return $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.

AttachmentSize
favorite_nodes.module_0.patch1.66 KB

Comments

#1

Good 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

AttachmentSize
favorite_nodes.module_1.patch 15.47 KB
nobody click here