This patch contains two optimizations for nodequeue_node_tab_access().

  1. If the nodequeue_use_tab option is disabled, there is no need to do anything further.
  2. The tab is displayed as long as the user has access to just one subqueue, so once nodequeue_api_subqueue_access() has returned TRUE, there is no need to inspect the remaining subqueues.

Comments

amateescu’s picture

Status: Needs review » Fixed
StatusFileSize
new1.16 KB
new1.21 KB

Great patch!

I changed it a bit to check the nodequeue_use_tab variable first because variable_get() is faster than user_access().

Commited attached patches to 6.x and 7.x. Thanks!

http://drupalcode.org/project/nodequeue.git/commit/5666adb
http://drupalcode.org/project/nodequeue.git/commit/977bc1a

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.