From ef731d4d167209c23fa33174896df7e9d8d85131 Mon Sep 17 00:00:00 2001
From: Eric Rasmussen <eric@unl.edu>
Date: Mon, 9 Jan 2012 18:14:27 +0000
Subject: [PATCH] [gh-279] Merging test into staging -c1394

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x/staging@1395 20a16fea-79d4-4915-8869-1ea9d5ebf173
---
 sites/all/modules/workbench/LICENSE.txt       | 601 ++++++++++--------
 .../page_manager/tasks/myworkbench.inc        | 100 +++
 .../views/workbench_current_user.view.inc     |  16 +-
 .../workbench/views/workbench_edited.view.inc |  55 +-
 .../views/workbench_recent_content.view.inc   |  98 +--
 sites/all/modules/workbench/workbench.info    |   6 +-
 sites/all/modules/workbench/workbench.module  |  42 +-
 .../all/modules/workbench/workbench.pages.inc |  24 +-
 .../workbench/workbench.pages_default.inc     | 175 +++++
 sites/all/modules/workbench_access/README.txt |  50 +-
 ...workbench_access_handler_field_section.inc |  72 ++-
 ...workbench_access_handler_filter_access.inc |  55 +-
 .../tests/workbench_access.test               | 299 ++++++++-
 .../views/workbench_access_content.view.inc   |  46 +-
 .../workbench_access.admin.inc                | 125 ++--
 .../workbench_access/workbench_access.info    |   6 +-
 .../workbench_access/workbench_access.install |  38 +-
 .../workbench_access/workbench_access.module  | 300 +++++++--
 .../workbench_access.tokens.inc               | 213 +++++++
 .../workbench_access.views.inc                |  12 +-
 .../views/workbench_files.view.inc            |   4 +-
 .../workbench_files/workbench_files.info      |   7 +-
 .../workbench_media/workbench_media.info      |   6 +-
 .../modules/workbench_moderation/LICENSE.txt  | 601 ++++++++++--------
 ..._moderation_handler_field_history_link.inc |  22 +
 ...rkbench_moderation_handler_field_state.inc |  42 ++
 ...kbench_moderation_handler_filter_state.inc |   6 +-
 .../plugins/page_manager/tasks/nodedraft.inc  | 133 ++++
 .../page_manager/tasks/noderevision.inc       | 130 ++++
 .../tests/workbench_moderation.test           |  55 +-
 .../views/workbench_moderation.view.inc       |  69 +-
 .../workbench_moderation.admin.inc            |  45 +-
 .../workbench_moderation.info                 |  10 +-
 .../workbench_moderation.install              | 176 ++++-
 .../workbench_moderation.module               | 247 +++----
 .../workbench_moderation.node.inc             |  80 ++-
 .../workbench_moderation.views.inc            |  50 +-
 37 files changed, 2924 insertions(+), 1092 deletions(-)
 create mode 100644 sites/all/modules/workbench/plugins/page_manager/tasks/myworkbench.inc
 create mode 100644 sites/all/modules/workbench/workbench.pages_default.inc
 create mode 100644 sites/all/modules/workbench_access/workbench_access.tokens.inc
 create mode 100644 sites/all/modules/workbench_moderation/includes/workbench_moderation_handler_field_history_link.inc
 create mode 100644 sites/all/modules/workbench_moderation/includes/workbench_moderation_handler_field_state.inc
 create mode 100644 sites/all/modules/workbench_moderation/plugins/page_manager/tasks/nodedraft.inc
 create mode 100644 sites/all/modules/workbench_moderation/plugins/page_manager/tasks/noderevision.inc

diff --git a/sites/all/modules/workbench/LICENSE.txt b/sites/all/modules/workbench/LICENSE.txt
index 2c095c8d..d159169d 100644
--- a/sites/all/modules/workbench/LICENSE.txt
+++ b/sites/all/modules/workbench/LICENSE.txt
@@ -1,274 +1,339 @@
-GNU GENERAL PUBLIC LICENSE
-
-              Version 2, June 1991
-
-Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave,
-Cambridge, MA 02139, USA. Everyone is permitted to copy and distribute
-verbatim copies of this license document, but changing it is not allowed.
-
-                  Preamble
-
-The licenses for most software are designed to take away your freedom to
-share and change it. By contrast, the GNU General Public License is
-intended to guarantee your freedom to share and change free software--to
-make sure the software is free for all its users. This General Public License
-applies to most of the Free Software Foundation's software and to any other
-program whose authors commit to using it. (Some other Free Software
-Foundation software is covered by the GNU Library General Public License
-instead.) You can apply it to your programs, too.
-
-When we speak of free software, we are referring to freedom, not price. Our
-General Public Licenses are designed to make sure that you have the
-freedom to distribute copies of free software (and charge for this service if
-you wish), that you receive source code or can get it if you want it, that you
-can change the software or use pieces of it in new free programs; and that
-you know you can do these things.
-
-To protect your rights, we need to make restrictions that forbid anyone to
-deny you these rights or to ask you to surrender the rights. These restrictions
-translate to certain responsibilities for you if you distribute copies of the
-software, or if you modify it.
-
-For example, if you distribute copies of such a program, whether gratis or for
-a fee, you must give the recipients all the rights that you have. You must make
-sure that they, too, receive or can get the source code. And you must show
-them these terms so they know their rights.
-
-We protect your rights with two steps: (1) copyright the software, and (2)
-offer you this license which gives you legal permission to copy, distribute
-and/or modify the software.
-
-Also, for each author's protection and ours, we want to make certain that
-everyone understands that there is no warranty for this free software. If the
-software is modified by someone else and passed on, we want its recipients
-to know that what they have is not the original, so that any problems
-introduced by others will not reflect on the original authors' reputations.
-
-Finally, any free program is threatened constantly by software patents. We
-wish to avoid the danger that redistributors of a free program will individually
-obtain patent licenses, in effect making the program proprietary. To prevent
-this, we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
-The precise terms and conditions for copying, distribution and modification
-follow.
-
-           GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND
-               MODIFICATION
-
-0. This License applies to any program or other work which contains a notice
-placed by the copyright holder saying it may be distributed under the terms
-of this General Public License. The "Program", below, refers to any such
-program or work, and a "work based on the Program" means either the
-Program or any derivative work under copyright law: that is to say, a work
-containing the Program or a portion of it, either verbatim or with
-modifications and/or translated into another language. (Hereinafter, translation
-is included without limitation in the term "modification".) Each licensee is
-addressed as "you".
-
-Activities other than copying, distribution and modification are not covered
-by this License; they are outside its scope. The act of running the Program is
-not restricted, and the output from the Program is covered only if its contents
-constitute a work based on the Program (independent of having been made
-by running the Program). Whether that is true depends on what the Program
-does.
-
-1. You may copy and distribute verbatim copies of the Program's source
-code as you receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this License
-and to the absence of any warranty; and give any other recipients of the
-Program a copy of this License along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and you
-may at your option offer warranty protection in exchange for a fee.
-
-2. You may modify your copy or copies of the Program or any portion of it,
-thus forming a work based on the Program, and copy and distribute such
-modifications or work under the terms of Section 1 above, provided that you
-also meet all of these conditions:
-
-a) You must cause the modified files to carry prominent notices stating that
-you changed the files and the date of any change.
-
-b) You must cause any work that you distribute or publish, that in whole or in
-part contains or is derived from the Program or any part thereof, to be
-licensed as a whole at no charge to all third parties under the terms of this
-License.
-
-c) If the modified program normally reads commands interactively when run,
-you must cause it, when started running for such interactive use in the most
-ordinary way, to print or display an announcement including an appropriate
-copyright notice and a notice that there is no warranty (or else, saying that
-you provide a warranty) and that users may redistribute the program under
-these conditions, and telling the user how to view a copy of this License.
-(Exception: if the Program itself is interactive but does not normally print such
-an announcement, your work based on the Program is not required to print
-an announcement.)
-
-These requirements apply to the modified work as a whole. If identifiable
-sections of that work are not derived from the Program, and can be
-reasonably considered independent and separate works in themselves, then
-this License, and its terms, do not apply to those sections when you distribute
-them as separate works. But when you distribute the same sections as part
-of a whole which is a work based on the Program, the distribution of the
-whole must be on the terms of this License, whose permissions for other
-licensees extend to the entire whole, and thus to each and every part
-regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your rights to
-work written entirely by you; rather, the intent is to exercise the right to
-control the distribution of derivative or collective works based on the
-Program.
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
 
 In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of a
-storage or distribution medium does not bring the other work under the scope
-of this License.
-
-3. You may copy and distribute the Program (or a work based on it, under
-Section 2) in object code or executable form under the terms of Sections 1
-and 2 above provided that you also do one of the following:
-
-a) Accompany it with the complete corresponding machine-readable source
-code, which must be distributed under the terms of Sections 1 and 2 above
-on a medium customarily used for software interchange; or,
-
-b) Accompany it with a written offer, valid for at least three years, to give
-any third party, for a charge no more than your cost of physically performing
-source distribution, a complete machine-readable copy of the corresponding
-source code, to be distributed under the terms of Sections 1 and 2 above on
-a medium customarily used for software interchange; or,
-
-c) Accompany it with the information you received as to the offer to distribute
-corresponding source code. (This alternative is allowed only for
-noncommercial distribution and only if you received the program in object
-code or executable form with such an offer, in accord with Subsection b
-above.)
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
 
 The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source code
-means all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation and
-installation of the executable. However, as a special exception, the source
-code distributed need not include anything that is normally distributed (in
-either source or binary form) with the major components (compiler, kernel,
-and so on) of the operating system on which the executable runs, unless that
-component itself accompanies the executable.
-
-If distribution of executable or object code is made by offering access to
-copy from a designated place, then offering equivalent access to copy the
-source code from the same place counts as distribution of the source code,
-even though third parties are not compelled to copy the source along with the
-object code.
-
-4. You may not copy, modify, sublicense, or distribute the Program except as
-expressly provided under this License. Any attempt otherwise to copy,
-modify, sublicense or distribute the Program is void, and will automatically
-terminate your rights under this License. However, parties who have received
-copies, or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-5. You are not required to accept this License, since you have not signed it.
-However, nothing else grants you permission to modify or distribute the
-Program or its derivative works. These actions are prohibited by law if you
-do not accept this License. Therefore, by modifying or distributing the
-Program (or any work based on the Program), you indicate your acceptance
-of this License to do so, and all its terms and conditions for copying,
-distributing or modifying the Program or works based on it.
-
-6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the original
-licensor to copy, distribute or modify the Program subject to these terms and
-conditions. You may not impose any further restrictions on the recipients'
-exercise of the rights granted herein. You are not responsible for enforcing
-compliance by third parties to this License.
-
-7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues), conditions
-are imposed on you (whether by court order, agreement or otherwise) that
-contradict the conditions of this License, they do not excuse you from the
-conditions of this License. If you cannot distribute so as to satisfy
-simultaneously your obligations under this License and any other pertinent
-obligations, then as a consequence you may not distribute the Program at all.
-For example, if a patent license would not permit royalty-free redistribution
-of the Program by all those who receive copies directly or indirectly through
-you, then the only way you could satisfy both it and this License would be to
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
 refrain entirely from distribution of the Program.
 
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply and
-the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or
-other property right claims or to contest validity of any such claims; this
-section has the sole purpose of protecting the integrity of the free software
-distribution system, which is implemented by public license practices. Many
-people have made generous contributions to the wide range of software
-distributed through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing to
-distribute software through any other system and a licensee cannot impose
-that choice.
-
-This section is intended to make thoroughly clear what is believed to be a
-consequence of the rest of this License.
-
-8. If the distribution and/or use of the Program is restricted in certain
-countries either by patents or by copyrighted interfaces, the original copyright
-holder who places the Program under this License may add an explicit
-geographical distribution limitation excluding those countries, so that
-distribution is permitted only in or among countries not thus excluded. In such
-case, this License incorporates the limitation as if written in the body of this
-License.
-
-9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will be
-similar in spirit to the present version, but may differ in detail to address new
-problems or concerns.
-
-Each version is given a distinguishing version number. If the Program specifies
-a version number of this License which applies to it and "any later version",
-you have the option of following the terms and conditions either of that
-version or of any later version published by the Free Software Foundation. If
-the Program does not specify a version number of this License, you may
-choose any version ever published by the Free Software Foundation.
-
-10. If you wish to incorporate parts of the Program into other free programs
-whose distribution conditions are different, write to the author to ask for
-permission. For software which is copyrighted by the Free Software
-Foundation, write to the Free Software Foundation; we sometimes make
-exceptions for this. Our decision will be guided by the two goals of
-preserving the free status of all derivatives of our free software and of
-promoting the sharing and reuse of software generally.
-
-               NO WARRANTY
-
-11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE,
-THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT
-PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
-STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
-WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
-NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR
-AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR
-ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
-LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
-SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
-ARISING OUT OF THE USE OR INABILITY TO USE THE
-PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA
-OR DATA BEING RENDERED INACCURATE OR LOSSES
-SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
-PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN
-IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.
-
-          END OF TERMS AND CONDITIONS
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/sites/all/modules/workbench/plugins/page_manager/tasks/myworkbench.inc b/sites/all/modules/workbench/plugins/page_manager/tasks/myworkbench.inc
new file mode 100644
index 00000000..fd966f17
--- /dev/null
+++ b/sites/all/modules/workbench/plugins/page_manager/tasks/myworkbench.inc
@@ -0,0 +1,100 @@
+<?php
+
+/**
+ * Specialized implementation of hook_page_manager_task_tasks(). See api-task.html for
+ * more information.
+ */
+function workbench_myworkbench_page_manager_tasks() {
+
+  return array(
+    // This is a 'page' task and will fall under the page admin UI
+    'task type' => 'page',
+
+    'title' => t('My Workbench'),
+    'admin title' => t('The Workbench landing page.'),
+    'admin description' => t('When enabled, this overrides the default Workbench page for <em>admin/workbench</em>. If no variant is selected, the default "My Workbench" will be shown. See http://drupal.org/node/1226174 for more information.'),
+    'admin path' => 'admin/workbench',
+
+    // Menu hooks so that we can alter the node/%node menu entry to point to us.
+    'hook menu alter' => 'workbench_myworkbench_menu_alter',
+
+    // This is task uses 'context' handlers and must implement these to give the
+    // handler data it needs.
+    'handler type' => 'context',
+
+    // Allow this to be enabled or disabled:
+    'disabled' => variable_get('workbench_myworkbench_disabled', TRUE),
+    'enable callback' => 'workbench_myworkbench_enable',
+  );
+}
+
+/**
+ * Callback defined by workbench_myworkbench_page_manager_tasks().
+ *
+ * Alter menu item so that admin/workbench comes here.
+ */
+function workbench_myworkbench_menu_alter(&$items, $task) {
+
+  if (variable_get('workbench_myworkbench_disabled', TRUE)) {
+    return;
+  }
+
+  $callback = $items['admin/workbench']['page callback'];
+  // Override the node edit handler for our purpose.
+  if ($callback == 'workbench_content' || variable_get('page_manager_override_anyway', FALSE)) {
+    $items['admin/workbench']['page callback'] = 'workbench_myworkbench';
+    $items['admin/workbench']['file path'] = $task['path'];
+    $items['admin/workbench']['file'] = $task['file'];
+  }
+
+  else {
+    //variable_set('workbench_myworkbench_disabled', TRUE);
+    if (!empty($GLOBALS['page_manager_enabling_workbench'])) {
+      drupal_set_message(t('Page manager module is unable to enable Workbench because some other module already has overridden with %callback.', array('%callback' => $callback)), 'warning');
+    }
+    return;
+  }
+}
+
+/**
+ * Entry point for our overridden My Workbench.
+ *
+ * This function asks its assigned handlers who, if anyone, would like
+ * to run with it. If no one does, it passes through to the main My Workbench.
+ */
+function workbench_myworkbench() {
+  // Load my task plugin
+  $task = page_manager_get_task('myworkbench');
+
+  ctools_include('context');
+  ctools_include('context-task-handler');
+  $output = ctools_context_handler_render($task, '', array(), array());
+  if ($output !== FALSE) {
+    return $output;
+  }
+
+  module_load_include('inc', 'workbench', 'workbench.pages');
+  $function = 'workbench_content';
+  foreach (module_implements('page_manager_override') as $module) {
+    $call = $module . '_page_manager_override';
+    if (($rc = $call('workbench')) && function_exists($rc)) {
+      $function = $rc;
+      break;
+    }
+  }
+
+  // Otherwise, fall back.
+  return $function();
+}
+
+/**
+ * Callback to enable/disable the page from the UI.
+ */
+function workbench_myworkbench_enable($cache, $status) {
+  variable_set('workbench_myworkbench_disabled', $status);
+  // Set a global flag so that the menu routine knows it needs
+  // to set a message if enabling cannot be done.
+  if (!$status) {
+    $GLOBALS['page_manager_enabling_workbench'] = TRUE;
+  }
+}
diff --git a/sites/all/modules/workbench/views/workbench_current_user.view.inc b/sites/all/modules/workbench/views/workbench_current_user.view.inc
index 22f3a6d7..ff9cd7e1 100644
--- a/sites/all/modules/workbench/views/workbench_current_user.view.inc
+++ b/sites/all/modules/workbench/views/workbench_current_user.view.inc
@@ -12,16 +12,16 @@ $view->tag = 'Workbench';
 $view->base_table = 'users';
 $view->human_name = '';
 $view->core = 7;
-$view->api_version = 3;
+$view->api_version = '3.0';
 $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
 
 /* Display: Defaults */
 $handler = $view->new_display('default', 'Defaults', 'default');
-$handler->display->display_options['use_ajax'] = FALSE;
 $handler->display->display_options['access']['type'] = 'perm';
 $handler->display->display_options['access']['perm'] = 'access workbench';
 $handler->display->display_options['cache']['type'] = 'none';
 $handler->display->display_options['query']['type'] = 'views_query';
+$handler->display->display_options['query']['options']['query_comment'] = FALSE;
 $handler->display->display_options['exposed_form']['type'] = 'basic';
 $handler->display->display_options['pager']['type'] = 'none';
 $handler->display->display_options['pager']['options']['offset'] = '0';
@@ -36,10 +36,10 @@ $handler->display->display_options['fields']['uid']['exclude'] = TRUE;
 $handler->display->display_options['fields']['uid']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['uid']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['uid']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['uid']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['uid']['alter']['word_boundary'] = 0;
 $handler->display->display_options['fields']['uid']['alter']['ellipsis'] = 0;
 $handler->display->display_options['fields']['uid']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['uid']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['uid']['alter']['html'] = 0;
 $handler->display->display_options['fields']['uid']['hide_empty'] = 0;
 $handler->display->display_options['fields']['uid']['empty_zero'] = 0;
@@ -52,10 +52,10 @@ $handler->display->display_options['fields']['picture']['label'] = '';
 $handler->display->display_options['fields']['picture']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['picture']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['picture']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['picture']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['picture']['alter']['word_boundary'] = 1;
 $handler->display->display_options['fields']['picture']['alter']['ellipsis'] = 1;
 $handler->display->display_options['fields']['picture']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['picture']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['picture']['alter']['html'] = 0;
 $handler->display->display_options['fields']['picture']['element_label_colon'] = 0;
 $handler->display->display_options['fields']['picture']['element_default_classes'] = 1;
@@ -69,10 +69,10 @@ $handler->display->display_options['fields']['name']['label'] = '';
 $handler->display->display_options['fields']['name']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['name']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['name']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['name']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['name']['alter']['word_boundary'] = 0;
 $handler->display->display_options['fields']['name']['alter']['ellipsis'] = 0;
 $handler->display->display_options['fields']['name']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['name']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['name']['alter']['html'] = 0;
 $handler->display->display_options['fields']['name']['hide_empty'] = 0;
 $handler->display->display_options['fields']['name']['empty_zero'] = 0;
@@ -86,15 +86,15 @@ $handler->display->display_options['fields']['edit_node']['label'] = '';
 $handler->display->display_options['fields']['edit_node']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['edit_node']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['word_boundary'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['ellipsis'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['edit_node']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['html'] = 0;
 $handler->display->display_options['fields']['edit_node']['hide_empty'] = 0;
 $handler->display->display_options['fields']['edit_node']['empty_zero'] = 0;
 $handler->display->display_options['fields']['edit_node']['text'] = 'edit my profile';
-/* Filter: User: Current */
+/* Filter criterion: User: Current */
 $handler->display->display_options['filters']['uid_current']['id'] = 'uid_current';
 $handler->display->display_options['filters']['uid_current']['table'] = 'users';
 $handler->display->display_options['filters']['uid_current']['field'] = 'uid_current';
@@ -107,7 +107,7 @@ $translatables['workbench_current_user'] = array(
   t('more'),
   t('Apply'),
   t('Reset'),
-  t('Sort By'),
+  t('Sort by'),
   t('Asc'),
   t('Desc'),
   t('edit my profile'),
diff --git a/sites/all/modules/workbench/views/workbench_edited.view.inc b/sites/all/modules/workbench/views/workbench_edited.view.inc
index df28b1b5..61168ada 100644
--- a/sites/all/modules/workbench/views/workbench_edited.view.inc
+++ b/sites/all/modules/workbench/views/workbench_edited.view.inc
@@ -12,12 +12,12 @@ $view->tag = 'Workbench';
 $view->base_table = 'node_revision';
 $view->human_name = '';
 $view->core = 7;
-$view->api_version = 3;
+$view->api_version = '3.0';
 $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
 
 /* Display: Defaults */
 $handler = $view->new_display('default', 'Defaults', 'default');
-$handler->display->display_options['title'] = 'Content I\'ve Edited';
+$handler->display->display_options['title'] = 'My Edits';
 $handler->display->display_options['use_more_always'] = TRUE;
 $handler->display->display_options['use_more_text'] = 'view all';
 $handler->display->display_options['group_by'] = TRUE;
@@ -25,6 +25,7 @@ $handler->display->display_options['access']['type'] = 'perm';
 $handler->display->display_options['access']['perm'] = 'access workbench';
 $handler->display->display_options['cache']['type'] = 'none';
 $handler->display->display_options['query']['type'] = 'views_query';
+$handler->display->display_options['query']['options']['query_comment'] = FALSE;
 $handler->display->display_options['exposed_form']['type'] = 'basic';
 $handler->display->display_options['pager']['type'] = 'full';
 $handler->display->display_options['pager']['options']['items_per_page'] = '25';
@@ -95,18 +96,18 @@ $handler->display->display_options['footer']['area']['field'] = 'area';
 $handler->display->display_options['footer']['area']['empty'] = TRUE;
 $handler->display->display_options['footer']['area']['content'] = 'Edited something recently and it\'s not in this list? If a content type isn\'t revisioned and you didn\'t create it, it will not show up in this list when you edit it. You can find it in the \'Content I Can Edit\' tab.';
 $handler->display->display_options['footer']['area']['format'] = '1';
-/* Empty text: Global: Text area */
+/* No results behavior: Global: Text area */
 $handler->display->display_options['empty']['area']['id'] = 'area';
 $handler->display->display_options['empty']['area']['table'] = 'views';
 $handler->display->display_options['empty']['area']['field'] = 'area';
 $handler->display->display_options['empty']['area']['empty'] = FALSE;
 $handler->display->display_options['empty']['area']['content'] = 'You haven\'t created or edited any content.';
 $handler->display->display_options['empty']['area']['format'] = '1';
-/* Relationship: Node revision: User */
+/* Relationship: Content revision: User */
 $handler->display->display_options['relationships']['uid']['id'] = 'uid';
 $handler->display->display_options['relationships']['uid']['table'] = 'node_revision';
 $handler->display->display_options['relationships']['uid']['field'] = 'uid';
-/* Field: Node: Nid */
+/* Field: COUNT(Content: Nid) */
 $handler->display->display_options['fields']['nid']['id'] = 'nid';
 $handler->display->display_options['fields']['nid']['table'] = 'node';
 $handler->display->display_options['fields']['nid']['field'] = 'nid';
@@ -116,55 +117,55 @@ $handler->display->display_options['fields']['nid']['exclude'] = TRUE;
 $handler->display->display_options['fields']['nid']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['nid']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['nid']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['nid']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['nid']['alter']['word_boundary'] = 0;
 $handler->display->display_options['fields']['nid']['alter']['ellipsis'] = 0;
 $handler->display->display_options['fields']['nid']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['nid']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['nid']['alter']['html'] = 0;
 $handler->display->display_options['fields']['nid']['hide_empty'] = 0;
 $handler->display->display_options['fields']['nid']['empty_zero'] = 0;
-/* Field: Node: Title */
+/* Field: Content: Title */
 $handler->display->display_options['fields']['title']['id'] = 'title';
 $handler->display->display_options['fields']['title']['table'] = 'node';
 $handler->display->display_options['fields']['title']['field'] = 'title';
 $handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
 $handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
 $handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['title']['alter']['html'] = 0;
 $handler->display->display_options['fields']['title']['hide_empty'] = 0;
 $handler->display->display_options['fields']['title']['empty_zero'] = 0;
 $handler->display->display_options['fields']['title']['link_to_node'] = 1;
-/* Field: Node: Type */
+/* Field: Content: Type */
 $handler->display->display_options['fields']['type']['id'] = 'type';
 $handler->display->display_options['fields']['type']['table'] = 'node';
 $handler->display->display_options['fields']['type']['field'] = 'type';
 $handler->display->display_options['fields']['type']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['type']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['type']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['type']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['type']['alter']['word_boundary'] = 0;
 $handler->display->display_options['fields']['type']['alter']['ellipsis'] = 0;
 $handler->display->display_options['fields']['type']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['type']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['type']['alter']['html'] = 0;
 $handler->display->display_options['fields']['type']['hide_empty'] = 0;
 $handler->display->display_options['fields']['type']['empty_zero'] = 0;
 $handler->display->display_options['fields']['type']['link_to_node'] = 0;
 $handler->display->display_options['fields']['type']['machine_name'] = 0;
-/* Field: Node: Published */
+/* Field: Content: Published */
 $handler->display->display_options['fields']['status']['id'] = 'status';
 $handler->display->display_options['fields']['status']['table'] = 'node';
 $handler->display->display_options['fields']['status']['field'] = 'status';
 $handler->display->display_options['fields']['status']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['status']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['status']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['status']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['status']['alter']['word_boundary'] = 0;
 $handler->display->display_options['fields']['status']['alter']['ellipsis'] = 0;
 $handler->display->display_options['fields']['status']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['status']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['status']['alter']['html'] = 0;
 $handler->display->display_options['fields']['status']['hide_empty'] = 0;
 $handler->display->display_options['fields']['status']['empty_zero'] = 0;
@@ -178,10 +179,10 @@ $handler->display->display_options['fields']['name']['label'] = 'Revised by';
 $handler->display->display_options['fields']['name']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['name']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['name']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['name']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['name']['alter']['word_boundary'] = 1;
 $handler->display->display_options['fields']['name']['alter']['ellipsis'] = 1;
 $handler->display->display_options['fields']['name']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['name']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['name']['alter']['html'] = 0;
 $handler->display->display_options['fields']['name']['element_label_colon'] = 1;
 $handler->display->display_options['fields']['name']['element_default_classes'] = 1;
@@ -189,7 +190,7 @@ $handler->display->display_options['fields']['name']['hide_empty'] = 0;
 $handler->display->display_options['fields']['name']['empty_zero'] = 0;
 $handler->display->display_options['fields']['name']['link_to_user'] = 1;
 $handler->display->display_options['fields']['name']['overwrite_anonymous'] = 0;
-/* Field: Node: Updated date */
+/* Field: Content: Updated date */
 $handler->display->display_options['fields']['changed']['id'] = 'changed';
 $handler->display->display_options['fields']['changed']['table'] = 'node';
 $handler->display->display_options['fields']['changed']['field'] = 'changed';
@@ -197,17 +198,17 @@ $handler->display->display_options['fields']['changed']['label'] = 'Last updated
 $handler->display->display_options['fields']['changed']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['changed']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['word_boundary'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['ellipsis'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['changed']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['html'] = 0;
 $handler->display->display_options['fields']['changed']['element_label_colon'] = 1;
 $handler->display->display_options['fields']['changed']['element_default_classes'] = 1;
 $handler->display->display_options['fields']['changed']['hide_empty'] = 0;
 $handler->display->display_options['fields']['changed']['empty_zero'] = 0;
 $handler->display->display_options['fields']['changed']['date_format'] = 'time ago';
-/* Field: Node: Edit link */
+/* Field: Content: Edit link */
 $handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
 $handler->display->display_options['fields']['edit_node']['table'] = 'node';
 $handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
@@ -215,28 +216,28 @@ $handler->display->display_options['fields']['edit_node']['label'] = 'Actions';
 $handler->display->display_options['fields']['edit_node']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['edit_node']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['word_boundary'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['ellipsis'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['edit_node']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['html'] = 0;
 $handler->display->display_options['fields']['edit_node']['element_label_colon'] = 1;
 $handler->display->display_options['fields']['edit_node']['element_default_classes'] = 1;
 $handler->display->display_options['fields']['edit_node']['hide_empty'] = 0;
 $handler->display->display_options['fields']['edit_node']['empty_zero'] = 0;
 $handler->display->display_options['fields']['edit_node']['text'] = 'edit';
-/* Sort criterion: Node: Updated date */
+/* Sort criterion: Content: Updated date */
 $handler->display->display_options['sorts']['changed']['id'] = 'changed';
 $handler->display->display_options['sorts']['changed']['table'] = 'node';
 $handler->display->display_options['sorts']['changed']['field'] = 'changed';
 $handler->display->display_options['sorts']['changed']['order'] = 'DESC';
-/* Filter: User: Current */
+/* Filter criterion: User: Current */
 $handler->display->display_options['filters']['uid_current']['id'] = 'uid_current';
 $handler->display->display_options['filters']['uid_current']['table'] = 'users';
 $handler->display->display_options['filters']['uid_current']['field'] = 'uid_current';
 $handler->display->display_options['filters']['uid_current']['relationship'] = 'uid';
 $handler->display->display_options['filters']['uid_current']['value'] = '1';
-/* Filter: Node: Title */
+/* Filter criterion: Content: Title */
 $handler->display->display_options['filters']['title']['id'] = 'title';
 $handler->display->display_options['filters']['title']['table'] = 'node';
 $handler->display->display_options['filters']['title']['field'] = 'title';
@@ -245,7 +246,7 @@ $handler->display->display_options['filters']['title']['exposed'] = TRUE;
 $handler->display->display_options['filters']['title']['expose']['label'] = 'Title';
 $handler->display->display_options['filters']['title']['expose']['identifier'] = 'title';
 $handler->display->display_options['filters']['title']['expose']['remember'] = 1;
-/* Filter: Node: Type */
+/* Filter criterion: Content: Type */
 $handler->display->display_options['filters']['type']['id'] = 'type';
 $handler->display->display_options['filters']['type']['table'] = 'node';
 $handler->display->display_options['filters']['type']['field'] = 'type';
@@ -254,11 +255,11 @@ $handler->display->display_options['filters']['type']['expose']['label'] = 'Type
 $handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
 $handler->display->display_options['filters']['type']['expose']['remember'] = 1;
 $handler->display->display_options['filters']['type']['expose']['reduce'] = 0;
-/* Filter: Node: Published */
+/* Filter criterion: Content: Published */
 $handler->display->display_options['filters']['status']['id'] = 'status';
 $handler->display->display_options['filters']['status']['table'] = 'node';
 $handler->display->display_options['filters']['status']['field'] = 'status';
-$handler->display->display_options['filters']['status']['value'] = '0';
+$handler->display->display_options['filters']['status']['value'] = 'All';
 $handler->display->display_options['filters']['status']['exposed'] = TRUE;
 $handler->display->display_options['filters']['status']['expose']['label'] = 'Published';
 $handler->display->display_options['filters']['status']['expose']['identifier'] = 'published';
@@ -268,7 +269,7 @@ $handler->display->display_options['filters']['status']['expose']['remember'] =
 $handler = $view->new_display('page', 'Page', 'page_1');
 $handler->display->display_options['path'] = 'admin/workbench/content/edited';
 $handler->display->display_options['menu']['type'] = 'tab';
-$handler->display->display_options['menu']['title'] = 'Content I\'ve Edited';
+$handler->display->display_options['menu']['title'] = 'My Edits';
 $handler->display->display_options['menu']['weight'] = '1';
 
 /* Display: Block */
@@ -289,7 +290,7 @@ $handler->display->display_options['header']['area']['content'] = 'Five of the m
 $handler->display->display_options['header']['area']['format'] = '1';
 $handler->display->display_options['defaults']['footer'] = FALSE;
 $handler->display->display_options['defaults']['filters'] = FALSE;
-/* Filter: User: Current */
+/* Filter criterion: User: Current */
 $handler->display->display_options['filters']['uid_current']['id'] = 'uid_current';
 $handler->display->display_options['filters']['uid_current']['table'] = 'users';
 $handler->display->display_options['filters']['uid_current']['field'] = 'uid_current';
@@ -297,11 +298,11 @@ $handler->display->display_options['filters']['uid_current']['relationship'] = '
 $handler->display->display_options['filters']['uid_current']['value'] = '1';
 $translatables['workbench_edited'] = array(
   t('Defaults'),
-  t('Content I\'ve Edited'),
+  t('My Edits'),
   t('view all'),
   t('Apply'),
   t('Reset'),
-  t('Sort By'),
+  t('Sort by'),
   t('Asc'),
   t('Desc'),
   t('Items per page'),
diff --git a/sites/all/modules/workbench/views/workbench_recent_content.view.inc b/sites/all/modules/workbench/views/workbench_recent_content.view.inc
index 000c960a..3d690d2b 100644
--- a/sites/all/modules/workbench/views/workbench_recent_content.view.inc
+++ b/sites/all/modules/workbench/views/workbench_recent_content.view.inc
@@ -7,12 +7,12 @@
 
 $view = new view;
 $view->name = 'workbench_recent_content';
-$view->description = 'Content overview page for Wobrkbench.';
+$view->description = 'Content overview page for Workbench.';
 $view->tag = 'Workbench';
 $view->base_table = 'node';
 $view->human_name = '';
 $view->core = 7;
-$view->api_version = 3;
+$view->api_version = '3.0';
 $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
 
 /* Display: Defaults */
@@ -24,6 +24,7 @@ $handler->display->display_options['access']['type'] = 'perm';
 $handler->display->display_options['access']['perm'] = 'access workbench';
 $handler->display->display_options['cache']['type'] = 'none';
 $handler->display->display_options['query']['type'] = 'views_query';
+$handler->display->display_options['query']['options']['query_comment'] = FALSE;
 $handler->display->display_options['exposed_form']['type'] = 'basic';
 $handler->display->display_options['pager']['type'] = 'full';
 $handler->display->display_options['pager']['options']['items_per_page'] = '25';
@@ -80,79 +81,74 @@ $handler->display->display_options['style_options']['info'] = array(
 $handler->display->display_options['style_options']['override'] = 1;
 $handler->display->display_options['style_options']['sticky'] = 0;
 $handler->display->display_options['style_options']['order'] = 'desc';
-/* Empty text: Global: Text area */
+/* No results behavior: Global: Text area */
 $handler->display->display_options['empty']['area']['id'] = 'area';
 $handler->display->display_options['empty']['area']['table'] = 'views';
 $handler->display->display_options['empty']['area']['field'] = 'area';
 $handler->display->display_options['empty']['area']['empty'] = FALSE;
 $handler->display->display_options['empty']['area']['content'] = 'There is no content available for you to edit.';
 $handler->display->display_options['empty']['area']['format'] = 'plain_text';
-/* Field: Node: Title */
+/* Relationship: Content: Author */
+$handler->display->display_options['relationships']['uid']['id'] = 'uid';
+$handler->display->display_options['relationships']['uid']['table'] = 'node';
+$handler->display->display_options['relationships']['uid']['field'] = 'uid';
+/* Field: Content: Title */
 $handler->display->display_options['fields']['title']['id'] = 'title';
 $handler->display->display_options['fields']['title']['table'] = 'node';
 $handler->display->display_options['fields']['title']['field'] = 'title';
 $handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
 $handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
 $handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['title']['alter']['html'] = 0;
 $handler->display->display_options['fields']['title']['hide_empty'] = 0;
 $handler->display->display_options['fields']['title']['empty_zero'] = 0;
 $handler->display->display_options['fields']['title']['link_to_node'] = 1;
-/* Field: Node: Type */
+/* Field: Content: Type */
 $handler->display->display_options['fields']['type']['id'] = 'type';
 $handler->display->display_options['fields']['type']['table'] = 'node';
 $handler->display->display_options['fields']['type']['field'] = 'type';
 $handler->display->display_options['fields']['type']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['type']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['type']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['type']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['type']['alter']['word_boundary'] = 0;
 $handler->display->display_options['fields']['type']['alter']['ellipsis'] = 0;
 $handler->display->display_options['fields']['type']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['type']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['type']['alter']['html'] = 0;
 $handler->display->display_options['fields']['type']['hide_empty'] = 0;
 $handler->display->display_options['fields']['type']['empty_zero'] = 0;
 $handler->display->display_options['fields']['type']['link_to_node'] = 0;
 $handler->display->display_options['fields']['type']['machine_name'] = 0;
-/* Field: Node: Published */
-$handler->display->display_options['fields']['status']['id'] = 'status';
-$handler->display->display_options['fields']['status']['table'] = 'node';
-$handler->display->display_options['fields']['status']['field'] = 'status';
-$handler->display->display_options['fields']['status']['alter']['alter_text'] = 0;
-$handler->display->display_options['fields']['status']['alter']['make_link'] = 0;
-$handler->display->display_options['fields']['status']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['status']['alter']['trim'] = 0;
-$handler->display->display_options['fields']['status']['alter']['word_boundary'] = 0;
-$handler->display->display_options['fields']['status']['alter']['ellipsis'] = 0;
-$handler->display->display_options['fields']['status']['alter']['strip_tags'] = 0;
-$handler->display->display_options['fields']['status']['alter']['html'] = 0;
-$handler->display->display_options['fields']['status']['hide_empty'] = 0;
-$handler->display->display_options['fields']['status']['empty_zero'] = 0;
-$handler->display->display_options['fields']['status']['not'] = 0;
 /* Field: User: Name */
 $handler->display->display_options['fields']['name']['id'] = 'name';
 $handler->display->display_options['fields']['name']['table'] = 'users';
 $handler->display->display_options['fields']['name']['field'] = 'name';
+$handler->display->display_options['fields']['name']['relationship'] = 'uid';
 $handler->display->display_options['fields']['name']['label'] = 'Author';
 $handler->display->display_options['fields']['name']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['name']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['name']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['name']['alter']['trim'] = 0;
+$handler->display->display_options['fields']['name']['alter']['external'] = 0;
+$handler->display->display_options['fields']['name']['alter']['replace_spaces'] = 0;
+$handler->display->display_options['fields']['name']['alter']['trim_whitespace'] = 0;
+$handler->display->display_options['fields']['name']['alter']['nl2br'] = 0;
 $handler->display->display_options['fields']['name']['alter']['word_boundary'] = 1;
 $handler->display->display_options['fields']['name']['alter']['ellipsis'] = 1;
 $handler->display->display_options['fields']['name']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['name']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['name']['alter']['html'] = 0;
 $handler->display->display_options['fields']['name']['element_label_colon'] = 0;
 $handler->display->display_options['fields']['name']['element_default_classes'] = 1;
 $handler->display->display_options['fields']['name']['hide_empty'] = 0;
 $handler->display->display_options['fields']['name']['empty_zero'] = 0;
+$handler->display->display_options['fields']['name']['hide_alter_empty'] = 0;
 $handler->display->display_options['fields']['name']['link_to_user'] = 1;
 $handler->display->display_options['fields']['name']['overwrite_anonymous'] = 0;
-/* Field: Node: Updated date */
+/* Field: Content: Updated date */
 $handler->display->display_options['fields']['changed']['id'] = 'changed';
 $handler->display->display_options['fields']['changed']['table'] = 'node';
 $handler->display->display_options['fields']['changed']['field'] = 'changed';
@@ -160,17 +156,17 @@ $handler->display->display_options['fields']['changed']['label'] = 'Last updated
 $handler->display->display_options['fields']['changed']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['changed']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['word_boundary'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['ellipsis'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['changed']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['html'] = 0;
 $handler->display->display_options['fields']['changed']['element_label_colon'] = 1;
 $handler->display->display_options['fields']['changed']['element_default_classes'] = 1;
 $handler->display->display_options['fields']['changed']['hide_empty'] = 0;
 $handler->display->display_options['fields']['changed']['empty_zero'] = 0;
 $handler->display->display_options['fields']['changed']['date_format'] = 'time ago';
-/* Field: Node: Edit link */
+/* Field: Content: Edit link */
 $handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
 $handler->display->display_options['fields']['edit_node']['table'] = 'node';
 $handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
@@ -178,20 +174,20 @@ $handler->display->display_options['fields']['edit_node']['label'] = '';
 $handler->display->display_options['fields']['edit_node']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['edit_node']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['word_boundary'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['ellipsis'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['edit_node']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['html'] = 0;
 $handler->display->display_options['fields']['edit_node']['hide_empty'] = 0;
 $handler->display->display_options['fields']['edit_node']['empty_zero'] = 0;
 $handler->display->display_options['fields']['edit_node']['text'] = 'edit';
-/* Sort criterion: Node: Updated date */
+/* Sort criterion: Content: Updated date */
 $handler->display->display_options['sorts']['changed']['id'] = 'changed';
 $handler->display->display_options['sorts']['changed']['table'] = 'node';
 $handler->display->display_options['sorts']['changed']['field'] = 'changed';
 $handler->display->display_options['sorts']['changed']['order'] = 'DESC';
-/* Filter: Node: Title */
+/* Filter criterion: Content: Title */
 $handler->display->display_options['filters']['title']['id'] = 'title';
 $handler->display->display_options['filters']['title']['table'] = 'node';
 $handler->display->display_options['filters']['title']['field'] = 'title';
@@ -200,7 +196,7 @@ $handler->display->display_options['filters']['title']['exposed'] = TRUE;
 $handler->display->display_options['filters']['title']['expose']['label'] = 'Title';
 $handler->display->display_options['filters']['title']['expose']['identifier'] = 'title';
 $handler->display->display_options['filters']['title']['expose']['remember'] = 1;
-/* Filter: Node: Type */
+/* Filter criterion: Content: Type */
 $handler->display->display_options['filters']['type']['id'] = 'type';
 $handler->display->display_options['filters']['type']['table'] = 'node';
 $handler->display->display_options['filters']['type']['field'] = 'type';
@@ -209,60 +205,65 @@ $handler->display->display_options['filters']['type']['expose']['label'] = 'Type
 $handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
 $handler->display->display_options['filters']['type']['expose']['remember'] = 1;
 $handler->display->display_options['filters']['type']['expose']['reduce'] = 0;
-/* Filter: Node: Published */
+/* Filter criterion: Content: Published */
 $handler->display->display_options['filters']['status']['id'] = 'status';
 $handler->display->display_options['filters']['status']['table'] = 'node';
 $handler->display->display_options['filters']['status']['field'] = 'status';
-$handler->display->display_options['filters']['status']['value'] = 'All';
+$handler->display->display_options['filters']['status']['value'] = '1';
 $handler->display->display_options['filters']['status']['exposed'] = TRUE;
+$handler->display->display_options['filters']['status']['expose']['operator_id'] = '';
 $handler->display->display_options['filters']['status']['expose']['label'] = 'Published';
 $handler->display->display_options['filters']['status']['expose']['identifier'] = 'published';
+/* Filter criterion: Content: Published or admin */
+$handler->display->display_options['filters']['status_extra']['id'] = 'status_extra';
+$handler->display->display_options['filters']['status_extra']['table'] = 'node';
+$handler->display->display_options['filters']['status_extra']['field'] = 'status_extra';
 
 /* Display: Page */
 $handler = $view->new_display('page', 'Page', 'page_1');
 $handler->display->display_options['defaults']['fields'] = FALSE;
-/* Field: Node: Title */
+/* Field: Content: Title */
 $handler->display->display_options['fields']['title']['id'] = 'title';
 $handler->display->display_options['fields']['title']['table'] = 'node';
 $handler->display->display_options['fields']['title']['field'] = 'title';
 $handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
 $handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
 $handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['title']['alter']['html'] = 0;
 $handler->display->display_options['fields']['title']['hide_empty'] = 0;
 $handler->display->display_options['fields']['title']['empty_zero'] = 0;
 $handler->display->display_options['fields']['title']['link_to_node'] = 1;
-/* Field: Node: Type */
+/* Field: Content: Type */
 $handler->display->display_options['fields']['type']['id'] = 'type';
 $handler->display->display_options['fields']['type']['table'] = 'node';
 $handler->display->display_options['fields']['type']['field'] = 'type';
 $handler->display->display_options['fields']['type']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['type']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['type']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['type']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['type']['alter']['word_boundary'] = 0;
 $handler->display->display_options['fields']['type']['alter']['ellipsis'] = 0;
 $handler->display->display_options['fields']['type']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['type']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['type']['alter']['html'] = 0;
 $handler->display->display_options['fields']['type']['hide_empty'] = 0;
 $handler->display->display_options['fields']['type']['empty_zero'] = 0;
 $handler->display->display_options['fields']['type']['link_to_node'] = 0;
 $handler->display->display_options['fields']['type']['machine_name'] = 0;
-/* Field: Node: Published */
+/* Field: Content: Published */
 $handler->display->display_options['fields']['status']['id'] = 'status';
 $handler->display->display_options['fields']['status']['table'] = 'node';
 $handler->display->display_options['fields']['status']['field'] = 'status';
 $handler->display->display_options['fields']['status']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['status']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['status']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['status']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['status']['alter']['word_boundary'] = 0;
 $handler->display->display_options['fields']['status']['alter']['ellipsis'] = 0;
 $handler->display->display_options['fields']['status']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['status']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['status']['alter']['html'] = 0;
 $handler->display->display_options['fields']['status']['hide_empty'] = 0;
 $handler->display->display_options['fields']['status']['empty_zero'] = 0;
@@ -271,14 +272,15 @@ $handler->display->display_options['fields']['status']['not'] = 0;
 $handler->display->display_options['fields']['name']['id'] = 'name';
 $handler->display->display_options['fields']['name']['table'] = 'users';
 $handler->display->display_options['fields']['name']['field'] = 'name';
+$handler->display->display_options['fields']['name']['relationship'] = 'uid';
 $handler->display->display_options['fields']['name']['label'] = 'Author';
 $handler->display->display_options['fields']['name']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['name']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['name']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['name']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['name']['alter']['word_boundary'] = 1;
 $handler->display->display_options['fields']['name']['alter']['ellipsis'] = 1;
 $handler->display->display_options['fields']['name']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['name']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['name']['alter']['html'] = 0;
 $handler->display->display_options['fields']['name']['element_label_colon'] = 0;
 $handler->display->display_options['fields']['name']['element_default_classes'] = 1;
@@ -286,7 +288,7 @@ $handler->display->display_options['fields']['name']['hide_empty'] = 0;
 $handler->display->display_options['fields']['name']['empty_zero'] = 0;
 $handler->display->display_options['fields']['name']['link_to_user'] = 1;
 $handler->display->display_options['fields']['name']['overwrite_anonymous'] = 0;
-/* Field: Node: Updated date */
+/* Field: Content: Updated date */
 $handler->display->display_options['fields']['changed']['id'] = 'changed';
 $handler->display->display_options['fields']['changed']['table'] = 'node';
 $handler->display->display_options['fields']['changed']['field'] = 'changed';
@@ -294,17 +296,17 @@ $handler->display->display_options['fields']['changed']['label'] = 'Last updated
 $handler->display->display_options['fields']['changed']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['changed']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['word_boundary'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['ellipsis'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['changed']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['html'] = 0;
 $handler->display->display_options['fields']['changed']['element_label_colon'] = 1;
 $handler->display->display_options['fields']['changed']['element_default_classes'] = 1;
 $handler->display->display_options['fields']['changed']['hide_empty'] = 0;
 $handler->display->display_options['fields']['changed']['empty_zero'] = 0;
 $handler->display->display_options['fields']['changed']['date_format'] = 'time ago';
-/* Field: Node: Edit link */
+/* Field: Content: Edit link */
 $handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
 $handler->display->display_options['fields']['edit_node']['table'] = 'node';
 $handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
@@ -312,10 +314,10 @@ $handler->display->display_options['fields']['edit_node']['label'] = 'Actions';
 $handler->display->display_options['fields']['edit_node']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['edit_node']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['word_boundary'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['ellipsis'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['edit_node']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['edit_node']['alter']['html'] = 0;
 $handler->display->display_options['fields']['edit_node']['element_label_colon'] = 1;
 $handler->display->display_options['fields']['edit_node']['element_default_classes'] = 1;
@@ -336,25 +338,31 @@ $handler->display->display_options['pager']['type'] = 'some';
 $handler->display->display_options['pager']['options']['items_per_page'] = '10';
 $handler->display->display_options['pager']['options']['offset'] = '0';
 $handler->display->display_options['defaults']['filters'] = FALSE;
+/* Filter criterion: Content: Published */
+$handler->display->display_options['filters']['status']['id'] = 'status';
+$handler->display->display_options['filters']['status']['table'] = 'node';
+$handler->display->display_options['filters']['status']['field'] = 'status';
+$handler->display->display_options['filters']['status']['value'] = '1';
 $translatables['workbench_recent_content'] = array(
   t('Defaults'),
   t('All Recent Content'),
   t('view all'),
   t('Apply'),
   t('Reset'),
-  t('Sort By'),
+  t('Sort by'),
   t('Asc'),
   t('Desc'),
   t('Items per page'),
   t('- All -'),
   t('Offset'),
   t('There is no content available for you to edit.'),
+  t('author'),
   t('Title'),
   t('Type'),
-  t('Published'),
   t('Author'),
   t('Last updated'),
   t('edit'),
+  t('Published'),
   t('Page'),
   t('more'),
   t('Actions'),
diff --git a/sites/all/modules/workbench/workbench.info b/sites/all/modules/workbench/workbench.info
index fe09b79c..7044c50d 100644
--- a/sites/all/modules/workbench/workbench.info
+++ b/sites/all/modules/workbench/workbench.info
@@ -5,9 +5,9 @@ core = 7.x
 configure = admin/config/workbench/settings
 dependencies[] = views
 
-; Information added by drupal.org packaging script on 2011-06-07
-version = "7.x-1.x-dev"
+; Information added by drupal.org packaging script on 2011-11-02
+version = "7.x-1.1"
 core = "7.x"
 project = "workbench"
-datestamp = "1307407630"
+datestamp = "1320263738"
 
diff --git a/sites/all/modules/workbench/workbench.module b/sites/all/modules/workbench/workbench.module
index ec0bd9da..6b9646de 100644
--- a/sites/all/modules/workbench/workbench.module
+++ b/sites/all/modules/workbench/workbench.module
@@ -44,6 +44,22 @@ function workbench_menu() {
     'type' => MENU_LOCAL_TASK,
     'file' => 'workbench.pages.inc',
   );
+
+  // Create redirect urls for node add pages.
+  // This is helpful for the admin_menu module and could have other uses.
+  foreach (node_type_get_types() as $type) {
+    $type_url_str = str_replace('_', '-', $type->type);
+    $items['admin/workbench/create/node/add/' . $type_url_str] = array(
+      'title' => $type->name,
+      'title callback' => 'check_plain',
+      'page callback' => 'drupal_goto',
+      'page arguments' => array('node/add/' . $type_url_str),
+      'access callback' => 'node_access',
+      'access arguments' => array('create', $type->type),
+      'description' => $type->description,
+    );
+  }
+
   return $items;
 }
 
@@ -161,11 +177,6 @@ function workbench_theme($existing, $type, $theme, $path) {
   );
 }
 
-
-
-
-
-
 /**
  * Implementation of hook_preprocess_views_view_table().
  *
@@ -187,3 +198,24 @@ function workbench_preprocess_views_view_field(&$variables) {
     }
   }
 }
+
+/**
+ * Implements hook_ctools_plugin_directory() to let the system know
+ * where our task and task_handler plugins are.
+ */
+function workbench_ctools_plugin_directory($owner, $plugin_type) {
+  if ($owner == 'page_manager') {
+    return 'plugins/page_manager/' . $plugin_type;
+  }
+}
+
+/**
+ * Implements hook_ctools_plugin_api().
+ */
+function workbench_ctools_plugin_api($module, $api) {
+  // This includes a check for whether Panels is enabled since the Page Manager
+  // export is for Panels.
+  if ($module == 'page_manager' && $api == 'pages_default' && module_exists('panels')) {
+    return array('version' => 1);
+  }
+}
diff --git a/sites/all/modules/workbench/workbench.pages.inc b/sites/all/modules/workbench/workbench.pages.inc
index 024b53df..07698471 100644
--- a/sites/all/modules/workbench/workbench.pages.inc
+++ b/sites/all/modules/workbench/workbench.pages.inc
@@ -12,7 +12,7 @@
  * the Views as part of the alter hook provided here.
  *
  * @see hook_workbench_content_alter()
- * 
+ *
  * @return
  *  A Render API array of content creation options.
  */
@@ -29,19 +29,18 @@ function workbench_content() {
   $output['workbench_current_user'] = array(
     '#title' => t('My Profile'),
     '#view' => 'workbench_current_user',
+    '#view_display' => 'block_1',
     '#attributes' => array('class' => array('left', 'clearfix')),
     '#theme' => 'workbench_element',
   );
   // This right column is given a width of 65% by workbench.myworkbench.css.
   $output['workbench_edited'] = array(
-    '#title' => t('Content I\'ve Edited'),
     '#view' => 'workbench_edited',
     '#view_display' => 'block_1',
     '#attributes' => array('class' => array('right', 'clearfix')),
     '#theme' => 'workbench_element',
   );
   $output['workbench_recent_content'] = array(
-    '#title' => t('All Recent Content'),
     '#view' => 'workbench_recent_content',
     '#view_display' => 'block_1',
     '#attributes' => array('class' => array('clearfix'), 'style' => array('clear: both;')),
@@ -52,17 +51,18 @@ function workbench_content() {
   drupal_alter('workbench_content', $output);
 
   // Transform the Views into markup.
+  // @see views_embed_view()
   foreach (element_children($output) as $key) {
-    $value = $output[$key];
-    if (isset($value['#view'])) {
-      $markup = '';
-      if (isset($output[$key]['#markup'])) {
-        $markup = $output[$key]['#markup'];
+    if (isset($output[$key]['#view']) && $view = views_get_view($output[$key]['#view'])) {
+      $output[$key] += array('#markup' => '', '#view_display' => 'default');
+      $display_id = $output[$key]['#view_display'];
+      if ($view->access($display_id)) {
+        $output[$key]['#markup'] .= $view->preview($display_id, array());
+        if ($title = $view->get_title()) {
+          $output[$key]['#title'] = $title;
+        }
       }
-      $view = $value['#view'];
-      $display = isset($value['#view_display']) ? $value['#view_display'] : 'default';
-      // TODO: pass arguments to the View.
-      $output[$key]['#markup'] = $markup . views_embed_view($view, $display);
+      $view->destroy();
     }
   }
 
diff --git a/sites/all/modules/workbench/workbench.pages_default.inc b/sites/all/modules/workbench/workbench.pages_default.inc
new file mode 100644
index 00000000..8adbe05e
--- /dev/null
+++ b/sites/all/modules/workbench/workbench.pages_default.inc
@@ -0,0 +1,175 @@
+<?php
+
+/**
+ * @file
+ * Contains a sample myworkbench variant for Panels.
+ */
+
+/**
+ * Implementation of hook_default_page_manager_handlers()
+ */
+function workbench_default_page_manager_handlers() {
+  $handlers = array();
+
+  $handler = new stdClass;
+  $handler->disabled = TRUE;
+  $handler->api_version = 1;
+  $handler->name = 'myworkbench_panel_context_sample';
+  $handler->task = 'myworkbench';
+  $handler->subtask = '';
+  $handler->handler = 'panel_context';
+  $handler->weight = 100;
+  $handler->conf = array(
+    'title' => 'Sample Workbench',
+    'no_blocks' => 0,
+    'pipeline' => 'standard',
+    'css_id' => '',
+    'css' => '',
+    'contexts' => array(),
+    'relationships' => array(),
+  );
+  $display = new panels_display;
+  $display->layout = 'twocol_bricks';
+  $display->layout_settings = array();
+  $display->panel_settings = array(
+    'style_settings' => array(
+      'default' => NULL,
+      'middle' => NULL,
+      'top' => NULL,
+      'left_above' => NULL,
+      'right_above' => NULL,
+      'left_below' => NULL,
+      'right_below' => NULL,
+      'bottom' => NULL,
+    ),
+  );
+  $display->cache = array();
+  $display->title = 'My Workbench Sample';
+  $display->content = array();
+  $display->panels = array();
+    $pane = new stdClass;
+    $pane->pid = 'new-1';
+    $pane->panel = 'left_above';
+    $pane->type = 'views';
+    $pane->subtype = 'workbench_current_user';
+    $pane->shown = TRUE;
+    $pane->access = array();
+    $pane->configuration = array(
+      'override_pager_settings' => 0,
+      'use_pager' => 0,
+      'nodes_per_page' => '0',
+      'pager_id' => '0',
+      'offset' => '0',
+      'more_link' => 0,
+      'feed_icons' => 0,
+      'panel_args' => 0,
+      'link_to_view' => 0,
+      'args' => '',
+      'url' => '',
+      'display' => 'default',
+      'override_title' => 0,
+      'override_title_text' => '',
+    );
+    $pane->cache = array();
+    $pane->style = array(
+      'settings' => NULL,
+    );
+    $pane->css = array();
+    $pane->extras = array();
+    $pane->position = 0;
+    $display->content['new-1'] = $pane;
+    $display->panels['left_above'][0] = 'new-1';
+    $pane = new stdClass;
+    $pane->pid = 'new-2';
+    $pane->panel = 'middle';
+    $pane->type = 'views';
+    $pane->subtype = 'workbench_recent_content';
+    $pane->shown = TRUE;
+    $pane->access = array();
+    $pane->configuration = array(
+      'override_pager_settings' => 0,
+      'use_pager' => 0,
+      'nodes_per_page' => '25',
+      'pager_id' => '0',
+      'offset' => '0',
+      'more_link' => 0,
+      'feed_icons' => 0,
+      'panel_args' => 0,
+      'link_to_view' => 0,
+      'args' => '',
+      'url' => '',
+      'display' => 'block_1',
+      'override_title' => 0,
+      'override_title_text' => '',
+    );
+    $pane->cache = array();
+    $pane->style = array(
+      'settings' => NULL,
+    );
+    $pane->css = array();
+    $pane->extras = array();
+    $pane->position = 0;
+    $display->content['new-2'] = $pane;
+    $display->panels['middle'][0] = 'new-2';
+    $pane = new stdClass;
+    $pane->pid = 'new-3';
+    $pane->panel = 'right_above';
+    $pane->type = 'views';
+    $pane->subtype = 'workbench_edited';
+    $pane->shown = TRUE;
+    $pane->access = array();
+    $pane->configuration = array(
+      'override_pager_settings' => 0,
+      'use_pager' => 0,
+      'nodes_per_page' => '5',
+      'pager_id' => '0',
+      'offset' => '0',
+      'more_link' => 0,
+      'feed_icons' => 0,
+      'panel_args' => 0,
+      'link_to_view' => 0,
+      'args' => '',
+      'url' => '',
+      'display' => 'block_1',
+      'override_title' => 0,
+      'override_title_text' => '',
+    );
+    $pane->cache = array();
+    $pane->style = array(
+      'settings' => NULL,
+    );
+    $pane->css = array();
+    $pane->extras = array();
+    $pane->position = 0;
+    $display->content['new-3'] = $pane;
+    $display->panels['right_above'][0] = 'new-3';
+    $pane = new stdClass;
+    $pane->pid = 'new-4';
+    $pane->panel = 'top';
+    $pane->type = 'custom';
+    $pane->subtype = 'custom';
+    $pane->shown = TRUE;
+    $pane->access = array();
+    $pane->configuration = array(
+      'admin_title' => 'Sample Variant',
+      'title' => 'My Workbench created through Panels.',
+      'body' => '<em>You are viewing "My Workbench" as created by Page Manager and Panels. The module Views Content Panes is also recommended. Please read the <a href="http://drupal.org/node/1226174" target="_blank">Workbench documentation</a> for the best practices in using Panels and Page Manager with Workbench.</em>',
+      'format' => 'filtered_html',
+      'substitute' => 0,
+    );
+    $pane->cache = array();
+    $pane->style = array(
+      'settings' => NULL,
+    );
+    $pane->css = array();
+    $pane->extras = array();
+    $pane->position = 0;
+    $display->content['new-4'] = $pane;
+    $display->panels['top'][0] = 'new-4';
+  $display->hide_title = PANELS_TITLE_FIXED;
+  $display->title_pane = 'new-2';
+  $handler->conf['display'] = $display;
+  $handlers['myworkbench_panel_context_sample'] = $handler;
+
+  return $handlers;
+}
diff --git a/sites/all/modules/workbench_access/README.txt b/sites/all/modules/workbench_access/README.txt
index bfe9060e..a916e514 100644
--- a/sites/all/modules/workbench_access/README.txt
+++ b/sites/all/modules/workbench_access/README.txt
@@ -22,8 +22,10 @@ CONTENTS
 3.  Permissions
 4.  Configuration
 4.1   Access schemes
-4.1.1  Automated section assignment
-4.1.2  Workbench Access message label
+4.1.1 Content types enabled
+4.1.2  Automated section assignment
+4.1.3  Workbench Access message label
+4.1.4  Allow multiple section assignments
 4.2   Access sections
 4.2.1  Manual section configuration
 4.2.2  Automated section configuration
@@ -459,9 +461,25 @@ section is the Museum vocabulary created during installation.
 
 Select your options and Save configuration.
 
+----
+4.1.1 Content types enabled
+
+This fieldset determines is access control rules will be enforced on each
+content type. You may select to disable complex access rules for any content
+type.
+
+  > Content types enabled
+  [*] Article
+  [*] Basic page
+  Only selected content types will have Workbench Access rules enforced.
+
+By default, access control is enforced for all content types.
+
+Note that these settings are also available under the "Workflow" tab of the
+content type settings page.
 
 ----
-4.1.1  Automated section assignment
+4.1.2  Automated section assignment
 
 On the settings page is another checkbox, labeled 'Automated section
 assignment'. This optional setting is enabled by default.
@@ -479,7 +497,7 @@ automatically configured for you.
 
 
 ----
-4.1.2  Workbench Access message label
+4.1.3  Workbench Access message label
 
 In the user interface, Workbench Access sets certain messages, such as the
 assigned editorial sections and the form label.
@@ -487,6 +505,21 @@ assigned editorial sections and the form label.
 This settings lets you change how the item is labelled. The default is
 "Workbench Access". You may prefer "Sections" or "Editorial Team" instead.
 
+----
+4.1.4  Allow multiple section assignments
+
+The checkbox labeled 'Allow multiple section assignments' controls the behavior
+of the section selection form when editing content. This optional setting is
+disabled by default.
+
+    [ ] Allow multiple section assignments
+    Let content be assigned to multiple sections.
+
+If enabled, editors will be shown a multiple select option when editing section
+assignments. This configuration can be useful if you have content that spans
+several parts of your organization.
+
+
 ----
 4.2   Access sections
 
@@ -692,8 +725,7 @@ This table may be sorted and searched to help editors find content quickly.
 
 The 'Section' column of the table shows the current section the content is
 assigned to. If the editor is assigned to that section, the section name is
-shown. If the editor is assigned to a parent section, the parent which grants
-the access is shown with an > preceding the actual section assignment.
+shown.
 
 For example, if the editor is assigned to the Library section, the table may
 look like so:
@@ -701,10 +733,10 @@ look like so:
     Title           Section
     -----           -------
     Library hours   Library
-    Return policy   Library > Library Visitors
-    Vacation rules  Library > Library Staff
+    Return policy   Library Visitors
+    Vacation rules  Library Staff
 
-This format is designed to show editors why they have access to the content.
+This column is designed to show editors why they have access to the content.
 
 
 ----
diff --git a/sites/all/modules/workbench_access/includes/workbench_access_handler_field_section.inc b/sites/all/modules/workbench_access/includes/workbench_access_handler_field_section.inc
index 96699e53..6b1c96c2 100644
--- a/sites/all/modules/workbench_access/includes/workbench_access_handler_field_section.inc
+++ b/sites/all/modules/workbench_access/includes/workbench_access_handler_field_section.inc
@@ -9,13 +9,19 @@
  * @TODO: support multiple sections.
  */
 
-class workbench_access_handler_field_section extends views_handler_field {
-  // No query for this field.
+class workbench_access_handler_field_section extends views_handler_field_prerender_list {
+  function init(&$view, &$options) {
+    parent::init($view, $options);
+    if ($view->base_table == 'node_revisions') {
+      $this->additional_fields['nid'] = array('table' => 'node_revisions', 'field' => 'nid');
+    }
+    else {
+      $this->additional_fields['nid'] = array('table' => 'node', 'field' => 'nid');
+    }
+  }
+  // Add the additional fields.
   function query() {
-    $active = workbench_access_get_active_tree();
-    $field_table = $this->query->ensure_table($active['access_scheme']['field_table']);
-    // Using this field alias breaks the COUNT query. Views bug?
-    $field = $this->query->add_field($field_table, $active['access_scheme']['query_field'], 'workbench_access_id');
+    $this->add_additional_fields();
   }
 
   function click_sort($order) {
@@ -44,32 +50,42 @@ class workbench_access_handler_field_section extends views_handler_field {
     }
   }
 
-  function render($values) {
-    global $user;
-    $account = $user;
-    if (!isset($account->workbench_access)) {
-      workbench_access_user_load_data($account);
-    }
-    if (!isset($values->workbench_access_id)) {
-      return '';
+  function pre_render(&$values) {
+    // We have to find the sections assigned to each node.
+    // Load node data.
+    $nids = array();
+    foreach ($values as $result) {
+      if (!empty($result->{$this->aliases['nid']})) {
+        $nids[] = $result->{$this->aliases['nid']};
+      }
     }
+    $nodes = node_load_multiple($nids, array());
+
+    // Now match the data to the active tree.
     $active = workbench_access_get_active_tree();
-    $name = '';
-    $tree = $active['tree'];
-    workbench_access_build_tree($tree, array_keys($account->workbench_access));
-    if (isset($account->workbench_access[$values->workbench_access_id])) {
-      $name = $tree[$values->workbench_access_id]['name'];
-    }
-    else {
-      foreach ($account->workbench_access as $id => $data) {
-        if (!empty($tree[$id]['children'])) {
-          $children = $tree[$id]['children'];
-          if (in_array($values->workbench_access_id, $children)) {
-            $name = $tree[$id]['name'] . ' > ' . $tree[$values->workbench_access_id]['name'];
-          }
+    foreach ($values as $value) {
+      if (isset($value->{$this->aliases['nid']}) && isset($nodes[$value->{$this->aliases['nid']}]->workbench_access)) {
+        foreach ($nodes[$value->{$this->aliases['nid']}]->workbench_access as $access_id) {
+          $value->workbench_access[] = check_plain($active['tree'][$access_id]['name']);
+          $this->items[$value->{$this->aliases['nid']}][$access_id]['value'] = check_plain($active['tree'][$access_id]['name']);
         }
       }
+      else {
+        $value->workbench_access = array();
+      }
+    }
+  }
+
+  // Only render() seems to work. What gives, Views?
+  function render($values) {
+    if (!isset($values->workbench_access)) {
+      $values->workbench_access = array();
+    }
+    if ($this->options['type'] == 'separator') {
+      return implode($this->sanitize_value($this->options['separator']), $values->workbench_access);
     }
-    return check_plain($name);
+    $variables['items'] = $values->workbench_access;
+    $variables['type'] = $this->options['type'];
+    return theme('item_list', $variables);
   }
 }
diff --git a/sites/all/modules/workbench_access/includes/workbench_access_handler_filter_access.inc b/sites/all/modules/workbench_access/includes/workbench_access_handler_filter_access.inc
index b7d982bf..aa803ed2 100644
--- a/sites/all/modules/workbench_access/includes/workbench_access_handler_filter_access.inc
+++ b/sites/all/modules/workbench_access/includes/workbench_access_handler_filter_access.inc
@@ -7,7 +7,7 @@
  * Provides a filter to display nodes by assigned section.
  */
 
-class workbench_access_handler_filter_access extends views_handler_filter {
+class workbench_access_handler_filter_access extends views_handler_filter_many_to_one {
   function option_definition() {
     $options = parent::option_definition();
     $options['access_id'] = array('default' => NULL);
@@ -15,7 +15,7 @@ class workbench_access_handler_filter_access extends views_handler_filter {
     return $options;
   }
 
-  function operator_options() {
+  function operator_options($which = 'title') {
     return array(
       'or' => t('Is one of'),
     );
@@ -68,6 +68,16 @@ class workbench_access_handler_filter_access extends views_handler_filter {
 
   function query() {
     global $user;
+    static $node_types;
+
+    // If not configured, do nothing.
+    $active = workbench_access_get_active_tree();
+    $tree = $active['tree'];
+    if (empty($tree)) {
+      return;
+    }
+
+    // Check the user's access.
     $account = $user; // Not a clone, but that's ok, since we need this data on $user.
     if (!isset($account->workbench_access)) {
       workbench_access_user_load_data($account);
@@ -78,8 +88,7 @@ class workbench_access_handler_filter_access extends views_handler_filter {
       $this->query->add_where($this->options['group'], "$table.nid", -1, '=');
       return;
     }
-    $active = workbench_access_get_active_tree();
-    $tree = $active['tree'];
+
     // No selection? Use the user's tree.
     if (empty($this->value) || $this->value[0] == -5) {
       workbench_access_build_tree($tree, array_keys($account->workbench_access));
@@ -88,12 +97,38 @@ class workbench_access_handler_filter_access extends views_handler_filter {
     else {
       workbench_access_build_tree($tree, array_keys($this->value[0]));
     }
+
+    // Build the query. Since we allow multi-select, this has to be a subquery.
     $ids = array_keys($tree);
-    $table = $this->query->ensure_table($active['access_scheme']['field_table']);
-    // Using this field alias breaks the COUNT query. Views bug?
-    $field = $this->query->add_field($table, $active['access_scheme']['query_field']);
-    $this->query->add_where($this->options['group'], "$table." . $active['access_scheme']['query_field'], $ids, 'IN');
-    $field = $this->query->add_field($table, 'access_scheme');
-    $this->query->add_where($this->options['group'], "$table." . 'access_scheme', $active['access_scheme']['access_scheme']);
+    $table = $active['access_scheme']['field_table'];
+    $subquery = db_select($table, $table);
+    $subquery->addField($table, 'nid');
+    $subquery->distinct();
+    $subquery->condition($table . '.' . $active['access_scheme']['query_field'], $ids, 'IN');
+    $subquery->condition($table . '.access_scheme', $active['access_scheme']['access_scheme']);
+
+    // Filter out node types not governed by this module.
+    // See http://drupal.org/node/1082220.
+    if (!isset($node_types)) {
+      $node_types = array();
+      foreach (node_type_get_names() as $type => $name) {
+        $node_types[$type] = variable_get('workbench_access_node_type_' . $type, 1);
+      }
+      if ($node_types == array_filter($node_types)) {
+        // If there were no node types that are not allowed, set the static
+        // variable to FALSE to indicate no restriction by node type.
+        $node_types = FALSE;
+      }
+    }
+    // If not all node types are allowed, filter out those not used.
+    // This has to go in the subquery, not the Views query.
+    if ($node_types !== FALSE) {
+      $alias = $subquery->join('node', 'n', "$table.nid = n.nid");
+      $subquery->condition("$alias.type", array_keys($node_types), 'IN');
+    }
+
+    // Now alter the query, which must have an nid in the base table.
+    $this->query->add_where($this->options['group'], $this->query->base_table . '.nid', $subquery, 'IN');
+
   }
 }
diff --git a/sites/all/modules/workbench_access/tests/workbench_access.test b/sites/all/modules/workbench_access/tests/workbench_access.test
index cf689e7f..7025a80c 100644
--- a/sites/all/modules/workbench_access/tests/workbench_access.test
+++ b/sites/all/modules/workbench_access/tests/workbench_access.test
@@ -8,6 +8,7 @@
 class WorkbenchAccessTestCase extends DrupalWebTestCase {
   protected $user_list;
   protected $editor_role;
+  protected $permissions;
 
   public static function getInfo() {
     return array(
@@ -20,7 +21,7 @@ class WorkbenchAccessTestCase extends DrupalWebTestCase {
   function setUp() {
     parent::setUp('workbench_access');
     // Add an editor role.
-    $permissions = array(
+    $this->permissions = array(
       'access content',
       'create page content',
       'edit any page content',
@@ -28,7 +29,7 @@ class WorkbenchAccessTestCase extends DrupalWebTestCase {
       'access workbench access by role',
     );
 
-    $this->editor_role = $this->drupalCreateRole($permissions);
+    $this->editor_role = $this->drupalCreateRole($this->permissions);
 
     // Create some nodes and users.
     for ($i = 0; $i < 10; $i++) {
@@ -44,6 +45,7 @@ class WorkbenchAccessTestCase extends DrupalWebTestCase {
         'mail' => $this->randomName(32) . '@example.com',
         'roles' => drupal_map_assoc(array(DRUPAL_AUTHENTICATED_RID, $this->editor_role)),
         'status' => 1,
+        'pass' => 'fubar',
       );
       $this->user_list[] = user_save(NULL, $edit);
     }
@@ -53,7 +55,7 @@ class WorkbenchAccessTestCase extends DrupalWebTestCase {
   function testWorkbenchAccess() {
     // Check for user creation.
     $this->assertTrue(count($this->user_list) == 10, t('Ten new users were created.'));
-    $this->assertTrue(!empty($this->editor_role), t('Created edtior role.'));
+    $this->assertTrue(!empty($this->editor_role), t('Created editor role.'));
     // Check for node creation.
     $count = db_query("SELECT COUNT(n.nid) FROM {node} n")->fetchField();
     $this->assertTrue($count == 10, t('Ten initial nodes created.'));
@@ -77,12 +79,12 @@ class WorkbenchAccessTestCase extends DrupalWebTestCase {
     $count = db_query("SELECT COUNT(n.nid) FROM {node} n INNER JOIN {workbench_access_node} wan ON n.nid = wan.nid WHERE wan.access_id = 'workbench_access' AND wan.access_scheme = 'taxonomy'")->fetchField();
     $this->assertTrue($count == 10, t('Initial nodes assigned to top-level hierarchy.'));
     // Test access settings of user 1.
-    $account = user_load(1);
+    $account = user_load(1, TRUE);
     $this->assertTrue(!empty($account->workbench_access['workbench_access']), t('User 1 assigned to top-level hierarchy.'));
     // End setup tests.
-    
+
     // Assign a user to a section and check permissions.
-    // This is a multi-step check. 
+    // This is a multi-step check.
     // First, the user should not be able to do anything (Create, Update or Delete).
     $id = array_rand($this->user_list);
     $account = $this->user_list[$id];
@@ -96,6 +98,106 @@ class WorkbenchAccessTestCase extends DrupalWebTestCase {
       }
     }
     $this->assertTrue(!empty($assigned), t('All nodes properly assigned.'));
+    $this->workbench_access_action_check($nodes, $account, t('No sections'), FALSE);
+
+    // Test that the role lookup function works correctly.
+    $roles = workbench_access_get_roles('access workbench access by role');
+    // The 'administrator' role always has permission.
+    $this->assertTrue(count($roles) == 2, t('One user role assigneed.'));
+
+    // Now, we assign the user to a section and check again.
+    workbench_access_user_section_save($account->uid, 'workbench_access', $active['access_scheme']['access_scheme']);
+    $account = user_load($account->uid, TRUE);
+    $this->assertTrue(!empty($account->workbench_access['workbench_access']), t('Test user assigned to top-level hierarchy.'));
+    $this->workbench_access_action_check($nodes, $account, t('Assigned sections'), TRUE);
+
+    // Remove the permission to 'access workbench access by role' and check again.
+    user_role_revoke_permissions($this->editor_role, array('access workbench access by role'));
+    $account = user_load($account->uid, TRUE);
+    $this->assertTrue(empty($account->workbench_access['workbench_access']), t('Permission revoked and test user not assigned to a section.'));
+    $this->workbench_access_action_check($nodes, $account, t('Role disallowed'), FALSE);
+
+    // Test that the role lookup function works correctly.
+    drupal_static_reset('workbench_access_get_roles');
+    $roles = workbench_access_get_roles('access workbench access by role');
+    // The 'administrator' role always has permission. Ignore that.
+    $this->assertTrue(count($roles) == 1, t('No user roles assigneed.'));
+
+    // Now give them permissions again.
+    user_role_grant_permissions($this->editor_role, array('access workbench access by role'));
+    $account = user_load($account->uid, TRUE);
+    $this->assertTrue(!empty($account->workbench_access['workbench_access']), t('Permission reinstated and test user assigned to a section.'));
+    $this->workbench_access_action_check($nodes, $account, t('Role allowed.'), TRUE);
+
+    // Now take away the core permissions to page content and test.
+    $perms = array(
+      'create page content',
+      'edit any page content',
+      'delete any page content',
+    );
+    user_role_revoke_permissions($this->editor_role, $perms);
+    $account = user_load($account->uid, TRUE);
+    $this->workbench_access_action_check($nodes, $account, t('Page access disallowed'), FALSE);
+
+    // Now give back the core permissions.
+    user_role_grant_permissions($this->editor_role, $perms);
+    $account = user_load($account->uid, TRUE);
+    $this->workbench_access_action_check($nodes, $account, t('Page access allowed'), TRUE);
+
+    // Form testing in Drupal is horribly broken.
+    // We can confirm that a form page is loaded, but cannot perform
+    // any introspection on the $form array.
+    $account->pass_raw = 'fubar';
+    $this->drupalLogin($account);
+    // Set the form label.
+    // Attempt to access edit page.
+    $this->drupalGet("node/$node->nid/edit");
+    $this->assertResponse(200);
+    $this->assertRaw('Section', t('Workbench Access field was found.'));
+    $this->assertRaw('<select id="edit-workbench-access-id" name="workbench_access_id" class="form-select required">', t('Form presents a select list with no multiple select.'));
+    // Change some values and try again.
+    variable_set('workbench_access_allow_multiple', 1);
+    variable_set('workbench_access_label', 'TestWA');
+    $this->drupalGet("node/$node->nid/edit");
+    $this->assertRaw('TestWA', t('Workbench Access field was renamed.'));
+    $this->assertRaw('<select multiple="multiple" name="workbench_access_id[]" id="edit-workbench-access-id" class="form-select required">', t('Form presents a select list with multiple select.'));
+
+    // Check that access control by node type settings work.
+    $this->assertTrue(variable_get('workbench_access_node_type_' . $node->type, 1), t('Workbench Access enforced for %type content.', array('%type' => $node->type)));
+    // Force a fail by removing this user's access rules. Else it will just
+    // return NODE_ACCESS_IGNORE, which cannot be tested.
+    $account->workbench_access = array('foo');
+    $response = workbench_access_node_access($node, 'update', $account);
+    $this->assertTrue($response == NODE_ACCESS_DENY, t('Workbench Access rules enforced on test node.'));
+
+    // Since the user is not in a section, this should DENY, unless the node
+    // type is ignored.
+    variable_set('workbench_access_node_type_' . $node->type, 0);
+    $this->assertFalse(variable_get('workbench_access_node_type_' . $node->type, 1), t('Workbench Access not enforced for %type content.', array('%type' => $node->type)));
+    $response = workbench_access_node_access($node, 'update', $account);
+    $this->assertTrue($response == NODE_ACCESS_IGNORE, t('Workbench Access rules ignored on test node.'));
+
+    // Restore the account, in case we do more tests later.
+    $account = user_load($account->uid, TRUE);
+
+  }
+
+  /**
+   * Simple method for running the same node access checks repeatedly.
+   *
+   * @param $nodes
+   *  The nodes to check. If one fails, the test fails.
+   * @param $account
+   *  The user account being tested.
+   * @param $message
+   *  The string to prefix in front of the test result message.
+   * @param $true
+   *  Boolean indicator that we want to test TRUE or FALSE on this test.
+   */
+  function workbench_access_action_check($nodes, $account, $message, $true = TRUE) {
+    // Since we change conditions, reset node access.
+    drupal_static_reset('node_access');
+    // Check the node operations.
     $actions = array('create', 'update', 'delete');
     foreach ($actions as $action) {
       foreach ($nodes as $node) {
@@ -111,38 +213,165 @@ class WorkbenchAccessTestCase extends DrupalWebTestCase {
           break;
         }
       }
-      $this->assertTrue(empty($status[$action]), t('Test user cannot @action content.', array('@action' => $action)));
-    }
-    // Now, we assign the user to a section and check again.
-    drupal_static_reset('node_access');
-    workbench_access_user_section_save($account->uid, 'workbench_access', $active['access_scheme']['access_scheme']);
-    $account = user_load($account->uid, TRUE);
-    $this->assertTrue(!empty($account->workbench_access['workbench_access']), t('Test user assigned to top-level hierarchy.'));
-    foreach ($actions as $action) {
-      foreach ($nodes as $node) {
-        $status[$action] = TRUE;
-        if ($action == 'create') {
-          $result = node_access($action, $node->type, $account);
-        }
-        else {
-          $result = node_access($action, $node, $account);
-        }
-        if (!$result) {
-          $status[$action] = FALSE;
-          break;
-        }
+      if ($true) {
+        $this->assertTrue(!empty($status[$action]), t('@message. Test user can @action content.', array('@message' => $message, '@action' => $action)));
+      }
+      else {
+        $this->assertTrue(empty($status[$action]), t('@message. Test user cannot @action content.', array('@message' => $message, '@action' => $action)));
       }
-      $this->assertTrue(!empty($status[$action]), t('Test user can now @action content.', array('@action' => $action)));
     }
-    // Remove the permission to 'access workbench access by role' and check again.
-    user_role_revoke_permissions($this->editor_role, array('access workbench access by role'));
-    $account = user_load($account->uid, TRUE);
-    $this->assertTrue(empty($account->workbench_access['workbench_access']), t('Permission revoked and test user not assigned to a section.'));
-    // Now give them permissions again.
-    user_role_grant_permissions($this->editor_role, array('access workbench access by role'));
-    $account = user_load($account->uid, TRUE);
-    $this->assertTrue(!empty($account->workbench_access['workbench_access']), t('Permission reinstated and test user assigned to a section.'));
+  }
+}
+
+class WorkbenchAccessTokenTestCase extends DrupalWebTestCase {
+  private $nodes = array();
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Workbench access tokens',
+      'description' => 'Tests tokens provided by Workbench Access.',
+      'group' => 'Workbench Access',
+      'dependencies' => array('token'),
+    );
+  }
+
+  function setUp() {
+    parent::setUp('workbench_access', 'token');
+
+    // Allow nodes to be assigned multiple sections.
+    variable_set('workbench_access_allow_multiple', 1);
+
+    // Disable access control for basic page nodes.
+    variable_set('workbench_access_node_type_page', 0);
+  }
+
+  function testTokens() {
+    $assigned_node = $this->drupalCreateNode(array('type' => 'article'));
+    module_load_include('inc', 'workbench_access', 'admin');
+    workbench_access_example_taxonomy();
+    $assigned_node = node_load($assigned_node->nid);
+
+    // Fetch a list of additional sections to be used in the tests.
+    $terms = taxonomy_get_term_by_name('Exhibits');
+    $terms += taxonomy_get_term_by_name('Library');
+    $terms += taxonomy_get_term_by_name('Gift Shop');
+
+    // Test tokens for a node that has been assigned to the Museum section only.
+    $tokens = array(
+      'workbench-access-sections' => 'Museum',
+      'workbench-access-sections:keys' => 'workbench_access',
+      'workbench-access-sections:count' => 1,
+    );
+    $this->assertTokens('node', array('node' => $assigned_node), $tokens);
+
+    $assigned_node->workbench_access_id = array_keys($terms);
+    node_save($assigned_node);
+
+    // Test tokens now that the node has multiple section assignments.
+    $assigned_node = node_load($assigned_node->nid);
+    $tokens = array(
+      'workbench-access-sections' => 'Exhibits, Library, Gift Shop',
+      'workbench-access-sections:keys' => implode(', ', array_keys($terms)),
+      'workbench-access-sections:count' => 3,
+      'workbench-access-sections:first' => 'Exhibits',
+      'workbench-access-sections:last' => 'Gift Shop',
+    );
+    $this->assertTokens('node', array('node' => $assigned_node), $tokens);
+
+    // Test tokens for a node that has not been assigned to any sections.
+    $unassigned_node = $this->drupalCreateNode(array('type' => 'article'));
+    $tokens = array(
+      'workbench-access-sections' => 'Unassigned',
+      'workbench-access-sections:keys' => NULL,
+      'workbench-access-sections:count' => NULL,
+    );
+    $this->assertTokens('node', array('node' => $unassigned_node), $tokens);
+
+    // Test tokens for a node that is not under section access control.
+    $unassigned_node = $this->drupalCreateNode(array('type' => 'page'));
+    $tokens = array(
+      'workbench-access-sections' => NULL,
+      'workbench-access-sections:keys' => NULL,
+      'workbench-access-sections:count' => NULL,
+    );
+    $this->assertTokens('node', array('node' => $unassigned_node), $tokens);
+
+    // Test tokens for a user that has been assigned to the Museum section only.
+    $admin_user = user_load(1);
+    $tokens = array(
+      'workbench-access-sections' => 'Museum',
+      'workbench-access-sections:keys' => 'workbench_access',
+      'workbench-access-sections:count' => 1,
+    );
+    $this->assertTokens('user', array('user' => $admin_user), $tokens);
+
+    // Change the sections for the user.
+    foreach ($terms as $term) {
+      workbench_access_user_section_save($admin_user->uid, $term->tid, 'taxonomy');
+    }
+    workbench_access_user_section_delete($admin_user->uid, 'workbench_access', 'taxonomy');
+
+    // Test tokens now that the user has multiple section assignments.
+    $admin_user = user_load(1);
+    $tokens = array(
+      'workbench-access-sections' => 'Exhibits, Library, Gift Shop',
+      'workbench-access-sections:keys' => implode(', ', array_keys($terms)),
+      'workbench-access-sections:count' => 3,
+      'workbench-access-sections:first' => 'Exhibits',
+      'workbench-access-sections:last' => 'Gift Shop',
+    );
+    $this->assertTokens('user', array('user' => $admin_user), $tokens);
+
+    // Test tokens for a user that is not assigned to any sections.
+    $unassigned_user = $this->drupalCreateUser();
+    $tokens = array(
+      'workbench-access-sections' => NULL,
+      'workbench-access-sections:keys' => NULL,
+      'workbench-access-sections:count' => NULL,
+    );
+    $this->assertTokens('user', array('user' => $unassigned_user), $tokens);
 
+    // Test the site-wide access scheme tokens.
+    $tokens = array(
+      'workbench-access-scheme' => t('Taxonomy'),
+      'workbench-access-scheme:name' => t('Taxonomy'),
+      'workbench-access-scheme:machine-name' => 'taxonomy',
+      'workbench-access-scheme:description' => t('Uses taxonomy vocabularies for assigning hierarchical access control.'),
+    );
+    $this->assertTokens('site', array(), $tokens);
+
+    // Change the site-wide scheme to menu.module.
+    variable_set('workbench_access', 'menu');
+    $tokens = array(
+      'workbench-access-scheme' => t('Menu'),
+      'workbench-access-scheme:name' => t('Menu'),
+      'workbench-access-scheme:machine-name' => 'menu',
+      'workbench-access-scheme:description' => t('Uses the menu system for assigning hierarchical access control.'),
+    );
+    $this->assertTokens('site', array(), $tokens);
   }
 
+  /**
+   * Function copied from TokenTestHelper::assertTokens().
+   */
+  function assertTokens($type, array $data, array $tokens, array $options = array()) {
+    $token_input = drupal_map_assoc(array_keys($tokens));
+    $values = token_generate($type, $token_input, $data, $options);
+    foreach ($tokens as $token => $expected) {
+      if (!isset($expected)) {
+        $this->assertTrue(!isset($values[$token]), t("Token value for [@type:@token] was not generated.", array('@type' => $type, '@token' => $token)));
+      }
+      elseif (!isset($values[$token])) {
+        $this->fail(t("Token value for [@type:@token] was not generated.", array('@type' => $type, '@token' => $token)));
+      }
+      elseif (!empty($options['regex'])) {
+        $this->assertTrue(preg_match('/^' . $expected . '$/', $values[$token]), t("Token value for [@type:@token] was '@actual', matching regular expression pattern '@expected'.", array('@type' => $type, '@token' => $token, '@actual' => $values[$token], '@expected' => $expected)));
+      }
+      else {
+        $this->assertIdentical($values[$token], $expected, t("Token value for [@type:@token] was '@actual', expected value '@expected'.", array('@type' => $type, '@token' => $token, '@actual' => $values[$token], '@expected' => $expected)));
+      }
+    }
+
+    return $values;
+  }
 }
diff --git a/sites/all/modules/workbench_access/views/workbench_access_content.view.inc b/sites/all/modules/workbench_access/views/workbench_access_content.view.inc
index 59820921..478a99fc 100644
--- a/sites/all/modules/workbench_access/views/workbench_access_content.view.inc
+++ b/sites/all/modules/workbench_access/views/workbench_access_content.view.inc
@@ -12,7 +12,7 @@ $view->tag = 'Workbench Access';
 $view->base_table = 'node';
 $view->human_name = '';
 $view->core = 0;
-$view->api_version = '3.0-alpha1';
+$view->api_version = '3.0';
 $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
 
 /* Display: Defaults */
@@ -22,6 +22,7 @@ $handler->display->display_options['access']['type'] = 'perm';
 $handler->display->display_options['access']['perm'] = 'access workbench access by role';
 $handler->display->display_options['cache']['type'] = 'none';
 $handler->display->display_options['query']['type'] = 'views_query';
+$handler->display->display_options['query']['options']['query_comment'] = FALSE;
 $handler->display->display_options['exposed_form']['type'] = 'basic';
 $handler->display->display_options['pager']['type'] = 'full';
 $handler->display->display_options['pager']['options']['items_per_page'] = '25';
@@ -85,32 +86,36 @@ $handler->display->display_options['style_options']['info'] = array(
 $handler->display->display_options['style_options']['override'] = 1;
 $handler->display->display_options['style_options']['sticky'] = 0;
 $handler->display->display_options['style_options']['order'] = 'desc';
-/* Field: Node: Title */
+/* Relationship: Content: Author */
+$handler->display->display_options['relationships']['uid']['id'] = 'uid';
+$handler->display->display_options['relationships']['uid']['table'] = 'node';
+$handler->display->display_options['relationships']['uid']['field'] = 'uid';
+/* Field: Content: Title */
 $handler->display->display_options['fields']['title']['id'] = 'title';
 $handler->display->display_options['fields']['title']['table'] = 'node';
 $handler->display->display_options['fields']['title']['field'] = 'title';
 $handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1;
 $handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1;
 $handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['title']['alter']['html'] = 0;
 $handler->display->display_options['fields']['title']['hide_empty'] = 0;
 $handler->display->display_options['fields']['title']['empty_zero'] = 0;
 $handler->display->display_options['fields']['title']['link_to_node'] = 1;
-/* Field: Node: Type */
+/* Field: Content: Type */
 $handler->display->display_options['fields']['type']['id'] = 'type';
 $handler->display->display_options['fields']['type']['table'] = 'node';
 $handler->display->display_options['fields']['type']['field'] = 'type';
 $handler->display->display_options['fields']['type']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['type']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['type']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['type']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['type']['alter']['word_boundary'] = 1;
 $handler->display->display_options['fields']['type']['alter']['ellipsis'] = 1;
 $handler->display->display_options['fields']['type']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['type']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['type']['alter']['html'] = 0;
 $handler->display->display_options['fields']['type']['hide_empty'] = 0;
 $handler->display->display_options['fields']['type']['empty_zero'] = 0;
@@ -123,10 +128,10 @@ $handler->display->display_options['fields']['section']['field'] = 'section';
 $handler->display->display_options['fields']['section']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['section']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['section']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['section']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['section']['alter']['word_boundary'] = 1;
 $handler->display->display_options['fields']['section']['alter']['ellipsis'] = 1;
 $handler->display->display_options['fields']['section']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['section']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['section']['alter']['html'] = 0;
 $handler->display->display_options['fields']['section']['element_label_colon'] = 1;
 $handler->display->display_options['fields']['section']['element_default_classes'] = 1;
@@ -136,14 +141,15 @@ $handler->display->display_options['fields']['section']['empty_zero'] = 0;
 $handler->display->display_options['fields']['name']['id'] = 'name';
 $handler->display->display_options['fields']['name']['table'] = 'users';
 $handler->display->display_options['fields']['name']['field'] = 'name';
+$handler->display->display_options['fields']['name']['relationship'] = 'uid';
 $handler->display->display_options['fields']['name']['label'] = 'Author';
 $handler->display->display_options['fields']['name']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['name']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['name']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['name']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['name']['alter']['word_boundary'] = 1;
 $handler->display->display_options['fields']['name']['alter']['ellipsis'] = 1;
 $handler->display->display_options['fields']['name']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['name']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['name']['alter']['html'] = 0;
 $handler->display->display_options['fields']['name']['element_label_colon'] = 1;
 $handler->display->display_options['fields']['name']['element_default_classes'] = 1;
@@ -151,22 +157,22 @@ $handler->display->display_options['fields']['name']['hide_empty'] = 0;
 $handler->display->display_options['fields']['name']['empty_zero'] = 0;
 $handler->display->display_options['fields']['name']['link_to_user'] = 1;
 $handler->display->display_options['fields']['name']['overwrite_anonymous'] = 0;
-/* Field: Node: Published */
+/* Field: Content: Published */
 $handler->display->display_options['fields']['status']['id'] = 'status';
 $handler->display->display_options['fields']['status']['table'] = 'node';
 $handler->display->display_options['fields']['status']['field'] = 'status';
 $handler->display->display_options['fields']['status']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['status']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['status']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['status']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['status']['alter']['word_boundary'] = 1;
 $handler->display->display_options['fields']['status']['alter']['ellipsis'] = 1;
 $handler->display->display_options['fields']['status']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['status']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['status']['alter']['html'] = 0;
 $handler->display->display_options['fields']['status']['hide_empty'] = 0;
 $handler->display->display_options['fields']['status']['empty_zero'] = 0;
 $handler->display->display_options['fields']['status']['not'] = 0;
-/* Field: Node: Updated date */
+/* Field: Content: Updated date */
 $handler->display->display_options['fields']['changed']['id'] = 'changed';
 $handler->display->display_options['fields']['changed']['table'] = 'node';
 $handler->display->display_options['fields']['changed']['field'] = 'changed';
@@ -174,10 +180,10 @@ $handler->display->display_options['fields']['changed']['label'] = 'Last updated
 $handler->display->display_options['fields']['changed']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['changed']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['word_boundary'] = 1;
 $handler->display->display_options['fields']['changed']['alter']['ellipsis'] = 1;
 $handler->display->display_options['fields']['changed']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['changed']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['changed']['alter']['html'] = 0;
 $handler->display->display_options['fields']['changed']['element_label_colon'] = 1;
 $handler->display->display_options['fields']['changed']['element_default_classes'] = 1;
@@ -192,14 +198,14 @@ $handler->display->display_options['fields']['edit']['label'] = 'Edit';
 $handler->display->display_options['fields']['edit']['alter']['alter_text'] = 0;
 $handler->display->display_options['fields']['edit']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['edit']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['edit']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['edit']['alter']['word_boundary'] = 1;
 $handler->display->display_options['fields']['edit']['alter']['ellipsis'] = 1;
 $handler->display->display_options['fields']['edit']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['edit']['alter']['trim'] = 0;
 $handler->display->display_options['fields']['edit']['alter']['html'] = 0;
 $handler->display->display_options['fields']['edit']['hide_empty'] = 0;
 $handler->display->display_options['fields']['edit']['empty_zero'] = 0;
-/* Filter: Node: Title */
+/* Filter criterion: Content: Title */
 $handler->display->display_options['filters']['title']['id'] = 'title';
 $handler->display->display_options['filters']['title']['table'] = 'node';
 $handler->display->display_options['filters']['title']['field'] = 'title';
@@ -208,7 +214,7 @@ $handler->display->display_options['filters']['title']['exposed'] = TRUE;
 $handler->display->display_options['filters']['title']['expose']['label'] = 'Title';
 $handler->display->display_options['filters']['title']['expose']['identifier'] = 'title';
 $handler->display->display_options['filters']['title']['expose']['remember'] = 1;
-/* Filter: Node: Type */
+/* Filter criterion: Content: Type */
 $handler->display->display_options['filters']['type']['id'] = 'type';
 $handler->display->display_options['filters']['type']['table'] = 'node';
 $handler->display->display_options['filters']['type']['field'] = 'type';
@@ -216,9 +222,8 @@ $handler->display->display_options['filters']['type']['exposed'] = TRUE;
 $handler->display->display_options['filters']['type']['expose']['label'] = 'Type';
 $handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
 $handler->display->display_options['filters']['type']['expose']['remember'] = 1;
-$handler->display->display_options['filters']['type']['expose']['single'] = 0;
 $handler->display->display_options['filters']['type']['expose']['reduce'] = 0;
-/* Filter: Node: Published */
+/* Filter criterion: Content: Published */
 $handler->display->display_options['filters']['status']['id'] = 'status';
 $handler->display->display_options['filters']['status']['table'] = 'node';
 $handler->display->display_options['filters']['status']['field'] = 'status';
@@ -228,31 +233,29 @@ $handler->display->display_options['filters']['status']['expose']['label'] = 'Pu
 $handler->display->display_options['filters']['status']['expose']['use_operator'] = TRUE;
 $handler->display->display_options['filters']['status']['expose']['identifier'] = 'status';
 $handler->display->display_options['filters']['status']['expose']['remember'] = 1;
-/* Filter: Workbench Access: Access filter */
+/* Filter criterion: Workbench Access: Access filter */
 $handler->display->display_options['filters']['access_id']['id'] = 'access_id';
 $handler->display->display_options['filters']['access_id']['table'] = 'workbench_access';
 $handler->display->display_options['filters']['access_id']['field'] = 'access_id';
-$handler->display->display_options['filters']['access_id']['operator'] = 'or';
 $handler->display->display_options['filters']['access_id']['exposed'] = TRUE;
 $handler->display->display_options['filters']['access_id']['expose']['label'] = 'Section';
 $handler->display->display_options['filters']['access_id']['expose']['identifier'] = 'access_id';
 $handler->display->display_options['filters']['access_id']['expose']['remember'] = 1;
-$handler->display->display_options['filters']['access_id']['expose']['single'] = 0;
 $handler->display->display_options['filters']['access_id']['access_id'] = array();
 $handler->display->display_options['filters']['access_id']['size'] = '5';
-
 $translatables['workbench_access_content'] = array(
   t('Defaults'),
   t('Content'),
   t('more'),
   t('Apply'),
   t('Reset'),
-  t('Sort By'),
+  t('Sort by'),
   t('Asc'),
   t('Desc'),
   t('Items per page'),
   t('- All -'),
   t('Offset'),
+  t('author'),
   t('Title'),
   t('Type'),
   t('Section'),
@@ -260,5 +263,4 @@ $translatables['workbench_access_content'] = array(
   t('Published'),
   t('Last updated'),
   t('Edit'),
-  t('Page'),
 );
diff --git a/sites/all/modules/workbench_access/workbench_access.admin.inc b/sites/all/modules/workbench_access/workbench_access.admin.inc
index 953271c6..8fded4ea 100644
--- a/sites/all/modules/workbench_access/workbench_access.admin.inc
+++ b/sites/all/modules/workbench_access/workbench_access.admin.inc
@@ -53,26 +53,43 @@ function workbench_access_settings_form($form, &$form_state) {
       }
     }
   }
-  $form['workbench_access_auto_assign'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Automated section assignment'),
-    '#default_value' => variable_get('workbench_access_auto_assign', 1),
-    '#description' => t('Enable all sections automatically for the active scheme.'),
-  );
+  $types = node_type_get_types();
+  if (!empty($types)) {
+    $form['node_types'] = array(
+      '#type' => 'fieldset',
+      '#title' => t('Content types enabled'),
+      '#collapsible' => TRUE,
+      '#collapsed' => TRUE,
+    );
+    foreach ($types as $type => $data) {
+      $form['node_types']['workbench_access_node_type_' . $type] = array(
+        '#title' => check_plain($data->name),
+        '#type' => 'checkbox',
+        '#default_value' => variable_get('workbench_access_node_type_' . $type, 1),
+      );
+    }
+    $form['node_types']['message'] = array(
+      '#markup' => '<em>' . t('Only selected content types will have Workbench Access rules enforced.') . '</em>',
+    );
+  }
   $form['workbench_access_label'] = array(
     '#type' => 'textfield',
     '#title' => t('Workbench Access message label'),
     '#default_value' => variable_get('workbench_access_label', 'Section'),
     '#description' => t('Text that will be shown in front of Workbench Access messages.'),
   );
-  /*
-  $form['workbench_access_custom_form'] = array(
+  $form['workbench_access_auto_assign'] = array(
     '#type' => 'checkbox',
-    '#title' => t('Require a Workbench Access form element'),
-    '#default_value' => variable_get('workbench_access_defailt_form', 1),
-    '#description' => t('If not selected, Workbench Access settings will inherit from the standard node form.'),
-  );*/
-
+    '#title' => t('Automated section assignment'),
+    '#default_value' => variable_get('workbench_access_auto_assign', 1),
+    '#description' => t('Enable all sections automatically for the active scheme.'),
+  );
+  $form['workbench_access_allow_multiple'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Allow multiple section assignments'),
+    '#default_value' => variable_get('workbench_access_allow_multiple', 0),
+    '#description' => t('Let content be assigned to multiple sections.'),
+  );
   $form = system_settings_form($form);
   $form['#validate'][] = 'workbench_access_settings_validate';
   $form['#submit'][] = 'workbench_access_settings_submit';
@@ -419,22 +436,29 @@ function workbench_access_editors($access_type = NULL, $access_type_id = NULL, $
       $row = array(
         str_repeat('-', $section['depth'] ) . ' ' . l($section['name'], 'admin/config/workbench/access/' . "{$type}s/" . $active['access_scheme']['access_type'] . '/' . $access_id),
       );
+      $roles = workbench_access_get_roles('access workbench access by role');
+      if (empty($roles)) {
+        if (user_access('administer permissions')) {
+          return t('To continue, at least one role must be have the <a href="!url">Allow all members of this role to be assigned to Workbench Access sections</a> permission', array('!url' => url('admin/people/permissions', array('fragment' => 'module-workbench_access'))));
+        }
+        else {
+          return t('There are no roles who have permission to edit sections. Please contact a site administrator.');
+        }
+      }
       if ($type == 'editor') {
-        $count = db_query("SELECT COUNT(wau.uid) FROM {workbench_access_user} wau
+        $count = db_query("SELECT COUNT(DISTINCT(wau.uid)) FROM {workbench_access_user} wau
           INNER JOIN {users_roles} ur ON wau.uid = ur.uid
-          INNER JOIN {role_permission} rp ON ur.rid = rp.rid
           WHERE wau.access_scheme = :access_scheme AND wau.access_id = :access_id
-          AND rp.permission = :permission",
-          array(':access_scheme' => $active['access_scheme']['access_type'], ':access_id' => $access_id, ':permission' => 'access workbench access by role')
+          AND ur.rid IN (:rids)",
+          array(':access_scheme' => $active['access_scheme']['access_type'], ':access_id' => $access_id, ':rids' => array_keys($roles))
         )->fetchField();
         $row[] = l(format_plural($count, '1 editor', '@count editors'), 'admin/config/workbench/access/editors/' . $active['access_scheme']['access_type'] . '/' . $access_id);
       }
       else {
         $count2 = db_query("SELECT COUNT(war.rid) FROM {workbench_access_role} war
-          INNER JOIN {role_permission} rp ON war.rid = rp.rid
           WHERE war.access_scheme = :access_scheme AND war.access_id = :access_id
-          AND rp.permission = :permission",
-          array(':access_scheme' => $active['access_scheme']['access_type'], ':access_id' => $access_id, ':permission' => 'access workbench access by role')
+          AND war.rid IN (:rids)",
+          array(':access_scheme' => $active['access_scheme']['access_type'], ':access_id' => $access_id, ':rids' => array_keys($roles))
         )->fetchField();
         $row[] = l(format_plural($count2, '1 role', '@count roles'),  'admin/config/workbench/access/roles/' . $active['access_scheme']['access_type'] . '/' . $access_id);
       }
@@ -467,6 +491,10 @@ function workbench_access_editor_form($form, &$form_state, $access_type, $access
     drupal_access_denied();
     drupal_exit();
   }
+
+  // Get the list of user roles that can be assigned workbench access.
+  $roles = workbench_access_get_roles('access workbench access by role');
+
   $query = db_select('users', 'u')
     ->fields('u', array('uid', 'name'));
   $query->join('workbench_access_user', 'wau', 'u.uid = wau.uid');
@@ -474,7 +502,7 @@ function workbench_access_editor_form($form, &$form_state, $access_type, $access
   $query->join('role_permission', 'rp', 'rp.rid = ur.rid');
   $query->condition('wau.access_scheme', $access_type)
     ->condition('wau.access_id', $access_type_id)
-    ->condition('rp.permission', 'access workbench access by role')
+    ->condition('ur.rid', array_keys($roles), 'IN')
     ->extend('PagerDefault')->limit(25);
   $result = $query->execute();
   $rows = array();
@@ -513,6 +541,9 @@ function workbench_access_editor_form_validate($form, &$form_state) {
     if (empty($account)) {
       form_set_error('add_user', t('The selected user does not exist.'));
     }
+    elseif (!user_access('access workbench access by role', $account)) {
+      form_set_error('add_user', t('The selected user does not have permission to be added as an editor.'));
+    }
   }
 }
 
@@ -547,7 +578,7 @@ function workbench_access_editor_form_submit($form, &$form_state) {
       workbench_access_role_section_save($rid, $values['workbench_access']['access_id'], $values['workbench_access']['access_scheme']);
     }
     elseif (empty($status) && in_array($rid, $values['default_roles'])) {
-      workbench_access_role_section_delete($rid, $values['workbench_access']['access_id'], $values['workbench_access']['access_scheme']);    
+      workbench_access_role_section_delete($rid, $values['workbench_access']['access_id'], $values['workbench_access']['access_scheme']);
     }
   }*/
 }
@@ -572,6 +603,7 @@ function theme_workbench_access_editor_form($variables) {
   $variables = array(
     'header' => $header,
     'rows' => $rows,
+    'empty' => t('No active editors.'),
   );
   $output .= theme('table', $variables);
   $output .= drupal_render_children($form);
@@ -616,16 +648,23 @@ function workbench_access_role_form($form, &$form_state, $access_type, $access_t
     drupal_access_denied();
     drupal_exit();
   }
+
+  // Build the list of user roles that can be assigned workbench access.
+  $roles = workbench_access_get_roles('access workbench access by role');
+
   // Form markup elements.
   $access_info = workbench_access_load($access_type, $access_type_id);
   $output = '<h2>' . t('%name editors by role', array('%name' => $access_info['name'])) . '</h2>';
   $output .= '<p>' . t('Active editors for the %section section, as determined by role. <a href="!url">View editors by user</a>.', array('%section' => $access_info['name'], '!url' => url('admin/config/workbench/access/editors/' . $active['access_scheme']['access_type'] . '/' . $access_type_id)));
   $header = array(t('Editors'), t('Roles'));
   $rows = array();
-  $roles = array_keys(db_query("SELECT war.rid FROM {workbench_access_role} war INNER JOIN {role_permission} rp ON rp.rid = war.rid WHERE rp.permission = :permission AND war.access_scheme = :access_scheme AND war.access_id = :access_type_id", array(':permission' => 'access workbench access by role', ':access_scheme' => $access_type, ':access_type_id' => $access_type_id))->fetchAllAssoc('rid'));
-  $users = array();
+  $access_rids = array();
   if (!empty($roles)) {
-    $users = db_query("SELECT u.name, u.uid, r.name AS role FROM {users} u INNER JOIN {users_roles} ur ON ur.uid = u.uid LEFT JOIN {role} r ON r.rid = ur.rid WHERE ur.rid IN (:roles)", array(':roles' => $roles));
+    $access_rids = db_query("SELECT war.rid FROM {workbench_access_role} war WHERE war.rid IN (:rids) AND war.access_scheme = :access_scheme AND war.access_id = :access_type_id", array(':rids' => array_keys($roles), ':access_scheme' => $access_type, ':access_type_id' => $access_type_id))->fetchCol();
+  }
+  $users = array();
+  if (!empty($access_rids)) {
+    $users = db_query("SELECT u.name, u.uid, r.name AS role FROM {users} u INNER JOIN {users_roles} ur ON ur.uid = u.uid LEFT JOIN {role} r ON r.rid = ur.rid WHERE ur.rid IN (:rids) AND u.status > 0", array(':rids' => $access_rids));
   }
   $users_by_role = array();
   foreach ($users as $data) {
@@ -638,7 +677,7 @@ function workbench_access_role_form($form, &$form_state, $access_type, $access_t
       theme('item_list', array('items' => $item['roles'], 'type' => 'ul')),
     );
   }
-  $table = theme('table', array('header' => $header, 'rows' => $rows));
+  $table = theme('table', array('header' => $header, 'rows' => $rows, 'empty' => t('No active roles.')));
   $form['content'] = array(
     '#weight' => -5,
     '#markup' => $output,
@@ -648,7 +687,6 @@ function workbench_access_role_form($form, &$form_state, $access_type, $access_t
     '#markup' => $table,
   );
   // User role form.
-  $roles = user_roles(FALSE, 'access workbench access by role');
   $default = array_keys(db_query("SELECT rid FROM {workbench_access_role} WHERE access_scheme = :access_scheme AND access_id = :access_type_id", array(':access_scheme' => $access_type, ':access_type_id' => $access_type_id))->fetchAllAssoc('rid'));
   $form['roles'] = array(
     '#type' => 'checkboxes',
@@ -657,6 +695,10 @@ function workbench_access_role_form($form, &$form_state, $access_type, $access_t
     '#default_value' => $default,
     '#description' => empty($roles) ? t('There are no roles with the proper permissions.') : t('Select the role(s) that should have all users assigned to this section.'),
   );
+  // TODO: replace with fancy jQuery.
+  if (isset($roles[DRUPAL_AUTHENTICATED_RID])) {
+    $form['roles']['#description'] .= '<p>' . t('Selecting the %auth role will select all registered users.', array('%auth' => $roles[DRUPAL_AUTHENTICATED_RID])) . '</p>';
+  }
   $form['default_roles'] = array('#type' => 'value', '#value' => !empty($roles) ? $default : array());
   $form['workbench_access'] = array(
     '#type' => 'value',
@@ -674,6 +716,14 @@ function workbench_access_role_form($form, &$form_state, $access_type, $access_t
  */
 function workbench_access_role_form_submit($form, &$form_state) {
   $values = $form_state['values'];
+  // Handle the authenticated user role, which is all roles but anonymous.
+  if (!empty($values['roles'][DRUPAL_AUTHENTICATED_RID])) {
+    foreach ($values['roles'] as $key => $value) {
+      if ($key > 0) {
+        $values['roles'][$key] = $key;
+      }
+    }
+  }
   // Role handling.
   foreach ($values['roles'] as $rid => $status) {
     if (!empty($status) && !in_array($rid, $values['default_roles'])) {
@@ -708,15 +758,17 @@ function workbench_access_example_taxonomy() {
   }
   // Save.
   taxonomy_vocabulary_save($vocabulary);
+  // Use the proper translation function, in case this is run from the install.
+  $t = get_t();
   // Create some terms.
   $terms = array(
-    t('Exhibits'),
-    t('Library'),
-    t('Gift Shop'),
+    $t('Exhibits'),
+    $t('Library'),
+    $t('Gift Shop'),
   );
   $children = array(
-    t('Staff'),
-    t('Visitors'),
+    $t('Staff'),
+    $t('Visitors'),
   );
   // Get the proper filter format for taxonomy descriptions.
   $account = new stdClass();
@@ -730,7 +782,7 @@ function workbench_access_example_taxonomy() {
     $term->name = $name;
     $term->vocabulary_machine_name = 'workbench_access';
     $term->vid = $vocabulary->vid;
-    $term->description = st('Test term for Workbench Access.');
+    $term->description = $t('Test term for Workbench Access.');
     $term->format = $format;
     $term->weight = $i;
     taxonomy_term_save($term);
@@ -744,7 +796,7 @@ function workbench_access_example_taxonomy() {
       $item->vocabulary_machine_name = 'workbench_access';
       $item->vid = $vocabulary->vid;
       $item->format = $format;
-      $item->description = t('Test child term for Workbench Access.');
+      $item->description = $t('Test child term for Workbench Access.');
       taxonomy_term_save($item);
       $ids[] = $item->tid;
     }
@@ -815,11 +867,12 @@ function workbench_access_vocabulary_exists($vocabulary) {
  *   A vocabulary object.
  */
 function workbench_access_sample_vocabulary() {
+  $t = get_t();
   $vocabulary = new stdClass();
-  $vocabulary->name = t('Museum');
+  $vocabulary->name = $t('Museum');
   $vocabulary->module = 'workbench_access';
   $vocabulary->machine_name = 'workbench_access';
-  $vocabulary->description = t('Access control for editorial content.');
+  $vocabulary->description = $t('Access control for editorial content.');
   $vocabulary->hierarchy = 1;
   $vocabulary->weight = -10;
   return $vocabulary;
diff --git a/sites/all/modules/workbench_access/workbench_access.info b/sites/all/modules/workbench_access/workbench_access.info
index 34516fab..5d371aee 100644
--- a/sites/all/modules/workbench_access/workbench_access.info
+++ b/sites/all/modules/workbench_access/workbench_access.info
@@ -10,9 +10,9 @@ files[] = includes/workbench_access_handler_filter_access.inc
 files[] = includes/workbench_access_handler_sort_section.inc
 files[] = tests/workbench_access.test
 
-; Information added by drupal.org packaging script on 2011-06-11
-version = "7.x-1.x-dev"
+; Information added by drupal.org packaging script on 2011-08-26
+version = "7.x-1.0"
 core = "7.x"
 project = "workbench_access"
-datestamp = "1307753219"
+datestamp = "1314385327"
 
diff --git a/sites/all/modules/workbench_access/workbench_access.install b/sites/all/modules/workbench_access/workbench_access.install
index 3002e274..3dff4128 100644
--- a/sites/all/modules/workbench_access/workbench_access.install
+++ b/sites/all/modules/workbench_access/workbench_access.install
@@ -161,29 +161,35 @@ function workbench_access_requirements($phase) {
 
   if ($phase == 'runtime') {
     $tree = workbench_access_get_active_tree();
+    $roles = workbench_access_get_roles('access workbench access by role');
+    $description = array();
     // If this variable has not been set, workbench access is not fully configured.
     if (!variable_get('workbench_access', FALSE)) {
-      $severity = REQUIREMENT_ERROR;
-      $value = t('Not configured');
-      $description = workbench_access_configuration_needed_message();
+      $description[] = workbench_access_configuration_needed_message();
     }
     // If no sections, then nothing works.
-    elseif (empty($tree['active'])) {
-      $severity = REQUIREMENT_ERROR;
-      $value = t('No sections');
-      $description = workbench_access_sections_needed_message();
+    if (empty($tree['active'])) {
+      $description[] = workbench_access_sections_needed_message();
+    }
+    if (empty($roles)) {
+      $description[] = t('At least one role must be have the <a href="!url">Allow all members of this role to be assigned to Workbench Access sections</a> permission', array('!url' => url('admin/people/permissions', array('fragment' => 'module-workbench_access'))));
+    }
+    if (empty($description)) {
+      $requirements['workbench_access'] = array(
+        'title' => t('Workbench Access'),
+        'value' => t('Configured'),
+        'severity' => REQUIREMENT_OK,
+        'description' => t('Workbench Access is configured properly, using %scheme as the access scheme.', array('%scheme' => variable_get('workbench_access', 'taxonomy'))),
+      );
     }
     else {
-      $severity = REQUIREMENT_OK;
-      $value = t('Configured');
-      $description = t('Workbench Access is configured properly, using %scheme as the access scheme.', array('%scheme' => variable_get('workbench_access', 'taxonomy')));
+      $requirements['workbench_access'] = array(
+        'title' => t('Workbench Access'),
+        'value' => t('Not configured'),
+        'severity' => REQUIREMENT_ERROR,
+        'description' => theme('item_list', array('items' => $description)),
+      );
     }
-    $requirements['workbench_access'] = array(
-      'title' => t('Workbench Access'),
-      'value' => $value,
-      'severity' => $severity,
-      'description' => $description,
-    );
   }
 
   return $requirements;
diff --git a/sites/all/modules/workbench_access/workbench_access.module b/sites/all/modules/workbench_access/workbench_access.module
index bae15df8..beae38a9 100644
--- a/sites/all/modules/workbench_access/workbench_access.module
+++ b/sites/all/modules/workbench_access/workbench_access.module
@@ -14,7 +14,7 @@ function workbench_access_menu() {
     'title' => 'Workbench access autocomplete',
     'page callback' => 'workbench_access_autocomplete',
     'page arguments' => array(2, 3, 4),
-    'access arguments' => array('access workbench access'),
+    'access arguments' => array('assign workbench access'),
     'type' => MENU_CALLBACK,
   );
   $items['admin/config/workbench/access'] = array(
@@ -284,19 +284,15 @@ function workbench_access_views_default_views() {
  * Implements hook_field_extra_fields()
  */
 function workbench_access_field_extra_fields() {
-  $base = array(
-    'workbench_access' => array(
-      'label' => t('Workbench Access'),
-      'description' => t('Workbench Access settings.'),
-      'weight' => -1,
-    ),
-  );
-  // Attach the field to all node bundles.
-  // @TODO: be more selective here.
   $extra = array();
   foreach (node_type_get_names() as $name => $value) {
-    $extra['node'][$name]['form'] = $base;
-    $extra['node'][$name]['display'] = $base;
+    if (variable_get('workbench_access_node_type_' . $name, 1)) {
+      $extra['node'][$name]['form']['workbench_access'] = array(
+        'label' => t('Workbench Access'),
+        'description' => t('Workbench Access settings.'),
+        'weight' => 0,
+      );
+    }
   }
   return $extra;
 }
@@ -341,25 +337,34 @@ function workbench_access_node_access($node, $op, $account) {
   if (empty($tree['active'])) {
     return NODE_ACCESS_IGNORE;
   }
-  // Now check the user account.
-  if (!isset($account->workbench_access)) {
-    $account = user_load($account->uid);
+
+  // View step. We ignore for published nodes.
+  if ($op == 'view' && $node->status) {
+    return NODE_ACCESS_IGNORE;
   }
+
+  // If disabled for this content type, do nothing.
   if (!is_object($node)) {
     $type = $node;
   }
   else {
     $type = $node->type;
   }
+  if (!variable_get('workbench_access_node_type_' . $type, 1)) {
+    return NODE_ACCESS_IGNORE;
+  }
+
+  // Now check the user account.
+  if (!isset($account->workbench_access)) {
+    $account = user_load($account->uid);
+  }
+
   // Create step. User must be assigned to a section to create content.
   // Note that we do not currently enforce complex rules here.
   if ($op == 'create' && !empty($account->workbench_access)) {
     return NODE_ACCESS_IGNORE;
   }
-  // View step. We ignore for published nodes.
-  if ($op == 'view' && $node->status) {
-    return NODE_ACCESS_IGNORE;
-  }
+
   // Load the current scheme.
   workbench_access_load_include(variable_get('workbench_access', 'taxonomy'));
   // Get the access rules for this node.
@@ -367,8 +372,11 @@ function workbench_access_node_access($node, $op, $account) {
   if (!empty($node->workbench_access) && !empty($account->workbench_access)) {
     $result = workbench_access_check($op, $type, array_filter($node->workbench_access), $account->workbench_access);
   }
+  // The user must be allowed to perform this action by core node module.
+  // All we do is issue an ignore response, indicating that some other module
+  // may grants access. If we ever support complex data rules, this may change.
   if ($result !== FALSE) {
-    return NODE_ACCESS_ALLOW;
+    return NODE_ACCESS_IGNORE;
   }
   return NODE_ACCESS_DENY;
 }
@@ -508,24 +516,32 @@ function workbench_access_tree($info, $keys = FALSE) {
  * Load the active tree.
  */
 function workbench_access_get_active_tree() {
-  $active = &drupal_static(__FUNCTION__);
-  if (isset($active['scheme'])) {
-    return $active;
-  }
+  // Even though we cache, we still need the include.
   $scheme = variable_get('workbench_access', 'taxonomy');
   workbench_access_load_include($scheme);
+
+  // Now check the cache.
+  $cache = cache_get('workbench_access_tree', 'cache_bootstrap');
+  if (isset($cache->data)) {
+    $access_tree = $cache->data;
+  }
+  if (isset($access_tree['access_scheme'])) {
+    return $access_tree;
+  }
+  // Retrieve and cache data.
   $func = $scheme . '_workbench_access_info';
   $info = $func();
   $data = $info[$scheme];
   $active = workbench_access_get_ids_by_scheme($data);
   $tree = workbench_access_tree($data);
   workbench_access_build_tree($tree);
-  $active = array(
+  $access_tree = array(
     'access_scheme' => $data,
     'tree' => $tree,
     'active' => $active,
   );
-  return $active;
+  cache_set('workbench_access_tree', $access_tree, 'cache_bootstrap');
+  return $access_tree;
 }
 
 /**
@@ -538,19 +554,33 @@ function workbench_access_node_load($nodes, $types) {
   }
   $tree = workbench_access_get_active_tree();
   $result = array();
-  if (!empty($tree['active'])) {
-    $result = db_query("SELECT nid, access_id FROM {workbench_access_node} WHERE nid IN (:nid) AND access_scheme = :access_scheme", array(':nid' => array_keys($nodes), ':access_scheme' => $scheme))->fetchAllAssoc('nid');
+  if (!empty($tree['active']) && !empty($nodes)) {
+   $result = db_query("SELECT nid, access_id FROM {workbench_access_node} WHERE nid IN (:nid) AND access_scheme = :access_scheme", array(':nid' => array_keys($nodes), ':access_scheme' => $scheme))->fetchAll();
+  }
+  $data = array();
+  foreach ($result as $obj) {
+    $data[$obj->nid][$obj->access_id] = $obj->access_id;
   }
   foreach ($nodes as $node) {
-    // Cannot load if the node has not been created yet.
-    if (empty($node->nid)) {
+    // Cannot load if the node has not been created yet or if it is
+    // not under access control.
+    if (empty($node->nid) || (isset($node->type) && !variable_get('workbench_access_node_type_' . $node->type, 1))) {
       continue;
     }
     $nodes[$node->nid]->workbench_access = array();
-    if (isset($result[$node->nid]->access_id) && in_array($result[$node->nid]->access_id, array_keys($tree['active']))) {
-      $nodes[$node->nid]->workbench_access[$result[$node->nid]->access_id] = $result[$node->nid]->access_id;
+    if (empty($data[$node->nid])) {
+      continue;
+    }
+    foreach ($data[$node->nid] as $access_id) {
+      if (in_array($access_id, array_keys($tree['active']))) {
+        $nodes[$node->nid]->workbench_access[$access_id] = $access_id;
+      }
     }
   }
+
+  // Add the access scheme to the node so that changes can be made with
+  // node_save() directly.
+  $nodes[$node->nid]->workbench_access_scheme = $tree['access_scheme'];
 }
 
 /**
@@ -562,12 +592,44 @@ function workbench_access_node_insert($node) {
     return;
   }
   workbench_access_node_delete($node);
-  $record = array(
-    'nid' => $node->nid,
-    'access_id' => $node->workbench_access_id,
-    'access_scheme' => $node->workbench_access_scheme['access_scheme'],
-  );
-  drupal_write_record('workbench_access_node', $record);
+
+  // Temporary fix for node property mis-match between node_load() and node_save().
+  if (!isset($node->workbench_access_id) && !empty($node->workbench_access)) {
+    $node->workbench_access_id = $node->workbench_access;
+  }
+
+  if (empty($node->workbench_access_id)) {
+    return;
+  }
+  if (!is_array($node->workbench_access_id)) {
+    $node->workbench_access_id = array($node->workbench_access_id);
+  }
+  foreach ($node->workbench_access_id as $id) {
+    $record = array(
+      'nid' => $node->nid,
+      'access_id' => $id,
+      'access_scheme' => $node->workbench_access_scheme['access_scheme'],
+    );
+    drupal_write_record('workbench_access_node', $record);
+  }
+
+  // Clear static caches.
+  drupal_static_reset('_workbench_access_get_node_section_names');
+}
+
+/**
+ * Implements hook_node_presave().
+ */
+function workbench_access_node_presave($node) {
+  if (isset($node->workbench_access_id) && isset($node->workbench_access_fixed)) {
+    if (!is_array($node->workbench_access_id)) {
+      $node->workbench_access_id = array($node->workbench_access_id);
+    }
+    if (!is_array($node->workbench_access_fixed)) {
+      $node->workbench_access_fixed = array($node->workbench_access_fixed);
+    }
+    $node->workbench_access_id += $node->workbench_access_fixed;
+  }
 }
 
 /**
@@ -745,6 +807,9 @@ function workbench_access_rebuild_scheme($access_scheme, $sections = array()) {
  * @see hook_workbench_access_section_save()
  */
 function workbench_access_section_save($section) {
+  // Reset the tree.
+  workbench_access_reset_tree();
+  // Write the record.
   drupal_write_record('workbench_access', $section);
   // Notify other modules.
   module_invoke_all('workbench_access_save', $section);
@@ -761,6 +826,8 @@ function workbench_access_section_save($section) {
  * @see hook_workbench_access_section_delete()
  */
 function workbench_access_section_delete($section) {
+  // Reset the tree.
+  workbench_access_reset_tree();
   // Notify other modules.
   module_invoke_all('workbench_access_delete', $section);
   // Now clean up.
@@ -788,8 +855,8 @@ function workbench_access_section_delete($section) {
  * Necessary when rebuilding the active tree settings.
  */
 function workbench_access_reset_tree() {
+  cache_clear_all('workbench_access_tree', 'cache_bootstrap');
   drupal_static_reset('workbench_access_get_access_tree');
-  drupal_static_reset('workbench_access_get_active_tree');
   drupal_static_reset('workbench_access_get_ids_by_scheme');
   drupal_static_reset('workbench_access_get_user_tree');
   drupal_static_reset('workbench_access_user_load_data');
@@ -864,11 +931,17 @@ function workbench_access_rebuild_user($uid, $access_scheme, $sections = array()
  * @see hook_workbench_access_save_user()
  */
 function workbench_access_user_section_save($uid, $access_id, $access_scheme) {
+  // Add the access section.
   $record['uid'] = $uid;
   $record['access_id'] = $access_id;
   $record['access_scheme'] = $access_scheme;
   drupal_write_record('workbench_access_user', $record);
+
+  // Clear static caches.
   drupal_static_reset('workbench_access_user_load_data');
+  drupal_static_reset('_workbench_access_get_user_section_names');
+
+  // Notify other modules the sections have changed for the user.
   $account = user_load($uid, TRUE);
   module_invoke_all('workbench_access_save_user', $account, $access_id, $access_scheme);
 }
@@ -886,16 +959,20 @@ function workbench_access_user_section_save($uid, $access_id, $access_scheme) {
  * @see hook_workbench_access_section_delete()
  */
 function workbench_access_user_section_delete($uid, $access_id, $access_scheme) {
-  // Notify other modules.
-  $account = user_load($uid, TRUE);
-  module_invoke_all('workbench_access_delete_user', $account, $access_id, $access_scheme);
-  // Clean up.
+  // Remove the access section.
   db_delete('workbench_access_user')
     ->condition('access_id', $access_id)
     ->condition('access_scheme', $access_scheme)
     ->condition('uid', $uid)
     ->execute();
+
+  // Clear static caches.
   drupal_static_reset('workbench_access_user_load_data');
+  drupal_static_reset('_workbench_access_get_user_section_names');
+
+  // Notify other modules the sections have changed for the user.
+  $account = user_load($uid, TRUE);
+  module_invoke_all('workbench_access_delete_user', $account, $access_id, $access_scheme);
 }
 
 /**
@@ -1126,12 +1203,13 @@ function workbench_access_autocomplete($access_type, $access_id, $string) {
   $string = trim($string);
   $matches = array();
   if (!empty($string)) {
+    $roles = workbench_access_get_roles('access workbench access by role');
     $result = db_query_range("SELECT DISTINCT(u.uid), u.name FROM {users} u
-      INNER JOIN {users_roles} ur USING (uid) INNER JOIN {role_permission} USING (rid)
-      WHERE permission = :permission
-      AND u.name LIKE :string AND
-      (u.uid NOT IN (SELECT uid FROM {workbench_access_user} WHERE access_scheme = :access_scheme AND access_id = :access_id))", 0, 10,
-      array(':permission' => 'access workbench access by role', ':string' => db_like($string) . '%', ':access_scheme' => $access_type, ':access_id' => $access_id))->FetchAll();
+      INNER JOIN {users_roles} ur USING (uid)
+      WHERE ur.rid IN (:rids)
+      AND u.name LIKE :string AND u.status > 0 AND
+      (u.uid NOT IN (SELECT uid FROM {workbench_access_user} WHERE access_scheme = :access_scheme AND access_id = :access_id))", 0, 20,
+      array(':rids' => array_keys($roles), ':string' => db_like($string) . '%', ':access_scheme' => $access_type, ':access_id' => $access_id))->FetchAll();
     foreach ($result as $data) {
       $matches[$data->name] = $data->name;
     }
@@ -1212,6 +1290,10 @@ function workbench_access_form_alter(&$form, $form_state, $form_id) {
   if (empty($form['#node_edit_form'])) {
     workbench_access_alter_form($form_id, $form, $form_state);
   }
+  // Ensure that we can enforce our rules.
+  elseif (!isset($form['#node']->type) || !variable_get('workbench_access_node_type_' . $form['#node']->type, 1)) {
+    return;
+  }
   // Fire the node form alter.
   else {
     // Make sure we prepared the user.
@@ -1227,12 +1309,10 @@ function workbench_access_form_alter(&$form, $form_state, $form_id) {
     $tree = workbench_access_get_user_tree();
     // Generate options so we can check for access.
     $options = workbench_access_options($tree, $active['active']);
-     // TODO: multi-select
-    $default = NULL;
+    $default = array();
     if (!empty($form['#node']->workbench_access)) {
-      $default = current(array_keys($form['#node']->workbench_access));
+      $default = array_keys($form['#node']->workbench_access);
     }
-
     // If there are no options and the 'workbench_access' variable has not been set
     // then it seems that Workbench Access has not been configured.
     if (empty($options) && !variable_get('workbench_access', FALSE)) {
@@ -1243,28 +1323,53 @@ function workbench_access_form_alter(&$form, $form_state, $form_id) {
     }
 
     // The base form element.
+    $multiple = variable_get('workbench_access_allow_multiple', 0);
     $element = array(
       '#type' => 'select',
       '#title' => t('@message_label', array('@message_label' => variable_get('workbench_access_label', 'Section'))),
       '#options' => $options,
       '#required' => TRUE,
       '#default_value' => $default,
-      '#description' => t('Select the proper editorial group for this content.'),
+      '#multiple' => $multiple,
+      '#description' => ($multiple) ? t('Select the proper editorial group(s) for this content.') : t('Select the proper editorial group for this content.'),
     );
     // If the default is set and is not in the user's range, then pass hidden and
     // display a message.
     // TODO: $default might legitimately be zero in some edge cases.
-    if (!empty($default) && !isset($options[$default]) && isset($active['tree'][$default])) {
-      $name = check_plain($active['tree'][$default]['name']);
-      $element['#type'] = 'value';
-      $element['#value'] = $element['#default_value'];
-      $form['workbench_access']['message'] = array(
-        '#type' => 'item',
-        '#title' => t('Workbench access'),
-        '#markup' => t('%title is assigned to the %section editorial group and may not be changed.', array('%title' => $form['#node']->title, '%section' => $name)),
-      );
+    if (!empty($default)) {
+      $all = array();
+      $disallowed = array();
+      foreach ($default as $item) {
+        if (isset($active['tree'][$item]['name'])) {
+          $all[$active['tree'][$item]['access_id']] = check_plain($active['tree'][$item]['name']);
+          if (!isset($options[$item])) {
+            $disallowed[$active['tree'][$item]['access_id']] = check_plain($active['tree'][$item]['name']);
+          }
+        }
+      }
+      if (!empty($disallowed)) {
+        $diff = array_diff($all, $disallowed);
+        // TODO: If we toggle from single to multiple, then this can get messy.
+        if (empty($diff) || !variable_get('workbench_access_allow_multiple', 0)) {
+          $element['#type'] = 'value';
+          $element['#value'] = $element['#default_value'];
+          $form['workbench_access']['message'] = array(
+            '#type' => 'item',
+            '#title' => t('Workbench access'),
+            '#markup' => t('%title is assigned to the %section editorial group(s), which may not be changed.', array('%title' => $form['#node']->title, '%section' => implode(', ', $disallowed))),
+          );
+        }
+        else {
+          $form['workbench_access']['workbench_access_fixed'] = array(
+            '#type' => 'value',
+            '#value' => array_keys($disallowed),
+          );
+          $element['#description'] = $element['#description'] . '<br />' . t('%title is also assigned to the %section editorial group(s), which may not be changed.', array('%title' => $form['#node']->title, '%section' => implode(', ', $disallowed)));
+        }
+      }
     }
     workbench_access_alter_form('node_element', $element, $form_state);
+    $form['workbench_access']['#type'] = 'container';
     $form['workbench_access']['workbench_access_id'] = $element;
     $form['workbench_access']['workbench_access_scheme'] = array(
       '#type' => 'value',
@@ -1291,7 +1396,7 @@ function workbench_access_alter_form($hook, &$form, &$form_state) {
  * Return the text directing admins to Workbench Access configuration.
  */
 function workbench_access_configuration_needed_message() {
-  return t('You must <a href="@settings">configure Workbench Access settings</a> before editorial access control will not be enforced.',
+  return t('You must <a href="@settings">configure Workbench Access settings</a> before editorial access control will be enforced.',
     array('@settings' => url('admin/config/workbench/access/settings'))
   );
 }
@@ -1345,7 +1450,7 @@ function workbench_access_vocabulary_submit($form, &$form_state) {
  * Add a sections form to native term editing.
  */
 function workbench_access_form_taxonomy_form_term_alter(&$form, &$form_state, $form_id) {
-  if (!user_access('administer workbench access') || variable_get('workbench_access', 'taxonomy') != 'taxonomy') {
+  if (!user_access('administer workbench access') || variable_get('workbench_access', 'taxonomy') != 'taxonomy' || isset($form_state['confirm_delete'])) {
     return;
   }
   // On delete, the term may be an object. Be consistent, core!
@@ -1500,6 +1605,20 @@ function workbench_access_menu_link_submit($form, &$form_state) {
   workbench_access_edit_form_submit($values, $section, $values['link_title']);
 }
 
+/**
+ * Implements hook_form_FORM_ID_alter().
+ *
+ * Add access rules to node types.
+ */
+function workbench_access_form_node_type_form_alter(&$form, $form_state) {
+  $form['workflow']['workbench_access_node_type'] = array(
+    '#title' => t('Enforce Workbench Access control'),
+    '#type' => 'checkbox',
+    '#default_value' => variable_get('workbench_access_node_type_' . $form['#node_type']->type, 1),
+    '#description' => t('Use Workbench Access to enforce editorial control to all content of this type.'),
+  );
+}
+
 /**
  * Implements hook_block_view_workbench_block_alter().
  *
@@ -1509,15 +1628,21 @@ function workbench_access_workbench_block() {
   // Add editing information to this page (if it's a node).
   if ($node = menu_get_object()) {
     if (user_access('view workbench access information')) {
-      if (empty($node->workbench_access)) {
+      if (!variable_get('workbench_access_node_type_' . $node->type, 1)) {
+        return array(t('@message_label: <em>@type pages are not under access control</em>', array('@message_label' => variable_get('workbench_access_label', 'Section'), '@type' => node_type_get_name($node->type))));
+      }
+      elseif (empty($node->workbench_access)) {
         return array(t('@message_label: <em>Unassigned</em>', array('@message_label' => variable_get('workbench_access_label', 'Section'))));
       }
       else {
+        $names = array();
         $access_type = variable_get('workbench_access', 'taxonomy');
-        $access_id = current($node->workbench_access);
-        $section = workbench_access_load($access_type, $access_id);
-        return array(t('@message_label: <em>%section</em>', array('@message_label' => variable_get('workbench_access_label', 'Section'), '%section' => $section['name'])));
-      }
+        foreach ($node->workbench_access as $access_id) {
+          $section = workbench_access_load($access_type, $access_id);
+          $names[] = check_plain($section['name']);
+        }
+        return array(t('Workbench Access: <em>%section</em>', array('%section' => implode(', ', $names))));
+       }
     }
   }
 }
@@ -1591,3 +1716,40 @@ function workbench_access_form_node_admin_content_alter(&$form, &$form_state) {
     }
   }
 }
+
+/**
+ * Fetch all user roles with the a specific permission.
+ *
+ * This is a wrapper for user_roles() since it may exclude user roles that have
+ * a permission assigned to the 'authenticated user' role.
+ *
+ * @param $permission
+ *  The perimission to return active roles.
+ *
+ * @return
+ *  An array of allowed roles, in the format rid => name.
+ */
+function workbench_access_get_roles($permission) {
+  $roles = &drupal_static(__FUNCTION__, array());
+
+  if (!isset($roles[$permission])) {
+    // Build the list of user roles that can be assigned workbench access.
+    $roles[$permission] = user_roles(FALSE, $permission);
+    if (isset($roles[$permission][DRUPAL_AUTHENTICATED_RID])) {
+      // Because the permission may only be granted for the 'authenticated user'
+      // role, manually add in all non-anonymous roles in that case.
+      $roles[$permission] += user_roles(TRUE);
+    }
+  }
+
+  return $roles[$permission];
+}
+
+/**
+ * Load callback to load information about an access scheme.
+ */
+function workbench_access_access_scheme_load($scheme) {
+  workbench_access_load_include();
+  $info = module_invoke_all('workbench_access_info');
+  return isset($info[$scheme]) ? $info[$scheme] : FALSE;
+}
diff --git a/sites/all/modules/workbench_access/workbench_access.tokens.inc b/sites/all/modules/workbench_access/workbench_access.tokens.inc
new file mode 100644
index 00000000..70c943a8
--- /dev/null
+++ b/sites/all/modules/workbench_access/workbench_access.tokens.inc
@@ -0,0 +1,213 @@
+<?php
+
+/**
+ * @file
+ * Token integration for the workbench_access module.
+ */
+
+/**
+ * Implements hook_token_info().
+ */
+function workbench_access_token_info() {
+  // Node tokens.
+  $info['tokens']['node']['workbench-access-sections'] = array(
+    'name' => t('Workbench access sections'),
+    'description' => t('Section assignments for the node.'),
+    'type' => 'array',
+  );
+
+  // User tokens.
+  $info['tokens']['user']['workbench-access-sections'] = array(
+    'name' => t('Workbench access sections'),
+    'description' => t('Section assignments for the user account.'),
+    'type' => 'array',
+  );
+
+  // Site global tokens.
+  $info['tokens']['site']['workbench-access-scheme'] = array(
+    'name' => t('Workbench access scheme'),
+    'description' => t('The active access scheme used on the site.'),
+    'type' => 'workbench-access-scheme',
+  );
+
+  // Workbench access scheme tokens.
+  $info['types']['workbench-access-scheme'] = array(
+    'name' => t('Workbench access scheme'),
+    'description' => t('Tokens related to workbench access schemes.'),
+    'needs-data' => 'workbench-access-scheme',
+  );
+  $info['tokens']['workbench-access-scheme']['name'] = array(
+    'name' => t('Name'),
+    'description' => t('The name of the access scheme.'),
+  );
+  $info['tokens']['workbench-access-scheme']['machine-name'] = array(
+    'name' => t('Machine name'),
+    'description' => t('The unique machine-readable name of the access scheme.'),
+  );
+  $info['tokens']['workbench-access-scheme']['description'] = array(
+    'name' => t('Description'),
+    'description' => t('A human-readable description of the access control scheme.'),
+  );
+
+  return $info;
+}
+
+/**
+ * Implements hook_tokens().
+ */
+function workbench_access_tokens($type, $tokens, array $data = array(), array $options = array()) {
+  $replacements = array();
+  $sanitize = !empty($options['sanitize']);
+
+  // Node tokens.
+  if ($type == 'node' && !empty($data['node'])) {
+    $node = $data['node'];
+
+    foreach ($tokens as $name => $original) {
+      switch ($name) {
+        case 'workbench-access-sections':
+          if ($sections = _workbench_access_get_node_section_names($node)) {
+            if ($sanitize) {
+              // Run sections through check_plain() if they should be sanitized.
+              $sections = array_map('check_plain', $sections);
+            }
+            $join = isset($options['join']) ? $options['join'] : ', ';
+            $replacements[$original] = implode($join, $sections);
+          }
+          elseif (variable_get('workbench_access_node_type_' . $node->type, 1)) {
+            // Output the default unassigned token if the content type is access
+            // controlled.
+            $replacements[$original] = t('Unassigned');
+          }
+          break;
+      }
+    }
+
+    // Chained token relationships.
+    if ($section_tokens = token_find_with_prefix($tokens, 'workbench-access-sections')) {
+      if ($sections = _workbench_access_get_node_section_names($node)) {
+        $replacements += token_generate('array', $section_tokens, array('array' => $sections), $options);
+      }
+    }
+  }
+
+  // User tokens.
+  if ($type == 'user' && !empty($data['user'])) {
+    $account = $data['user'];
+
+    foreach ($tokens as $name => $original) {
+      switch ($name) {
+        case 'workbench-access-sections':
+          if ($sections = _workbench_access_get_user_section_names($account)) {
+            if ($sanitize) {
+              // Run sections through check_plain() if they should be sanitized.
+              $sections = array_map('check_plain', $sections);
+            }
+            $join = isset($options['join']) ? $options['join'] : ', ';
+            $replacements[$original] = implode($join, $sections);
+          }
+          break;
+      }
+    }
+
+    // Chained token relationships.
+    if ($section_tokens = token_find_with_prefix($tokens, 'workbench-access-sections')) {
+      if ($sections = _workbench_access_get_user_section_names($account)) {
+        $replacements += token_generate('array', $section_tokens, array('array' => $sections), $options);
+      }
+    }
+  }
+
+  // Site global tokens.
+  if ($type == 'site') {
+    foreach ($tokens as $name => $original) {
+      switch ($name) {
+        case 'workbench-access-scheme':
+          if ($scheme = workbench_access_access_scheme_load(variable_get('workbench_access', 'taxonomy'))) {
+            $replacements[$original] = $sanitize ? check_plain($scheme['name']) : $scheme['name'];
+          }
+          break;
+      }
+    }
+
+    // Chained token relationships.
+    if ($scheme_tokens = token_find_with_prefix($tokens, 'workbench-access-scheme')) {
+      if ($scheme = workbench_access_access_scheme_load(variable_get('workbench_access', 'taxonomy'))) {
+        $replacements += token_generate('workbench-access-scheme', $scheme_tokens, array('workbench-access-scheme' => $scheme), $options);
+      }
+    }
+  }
+
+  // Workbench access scheme tokens.
+  if ($type == 'workbench-access-scheme' && !empty($data['workbench-access-scheme'])) {
+    $scheme = $data['workbench-access-scheme'];
+
+    foreach ($tokens as $name => $original) {
+      switch ($name) {
+        case 'name':
+          $replacements[$original] = $sanitize ? check_plain($scheme['name']) : $scheme['name'];
+          break;
+
+        case 'machine-name':
+          // Machine names are assumed to not contain unsafe characters.
+          $replacements[$original] = $scheme['access_scheme'];
+          break;
+
+        case 'description':
+          $replacements[$original] = $sanitize ? check_plain($scheme['description']) : $scheme['description'];
+          break;
+      }
+    }
+  }
+
+  return $replacements;
+}
+
+
+/**
+ * Fetch an array of a node's access sections for use with tokens.
+ *
+ * @return array
+ *   An array of access section names keyed by access ID.
+ */
+function _workbench_access_get_node_section_names($node) {
+  $sections = &drupal_static(__FUNCTION__, array());
+
+  if (!isset($sections[$node->nid])) {
+    $sections[$node->nid] = array();
+
+    if (!empty($node->workbench_access)) {
+      $access_type = variable_get('workbench_access', 'taxonomy');
+      foreach ($node->workbench_access as $access_id) {
+        $info = workbench_access_load($access_type, $access_id);
+        $sections[$node->nid][$access_id] = $info['name'];
+      }
+    }
+  }
+
+  return $sections[$node->nid];
+}
+
+/**
+ * Fetch an array of a user's access sections for use with tokens.
+ *
+ * @return array
+ *   An array of access section names keyed by access ID.
+ */
+function _workbench_access_get_user_section_names($account) {
+  $sections = &drupal_static(__FUNCTION__, array());
+
+  if (!isset($sections[$account->uid])) {
+    $sections[$account->uid] = array();
+
+    if (!empty($account->workbench_access)) {
+      $access_type = variable_get('workbench_access', 'taxonomy');
+      foreach (array_keys($account->workbench_access) as $access_id) {
+        $info = workbench_access_load($access_type, $access_id);
+        $sections[$account->uid][$access_id] = $info['name'];
+      }
+    }
+  }
+
+  return $sections[$account->uid];
+}
diff --git a/sites/all/modules/workbench_access/workbench_access.views.inc b/sites/all/modules/workbench_access/workbench_access.views.inc
index 7c1a51d8..8604fdd9 100644
--- a/sites/all/modules/workbench_access/workbench_access.views.inc
+++ b/sites/all/modules/workbench_access/workbench_access.views.inc
@@ -20,15 +20,17 @@ function workbench_access_views_data() {
     ),
   );
   $data['workbench_access']['section'] = array(
-    'title' => t('Section'),
+    'title' => variable_get('workbench_access_label', 'Section'),
     'help' => t('The section to which this node belongs.'),
     'field' => array(
       'handler' => 'workbench_access_handler_field_section',
-      'click sortable' => TRUE,
-    ),
-    'sort' => array(
-      'handler' => 'workbench_access_handler_sort_section',
+      'click sortable' => FALSE,
     ),
+    // Temporarily disable sortability for the section handler.
+    // @see http://drupal.org/node/1243186
+    //'sort' => array(
+    //  'handler' => 'workbench_access_handler_sort_section',
+    //),
   );
   $data['workbench_access']['access_id'] = array(
     'title' => t('Access filter'),
diff --git a/sites/all/modules/workbench_files/views/workbench_files.view.inc b/sites/all/modules/workbench_files/views/workbench_files.view.inc
index 260be136..5246003a 100644
--- a/sites/all/modules/workbench_files/views/workbench_files.view.inc
+++ b/sites/all/modules/workbench_files/views/workbench_files.view.inc
@@ -12,7 +12,7 @@ $view->tag = 'Workbench';
 $view->base_table = 'file_managed';
 $view->human_name = '';
 $view->core = 0;
-$view->api_version = '3.0-alpha1';
+$view->api_version = 3;
 $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
 
 /* Display: Defaults */
@@ -200,7 +200,7 @@ $handler->display->display_options['filters']['filename']['expose']['identifier'
 $handler = $view->new_display('page', 'Page', 'page_1');
 $handler->display->display_options['path'] = 'admin/workbench/files';
 $handler->display->display_options['menu']['type'] = 'tab';
-$handler->display->display_options['menu']['title'] = 'File List';
+$handler->display->display_options['menu']['title'] = 'File list';
 $handler->display->display_options['menu']['description'] = 'List of all files uploaded to this site.';
 $handler->display->display_options['menu']['weight'] = '0';
 $translatables['workbench_files'] = array(
diff --git a/sites/all/modules/workbench_files/workbench_files.info b/sites/all/modules/workbench_files/workbench_files.info
index 9c8fc2b9..33d5b8df 100644
--- a/sites/all/modules/workbench_files/workbench_files.info
+++ b/sites/all/modules/workbench_files/workbench_files.info
@@ -3,11 +3,10 @@ description = File-related features for the Workbench editorial suite.
 package = Workbench
 core = 7.x
 dependencies[] = workbench
-files[] = workbench_files.module
 
-; Information added by drupal.org packaging script on 2011-03-02
-version = "7.x-1.0-beta5"
+; Information added by drupal.org packaging script on 2011-08-26
+version = "7.x-1.0"
 core = "7.x"
 project = "workbench_files"
-datestamp = "1299096669"
+datestamp = "1314385328"
 
diff --git a/sites/all/modules/workbench_media/workbench_media.info b/sites/all/modules/workbench_media/workbench_media.info
index 6538b0c3..1a3dc1ee 100644
--- a/sites/all/modules/workbench_media/workbench_media.info
+++ b/sites/all/modules/workbench_media/workbench_media.info
@@ -5,9 +5,9 @@ core = 7.x
 dependencies[] = workbench
 dependencies[] = media
 
-; Information added by drupal.org packaging script on 2011-05-25
-version = "7.x-1.x-dev"
+; Information added by drupal.org packaging script on 2011-08-26
+version = "7.x-1.0"
 core = "7.x"
 project = "workbench_media"
-datestamp = "1306285347"
+datestamp = "1314385328"
 
diff --git a/sites/all/modules/workbench_moderation/LICENSE.txt b/sites/all/modules/workbench_moderation/LICENSE.txt
index 2c095c8d..d159169d 100644
--- a/sites/all/modules/workbench_moderation/LICENSE.txt
+++ b/sites/all/modules/workbench_moderation/LICENSE.txt
@@ -1,274 +1,339 @@
-GNU GENERAL PUBLIC LICENSE
-
-              Version 2, June 1991
-
-Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave,
-Cambridge, MA 02139, USA. Everyone is permitted to copy and distribute
-verbatim copies of this license document, but changing it is not allowed.
-
-                  Preamble
-
-The licenses for most software are designed to take away your freedom to
-share and change it. By contrast, the GNU General Public License is
-intended to guarantee your freedom to share and change free software--to
-make sure the software is free for all its users. This General Public License
-applies to most of the Free Software Foundation's software and to any other
-program whose authors commit to using it. (Some other Free Software
-Foundation software is covered by the GNU Library General Public License
-instead.) You can apply it to your programs, too.
-
-When we speak of free software, we are referring to freedom, not price. Our
-General Public Licenses are designed to make sure that you have the
-freedom to distribute copies of free software (and charge for this service if
-you wish), that you receive source code or can get it if you want it, that you
-can change the software or use pieces of it in new free programs; and that
-you know you can do these things.
-
-To protect your rights, we need to make restrictions that forbid anyone to
-deny you these rights or to ask you to surrender the rights. These restrictions
-translate to certain responsibilities for you if you distribute copies of the
-software, or if you modify it.
-
-For example, if you distribute copies of such a program, whether gratis or for
-a fee, you must give the recipients all the rights that you have. You must make
-sure that they, too, receive or can get the source code. And you must show
-them these terms so they know their rights.
-
-We protect your rights with two steps: (1) copyright the software, and (2)
-offer you this license which gives you legal permission to copy, distribute
-and/or modify the software.
-
-Also, for each author's protection and ours, we want to make certain that
-everyone understands that there is no warranty for this free software. If the
-software is modified by someone else and passed on, we want its recipients
-to know that what they have is not the original, so that any problems
-introduced by others will not reflect on the original authors' reputations.
-
-Finally, any free program is threatened constantly by software patents. We
-wish to avoid the danger that redistributors of a free program will individually
-obtain patent licenses, in effect making the program proprietary. To prevent
-this, we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
-The precise terms and conditions for copying, distribution and modification
-follow.
-
-           GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND
-               MODIFICATION
-
-0. This License applies to any program or other work which contains a notice
-placed by the copyright holder saying it may be distributed under the terms
-of this General Public License. The "Program", below, refers to any such
-program or work, and a "work based on the Program" means either the
-Program or any derivative work under copyright law: that is to say, a work
-containing the Program or a portion of it, either verbatim or with
-modifications and/or translated into another language. (Hereinafter, translation
-is included without limitation in the term "modification".) Each licensee is
-addressed as "you".
-
-Activities other than copying, distribution and modification are not covered
-by this License; they are outside its scope. The act of running the Program is
-not restricted, and the output from the Program is covered only if its contents
-constitute a work based on the Program (independent of having been made
-by running the Program). Whether that is true depends on what the Program
-does.
-
-1. You may copy and distribute verbatim copies of the Program's source
-code as you receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this License
-and to the absence of any warranty; and give any other recipients of the
-Program a copy of this License along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and you
-may at your option offer warranty protection in exchange for a fee.
-
-2. You may modify your copy or copies of the Program or any portion of it,
-thus forming a work based on the Program, and copy and distribute such
-modifications or work under the terms of Section 1 above, provided that you
-also meet all of these conditions:
-
-a) You must cause the modified files to carry prominent notices stating that
-you changed the files and the date of any change.
-
-b) You must cause any work that you distribute or publish, that in whole or in
-part contains or is derived from the Program or any part thereof, to be
-licensed as a whole at no charge to all third parties under the terms of this
-License.
-
-c) If the modified program normally reads commands interactively when run,
-you must cause it, when started running for such interactive use in the most
-ordinary way, to print or display an announcement including an appropriate
-copyright notice and a notice that there is no warranty (or else, saying that
-you provide a warranty) and that users may redistribute the program under
-these conditions, and telling the user how to view a copy of this License.
-(Exception: if the Program itself is interactive but does not normally print such
-an announcement, your work based on the Program is not required to print
-an announcement.)
-
-These requirements apply to the modified work as a whole. If identifiable
-sections of that work are not derived from the Program, and can be
-reasonably considered independent and separate works in themselves, then
-this License, and its terms, do not apply to those sections when you distribute
-them as separate works. But when you distribute the same sections as part
-of a whole which is a work based on the Program, the distribution of the
-whole must be on the terms of this License, whose permissions for other
-licensees extend to the entire whole, and thus to each and every part
-regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your rights to
-work written entirely by you; rather, the intent is to exercise the right to
-control the distribution of derivative or collective works based on the
-Program.
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
 
 In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of a
-storage or distribution medium does not bring the other work under the scope
-of this License.
-
-3. You may copy and distribute the Program (or a work based on it, under
-Section 2) in object code or executable form under the terms of Sections 1
-and 2 above provided that you also do one of the following:
-
-a) Accompany it with the complete corresponding machine-readable source
-code, which must be distributed under the terms of Sections 1 and 2 above
-on a medium customarily used for software interchange; or,
-
-b) Accompany it with a written offer, valid for at least three years, to give
-any third party, for a charge no more than your cost of physically performing
-source distribution, a complete machine-readable copy of the corresponding
-source code, to be distributed under the terms of Sections 1 and 2 above on
-a medium customarily used for software interchange; or,
-
-c) Accompany it with the information you received as to the offer to distribute
-corresponding source code. (This alternative is allowed only for
-noncommercial distribution and only if you received the program in object
-code or executable form with such an offer, in accord with Subsection b
-above.)
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
 
 The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source code
-means all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation and
-installation of the executable. However, as a special exception, the source
-code distributed need not include anything that is normally distributed (in
-either source or binary form) with the major components (compiler, kernel,
-and so on) of the operating system on which the executable runs, unless that
-component itself accompanies the executable.
-
-If distribution of executable or object code is made by offering access to
-copy from a designated place, then offering equivalent access to copy the
-source code from the same place counts as distribution of the source code,
-even though third parties are not compelled to copy the source along with the
-object code.
-
-4. You may not copy, modify, sublicense, or distribute the Program except as
-expressly provided under this License. Any attempt otherwise to copy,
-modify, sublicense or distribute the Program is void, and will automatically
-terminate your rights under this License. However, parties who have received
-copies, or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-5. You are not required to accept this License, since you have not signed it.
-However, nothing else grants you permission to modify or distribute the
-Program or its derivative works. These actions are prohibited by law if you
-do not accept this License. Therefore, by modifying or distributing the
-Program (or any work based on the Program), you indicate your acceptance
-of this License to do so, and all its terms and conditions for copying,
-distributing or modifying the Program or works based on it.
-
-6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the original
-licensor to copy, distribute or modify the Program subject to these terms and
-conditions. You may not impose any further restrictions on the recipients'
-exercise of the rights granted herein. You are not responsible for enforcing
-compliance by third parties to this License.
-
-7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues), conditions
-are imposed on you (whether by court order, agreement or otherwise) that
-contradict the conditions of this License, they do not excuse you from the
-conditions of this License. If you cannot distribute so as to satisfy
-simultaneously your obligations under this License and any other pertinent
-obligations, then as a consequence you may not distribute the Program at all.
-For example, if a patent license would not permit royalty-free redistribution
-of the Program by all those who receive copies directly or indirectly through
-you, then the only way you could satisfy both it and this License would be to
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
 refrain entirely from distribution of the Program.
 
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply and
-the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or
-other property right claims or to contest validity of any such claims; this
-section has the sole purpose of protecting the integrity of the free software
-distribution system, which is implemented by public license practices. Many
-people have made generous contributions to the wide range of software
-distributed through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing to
-distribute software through any other system and a licensee cannot impose
-that choice.
-
-This section is intended to make thoroughly clear what is believed to be a
-consequence of the rest of this License.
-
-8. If the distribution and/or use of the Program is restricted in certain
-countries either by patents or by copyrighted interfaces, the original copyright
-holder who places the Program under this License may add an explicit
-geographical distribution limitation excluding those countries, so that
-distribution is permitted only in or among countries not thus excluded. In such
-case, this License incorporates the limitation as if written in the body of this
-License.
-
-9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will be
-similar in spirit to the present version, but may differ in detail to address new
-problems or concerns.
-
-Each version is given a distinguishing version number. If the Program specifies
-a version number of this License which applies to it and "any later version",
-you have the option of following the terms and conditions either of that
-version or of any later version published by the Free Software Foundation. If
-the Program does not specify a version number of this License, you may
-choose any version ever published by the Free Software Foundation.
-
-10. If you wish to incorporate parts of the Program into other free programs
-whose distribution conditions are different, write to the author to ask for
-permission. For software which is copyrighted by the Free Software
-Foundation, write to the Free Software Foundation; we sometimes make
-exceptions for this. Our decision will be guided by the two goals of
-preserving the free status of all derivatives of our free software and of
-promoting the sharing and reuse of software generally.
-
-               NO WARRANTY
-
-11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE,
-THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT
-PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
-STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
-WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
-NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR
-AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR
-ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
-LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
-SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
-ARISING OUT OF THE USE OR INABILITY TO USE THE
-PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA
-OR DATA BEING RENDERED INACCURATE OR LOSSES
-SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
-PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN
-IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.
-
-          END OF TERMS AND CONDITIONS
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/sites/all/modules/workbench_moderation/includes/workbench_moderation_handler_field_history_link.inc b/sites/all/modules/workbench_moderation/includes/workbench_moderation_handler_field_history_link.inc
new file mode 100644
index 00000000..40a6bea7
--- /dev/null
+++ b/sites/all/modules/workbench_moderation/includes/workbench_moderation_handler_field_history_link.inc
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * @file
+ * Provides a link to Moderation History for Views.
+ */
+
+class workbench_moderation_handler_field_history_link extends views_handler_field_node_link {
+
+  function render_link($data, $values) {
+    // ensure user has access to view moderation history for this node.
+    $node = node_load($this->get_value($values, 'nid'));
+    if (!_workbench_moderation_access('view history', $node)) {
+      return;
+    }
+
+    $this->options['alter']['make_link'] = TRUE;
+    $this->options['alter']['path'] = "node/$node->nid/moderation";
+    $text = !empty($this->options['text']) ? $this->options['text'] : t('View Moderation History');
+    return $text;
+  }
+}
diff --git a/sites/all/modules/workbench_moderation/includes/workbench_moderation_handler_field_state.inc b/sites/all/modules/workbench_moderation/includes/workbench_moderation_handler_field_state.inc
new file mode 100644
index 00000000..3c13157f
--- /dev/null
+++ b/sites/all/modules/workbench_moderation/includes/workbench_moderation_handler_field_state.inc
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * Field handler to translate a moderation state into its readable form.
+ */
+class workbench_moderation_handler_field_state extends views_handler_field_node {
+  function option_definition() {
+    $options = parent::option_definition();
+    $options['machine_name'] = array('default' => FALSE);
+    return $options;
+  }
+
+  /**
+   * Provide machine_name option for to node type display.
+   */
+  function options_form(&$form, &$form_state) {
+    parent::options_form($form, $form_state);
+
+    $form['machine_name'] = array(
+      '#title' => t('Output machine name'),
+      '#description' => t('Display field as the moderation state machine name.'),
+      '#type' => 'checkbox',
+      '#default_value' => !empty($this->options['machine_name']),
+      '#fieldset' => 'more',
+    );
+  }
+
+  /**
+    * Render node type as human readable name, unless using machine_name option.
+    */
+  function render_name($data, $values) {
+    if ($this->options['machine_name'] != 1 && $data !== NULL && $data !== '') {
+      return t($this->sanitize_value(workbench_moderation_state_label($data)));
+    }
+    return $this->sanitize_value($data);
+  }
+
+  function render($values) {
+    $value = $this->get_value($values);
+    return $this->render_link($this->render_name($value, $values), $values);
+  }
+}
diff --git a/sites/all/modules/workbench_moderation/includes/workbench_moderation_handler_filter_state.inc b/sites/all/modules/workbench_moderation/includes/workbench_moderation_handler_filter_state.inc
index d1e824fa..0c1aef86 100644
--- a/sites/all/modules/workbench_moderation/includes/workbench_moderation_handler_filter_state.inc
+++ b/sites/all/modules/workbench_moderation/includes/workbench_moderation_handler_filter_state.inc
@@ -8,11 +8,7 @@ class workbench_moderation_handler_filter_state extends views_handler_filter_in_
   function get_value_options() {
     if (!isset($this->value_options)) {
       $this->value_title = t('Moderation Status');
-      $this->value_options = array();
-      foreach (workbench_moderation_states() as $key => $state) {
-        $this->value_options[$key] = check_plain($key . ': ' . $state->description);
-      }
-
+      $this->value_options = array_map('check_plain', workbench_moderation_state_labels());
     }
   }
 }
diff --git a/sites/all/modules/workbench_moderation/plugins/page_manager/tasks/nodedraft.inc b/sites/all/modules/workbench_moderation/plugins/page_manager/tasks/nodedraft.inc
new file mode 100644
index 00000000..26a5fc33
--- /dev/null
+++ b/sites/all/modules/workbench_moderation/plugins/page_manager/tasks/nodedraft.inc
@@ -0,0 +1,133 @@
+<?php
+
+/**
+ * Specialized implementation of hook_page_manager_task_tasks(). See api-task.html for
+ * more information.
+ */
+function workbench_moderation_nodedraft_page_manager_tasks() {
+
+  return array(
+    // This is a 'page' task and will fall under the page admin UI
+    'task type' => 'page',
+
+    'title' => t('Node Draft'),
+    'admin title' => t('The draft page for moderated nodes.'),
+    'admin description' => t('When enabled, this overrides the default node view at node/%node/draft'),
+    'admin path' => 'node/%node/draft',
+
+    // Menu hooks so that we can alter the node/%node menu entry to point to us.
+    'hook menu alter' => 'workbench_moderation_nodedraft_menu_alter',
+
+    // This is task uses 'context' handlers and must implement these to give the
+    // handler data it needs.
+    'handler type' => 'context',
+    'get arguments' => 'workbench_moderation_nodedraft_get_arguments',
+    'get context placeholders' => 'workbench_moderation_nodedraft_get_contexts',
+
+    // Allow this to be enabled or disabled:
+    'disabled' => variable_get('workbench_moderation_nodedraft_disabled', TRUE),
+    'enable callback' => 'workbench_moderation_nodedraft_enable',
+  );
+}
+
+/**
+ * Callback defined by workbench_moderation_nodedraft_page_manager_tasks().
+ *
+ * Alter menu item so that admin/workbench comes here.
+ */
+function workbench_moderation_nodedraft_menu_alter(&$items, $task) {
+
+  if (variable_get('workbench_moderation_nodedraft_disabled', TRUE)) {
+    return;
+  }
+
+  $callback = $items['node/%node/draft']['page callback'];
+  // Override the node edit handler for our purpose.
+  if ($callback == 'workbench_moderation_node_view_draft' || variable_get('page_manager_override_anyway', FALSE)) {
+    $items['node/%node/draft']['page callback'] = 'workbench_moderation_nodedraft';
+    $items['node/%node/draft']['file path'] = $task['path'];
+    $items['node/%node/draft']['file'] = $task['file'];
+  }
+
+  else {
+    //variable_set('workbench_moderation_nodedraft_disabled', TRUE);
+    if (!empty($GLOBALS['page_manager_enabling_workbench'])) {
+      drupal_set_message(t('Page manager module is unable to enable Workbench Moderation Draft Node because some other module already has overridden with %callback.', array('%callback' => $callback)), 'warning');
+    }
+    return;
+  }
+}
+
+/**
+ * Entry point for our overridden My Workbench.
+ *
+ * This function asks its assigned handlers who, if anyone, would like
+ * to run with it. If no one does, it passes through to the main node draft page.
+ */
+function workbench_moderation_nodedraft($node) {
+  // Load my task plugin
+  $task = page_manager_get_task('nodedraft');
+
+  // Get the most recent revision to pass to the task handler.
+  $current_node = workbench_moderation_node_current_load($node);
+
+  // Load the node into a context.
+  ctools_include('context');
+  ctools_include('context-task-handler');
+  $contexts = ctools_context_handler_get_task_contexts($task, '', array($current_node));
+
+  $output = ctools_context_handler_render($task, '', $contexts, array($current_node->nid));
+  if ($output !== FALSE) {
+    return $output;
+  }
+
+  module_load_include('inc', 'workbench_moderation', 'workbench_moderation.node');
+  $function = 'workbench_moderation_node_view_draft';
+  foreach (module_implements('page_manager_override') as $module) {
+    $call = $module . '_page_manager_override';
+    if (($rc = $call('workbench')) && function_exists($rc)) {
+      $function = $rc;
+      break;
+    }
+  }
+
+  // Otherwise, fall back.
+  return $function($node);
+}
+
+/**
+ * Callback to enable/disable the page from the UI.
+ */
+function workbench_moderation_nodedraft_enable($cache, $status) {
+  variable_set('workbench_moderation_nodedraft_disabled', $status);
+  // Set a global flag so that the menu routine knows it needs
+  // to set a message if enabling cannot be done.
+  if (!$status) {
+    $GLOBALS['page_manager_enabling_workbench'] = TRUE;
+  }
+}
+
+/**
+ * Callback to get arguments provided by this task handler.
+ *
+ * Since this is the node view and there is no UI on the arguments, we
+ * create dummy arguments that contain the needed data.
+ */
+function workbench_moderation_nodedraft_get_arguments($task, $subtask_id) {
+  return array(
+    array(
+      'keyword' => 'node',
+      'identifier' => t('Node draft being viewed'),
+      'id' => 1,
+      'name' => 'entity_id:node',
+      'settings' => array(),
+    ),
+  );
+}
+
+/**
+ * Callback to get context placeholders provided by this handler.
+ */
+function workbench_moderation_nodedraft_get_contexts($task, $subtask_id) {
+  return ctools_context_get_placeholders_from_argument(page_manager_node_view_get_arguments($task, $subtask_id));
+}
diff --git a/sites/all/modules/workbench_moderation/plugins/page_manager/tasks/noderevision.inc b/sites/all/modules/workbench_moderation/plugins/page_manager/tasks/noderevision.inc
new file mode 100644
index 00000000..ec56bdef
--- /dev/null
+++ b/sites/all/modules/workbench_moderation/plugins/page_manager/tasks/noderevision.inc
@@ -0,0 +1,130 @@
+<?php
+
+/**
+ * Specialized implementation of hook_page_manager_task_tasks(). See api-task.html for
+ * more information.
+ */
+function workbench_moderation_noderevision_page_manager_tasks() {
+
+  return array(
+    // This is a 'page' task and will fall under the page admin UI
+    'task type' => 'page',
+
+    'title' => t('Node Revision'),
+    'admin title' => t('The revision page for moderated nodes.'),
+    'admin description' => t('When enabled, this overrides the default node view at node/%node/revisions/%/view'),
+    'admin path' => 'node/%node/revisions/%/view',
+
+    // Menu hooks so that we can alter the node/%node menu entry to point to us.
+    'hook menu alter' => 'workbench_moderation_noderevision_menu_alter',
+
+    // This is task uses 'context' handlers and must implement these to give the
+    // handler data it needs.
+    'handler type' => 'context',
+    'get arguments' => 'workbench_moderation_noderevision_get_arguments',
+    'get context placeholders' => 'workbench_moderation_noderevisoin_get_contexts',
+
+    // Allow this to be enabled or disabled:
+    'disabled' => variable_get('workbench_moderation_noderevision_disabled', TRUE),
+    'enable callback' => 'workbench_moderation_noderevision_enable',
+  );
+}
+
+/**
+ * Callback defined by workbench_moderation_noderevision_page_manager_tasks().
+ *
+ * Alter menu item so that admin/workbench comes here.
+ */
+function workbench_moderation_noderevision_menu_alter(&$items, $task) {
+
+  if (variable_get('workbench_moderation_noderevision_disabled', TRUE)) {
+    return;
+  }
+
+  $callback = $items['node/%node/revisions/%/view']['page callback'];
+  // Override the node edit handler for our purpose.
+  if ($callback == 'workbench_moderation_node_view_revision' || variable_get('page_manager_override_anyway', FALSE)) {
+    $items['node/%node/revisions/%/view']['page callback'] = 'workbench_moderation_noderevision';
+    $items['node/%node/revisions/%/view']['file path'] = $task['path'];
+    $items['node/%node/revisions/%/view']['file'] = $task['file'];
+  }
+
+  else {
+    variable_set('workbench_moderation_noderevision_disabled', TRUE);
+    if (!empty($GLOBALS['page_manager_enabling_workbench_noderevision'])) {
+      drupal_set_message(t('Page manager module is unable to enable Workbench Moderation Revision Node because some other module already has overridden with %callback.', array('%callback' => $callback)), 'warning');
+    }
+    return;
+  }
+}
+
+/**
+ * Entry point for our overridden My Workbench.
+ *
+ * This function asks its assigned handlers who, if anyone, would like
+ * to run with it. If no one does, it passes through to the main node draft page.
+ */
+function workbench_moderation_noderevision($node) {
+  // Load my task plugin
+  $task = page_manager_get_task('noderevision');
+
+  // Load the node into a context.
+  ctools_include('context');
+  ctools_include('context-task-handler');
+  $contexts = ctools_context_handler_get_task_contexts($task, '', array($node));
+
+  $output = ctools_context_handler_render($task, '', $contexts, array($node->nid));
+  if ($output !== FALSE) {
+    return $output;
+  }
+
+  module_load_include('inc', 'workbench_moderation', 'workbench_moderation.node');
+  $function = 'workbench_moderation_node_view_revision';
+  foreach (module_implements('page_manager_override') as $module) {
+    $call = $module . '_page_manager_override';
+    if (($rc = $call('workbench')) && function_exists($rc)) {
+      $function = $rc;
+      break;
+    }
+  }
+
+  // Otherwise, fall back.
+  return $function($node);
+}
+
+/**
+ * Callback to enable/disable the page from the UI.
+ */
+function workbench_moderation_noderevision_enable($cache, $status) {
+  variable_set('workbench_moderation_noderevision_disabled', $status);
+  // Set a global flag so that the menu routine knows it needs
+  // to set a message if enabling cannot be done.
+  if (!$status) {
+    $GLOBALS['page_manager_enabling_workbench_noderevision'] = TRUE;
+  }
+}
+
+/**
+ * Callback to get arguments provided by this task handler.
+ *
+ * Since this is the node view and there is no UI on the arguments, we
+ * create dummy arguments that contain the needed data.
+ */
+function workbench_moderation_noderevision_get_arguments($task, $subtask_id) {
+  return array(
+    array(
+      'keyword' => 'node',
+      'identifier' => t('Node revision being viewed'),
+      'id' => 1,
+      'name' => 'entity_id:node',
+      'settings' => array(),
+    ),
+  );
+}
+
+/**
+ * Callback to get context placeholders provided by this handler.
+ */
+function workbench_moderation_noderevision_get_contexts($task, $subtask_id) {
+  return ctools_context_get_placeholders_from_argument(page_manager_node_view_get_arguments($task, $subtask_id));
+}
diff --git a/sites/all/modules/workbench_moderation/tests/workbench_moderation.test b/sites/all/modules/workbench_moderation/tests/workbench_moderation.test
index 5cacb863..c6e00064 100644
--- a/sites/all/modules/workbench_moderation/tests/workbench_moderation.test
+++ b/sites/all/modules/workbench_moderation/tests/workbench_moderation.test
@@ -9,8 +9,9 @@ class WorkbenchModerationTestCase extends DrupalWebTestCase {
   protected $content_type;
   protected $moderator_user;
 
-  function setUp() {
-    parent::setUp(array('workbench_moderation', 'workbench'));
+  function setUp($modules = array()) {
+    $modules = array_merge($modules, array('workbench_moderation'));
+    parent::setUp($modules);
 
     // Create a new content type and enable moderation on it.
     $type = $this->drupalCreateContentType();
@@ -52,11 +53,23 @@ class WorkbenchModerationModerateTabTestCase extends WorkbenchModerationTestCase
     );
   }
 
-  function setUp() {
-    parent::setUp();
+  function setUp($modules = array()) {
+    parent::setUp($modules);
     $this->drupalLogin($this->moderator_user);
   }
 
+  /**
+   * Override DrupalWebTestCase::drupalGetToken() as it does not return the
+   * correct token for the currently logged-in testing user.
+   */
+  protected function drupalGetToken($value = '') {
+    $session_id = $this->session_id;
+    if (empty($session_id) && !empty($this->loggedInUser)) {
+      $session_id = db_query("SELECT sid FROM {sessions} WHERE uid = :uid ORDER BY timestamp DESC", array(':uid' => $this->loggedInUser->uid))->fetchField();
+    }
+    return drupal_hmac_base64($value, $session_id . drupal_get_private_key() . drupal_get_hash_salt());
+  }
+
   function testModerateTab() {
     $is_moderated = workbench_moderation_node_type_moderated($this->content_type);
     $this->assertTrue($is_moderated, t('The content type is moderated.'));
@@ -80,6 +93,18 @@ class WorkbenchModerationModerateTabTestCase extends WorkbenchModerationTestCase
     // Make sure the "Moderate" tab is accessible.
     $this->drupalGet("node/{$node->nid}/moderation");
 
+    // Attempt to change the moderation state without a token in the link.
+    $this->drupalGet("node/{$node->nid}/moderation/{$node->vid}/change-state/needs_review");
+    $this->assertResponse(403);
+
+    // Run the same state change with a valid token, which should succeed.
+    $this->drupalGet("node/{$node->nid}/moderation/{$node->vid}/change-state/needs_review", array(
+      'query' => array('token' => $this->drupalGetToken("{$node->nid}:{$node->vid}:needs_review"))
+    ));
+    $this->assertResponse(200);
+    $node = node_load($node->nid, NULL, TRUE);
+    $this->assertEqual($node->workbench_moderation['current']->state, 'needs_review', 'Node state changed to Needs Review via callback.');
+
     // Publish the node via the moderation form.
     $moderate = array('state' => workbench_moderation_state_published());
     $this->drupalPost("node/{$node->nid}/moderation", $moderate, t('Apply'));
@@ -111,15 +136,15 @@ class WorkbenchModerationDraftTabTestCase extends WorkbenchModerationTestCase {
       'name' => 'Draft tab',
       'description' => 'Test access to the "Draft" tab and publishing from the mini moderation form on the draft tab.',
       'group' => 'Workbench Moderation',
+      'dependencies' => array(
+        'workbench', // Workbench is required for the mini moderation form
+      ),
     );
   }
 
-  function setUp() {
-    parent::setUp();
-
-    // Workbench is now required for the mini moderation form.
-    module_enable(array('workbench'));
-
+  function setUp($modules = array()) {
+    $modules = array_merge($modules, array('workbench'));
+    parent::setUp($modules);
     $this->drupalLogin($this->moderator_user);
   }
 
@@ -182,8 +207,8 @@ class WorkbenchModerationPublishFromNodeFormTestCase extends WorkbenchModeration
     );
   }
 
-  function setUp() {
-    parent::setUp();
+  function setUp($modules = array()) {
+    parent::setUp($modules);
     $this->drupalLogin($this->admin_user);
   }
 
@@ -222,8 +247,8 @@ class WorkbenchModerationUnpublishTestCase extends WorkbenchModerationTestCase {
     );
   }
 
-  function setUp() {
-    parent::setUp();
+  function setUp($modules = array()) {
+    parent::setUp($modules);
     $this->drupalLogin($this->admin_user);
   }
 
@@ -241,7 +266,7 @@ class WorkbenchModerationUnpublishTestCase extends WorkbenchModerationTestCase {
     $node = $this->drupalGetNodeByTitle($edit['title']);
 
     // Unpublish the node via the unpublish confirmation form.
-    $this->drupalPost("node/{$node->nid}/moderation/{$node->vid}/unpublish", array(), t('Confirm'));
+    $this->drupalPost("node/{$node->nid}/moderation/{$node->vid}/unpublish", array(), t('Unpublish'));
 
     $unpublished_node = node_load($node->nid, FALSE, TRUE);
     $this->assertFalse($unpublished_node->status, t('The node is not published.'));
diff --git a/sites/all/modules/workbench_moderation/views/workbench_moderation.view.inc b/sites/all/modules/workbench_moderation/views/workbench_moderation.view.inc
index a829014e..12969296 100644
--- a/sites/all/modules/workbench_moderation/views/workbench_moderation.view.inc
+++ b/sites/all/modules/workbench_moderation/views/workbench_moderation.view.inc
@@ -154,24 +154,28 @@ $handler->display->display_options['fields']['log']['element_label_colon'] = 1;
 $handler->display->display_options['fields']['log']['element_default_classes'] = 1;
 $handler->display->display_options['fields']['log']['hide_empty'] = 0;
 $handler->display->display_options['fields']['log']['empty_zero'] = 0;
-/* Field: Global: Custom text */
-$handler->display->display_options['fields']['nothing']['id'] = 'nothing';
-$handler->display->display_options['fields']['nothing']['table'] = 'views';
-$handler->display->display_options['fields']['nothing']['field'] = 'nothing';
-$handler->display->display_options['fields']['nothing']['exclude'] = TRUE;
-$handler->display->display_options['fields']['nothing']['alter']['text'] = 'View moderation history';
-$handler->display->display_options['fields']['nothing']['alter']['make_link'] = 1;
-$handler->display->display_options['fields']['nothing']['alter']['path'] = 'node/[nid_1]/moderation';
-$handler->display->display_options['fields']['nothing']['alter']['absolute'] = 0;
-$handler->display->display_options['fields']['nothing']['alter']['word_boundary'] = 1;
-$handler->display->display_options['fields']['nothing']['alter']['ellipsis'] = 1;
-$handler->display->display_options['fields']['nothing']['alter']['strip_tags'] = 0;
-$handler->display->display_options['fields']['nothing']['alter']['trim'] = 0;
-$handler->display->display_options['fields']['nothing']['alter']['html'] = 0;
-$handler->display->display_options['fields']['nothing']['element_label_colon'] = 1;
-$handler->display->display_options['fields']['nothing']['element_default_classes'] = 1;
-$handler->display->display_options['fields']['nothing']['hide_empty'] = 0;
-$handler->display->display_options['fields']['nothing']['empty_zero'] = 0;
+/* Field: Workbench Moderation: Moderation History Link */
+$handler->display->display_options['fields']['workbench_moderation_history_link']['id'] = 'workbench_moderation_history_link';
+$handler->display->display_options['fields']['workbench_moderation_history_link']['table'] = 'node';
+$handler->display->display_options['fields']['workbench_moderation_history_link']['field'] = 'workbench_moderation_history_link';
+$handler->display->display_options['fields']['workbench_moderation_history_link']['exclude'] = TRUE;
+$handler->display->display_options['fields']['workbench_moderation_history_link']['alter']['alter_text'] = 0;
+$handler->display->display_options['fields']['workbench_moderation_history_link']['alter']['make_link'] = 0;
+$handler->display->display_options['fields']['workbench_moderation_history_link']['alter']['absolute'] = 0;
+$handler->display->display_options['fields']['workbench_moderation_history_link']['alter']['external'] = 0;
+$handler->display->display_options['fields']['workbench_moderation_history_link']['alter']['replace_spaces'] = 0;
+$handler->display->display_options['fields']['workbench_moderation_history_link']['alter']['trim_whitespace'] = 0;
+$handler->display->display_options['fields']['workbench_moderation_history_link']['alter']['nl2br'] = 0;
+$handler->display->display_options['fields']['workbench_moderation_history_link']['alter']['word_boundary'] = 1;
+$handler->display->display_options['fields']['workbench_moderation_history_link']['alter']['ellipsis'] = 1;
+$handler->display->display_options['fields']['workbench_moderation_history_link']['alter']['strip_tags'] = 0;
+$handler->display->display_options['fields']['workbench_moderation_history_link']['alter']['trim'] = 0;
+$handler->display->display_options['fields']['workbench_moderation_history_link']['alter']['html'] = 0;
+$handler->display->display_options['fields']['workbench_moderation_history_link']['element_label_colon'] = 1;
+$handler->display->display_options['fields']['workbench_moderation_history_link']['element_default_classes'] = 1;
+$handler->display->display_options['fields']['workbench_moderation_history_link']['hide_empty'] = 0;
+$handler->display->display_options['fields']['workbench_moderation_history_link']['empty_zero'] = 0;
+$handler->display->display_options['fields']['workbench_moderation_history_link']['hide_alter_empty'] = 0;
 /* Field: Moderation State */
 $handler->display->display_options['fields']['state']['id'] = 'state';
 $handler->display->display_options['fields']['state']['table'] = 'workbench_moderation_node_history';
@@ -179,9 +183,13 @@ $handler->display->display_options['fields']['state']['field'] = 'state';
 $handler->display->display_options['fields']['state']['ui_name'] = 'Moderation State';
 $handler->display->display_options['fields']['state']['label'] = 'Moderation State';
 $handler->display->display_options['fields']['state']['alter']['alter_text'] = 1;
-$handler->display->display_options['fields']['state']['alter']['text'] = '<div>[state]</div><div>[nothing]</div>';
+$handler->display->display_options['fields']['state']['alter']['text'] = '<div>[state]</div><div>[workbench_moderation_history_link]</div>';
 $handler->display->display_options['fields']['state']['alter']['make_link'] = 0;
 $handler->display->display_options['fields']['state']['alter']['absolute'] = 0;
+$handler->display->display_options['fields']['state']['alter']['external'] = 0;
+$handler->display->display_options['fields']['state']['alter']['replace_spaces'] = 0;
+$handler->display->display_options['fields']['state']['alter']['trim_whitespace'] = 0;
+$handler->display->display_options['fields']['state']['alter']['nl2br'] = 0;
 $handler->display->display_options['fields']['state']['alter']['word_boundary'] = 1;
 $handler->display->display_options['fields']['state']['alter']['ellipsis'] = 1;
 $handler->display->display_options['fields']['state']['alter']['strip_tags'] = 0;
@@ -191,6 +199,9 @@ $handler->display->display_options['fields']['state']['element_label_colon'] = 1
 $handler->display->display_options['fields']['state']['element_default_classes'] = 1;
 $handler->display->display_options['fields']['state']['hide_empty'] = 0;
 $handler->display->display_options['fields']['state']['empty_zero'] = 0;
+$handler->display->display_options['fields']['state']['hide_alter_empty'] = 0;
+$handler->display->display_options['fields']['state']['link_to_node'] = 0;
+$handler->display->display_options['fields']['state']['machine_name'] = 0;
 /* Field: Workbench Moderation: Moderation Links */
 $handler->display->display_options['fields']['moderation_actions']['id'] = 'moderation_actions';
 $handler->display->display_options['fields']['moderation_actions']['table'] = 'workbench_moderation_node_history';
@@ -317,13 +328,14 @@ $handler->display->display_options['filters']['state']['id'] = 'state';
 $handler->display->display_options['filters']['state']['table'] = 'workbench_moderation_node_history';
 $handler->display->display_options['filters']['state']['field'] = 'state';
 $handler->display->display_options['filters']['state']['value'] = array(
-  'Draft' => 'Draft',
-  'Needs Review' => 'Needs Review',
+  'all' => 'all',
+  'draft' => 'draft',
+  'needs_review' => 'needs_review',
+  'published' => 'published',
 );
 $handler->display->display_options['filters']['state']['exposed'] = TRUE;
 $handler->display->display_options['filters']['state']['expose']['operator_id'] = 'state_op';
 $handler->display->display_options['filters']['state']['expose']['label'] = 'State';
-$handler->display->display_options['filters']['state']['expose']['use_operator'] = FALSE;
 $handler->display->display_options['filters']['state']['expose']['operator'] = 'state_op';
 $handler->display->display_options['filters']['state']['expose']['identifier'] = 'state';
 $handler->display->display_options['filters']['state']['expose']['remember'] = 1;
@@ -359,7 +371,7 @@ $handler->display->display_options['filters']['state']['id'] = 'state';
 $handler->display->display_options['filters']['state']['table'] = 'workbench_moderation_node_history';
 $handler->display->display_options['filters']['state']['field'] = 'state';
 $handler->display->display_options['filters']['state']['value'] = array(
-  'Needs Review' => 'Needs Review',
+  'needs_review' => 'needs_review',
 );
 $handler->display->display_options['filters']['state']['expose']['label'] = 'Workbench Moderation: State';
 $handler->display->display_options['filters']['state']['expose']['use_operator'] = FALSE;
@@ -448,13 +460,12 @@ $handler->display->display_options['filters']['state']['id'] = 'state';
 $handler->display->display_options['filters']['state']['table'] = 'workbench_moderation_node_history';
 $handler->display->display_options['filters']['state']['field'] = 'state';
 $handler->display->display_options['filters']['state']['value'] = array(
-  'Draft' => 'Draft',
-  'Needs Review' => 'Needs Review',
+  'draft' => 'draft',
+  'needs_review' => 'needs_review',
 );
 $handler->display->display_options['filters']['state']['exposed'] = TRUE;
 $handler->display->display_options['filters']['state']['expose']['operator_id'] = 'state_op';
 $handler->display->display_options['filters']['state']['expose']['label'] = 'State';
-$handler->display->display_options['filters']['state']['expose']['use_operator'] = FALSE;
 $handler->display->display_options['filters']['state']['expose']['operator'] = 'state_op';
 $handler->display->display_options['filters']['state']['expose']['identifier'] = 'state';
 $handler->display->display_options['filters']['state']['expose']['remember'] = 1;
@@ -479,11 +490,9 @@ $translatables['workbench_moderation'] = array(
   t('revision user'),
   t('Nid'),
   t('Log message'),
-  t('Custom text'),
-  t('View moderation history'),
-  t('node/[nid_1]/moderation'),
+  t('Moderation History Link'),
   t('Moderation State'),
-  t('<div>[state]</div><div>[nothing]</div>'),
+  t('<div>[state]</div><div>[workbench_moderation_history_link]</div>'),
   t('Moderate'),
   t('Title'),
   t('Type'),
diff --git a/sites/all/modules/workbench_moderation/workbench_moderation.admin.inc b/sites/all/modules/workbench_moderation/workbench_moderation.admin.inc
index 90a773ed..7197cf54 100644
--- a/sites/all/modules/workbench_moderation/workbench_moderation.admin.inc
+++ b/sites/all/modules/workbench_moderation/workbench_moderation.admin.inc
@@ -28,6 +28,12 @@ function workbench_moderation_admin_states_form($form, &$form_state) {
       '#value' => $state->name,
     );
     $form['states'][$state->name]['label'] = array(
+      '#type' => 'textfield',
+      '#default_value' => $state->label,
+      '#maxlength' => 255,
+      '#size' => 30,
+    );
+    $form['states'][$state->name]['machine_name'] = array(
       '#markup' => check_plain($state->name),
     );
     $form['states'][$state->name]['description'] = array(
@@ -50,18 +56,28 @@ function workbench_moderation_admin_states_form($form, &$form_state) {
   }
 
   // Provide fields to create a new state.
-  $new_state['name'] = array(
+  $new_state['label'] = array(
+    '#title' => t('New state'),
     '#type' => 'textfield',
+    '#description' => t('Enter a name for the new state.'),
+    '#maxlength' => 255,
     '#size' => 30,
+  );
+  $new_state['name'] = array(
+    '#type' => 'machine_name',
     '#maxlength' => 255,
-    '#title' => t('New state'),
-    '#description' => t('Enter name of the new state.')
+    '#size' => 30,
+    '#required' => FALSE,
+    '#machine_name' => array(
+      'exists' => 'workbench_moderation_state_load',
+      'source' => array('states', '0', 'label'),
+    ),
   );
   $new_state['description'] = array(
     '#type' => 'textfield',
     '#maxlength' => 255,
     '#title' => '&nbsp;',
-    '#description' => 'Enter a description of the new state.'
+    '#description' => t('Enter a description of the new state.')
   );
   $new_state['weight'] = array(
     '#type' => 'weight',
@@ -86,6 +102,7 @@ function theme_workbench_moderation_admin_states_form($variables) {
 
   $header = array(
     t('Name'),
+    t('Machine name'),
     t('Description'),
     array('data' => t('Delete'), 'class' => array('checkbox')),
     t('Weight'),
@@ -99,7 +116,8 @@ function theme_workbench_moderation_admin_states_form($variables) {
       'data' => array(),
       'class' => array('draggable'),
     );
-    $row['data']['name'] = drupal_render($element['name']) . drupal_render($element['label']);
+    $row['data']['label'] = drupal_render($element['label']);
+    $row['data']['name'] = drupal_render($element['name']) . drupal_render($element['machine_name']);
     $row['data']['description'] = drupal_render($element['description']);
     $row['data']['delete'] = drupal_render($element['delete']);
 
@@ -122,11 +140,12 @@ function workbench_moderation_admin_states_form_submit($form, &$form_state) {
   foreach ($form_state['values']['states'] as $key => $info) {
     if (!empty($info['delete'])) {
       workbench_moderation_state_delete($info['state']);
-      drupal_set_message(t('%state has been deleted.', array('%state' => $key)));
+      drupal_set_message(t('Moderation state %label (%name) has been deleted.', array('%label' => $info['label'], '%name' => $info['name'])));
     }
     elseif (!empty($info['name'])) {
       $state = (object) array(
         'name' => $info['name'],
+        'label' => $info['label'],
         'description' => $info['description'],
         'weight' => $info['weight'],
       );
@@ -153,6 +172,7 @@ function workbench_moderation_admin_transitions_form($form, &$form_state) {
 
   // List existing states.
   $transitions = workbench_moderation_transitions();
+
   foreach ($transitions as $transition) {
     $element = array();
 
@@ -161,10 +181,10 @@ function workbench_moderation_admin_transitions_form($form, &$form_state) {
       '#value' => $transition,
     );
     $element['from_name'] = array(
-      '#markup' => check_plain($transition->from_name),
+      '#markup' => check_plain(workbench_moderation_state_label($transition->from_name)),
     );
     $element['to_name'] = array(
-      '#markup' => check_plain($transition->to_name),
+      '#markup' => check_plain(workbench_moderation_state_label($transition->to_name)),
     );
     $element['delete'] = array(
       '#type' => 'checkbox',
@@ -177,7 +197,8 @@ function workbench_moderation_admin_transitions_form($form, &$form_state) {
   }
 
   // Provide fields to create a new transition.
-  $options = drupal_map_assoc(array_keys(workbench_moderation_states()));
+  $options = workbench_moderation_state_labels();
+
   array_unshift($options, t('- Choose state -'));
   $element = array();
   $element['from_name'] = array(
@@ -185,7 +206,6 @@ function workbench_moderation_admin_transitions_form($form, &$form_state) {
     '#title' => t('New transition'),
     '#options' => $options,
   );
-  unset($element['from_name']['#options'][workbench_moderation_state_published()]);
   $element['to_name'] = array(
     '#type' => 'select',
     '#title' => '&nbsp;',
@@ -259,7 +279,7 @@ function workbench_moderation_admin_transitions_form_submit($form, &$form_state)
   foreach ($form_state['values']['transitions'] as $transition) {
     if (!empty($transition['delete'])) {
       workbench_moderation_transition_delete($transition['transition']);
-      drupal_set_message(t('%from --&gt; %to has been deleted.', array('%from' => $transition['transition']->from_name, '%to' => $transition['transition']->to_name)));
+      drupal_set_message(t('%from --&gt; %to has been deleted.', array('%from' => workbench_moderation_state_label($transition['transition']->from_name), '%to' => workbench_moderation_state_label($transition['transition']->to_name))));
     }
     elseif (!empty($transition['from_name']) && !empty($transition['to_name'])) {
       $new_transition = (object) array(
@@ -267,7 +287,7 @@ function workbench_moderation_admin_transitions_form_submit($form, &$form_state)
         'to_name' => $transition['to_name'],
       );
       workbench_moderation_transition_save($new_transition);
-      drupal_set_message(t('%from --&gt; %to has been created.', array('%from' => $new_transition->from_name, '%to' => $new_transition->to_name)));
+      drupal_set_message(t('%from --&gt; %to has been created.',array('%from' => workbench_moderation_state_label($new_transition->from_name), '%to' => workbench_moderation_state_label($new_transition->to_name))));
     }
   }
 }
@@ -451,7 +471,6 @@ function workbench_moderation_recommended_permissions($types = array()) {
       "view moderation messages",
       "view moderation history",
       "use workbench_moderation needs review tab",
-      "unpublish live revision",
     ),
   );
 
diff --git a/sites/all/modules/workbench_moderation/workbench_moderation.info b/sites/all/modules/workbench_moderation/workbench_moderation.info
index 5ea99225..06d8585d 100644
--- a/sites/all/modules/workbench_moderation/workbench_moderation.info
+++ b/sites/all/modules/workbench_moderation/workbench_moderation.info
@@ -6,16 +6,18 @@ core = 7.x
 configure = admin/config/workbench/moderation
 
 files[] = workbench_moderation.module
-files[] = includes/workbench_moderation_handler_filter_state.inc
+files[] = includes/workbench_moderation_handler_field_history_link.inc
 files[] = includes/workbench_moderation_handler_field_links.inc
+files[] = includes/workbench_moderation_handler_field_state.inc
+files[] = includes/workbench_moderation_handler_filter_state.inc
 files[] = includes/workbench_moderation_handler_filter_moderated_type.inc
 files[] = includes/workbench_moderation_handler_filter_user_can_moderate.inc
 files[] = tests/workbench_moderation.test
 files[] = tests/workbench_moderation.files.test
 
-; Information added by drupal.org packaging script on 2011-07-23
-version = "7.x-1.0-beta8"
+; Information added by drupal.org packaging script on 2011-11-02
+version = "7.x-1.1"
 core = "7.x"
 project = "workbench_moderation"
-datestamp = "1311431220"
+datestamp = "1320263436"
 
diff --git a/sites/all/modules/workbench_moderation/workbench_moderation.install b/sites/all/modules/workbench_moderation/workbench_moderation.install
index 1c141c92..1dffed4b 100644
--- a/sites/all/modules/workbench_moderation/workbench_moderation.install
+++ b/sites/all/modules/workbench_moderation/workbench_moderation.install
@@ -25,7 +25,13 @@ function workbench_moderation_schema() {
     'description' => 'Defines all possible states',
     'fields' => array(
       'name' => array(
-        'description' => 'The name of the moderation state.',
+        'description' => 'The machine name of the moderation state.',
+        'type' => 'varchar',
+        'length' => '255',
+        'not null' => FALSE,
+      ),
+      'label' => array(
+        'description' => 'A label for the moderation state.',
         'type' => 'varchar',
         'length' => '255',
         'not null' => FALSE,
@@ -42,7 +48,7 @@ function workbench_moderation_schema() {
         'default' => 0,
       ),
     ),
-    'unique keys' => array('name' => array('name'))
+    'primary key' => array('name'),
   );
 
   $schema['workbench_moderation_transitions'] = array(
@@ -153,25 +159,28 @@ function _workbench_moderation_insert_values() {
   // Default states.
   $states = array(
     array(
-      'name' => workbench_moderation_state_none(),
-      'description' => 'Visible only to the author',
+      'name' => 'draft',
+      'label' => 'Draft',
+      'description' => 'Work in progress',
       'weight' => -99,
     ),
     array(
-      'name' => 'Needs Review',
-      'description' => 'Visible to the author and editors',
+      'name' => 'needs_review',
+      'label' => 'Needs Review',
+      'description' => 'Ready for moderation',
       'weight' => 0,
     ),
     array(
-      'name' => workbench_moderation_state_published(),
-      'description' => 'Visible to the world',
+      'name' => 'published',
+      'label' => 'Published',
+      'description' => 'Make this version live',
       'weight' => 99,
     ),
   );
 
   // Save default states to the database.
   $query = db_insert('workbench_moderation_states')
-    ->fields(array('name', 'description', 'weight'));
+    ->fields(array('name', 'label', 'description', 'weight'));
 
   foreach ($states as $state) {
     $query->values($state);
@@ -182,16 +191,16 @@ function _workbench_moderation_insert_values() {
   // Default transitions.
   $transitions = array(
     array(
-      'from_name' => workbench_moderation_state_none(),
-      'to_name' => 'Needs Review',
+      'from_name' => 'draft',
+      'to_name' => 'needs_review',
     ),
     array(
-      'from_name' => 'Needs Review',
-      'to_name' => workbench_moderation_state_none(),
+      'from_name' => 'needs_review',
+      'to_name' => 'draft',
     ),
     array(
-      'from_name' => 'Needs Review',
-      'to_name' => workbench_moderation_state_published(),
+      'from_name' => 'needs_review',
+      'to_name' => 'published',
     ),
   );
 
@@ -423,3 +432,140 @@ function workbench_moderation_update_7005() {
 
   return t("Updated state descriptions.");
 }
+
+/**
+ * Add machine names to moderation states.
+ */
+function workbench_moderation_update_7006() {
+  // Drop the unique key on name which will be converted to label.
+  db_drop_unique_key('workbench_moderation_states', 'name');
+
+  // Add the new field.
+  $spec = array(
+    'description' => 'A label for the moderation state.',
+    'type' => 'varchar',
+    'length' => '255',
+    'not null' => FALSE,
+  );
+  db_add_field('workbench_moderation_states', 'label', $spec);
+
+  // Transform names into machine_names, saving the original name into the new
+  // 'label' field.
+  $states = db_select('workbench_moderation_states', 'states')
+    ->fields('states', array('name', 'label', 'description', 'weight'))
+    ->orderBy('states.weight', 'ASC')
+    ->execute()
+    ->fetchAllAssoc('name');
+  foreach ($states as $state) {
+    $machine_name = preg_replace('/[^a-z]+/', '_', strtolower($state->name));
+    db_update('workbench_moderation_states')
+      ->fields(array(
+        'name' => $machine_name,
+        'label' => $state->name,
+      ))
+      ->condition('name', $state->name)
+      ->execute();
+    db_update('workbench_moderation_transitions')
+      ->fields(array('from_name' => $machine_name))
+      ->condition('from_name', $state->name)
+      ->execute();
+    db_update('workbench_moderation_transitions')
+      ->fields(array('to_name' => $machine_name))
+      ->condition('to_name', $state->name)
+      ->execute();
+    db_update('workbench_moderation_node_history')
+      ->fields(array('from_state' => $machine_name))
+      ->condition('from_state', $state->name)
+      ->execute();
+    db_update('workbench_moderation_node_history')
+      ->fields(array('state' => $machine_name))
+      ->condition('state', $state->name)
+      ->execute();
+  }
+
+  // Add a primary key on {workbench_moderation_states}.
+  db_add_primary_key('workbench_moderation_states', array('name'));
+
+  // Get content types where moderation is enabled and update
+  // 'workbench_moderation_default_state_TYPE_NAME' variables
+  $entity_info = entity_get_info('node');
+  foreach (array_keys($entity_info['bundles']) as $content_type) {
+    $options = variable_get("node_options_$content_type", array());
+
+    if (in_array('revision', $options) && in_array('moderation', $options)) {
+      $orig_name = variable_get('workbench_moderation_default_state_' . $content_type, 'Draft');
+      $machine_name = preg_replace('/[^a-z]+/', '_', strtolower($orig_name));
+      variable_set('workbench_moderation_default_state_' . $content_type, $machine_name);
+    }
+  }
+
+  // Update transition permissions with new permission strings
+
+  // Normally we would use workbench_moderation_states(), but we can't guarantee that workbench_moderation is enabled.
+  $states = db_select('workbench_moderation_states', 'states')
+    ->fields('states', array('name', 'label', 'description', 'weight'))
+    ->orderBy('states.weight', 'ASC')
+    ->execute()
+    ->fetchAllAssoc('name');
+
+  // Normally we would use workbench_moderation_transitions(), but we can't guarantee that workbench_moderation is enabled.
+  $query = db_select('workbench_moderation_transitions', 't')
+    ->fields('t', array('from_name', 'to_name'));
+  $alias_from = $query->addJoin('INNER', 'workbench_moderation_states', NULL, 't.from_name = %alias.name');
+  $alias_to = $query->addJoin('INNER', 'workbench_moderation_states', NULL, 't.to_name = %alias.name');
+  $query
+    ->orderBy("$alias_from.weight", 'ASC')
+    ->orderBy("$alias_to.weight", 'ASC');
+  $transitions = $query->execute()->fetchAll();
+
+  foreach ($transitions as $transition) {
+    $old_perm = "moderate content from {$states[$transition->from_name]->label} to {$states[$transition->to_name]->label}";
+    $new_perm = "moderate content from {$transition->from_name} to {$transition->to_name}";
+    db_update('role_permission')
+      ->fields(array('permission' => $new_perm))
+      ->condition('permission', $old_perm)
+      ->execute();
+  }
+
+  return t("Added column to store moderation state labels.");
+}
+
+/**
+ * Replace the "Unpublish the current live revision" permission with a transition.
+ */
+function workbench_moderation_update_7007() {
+  // Normally we would use workbench_moderation_states(), but we can't guarantee that workbench_moderation is enabled.
+  $states = db_select('workbench_moderation_states', 'states')
+    ->fields('states', array('name', 'label', 'description', 'weight'))
+    ->orderBy('states.weight', 'ASC')
+    ->execute()
+    ->fetchAllAssoc('name');
+
+  // Add an unpublish transition from published to draft. The 'published' state
+  // currently can't be deleted, but the draft state may or may not be present.
+  $transition = (object) array(
+    'from_name' => 'published',
+    'to_name' => (isset($states['draft']) ? 'draft' : key($states)),
+  );
+  // Normally we would use workbench_moderation_transition_save(), but we can't guarantee that workbench_moderation is enabled.
+  db_merge('workbench_moderation_transitions')
+    ->key(array('from_name' => $transition->from_name, 'to_name' => $transition->to_name))
+    ->fields((array) $transition)
+    ->execute();
+
+  // Change permission grants from the deprecated unpublish permission to the
+  // new transition permission.
+  $roles = user_roles(FALSE, 'unpublish live revision');
+  $permissions = array(
+    'unpublish live revision' => FALSE,
+    "moderate content from {$transition->from_name} to {$transition->to_name}" => TRUE,
+  );
+  foreach ($roles as $rid => $role) {
+    user_role_change_permissions($rid, $permissions);
+  }
+
+  return t("Added a new transition from %from to %to and updated unpublish permissions. Unpublishing content is now controlled by transition permissions, and roles with the 'Bypass moderation restrictions' permission may unpublish content.", array(
+    '%from' => $transition->from_name,
+    '%to' => $transition->to_name,
+  ));
+}
diff --git a/sites/all/modules/workbench_moderation/workbench_moderation.module b/sites/all/modules/workbench_moderation/workbench_moderation.module
index 253c6f03..1d3846d0 100644
--- a/sites/all/modules/workbench_moderation/workbench_moderation.module
+++ b/sites/all/modules/workbench_moderation/workbench_moderation.module
@@ -21,7 +21,6 @@ function workbench_moderation_menu() {
     'type' => MENU_LOCAL_TASK,
     'page callback' => 'workbench_moderation_node_history_view',
     'page arguments' => array(1),
-    'theme callback' => '_node_custom_theme',
     'access callback' => '_workbench_moderation_access',
     'access arguments' => array('view history', 1),
     'file' => 'workbench_moderation.node.inc'
@@ -35,7 +34,6 @@ function workbench_moderation_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('workbench_moderation_node_unpublish_form', 1),
     'load arguments' => array(3),
-    'theme callback' => '_node_custom_theme',
     'access callback' => '_workbench_moderation_access',
     'access arguments' => array('unpublish', 1),
     'file' => 'workbench_moderation.node.inc'
@@ -128,6 +126,12 @@ function workbench_moderation_menu_alter(&$items) {
   $items['node/%node/revisions']['page callback'] = 'workbench_moderation_node_revisions_redirect';
   $items['node/%node/revisions']['page arguments'] = array(1);
 
+  // Override the node revision view callback.
+ $items['node/%node/revisions/%/view']['page callback'] = 'workbench_moderation_node_view_revision';
+ $items['node/%node/revisions/%/view']['file path'] = drupal_get_path('module', 'workbench_moderation');
+ $items['node/%node/revisions/%/view']['file'] = 'workbench_moderation.node.inc';
+
+
   // For revert and delete operations, use our own access check.
   $items['node/%node/revisions/%/revert']['access callback'] = '_workbench_moderation_revision_access';
   $items['node/%node/revisions/%/delete']['access callback'] = '_workbench_moderation_revision_access';
@@ -331,9 +335,6 @@ function workbench_moderation_permission() {
   $permissions['view moderation messages'] = array(
     'title' => t('View the moderation messages on a node')
   );
-  $permissions['unpublish live revision'] = array(
-    'title' => t('Unpublish the current live revision'),
-  );
   $permissions['use workbench_moderation my drafts tab'] = array(
     'title' => t('Use "My Drafts" workbench tab')
   );
@@ -344,13 +345,14 @@ function workbench_moderation_permission() {
   // Per-node-type, per-transition permissions. Used by workbench_moderation_state_allowed().
   $node_types = workbench_moderation_moderate_node_types();
   $transitions = workbench_moderation_transitions();
-  foreach ($transitions as $t) {
-    $from_state = check_plain($t->from_name);
-    $to_state = check_plain($t->to_name);
+
+  foreach ($transitions as $transition) {
+    $from_state = $transition->from_name;
+    $to_state = $transition->to_name;
 
     // Always set a permission to perform all moderation states.
     $permissions["moderate content from $from_state to $to_state"] = array(
-      'title' => t('Moderate all content from !from_state to !to_state', array('!from_state' => $from_state, '!to_state' => $to_state)),
+      'title' => t('Moderate all content from @from_state to @to_state', array('@from_state' => workbench_moderation_state_label($from_state), '@to_state' => workbench_moderation_state_label($to_state))),
     );
     // Per-node type permissions are very complex, and should only be used if
     // absolutely needed. For right now, this is hardcoded to OFF. To enable it,
@@ -359,7 +361,7 @@ function workbench_moderation_permission() {
     if (variable_get('workbench_moderation_per_node_type', FALSE)) {
       foreach ($node_types as $node_type) {
         $permissions["moderate $node_type state from $from_state to $to_state"] = array(
-          'title' => t('Moderate @node_type state from !from_state to !to_state', array('@node_type' => node_type_get_name($node_type), '!from_state' => $from_state, '!to_state' => $to_state)),
+          'title' => t('Moderate @node_type state from @from_state to @to_state', array('@node_type' => node_type_get_name($node_type), '@from_state' => workbench_moderation_state_label($from_state), '@to_state' => workbench_moderation_state_label($to_state))),
         );
       }
     }
@@ -391,6 +393,8 @@ function workbench_moderation_node_access($node, $op, $account) {
  *   Boolean TRUE or FALSE.
  */
 function _workbench_moderation_access($op, $node) {
+  global $user;
+
   // If we do not control this node type, deny access.
   if (workbench_moderation_node_type_moderated($node->type) === FALSE) {
     return FALSE;
@@ -405,7 +409,9 @@ function _workbench_moderation_access($op, $node) {
   $access &= node_access('update', $node);
 
   if ($op == 'unpublish') {
-    $access &= (user_access('unpublish live revision') || user_access('bypass workbench moderation'));
+    // workbench_moderation_states_next() checks transition permissions.
+    $next_states = workbench_moderation_states_next(workbench_moderation_state_published(), $user, $node->type);
+    $access &= !empty($next_states);
   }
 
   // Allow other modules to change our rule set.
@@ -528,8 +534,8 @@ function workbench_moderation_help($path, $arg) {
     case 'admin/config/workbench/moderation/transitions':
       return '<p>' . t("The Workbench Moderation module keeeps track of when a node moves from one state to
         another. By default, nodes begin in the %draft state and end in the %published state. The transitions
-        on this page control how nodes move from state to state.", array('%draft' => workbench_moderation_state_none(),
-        '%published' => workbench_moderation_state_published())) . ' ' . l(t('Permission to perform these transitions
+        on this page control how nodes move from state to state.", array('%draft' => workbench_moderation_state_label(workbench_moderation_state_none()),
+        '%published' => workbench_moderation_state_label(workbench_moderation_state_published()))) . ' ' . l(t('Permission to perform these transitions
         is controlled on a role-by-role basis.'), 'admin/people/permissions', array('fragment' => 'module-workbench_moderation')) . '</p>';
 
     case 'admin/config/workbench/moderation/check-permissions':
@@ -621,7 +627,7 @@ function workbench_moderation_node_update($node) {
     $node->workbench_moderation_state_current = ($node->status ? workbench_moderation_state_published() : workbench_moderation_state_none());
   };
   if (!isset($node->workbench_moderation_state_new)) {
-    $node->workbench_moderation_state_new = variable_get('workbench_moderation_default_state_' . $node->type);
+    $node->workbench_moderation_state_new = variable_get('workbench_moderation_default_state_' . $node->type, workbench_moderation_state_none());
   };
 
   // If this is a new node, give it some information about 'my revision'.
@@ -670,7 +676,7 @@ function workbench_moderation_node_load($nodes, $types) {
  */
 function workbench_moderation_node_view($node, $view_mode = 'full') {
   // Show moderation state messages if we're on a node page.
-  if (menu_get_object('node', 1)) {
+  if (node_is_page($node) && $view_mode == 'full' && empty($node->in_preview)) {
     workbench_moderation_messages('view', $node);
   }
 }
@@ -692,10 +698,7 @@ function workbench_moderation_node_delete($node) {
  */
 function workbench_moderation_form_node_type_form_alter(&$form, $form_state) {
   // Get a list of moderation states.
-  $options = array();
-  foreach (workbench_moderation_states() as $key => $state) {
-    $options[$key] = check_plain($key . ': ' . $state->description);
-  }
+  $options = workbench_moderation_state_labels();
 
   // Disable the 'revision' checkbox when the 'moderation' checkbox is checked, so that moderation
   // can not be enabled unless revisions are enabled.
@@ -737,17 +740,15 @@ function workbench_moderation_node_type_form_validate($from, &$form_state) {
 }
 
 /**
- * Implements hook_form_alter().
+ * Implements hook_form_BASE_FORM_ID_alter().
  *
  * Forcing new reversion and publishing.
- *
- * @TODO: Use the node_forms alter instead?
  */
-function workbench_moderation_form_alter(&$form, $form_state, $form_id) {
+function workbench_moderation_form_node_form_alter(&$form, $form_state) {
   global $user;
 
   // This must be a node form and a type that has moderation enabled
-  if (!(isset($form['#node_edit_form']) && workbench_moderation_node_type_moderated($form['type']['#value']))) {
+  if (!workbench_moderation_node_type_moderated($form['type']['#value'])) {
     return;
   }
   // Set a moderation state even if there is not one defined
@@ -755,7 +756,7 @@ function workbench_moderation_form_alter(&$form, $form_state, $form_id) {
     $moderation_state = $form['#node']->workbench_moderation['current']->state;
   }
   else {
-    $moderation_state = variable_get('workbench_moderation_default_state_' . $form['type']['#value']);
+    $moderation_state = variable_get('workbench_moderation_default_state_' . $form['type']['#value'], workbench_moderation_state_none());
   }
 
   // Store the current moderation state
@@ -771,7 +772,7 @@ function workbench_moderation_form_alter(&$form, $form_state, $form_id) {
   // Get all the states *this* user can access. If states is false, this user
   // can not change the moderation state
   if ($states = workbench_moderation_states_next($moderation_state, $user, $form['type']['#value'])) {
-    $current = array($moderation_state => t('Current: !state', array('!state' => $moderation_state)));
+    $current = array($moderation_state => t('Current: @state', array('@state' => workbench_moderation_state_label($moderation_state))));
     $states = array_merge($current, $states);
     $form['options']['workbench_moderation_state_new'] = array(
       '#title' => t('Moderation state'),
@@ -856,7 +857,7 @@ function workbench_moderation_node_edit_page_override($node) {
  * @TODO: make this configurable.
  */
 function workbench_moderation_state_published() {
-  return 'Published';
+  return 'published';
 }
 
 /**
@@ -865,7 +866,7 @@ function workbench_moderation_state_published() {
  * @TODO: make this configurable.
  */
 function workbench_moderation_state_none() {
-  return 'Draft';
+  return 'draft';
 }
 
 /**
@@ -1166,16 +1167,65 @@ function workbench_moderation_states() {
   static $states;
   if (!isset($states)) {
     $states = db_select('workbench_moderation_states', 'states')
-      ->fields('states', array('name', 'description', 'weight'))
+      ->fields('states', array('name', 'label', 'description', 'weight'))
       ->orderBy('states.weight', 'ASC')
       ->execute()
       ->fetchAllAssoc('name');
   }
+
   return $states;
 }
 
 /**
- * Saves a new or existing moderation state.
+ * Generate an array of moderation states suitable for use as Form API #options.
+ *
+ * @return
+ *   An array of states with machine names as keys and labels as values.
+ */
+function workbench_moderation_state_labels() {
+  $labels = &drupal_static(__FUNCTION__);
+
+  if (!isset($labels)) {
+    $labels = array();
+    foreach (workbench_moderation_states() as $machine_name => $state) {
+      $labels[$machine_name] = $state->label;
+    }
+  }
+
+  return $labels;
+}
+
+/**
+ * Get the label for a state based on its machine name.
+ *
+ * @param type $machine_name
+ *   The machine name of the state.
+ * @return
+ *   An unsanitized label or an empty string if the state does not exist.
+ */
+function workbench_moderation_state_label($machine_name) {
+  $labels = workbench_moderation_state_labels();
+  return isset($labels[$machine_name]) ? $labels[$machine_name] : '';
+}
+
+/**
+ * Get information about a single moderation state.
+ *
+ * @param type $machine_name
+ *   The machine name of the state.
+ * @return
+ *   An object of information about the state or FALSE if the state does not exist.
+ */
+function workbench_moderation_state_load($machine_name) {
+  $states = workbench_moderation_states();
+  if (isset($states[$machine_name])) {
+    return $states[$machine_name];
+  }
+  return FALSE;
+}
+
+/**
+ * Save a new or existing moderation state.
  *
  * Moderation state names must be unique, so saving a state object with a
  * non-unique name updates the existing state.
@@ -1193,7 +1243,7 @@ function workbench_moderation_state_save($state) {
 }
 
 /**
- * Deletes a moderation state.
+ * Delete a moderation state.
  *
  * This function also deletes any transitions that reference the deleted
  * moderation state.
@@ -1215,7 +1265,7 @@ function workbench_moderation_state_delete($state) {
 }
 
 /**
- * Returns a list of all moderation state transitions.
+ * Get a list of all moderation state transitions.
  *
  * @return
  *   An array of transition objects, each with from_name and to_name properties
@@ -1289,37 +1339,39 @@ function workbench_moderation_transition_delete($transition) {
  *   If the user may moderate a change, return an array of possible state
  *   changes. Otherwise, return FALSE.
  */
-function workbench_moderation_states_next($current_state, $account, $node_type) {
+function workbench_moderation_states_next($current_state, $account = NULL, $node_type) {
   // Make sure we have a current state.
   if (!$current_state) {
     $current_state = workbench_moderation_state_none();
   }
 
-  if (!$account) {
-    $account = $user;
+  if (empty($account)) {
+    $account = $GLOBALS['user'];
   }
 
   if (user_access('bypass workbench moderation', $account)) {
     // Some functions expect an array of $state => $state pairs.
-    $states = drupal_map_assoc(array_keys(workbench_moderation_states()));
+    $states = workbench_moderation_state_labels();
     unset($states[$current_state]);
     return $states;
   }
   else {
     // Get a list of possible transitions.
-    $states = db_select('workbench_moderation_transitions', 'transitions')
+    $select = db_select('workbench_moderation_transitions', 'transitions')
       ->condition('transitions.from_name', $current_state)
       ->fields('transitions', array('to_name'))
-      ->execute()
-      ->fetchAllKeyed(0, 0);
+      ->fields('states', array('label'));
+    $select->join('workbench_moderation_states', 'states', 'transitions.to_name = states.name');
+
+    $states = $select->execute()->fetchAllKeyed();
 
     // Checks whether the user has permission to make each transition. The
     // 'bypass workbench moderation' permission is accounted for in
     // workbench_moderation_state_allowed().
     if ($states) {
-      foreach ($states as $state) {
-        if (!workbench_moderation_state_allowed($account, $current_state, $state, $node_type)) {
-          unset($states[$state]);
+      foreach ($states as $machine_name => $label) {
+        if (!workbench_moderation_state_allowed($account, $current_state, $machine_name, $node_type)) {
+          unset($states[$machine_name]);
         }
       }
       return $states;
@@ -1421,11 +1473,6 @@ function workbench_moderation_moderate($node, $state) {
   if (!empty($node->workbench_moderation['published'])) {
     drupal_register_shutdown_function('workbench_moderation_store', $node);
   }
-
-  /** UNL CHANGE/ADDITION - SEE workbench_moderation/README-UNL.txt **/
-  if (module_exists('trigger')) {
-    workbench_moderation_trigger_transition($node, $old_revision->state, $state);
-  }
 }
 
 /**
@@ -1475,6 +1522,10 @@ function workbench_moderation_store($node) {
  *   The new moderation state requested.
  */
 function workbench_moderation_moderate_callback($node, $state) {
+  if (!isset($_GET['token']) || !drupal_valid_token($_GET['token'], "{$node->nid}:{$node->vid}:$state")) {
+    return MENU_ACCESS_DENIED;
+  }
+
   workbench_moderation_moderate($node, $state);
   drupal_goto(isset($_GET['destination']) ? $_GET['destination'] : 'node/' . $node->nid . '/moderation');
 }
@@ -1491,8 +1542,6 @@ function workbench_moderation_moderate_callback($node, $state) {
  *   A list of links to display with the revision.
  */
 function workbench_moderation_get_moderation_links($node, $url_options = array()) {
-  global $user;
-
   // Make sure that this node type is moderated.
   if (!workbench_moderation_node_type_moderated($node->type)) {
     return;
@@ -1502,12 +1551,14 @@ function workbench_moderation_get_moderation_links($node, $url_options = array()
   $links = array();
   $my_revision = $node->workbench_moderation['my_revision'];
   if ($my_revision->vid == $node->workbench_moderation['current']->vid
-      && $next_states = workbench_moderation_states_next($my_revision->state, $user, $node->type)) {
+      && $next_states = workbench_moderation_states_next($my_revision->state, NULL, $node->type)) {
     foreach ($next_states as $state => $label) {
-      $links[] = array_merge($url_options, array(
-        'title' => $state,
+      $link = array_merge($url_options, array(
+        'title' => workbench_moderation_state_label($state),
         'href' => "node/{$node->nid}/moderation/{$node->vid}/change-state/{$state}",
       ));
+      $link['query']['token'] = drupal_get_token("{$node->nid}:{$node->vid}:{$state}");
+      $links[] = $link;
     }
   }
 
@@ -1544,7 +1595,7 @@ function workbench_moderation_moderate_form($form, &$form_state, $node, $destina
     $form['state'] = array(
       '#type' => 'select',
       '#options' => $next_states,
-      '#default_value' => $node->workbench_moderation['current']->state,
+      '#default_value' => _workbench_moderation_default_next_state($my_revision->state, $next_states),
     );
     $form['submit'] = array(
       '#type' => 'submit',
@@ -1563,6 +1614,15 @@ function workbench_moderation_moderate_form($form, &$form_state, $node, $destina
   return $form;
 }
 
+function _workbench_moderation_default_next_state($current_state, $next_states) {
+  $states = workbench_moderation_states();
+  foreach ($states as $state_name => $state) {
+    if ($state->weight > $states[$current_state]->weight && isset($next_states[$state_name])) {
+      return $state_name;
+    }
+  }
+}
+
 function workbench_moderation_moderate_form_validate($form, &$form_state) {
   // Make sure that the revision that was shown to the user is still the current
   // revision before changing the current revision's state.
@@ -1586,7 +1646,9 @@ function workbench_moderation_moderate_form_submit($form, $form_state) {
   // able to redirect to the published revision.
   if (!empty($form['#destination'])) {
     if ($form_state['values']['state'] == workbench_moderation_state_published()) {
-      $form_state['redirect'] = $form['node']['#value']->uri['path'];
+      if ($uri = entity_uri('node', $form['node']['#value'])) {
+        $form_state['redirect'] = array($uri['path'], $uri['options']);
+      }
     }
     else {
       $form_state['redirect'] = $form['#destination'];
@@ -1610,6 +1672,7 @@ function workbench_moderation_moderate_form_submit($form, $form_state) {
  *   this variable was not set.
  */
 function workbench_moderation_messages($context, $node = NULL) {
+  global $user;
   if (!user_access('view moderation messages')
       || (!$node && !($node = menu_get_object()))
       || !workbench_moderation_node_type_moderated($node->type)) {
@@ -1640,7 +1703,7 @@ function workbench_moderation_messages($context, $node = NULL) {
   if ($context == 'view') {
     $info_block_messages[] = array(
       'label' => t('Revision state'),
-      'message' => check_plain($state['my_revision']->state),
+      'message' => check_plain(workbench_moderation_state_label($state['my_revision']->state)),
     );
     $info_block_messages[] = array(
       'label' => t('Current draft'),
@@ -1661,7 +1724,8 @@ function workbench_moderation_messages($context, $node = NULL) {
     }
 
     // Add an unpublish link.
-    if ($revision_published && user_access('unpublish live revision') && $link = workbench_moderation_access_link(t('Unpublish this revision'), "node/{$node->nid}/moderation/{$node->vid}/unpublish")) {
+    $next_states = workbench_moderation_states_next(workbench_moderation_state_published(), $user, $node->type);
+    if ($revision_published && !empty($next_states) && $link = workbench_moderation_access_link(t('Unpublish this revision'), "node/{$node->nid}/moderation/{$node->vid}/unpublish")) {
       $info_block_messages[] = array(
         'label' => t('Actions'),
         'message' => $link,
@@ -1797,75 +1861,22 @@ function workbench_moderation_workbench_block() {
   return $output;
 }
 
-
-/** UNL CHANGE/ADDITION - SEE workbench_moderation/README-UNL.txt **/
-
 /**
- * Implements hook_trigger_info().
- *
- * Creates a trigger for each transition.
+ * Implements hook_ctools_plugin_directory() to let the system know
+ * where our task and task_handler plugins are.
  */
-function workbench_moderation_trigger_info() {
-  $output = array(
-    'workbench_moderation' => array(
-      'workbench_moderation_transition' => array(
-        'label' => t('After any transition between states occurs.'),
-      ),
-     ),
-  );
-
-  // Get all transitions.
-  $transitions = workbench_moderation_transitions();
-
-  // Add a trigger for each trasnistion.
-  foreach ($transitions as $transition_definition) {
-    $transition_string = 'wmt_' . $transition_definition->from_name . '__' . $transition_definition->to_name;
-    // Hash this string if it's longer than the db field size
-    if (strlen($transition_string) > 32) {
-      $transition_string = md5($transition_string);
-    }
-
-    $output['workbench_moderation'][$transition_string] = array(
-      'label' => t('Transition from the state %from_name to %to_name occurs.', array('%from_name' => $transition_definition->from_name, '%to_name' => $transition_definition->to_name)),
-    );
+function workbench_moderation_ctools_plugin_directory($owner, $plugin_type) {
+  if ($owner == 'page_manager') {
+    return 'plugins/page_manager/' . $plugin_type;
   }
-
-  return $output;
 }
 
 /**
- * transition trigger: Run actions associated with an arbitrary event.
- *
- * This function is executed after a transition takes place.
- *
- * @param $node
- *   The node undergoing the transition.
- * @param $from_state
- *   The previous workbench moderation state.
- * @param $state
- *   The new workbench moderation state.
+ * Implements hook_ctools_plugin_api().
  */
-function workbench_moderation_trigger_transition($node, $from_state, $state, $a3 = NULL, $a4 = NULL) {
-  // Ask the trigger module for all actions enqueued for the 'transition' trigger.
-  $aids = trigger_get_assigned_actions('workbench_moderation_transition');
-  // prepare a basic context, indicating group and "hook", and call all the
-  // actions with this context as arguments.
-  $context = array(
-    'group' => 'workbench_moderation',
-    'hook' => 'transition',
-    'from_state' => $from_state,
-    'state' => $state,
-  );
-  actions_do(array_keys($aids), $node, $context, $a3, $a4);
+function workbench_moderation_ctools_plugin_api($module, $api) {
 
-  // Ask the trigger module for all actions enqueued for this specific transition.
-  $transition_string = 'wmt_' . $from_state . '__' . $state;
-  // Hash this string if it's longer than the db field size
-  if (strlen($transition_string) > 32) {
-    $transition_string = md5($transition_string);
+  if ($module == 'page_manager' && $api == 'pages_default') {
+    return array('version' => 1);
   }
-  $aids = trigger_get_assigned_actions($transition_string);
-  $context['hook'] = $transition_string;
-
-  actions_do(array_keys($aids), $node, $context, $a3, $a4);
 }
diff --git a/sites/all/modules/workbench_moderation/workbench_moderation.node.inc b/sites/all/modules/workbench_moderation/workbench_moderation.node.inc
index 3883e018..3ca0d27c 100644
--- a/sites/all/modules/workbench_moderation/workbench_moderation.node.inc
+++ b/sites/all/modules/workbench_moderation/workbench_moderation.node.inc
@@ -20,6 +20,26 @@ function workbench_moderation_node_current_view($node) {
   drupal_goto('node/' . $node->nid);
 }
 
+/**
+ * Get the menu router item for nodes.
+ *
+ * @param $node
+ *   The node being acted upon.
+ * @return
+ *   A fully themed node page.
+ */
+function workbench_moderation_router_item_page_callback($node) {
+  $router_item = menu_get_item('node/' . $node->nid);
+  if ($router_item['include_file']) {
+    require_once DRUPAL_ROOT . '/' . $router_item['include_file'];
+  }
+
+  // Call whatever function is assigned to the main node path but pass the
+  // current node as an argument. This approach allows for the reuse of of Panel
+  // definition acting on node/%node.
+  return $router_item['page_callback']($node);
+
+}
 /**
  * Displays the current draft the node, if it is not published.
  *
@@ -31,7 +51,20 @@ function workbench_moderation_node_current_view($node) {
  */
 function workbench_moderation_node_view_draft($node) {
   $current_node = workbench_moderation_node_current_load($node);
-  return node_page_view($current_node);
+  return workbench_moderation_router_item_page_callback($current_node);
+}
+
+/**
+ * Displays a specific revisison of the node.
+ *
+ * @param $node
+ *   The node being acted upon.
+ *
+ * @return
+ *   A fully themed node page.
+ */
+function workbench_moderation_node_view_revision($node) {
+  return workbench_moderation_router_item_page_callback($node);
 }
 
 /**
@@ -97,7 +130,7 @@ function workbench_moderation_node_history_view($node) {
     $row['data']['info'] .= '<div class="revision-title">' . check_plain($revision->title) . '</div>';
     $row['data']['info'] .= '<div class="revision-log description">' . filter_xss($revision->log) . '</div>';
     $row['data']['info'] .= '<div class="revision-user description">' . t('Revised by !user', array('!user' => theme('username', array('account' => $revision)))) . '</div>';
-    $row['data']['date'] = l(format_date($revision->timestamp, 'short'), "node/{$node->nid}/moderation/{$revision->vid}/view");
+    $row['data']['date'] = format_date($revision->timestamp, 'short');
 
     // Revision operations.
     $revision_operations = array();
@@ -139,13 +172,14 @@ function workbench_moderation_node_history_view($node) {
     if (!empty($node->workbench_moderation['published']) && $revision->vid == $node->workbench_moderation['published']->vid) {
       $row['data']['moderation'] = '<div class="moderation-state"><strong>' . t('This is the published revision.') . '</strong></div>';
       // Provide an unpublish link.
-      if (user_access('unpublish live revision')) {
+      $next_states = workbench_moderation_states_next(workbench_moderation_state_published(), $user, $node->type);
+      if (!empty($next_states)) {
         $row['data']['moderation'] .= '<div class="moderation-actions">' . l(t('Unpublish'), "node/{$revision->nid}/moderation/{$revision->live_revision}/unpublish") . '</div>';
       }
     }
     elseif ($revision->vid == $node->workbench_moderation['current']->vid) {
       $node_current = workbench_moderation_node_current_load($node);
-      $row['data']['moderation'] = '<div class="moderation-state"><strong>' . t('This is the current revision. The current state is %state.', array('%state' => $node->workbench_moderation['current']->state)) . '</strong></div>';
+      $row['data']['moderation'] = '<div class="moderation-state"><strong>' . t('This is the current revision. The current state is %state.', array('%state' => workbench_moderation_state_label($node->workbench_moderation['current']->state))) . '</strong></div>';
       $moderate_form = drupal_get_form('workbench_moderation_moderate_form', $node_current);
       $row['data']['moderation'] .= '<div class="moderation-actions">' . t('Moderate') . ': ' . drupal_render($moderate_form) . '</div>';
     }
@@ -157,8 +191,8 @@ function workbench_moderation_node_history_view($node) {
       if ($moderation->from_state) {
         $items[] = t('From @from_state --> @to_state on %date by !user',
           array(
-            '@from_state' => $moderation->from_state,
-            '@to_state' => $moderation->state,
+            '@from_state' => workbench_moderation_state_label($moderation->from_state),
+            '@to_state' => workbench_moderation_state_label($moderation->state),
             '%date' => format_date($moderation->stamp, 'short'),
             '!user' => theme('username', array('account' => $moderation)),
           )
@@ -167,8 +201,8 @@ function workbench_moderation_node_history_view($node) {
       else {
         $items[] = t('Created as @to_state on %date by !user',
           array(
-            '@from_state' => $moderation->from_state,
-            '@to_state' => $moderation->state,
+            '@from_state' => workbench_moderation_state_label($moderation->from_state),
+            '@to_state' => workbench_moderation_state_label($moderation->state),
             '%date' => format_date($moderation->stamp, 'short'),
             '!user' => theme('username', array('account' => $moderation)),
           )
@@ -190,7 +224,9 @@ function workbench_moderation_node_history_view($node) {
         drupal_get_path('module', 'workbench_moderation') . '/css/workbench_moderation.css',
       ),
     ),
-    '#markup' => theme('table', array('header' => $header, 'rows' => $rows)),
+    '#theme' => 'table',
+    '#header' => $header,
+    '#rows' => $rows,
   );
 }
 
@@ -204,6 +240,8 @@ function workbench_moderation_node_history_view($node) {
  *   A Drupal confirmation form to unpublish the live revision.
  */
 function workbench_moderation_node_unpublish_form($form, &$form_state, $node) {
+  global $user;
+
   // Ensure that this is the live revision.
   if (isset($node->workbench_moderation['published']->vid) && $node->vid != $node->workbench_moderation['published']->vid) {
     drupal_set_message(t('This is not the live revision of this node.'), 'error');
@@ -216,9 +254,27 @@ function workbench_moderation_node_unpublish_form($form, &$form_state, $node) {
     '#type' => 'value',
   );
   $form['message'] = array(
-    '#markup' =>  '<p>' . t('Are you sure that you want to unpublish the live revision of this content? The current live revision will be set to moderation state %state.', array('%state' => workbench_moderation_state_none())) . '</p>',
+    '#markup' =>  '<p>' . t('Are you sure that you want to unpublish the live revision of this content?') . '</p>',
   );
-  return confirm_form($form, t('Unpublish %title?', array('%title' => $node->title)), "node/{$node->nid}/moderation");
+
+  $current_state = $node->workbench_moderation['my_revision']->state;
+  if ($next_states = workbench_moderation_states_next($current_state, $user, $node->type)) {
+    $form['state'] = array(
+      '#title' => t('Set moderation state:'),
+      '#type' => 'select',
+      '#options' => $next_states,
+      '#default_value' => _workbench_moderation_default_next_state($current_state, $next_states),
+    );
+  }
+  else {
+    $form['message']['#markup'] .= '<p>' . t('The current live revision will be set to moderation state %state.', array('%state' => workbench_moderation_state_label(workbench_moderation_state_none()))) . '</p>';
+    $form['state'] = array(
+      '#type' => 'value',
+      '#value' => workbench_moderation_state_none(),
+    );
+  }
+
+  return confirm_form($form, t('Unpublish %title?', array('%title' => $node->title)), "node/{$node->nid}/moderation", '', t('Unpublish'));
 }
 
 /**
@@ -235,7 +291,7 @@ function workbench_moderation_node_unpublish_form_submit($form, &$form_state) {
     ->execute();
 
   // Moderate the revision.
-  workbench_moderation_moderate($node, workbench_moderation_state_none());
+  workbench_moderation_moderate($node, $form_state['values']['state']);
 
   // Make sure the 'current' revision is the 'live' revision -- ie, the revision
   // in {node}.
diff --git a/sites/all/modules/workbench_moderation/workbench_moderation.views.inc b/sites/all/modules/workbench_moderation/workbench_moderation.views.inc
index 8aa64553..95126988 100644
--- a/sites/all/modules/workbench_moderation/workbench_moderation.views.inc
+++ b/sites/all/modules/workbench_moderation/workbench_moderation.views.inc
@@ -50,7 +50,7 @@ function workbench_moderation_views_data() {
       'handler' => 'workbench_moderation_handler_filter_state',
     ),
     'field' => array(
-      'handler' => 'views_handler_field',
+      'handler' => 'workbench_moderation_handler_field_state',
       'click sortable' => TRUE,
     ),
     'sort' => array(
@@ -58,6 +58,8 @@ function workbench_moderation_views_data() {
     ),
     'argument' => array(
       'handler' => 'views_handler_argument_string',
+      'name table' => 'workbench_moderation_states',
+      'name field' => 'label',
     ),
   );
   $data['workbench_moderation_node_history']['from_state'] = array(
@@ -75,6 +77,8 @@ function workbench_moderation_views_data() {
     ),
     'argument' => array(
       'handler' => 'views_handler_argument_string',
+      'name table' => 'workbench_moderation_states',
+      'name field' => 'label',
     ),
   );
   $data['workbench_moderation_node_history']['uid'] = array(
@@ -150,7 +154,38 @@ function workbench_moderation_views_data() {
     ),
   );
 
-  // Declare a virtual field on the {node} table.
+  $data['workbench_moderation_states']['table']['group'] = t('Workbench Moderation');
+  $data['workbench_moderation_states']['table']['join'] = array(
+    // Add a join for labeling the 'state' and 'from_state' arguments on workbench_moderation_node_history.
+    'workbench_moderation_node_history' => array(
+      'left_field' => 'state',
+      'field' => 'name',
+    ),
+    'node' => array(
+      'left_table' => 'workbench_moderation_node_history',
+      'left_field' => 'state',
+      'field' => 'name',
+    ),
+    'node_revision' => array(
+      'left_table' => 'workbench_moderation_node_history',
+      'left_field' => 'state',
+      'field' => 'name',
+    ),
+  );
+  $data['workbench_moderation_states']['description'] = array(
+    'title' => t('Moderation state description'),
+    'field' => array(
+      'handler' => 'views_handler_field',
+    ),
+  );
+  $data['workbench_moderation_states']['weight'] = array(
+    'title' => t('Moderation state order'),
+    'sort' => array(
+      'handler' => 'views_handler_sort',
+    ),
+  );
+
+  // Declare virtual fields on the {node} table.
   $data['node']['workbench_moderation_moderated_type'] = array(
     'group' => t('Workbench Moderation'),
     'title' => t('Type is moderated'),
@@ -162,6 +197,17 @@ function workbench_moderation_views_data() {
       'type' => 'yes-no',
     ),
   );
+  $data['node']['workbench_moderation_history_link'] = array(
+    'group' => t('Workbench Moderation'),
+    'title' => t('Moderation History'),
+    'help' => t('A link to the Moderation History page of the node'),
+    'real field' => 'nid',
+    'field' => array(
+      'title' => t('Moderation History Link'),
+      'handler' => 'workbench_moderation_handler_field_history_link',
+      'click sortable' => FALSE,
+    ),
+  );
 
   return $data;
 }
-- 
GitLab