From 590b32df3cd22dc0d2662d924c9d13664decdbdc Mon Sep 17 00:00:00 2001 From: Brandon Kesselly Date: Tue, 16 Aug 2016 20:06:36 +0000 Subject: [PATCH 1/4] Downloaded devel module --- sites/all/modules/contrib/devel/LICENSE.txt | 339 + sites/all/modules/contrib/devel/README.txt | 59 + .../devel/README_devel_node_access.txt | 42 + sites/all/modules/contrib/devel/devel-rtl.css | 8 + .../all/modules/contrib/devel/devel.admin.inc | 176 + sites/all/modules/contrib/devel/devel.css | 138 + .../all/modules/contrib/devel/devel.drush.inc | 207 + sites/all/modules/contrib/devel/devel.info | 15 + sites/all/modules/contrib/devel/devel.install | 135 + sites/all/modules/contrib/devel/devel.js | 45 + .../all/modules/contrib/devel/devel.mail.inc | 82 + sites/all/modules/contrib/devel/devel.module | 2154 +++++ .../all/modules/contrib/devel/devel.pages.inc | 298 + .../all/modules/contrib/devel/devel.rules.inc | 24 + sites/all/modules/contrib/devel/devel.test | 53 + .../modules/contrib/devel/develDrushTest.php | 25 + .../devel_generate/devel_generate.drush.inc | 238 + .../devel_generate/devel_generate.fields.inc | 98 + .../devel/devel_generate/devel_generate.inc | 722 ++ .../devel/devel_generate/devel_generate.info | 14 + .../devel_generate/devel_generate.module | 522 ++ .../devel/devel_generate/devel_generate.test | 108 + .../devel_generate/devel_generate_batch.inc | 68 + .../devel_generate/file.devel_generate.inc | 58 + .../devel_generate/image.devel_generate.inc | 94 + .../devel_generate/list.devel_generate.inc | 20 + .../devel_generate/number.devel_generate.inc | 45 + .../taxonomy.devel_generate.inc | 36 + .../devel_generate/text.devel_generate.inc | 35 + .../modules/contrib/devel/devel_krumo_path.js | 66 + .../contrib/devel/devel_node_access.api.php | 78 + .../contrib/devel/devel_node_access.info | 14 + .../contrib/devel/devel_node_access.install | 13 + .../contrib/devel/devel_node_access.js | 64 + .../contrib/devel/devel_node_access.module | 1393 ++++ .../devel/jquery-1.4.4-uncompressed.js | 7179 +++++++++++++++++ sites/all/modules/contrib/devel/krumo/INSTALL | 32 + sites/all/modules/contrib/devel/krumo/LICENSE | 504 ++ sites/all/modules/contrib/devel/krumo/README | 103 + sites/all/modules/contrib/devel/krumo/TODO | 24 + sites/all/modules/contrib/devel/krumo/VERSION | 1 + .../contrib/devel/krumo/class.krumo.php | 1317 +++ .../krumo/docs/Krumo/_class.krumo.php.html | 267 + .../contrib/devel/krumo/docs/Krumo/krumo.html | 900 +++ .../contrib/devel/krumo/docs/blank.html | 13 + .../devel/krumo/docs/classtrees_Krumo.html | 23 + .../devel/krumo/docs/elementindex.html | 392 + .../devel/krumo/docs/elementindex_Krumo.html | 389 + .../contrib/devel/krumo/docs/errors.html | 15 + .../contrib/devel/krumo/docs/index.html | 24 + .../contrib/devel/krumo/docs/li_Krumo.html | 155 + .../contrib/devel/krumo/docs/media/banner.css | 32 + .../krumo/docs/media/images/AbstractClass.png | Bin 0 -> 620 bytes .../docs/media/images/AbstractClass_logo.png | Bin 0 -> 1232 bytes .../docs/media/images/AbstractMethod.png | Bin 0 -> 696 bytes .../media/images/AbstractPrivateClass.png | Bin 0 -> 848 bytes .../images/AbstractPrivateClass_logo.png | Bin 0 -> 1615 bytes .../media/images/AbstractPrivateMethod.png | Bin 0 -> 874 bytes .../devel/krumo/docs/media/images/Class.png | Bin 0 -> 570 bytes .../krumo/docs/media/images/Class_logo.png | Bin 0 -> 1600 bytes .../krumo/docs/media/images/Constant.png | Bin 0 -> 752 bytes .../krumo/docs/media/images/Constructor.png | Bin 0 -> 865 bytes .../krumo/docs/media/images/Destructor.png | Bin 0 -> 956 bytes .../krumo/docs/media/images/Function.png | Bin 0 -> 596 bytes .../devel/krumo/docs/media/images/Global.png | Bin 0 -> 712 bytes .../devel/krumo/docs/media/images/I.png | Bin 0 -> 148 bytes .../devel/krumo/docs/media/images/Index.png | Bin 0 -> 584 bytes .../krumo/docs/media/images/Interface.PNG | Bin 0 -> 1083 bytes .../docs/media/images/Interface_logo.png | Bin 0 -> 1600 bytes .../devel/krumo/docs/media/images/L.png | Bin 0 -> 153 bytes .../devel/krumo/docs/media/images/Lminus.png | Bin 0 -> 219 bytes .../devel/krumo/docs/media/images/Lplus.png | Bin 0 -> 224 bytes .../devel/krumo/docs/media/images/Method.png | Bin 0 -> 661 bytes .../devel/krumo/docs/media/images/Page.png | Bin 0 -> 592 bytes .../krumo/docs/media/images/Page_logo.png | Bin 0 -> 1369 bytes .../krumo/docs/media/images/PrivateClass.png | Bin 0 -> 790 bytes .../docs/media/images/PrivateClass_logo.png | Bin 0 -> 1836 bytes .../krumo/docs/media/images/PrivateMethod.png | Bin 0 -> 918 bytes .../docs/media/images/PrivateVariable.png | Bin 0 -> 772 bytes .../krumo/docs/media/images/StaticMethod.png | Bin 0 -> 661 bytes .../docs/media/images/StaticVariable.png | Bin 0 -> 688 bytes .../devel/krumo/docs/media/images/T.png | Bin 0 -> 152 bytes .../devel/krumo/docs/media/images/Tminus.png | Bin 0 -> 207 bytes .../devel/krumo/docs/media/images/Tplus.png | Bin 0 -> 222 bytes .../krumo/docs/media/images/Variable.png | Bin 0 -> 688 bytes .../devel/krumo/docs/media/images/blank.png | Bin 0 -> 144 bytes .../krumo/docs/media/images/class_folder.png | Bin 0 -> 633 bytes .../devel/krumo/docs/media/images/empty.png | Bin 0 -> 90 bytes .../devel/krumo/docs/media/images/file.png | Bin 0 -> 462 bytes .../devel/krumo/docs/media/images/folder.png | Bin 0 -> 492 bytes .../docs/media/images/function_folder.png | Bin 0 -> 605 bytes .../devel/krumo/docs/media/images/minus.gif | Bin 0 -> 54 bytes .../krumo/docs/media/images/next_button.png | Bin 0 -> 657 bytes .../media/images/next_button_disabled.png | Bin 0 -> 543 bytes .../devel/krumo/docs/media/images/package.png | Bin 0 -> 668 bytes .../docs/media/images/package_folder.png | Bin 0 -> 564 bytes .../devel/krumo/docs/media/images/plus.gif | Bin 0 -> 56 bytes .../docs/media/images/previous_button.png | Bin 0 -> 644 bytes .../media/images/previous_button_disabled.png | Bin 0 -> 541 bytes .../docs/media/images/private_class_logo.png | Bin 0 -> 1836 bytes .../krumo/docs/media/images/tutorial.png | Bin 0 -> 431 bytes .../docs/media/images/tutorial_folder.png | Bin 0 -> 572 bytes .../krumo/docs/media/images/up_button.png | Bin 0 -> 668 bytes .../devel/krumo/docs/media/lib/classTree.js | 454 ++ .../devel/krumo/docs/media/stylesheet.css | 181 + .../contrib/devel/krumo/docs/packages.html | 40 + .../contrib/devel/krumo/docs/ric_INSTALL.html | 49 + .../contrib/devel/krumo/docs/ric_LICENSE.html | 522 ++ .../contrib/devel/krumo/docs/ric_README.html | 121 + .../contrib/devel/krumo/docs/ric_TODO.html | 41 + .../contrib/devel/krumo/docs/ric_VERSION.html | 18 + .../all/modules/contrib/devel/krumo/krumo.ini | 20 + .../all/modules/contrib/devel/krumo/krumo.js | 97 + .../contrib/devel/krumo/skins/blue/bg.gif | Bin 0 -> 141 bytes .../contrib/devel/krumo/skins/blue/skin.css | 158 + .../contrib/devel/krumo/skins/default/bg.gif | Bin 0 -> 141 bytes .../devel/krumo/skins/default/skin.css | 158 + .../contrib/devel/krumo/skins/green/bg.gif | Bin 0 -> 141 bytes .../contrib/devel/krumo/skins/green/skin.css | 158 + .../contrib/devel/krumo/skins/orange/bg.gif | Bin 0 -> 141 bytes .../contrib/devel/krumo/skins/orange/skin.css | 158 + .../devel/krumo/skins/white/collapsed.gif | Bin 0 -> 102 bytes .../devel/krumo/skins/white/dotted.gif | Bin 0 -> 91 bytes .../contrib/devel/krumo/skins/white/empty.gif | Bin 0 -> 101 bytes .../devel/krumo/skins/white/expanded.gif | Bin 0 -> 99 bytes .../contrib/devel/krumo/skins/white/skin.css | 165 + sites/all/modules/contrib/devel/runtests.sh | 22 + 127 files changed, 21218 insertions(+) create mode 100644 sites/all/modules/contrib/devel/LICENSE.txt create mode 100644 sites/all/modules/contrib/devel/README.txt create mode 100644 sites/all/modules/contrib/devel/README_devel_node_access.txt create mode 100644 sites/all/modules/contrib/devel/devel-rtl.css create mode 100644 sites/all/modules/contrib/devel/devel.admin.inc create mode 100644 sites/all/modules/contrib/devel/devel.css create mode 100644 sites/all/modules/contrib/devel/devel.drush.inc create mode 100644 sites/all/modules/contrib/devel/devel.info create mode 100644 sites/all/modules/contrib/devel/devel.install create mode 100644 sites/all/modules/contrib/devel/devel.js create mode 100644 sites/all/modules/contrib/devel/devel.mail.inc create mode 100644 sites/all/modules/contrib/devel/devel.module create mode 100644 sites/all/modules/contrib/devel/devel.pages.inc create mode 100644 sites/all/modules/contrib/devel/devel.rules.inc create mode 100644 sites/all/modules/contrib/devel/devel.test create mode 100644 sites/all/modules/contrib/devel/develDrushTest.php create mode 100644 sites/all/modules/contrib/devel/devel_generate/devel_generate.drush.inc create mode 100644 sites/all/modules/contrib/devel/devel_generate/devel_generate.fields.inc create mode 100644 sites/all/modules/contrib/devel/devel_generate/devel_generate.inc create mode 100644 sites/all/modules/contrib/devel/devel_generate/devel_generate.info create mode 100644 sites/all/modules/contrib/devel/devel_generate/devel_generate.module create mode 100644 sites/all/modules/contrib/devel/devel_generate/devel_generate.test create mode 100644 sites/all/modules/contrib/devel/devel_generate/devel_generate_batch.inc create mode 100644 sites/all/modules/contrib/devel/devel_generate/file.devel_generate.inc create mode 100644 sites/all/modules/contrib/devel/devel_generate/image.devel_generate.inc create mode 100644 sites/all/modules/contrib/devel/devel_generate/list.devel_generate.inc create mode 100644 sites/all/modules/contrib/devel/devel_generate/number.devel_generate.inc create mode 100644 sites/all/modules/contrib/devel/devel_generate/taxonomy.devel_generate.inc create mode 100644 sites/all/modules/contrib/devel/devel_generate/text.devel_generate.inc create mode 100644 sites/all/modules/contrib/devel/devel_krumo_path.js create mode 100644 sites/all/modules/contrib/devel/devel_node_access.api.php create mode 100644 sites/all/modules/contrib/devel/devel_node_access.info create mode 100644 sites/all/modules/contrib/devel/devel_node_access.install create mode 100644 sites/all/modules/contrib/devel/devel_node_access.js create mode 100644 sites/all/modules/contrib/devel/devel_node_access.module create mode 100644 sites/all/modules/contrib/devel/jquery-1.4.4-uncompressed.js create mode 100644 sites/all/modules/contrib/devel/krumo/INSTALL create mode 100644 sites/all/modules/contrib/devel/krumo/LICENSE create mode 100644 sites/all/modules/contrib/devel/krumo/README create mode 100644 sites/all/modules/contrib/devel/krumo/TODO create mode 100644 sites/all/modules/contrib/devel/krumo/VERSION create mode 100644 sites/all/modules/contrib/devel/krumo/class.krumo.php create mode 100644 sites/all/modules/contrib/devel/krumo/docs/Krumo/_class.krumo.php.html create mode 100644 sites/all/modules/contrib/devel/krumo/docs/Krumo/krumo.html create mode 100644 sites/all/modules/contrib/devel/krumo/docs/blank.html create mode 100644 sites/all/modules/contrib/devel/krumo/docs/classtrees_Krumo.html create mode 100644 sites/all/modules/contrib/devel/krumo/docs/elementindex.html create mode 100644 sites/all/modules/contrib/devel/krumo/docs/elementindex_Krumo.html create mode 100644 sites/all/modules/contrib/devel/krumo/docs/errors.html create mode 100644 sites/all/modules/contrib/devel/krumo/docs/index.html create mode 100644 sites/all/modules/contrib/devel/krumo/docs/li_Krumo.html create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/banner.css create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/AbstractClass.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/AbstractClass_logo.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/AbstractMethod.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/AbstractPrivateClass.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/AbstractPrivateClass_logo.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/AbstractPrivateMethod.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/Class.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/Class_logo.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/Constant.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/Constructor.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/Destructor.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/Function.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/Global.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/I.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/Index.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/Interface.PNG create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/Interface_logo.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/L.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/Lminus.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/Lplus.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/Method.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/Page.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/Page_logo.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/PrivateClass.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/PrivateClass_logo.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/PrivateMethod.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/PrivateVariable.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/StaticMethod.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/StaticVariable.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/T.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/Tminus.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/Tplus.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/Variable.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/blank.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/class_folder.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/empty.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/file.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/folder.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/function_folder.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/minus.gif create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/next_button.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/next_button_disabled.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/package.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/package_folder.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/plus.gif create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/previous_button.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/previous_button_disabled.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/private_class_logo.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/tutorial.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/tutorial_folder.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/images/up_button.png create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/lib/classTree.js create mode 100644 sites/all/modules/contrib/devel/krumo/docs/media/stylesheet.css create mode 100644 sites/all/modules/contrib/devel/krumo/docs/packages.html create mode 100644 sites/all/modules/contrib/devel/krumo/docs/ric_INSTALL.html create mode 100644 sites/all/modules/contrib/devel/krumo/docs/ric_LICENSE.html create mode 100644 sites/all/modules/contrib/devel/krumo/docs/ric_README.html create mode 100644 sites/all/modules/contrib/devel/krumo/docs/ric_TODO.html create mode 100644 sites/all/modules/contrib/devel/krumo/docs/ric_VERSION.html create mode 100644 sites/all/modules/contrib/devel/krumo/krumo.ini create mode 100644 sites/all/modules/contrib/devel/krumo/krumo.js create mode 100644 sites/all/modules/contrib/devel/krumo/skins/blue/bg.gif create mode 100644 sites/all/modules/contrib/devel/krumo/skins/blue/skin.css create mode 100644 sites/all/modules/contrib/devel/krumo/skins/default/bg.gif create mode 100644 sites/all/modules/contrib/devel/krumo/skins/default/skin.css create mode 100644 sites/all/modules/contrib/devel/krumo/skins/green/bg.gif create mode 100644 sites/all/modules/contrib/devel/krumo/skins/green/skin.css create mode 100644 sites/all/modules/contrib/devel/krumo/skins/orange/bg.gif create mode 100644 sites/all/modules/contrib/devel/krumo/skins/orange/skin.css create mode 100644 sites/all/modules/contrib/devel/krumo/skins/white/collapsed.gif create mode 100644 sites/all/modules/contrib/devel/krumo/skins/white/dotted.gif create mode 100644 sites/all/modules/contrib/devel/krumo/skins/white/empty.gif create mode 100644 sites/all/modules/contrib/devel/krumo/skins/white/expanded.gif create mode 100644 sites/all/modules/contrib/devel/krumo/skins/white/skin.css create mode 100644 sites/all/modules/contrib/devel/runtests.sh diff --git a/sites/all/modules/contrib/devel/LICENSE.txt b/sites/all/modules/contrib/devel/LICENSE.txt new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/sites/all/modules/contrib/devel/LICENSE.txt @@ -0,0 +1,339 @@ + 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.) + +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 +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 + + 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. + + + Copyright (C) + + 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. + + , 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/contrib/devel/README.txt b/sites/all/modules/contrib/devel/README.txt new file mode 100644 index 0000000..194fcbf --- /dev/null +++ b/sites/all/modules/contrib/devel/README.txt @@ -0,0 +1,59 @@ +README.txt +========== + +A module containing helper functions for Drupal developers and +inquisitive admins. This module can print a log of +all database queries for each page request at the bottom of each page. The +summary includes how many times each query was executed on a page, and how long +each query took. + + It also offers + - a block for running custom PHP on a page + - a block for quickly accessing devel pages + - a block for masquerading as other users (useful for testing) + - reports memory usage at bottom of page + - A mail-system class which redirects outbound email to files + - more + + This module is safe to use on a production site. Just be sure to only grant + 'access development information' permission to developers. + +Also a dpr() function is provided, which pretty prints arrays and strings. +Useful during development. Many other nice functions like dpm(), dvm(). + +AJAX developers in particular ought to install FirePHP Core from +http://www.firephp.org/ and put it in the devel directory. You may +use the devel-download drush command to download the library. If downloading by hand, +your path to fb.php should look like devel/FirePHPCore/lib/FirePHPCore/fb.php. +You can use svn checkout http://firephp.googlecode.com/svn/trunk/trunk/Libraries/FirePHPCore. +Then you can log php variables to the Firebug console. Is quite useful. + +Included in this package is also: + +- devel_node_access module which prints out the node_access records for a given node. Also offers hook_node_access_explain for all node access modules to implement. Handy. +- devel_generate.module which bulk creates nodes, users, comment, terms for development. + +Some nifty drush integration ships with devel and devel_generate. See drush help for details. + +DEVEL GENERATE EXTENSIONS +========================= +Devel Images Provider [http://drupal.org/project/devel_image_provider] allows to configure external providers for images. + +COMPATIBILITY NOTES +================== +- Modules that use AHAH may have incompatibility with the query log and other + footer info. Consider setting $GLOBALS['devel_shutdown'] = FALSE if you run into + any issues. + +DRUSH UNIT TEST +================== +See develDrushTest.php for an example of unit testing of the Drush integration. +This uses Drush's own test framework, based on PHPUnit. To run the tests, use +phpunit --bootstrap=/path/to/drush/tests/drush_testcase.inc. Note that we must name a file +under /tests there. + +AUTHOR/MAINTAINER +====================== +-moshe weitzman +http://cyrve.com +Hans Salvisberg diff --git a/sites/all/modules/contrib/devel/README_devel_node_access.txt b/sites/all/modules/contrib/devel/README_devel_node_access.txt new file mode 100644 index 0000000..1d9362f --- /dev/null +++ b/sites/all/modules/contrib/devel/README_devel_node_access.txt @@ -0,0 +1,42 @@ +README +====== + +This module contains tools for developers using access control modules +to restrict access to some nodes. It is intended to help catch some +common mistakes and provide feedback to confirm that restricted nodes +are in fact visible only to the intended users. + +Provides a summary page which queries the node_access table and +reports common mistakes such as the presence of Drupal's default entry +which grants all users read access to all nodes. Also reports the +presence of nodes not represented in node_access table. This may +occur when an access control module is installed after nodes have +already been created. + +Provides a block which shows all node_access entries for the nodes +shown on a given page. This gives developers a quick check to see +that grants are provided as they should be. This block auto-enables +to the footer region. You may move it as desired. + +If Views module is installed, allows browsing of nodes by realm, +including those nodes not in the node_access table (NULL realm). + +WISHLIST +======== + +Things I'd like to see but haven't had time to do: + +* Automatically solve common problems. I.e. delete the "all" realm + entry, and automatically save all nodes not in the node_access table. + +* Nicer feedback indicating whether nodes are visible to the public or + not. I.e. use color coding or icons. + +* Summary does not differentiate between view grants and other types + of grants. I personally use node_access only for view grants so I'm + not sure exactly what else it should show. + +AUTHOR +====== + +Dave Cohen AKA yogadex on drupal.org diff --git a/sites/all/modules/contrib/devel/devel-rtl.css b/sites/all/modules/contrib/devel/devel-rtl.css new file mode 100644 index 0000000..fe784a8 --- /dev/null +++ b/sites/all/modules/contrib/devel/devel-rtl.css @@ -0,0 +1,8 @@ +.dev-query, .dev-timer, .dev-memory-usage { + align: left; + direction: ltr; + padding-top: inherit; +} +.dev-query, .dev-timer, .dev-memory-usage table { + direction: ltr; +} \ No newline at end of file diff --git a/sites/all/modules/contrib/devel/devel.admin.inc b/sites/all/modules/contrib/devel/devel.admin.inc new file mode 100644 index 0000000..6fec2ca --- /dev/null +++ b/sites/all/modules/contrib/devel/devel.admin.inc @@ -0,0 +1,176 @@ + 'fieldset', '#title' => t('Query log')); + + $description = t('Display a log of the database queries needed to generate the current page, and the execution time for each. Also, queries which are repeated during a single page view are summed in the # column, and printed in red since they are candidates for caching.'); + if (!devel_is_compatible_optimizer()) { + $description = t('You must disable or upgrade the php Zend Optimizer extension in order to enable this feature. The minimum required version is 3.2.8. Earlier versions of Zend Optimizer are horribly buggy and segfault your Apache ... ', array('!url' => url('http://drupal.org/node/126098'))) . $description; + } + $form['queries']['devel_query_display'] = array('#type' => 'checkbox', + '#title' => t('Display query log'), + '#default_value' => variable_get('devel_query_display', 0), + '#description' => $description, + '#disabled' => !devel_is_compatible_optimizer(), + ); + $form['queries']['settings'] = array( + '#type' => 'container', + '#states' => array( + // Hide the query log settings when not displaying query log. + 'invisible' => array( + 'input[name="devel_query_display"]' => array('checked' => FALSE), + ), + ), + ); + $form['queries']['settings']['devel_query_sort'] = array('#type' => 'radios', + '#title' => t('Sort query log'), + '#default_value' => variable_get('devel_query_sort', DEVEL_QUERY_SORT_BY_SOURCE), + '#options' => array(t('by source'), t('by duration')), + '#description' => t('The query table can be sorted in the order that the queries were executed or by descending duration.'), + ); + $form['queries']['settings']['devel_execution'] = array('#type' => 'textfield', + '#title' => t('Slow query highlighting'), + '#default_value' => variable_get('devel_execution', 5), + '#size' => 4, + '#maxlength' => 4, + '#description' => t('Enter an integer in milliseconds. Any query which takes longer than this many milliseconds will be highlighted in the query log. This indicates a possibly inefficient query, or a candidate for caching.'), + ); + + $form['xhprof'] = array( + '#type' => 'fieldset', + '#title' => 'XHProf', + '#description' => t('XHProf is a php extension which is essential for profiling your Drupal site. It pinpoints slow functions, and also memory hogging functions.'), + ); + $description = extension_loaded('xhprof') ? t('Profile requests with the xhprof php extension.') : '' . t('You must enable the xhprof php extension to use this feature.', array('!url' => url('http://techportal.ibuildings.com/2009/12/01/profiling-with-xhprof/'))) . ''; + $form['xhprof']['devel_xhprof_enabled'] = array( + '#type' => 'checkbox', + '#title' => t('Enable profiling of all page views and drush requests.', array('!drush' => url('http://drush.ws'))), + '#default_value' => variable_get('devel_xhprof_enabled', FALSE), + '#description' => $description, + '#disabled' => !extension_loaded('xhprof'), + ); + $form['xhprof']['settings'] = array( + '#type' => 'container', + '#states' => array( + 'invisible' => array( + 'input[name="devel_xhprof_enabled"]' => array('checked' => FALSE), + ), + ), + ); + $form['xhprof']['settings']['devel_xhprof_directory'] = array( + '#type' => 'textfield', + '#title' => 'xhprof directory', + '#description' => t('Location of the xhprof source code on your system, where the directory "xhprof_lib" can be found, usually somewhere in /usr/local/share or /usr/share, include the leading forward slash.'), + '#default_value' => variable_get('devel_xhprof_directory', ''), + '#states' => array( + 'invisible' => array( + 'input[name="devel_xhprof_enabled"]' => array('checked' => FALSE), + ), + ), + ); + $form['xhprof']['settings']['devel_xhprof_url'] = array( + '#type' => 'textfield', + '#title' => 'XHProf URL', + '#description' => t('Path to the publically accessible xhprof_html - required to display profiler reports. You will need to set this up outside Drupal, for example at http://xhprof.localhost/xhprof_html'), + '#default_value' => variable_get('devel_xhprof_url', ''), + '#states' => array( + 'invisible' => array( + 'input[name="devel_xhprof_enabled"]' => array('checked' => FALSE), + ), + ), + ); + + $form['devel_api_url'] = array('#type' => 'textfield', + '#title' => t('API Site'), + '#default_value' => variable_get('devel_api_url', 'api.drupal.org'), + '#description' => t('The base URL for your developer documentation links. You might change this if you run api.module locally.', array('!url' => url('http://drupal.org/project/api')))); + $form['dev_timer'] = array('#type' => 'checkbox', + '#title' => t('Display page timer'), + '#default_value' => variable_get('dev_timer', 0), + '#description' => t('Display page execution time in the query log box.'), + ); + + $form['devel_memory'] = array('#type' => 'checkbox', + '#title' => t('Display memory usage'), + '#default_value' => variable_get('devel_memory', 0), + '#description' => t('Display how much memory is used to generate the current page. This will show memory usage when devel_init() is called and when devel_exit() is called.'), + ); + $form['devel_redirect_page'] = array('#type' => 'checkbox', + '#title' => t('Display redirection page'), + '#default_value' => variable_get('devel_redirect_page', 0), + '#description' => t('When a module executes drupal_goto(), the query log and other developer information is lost. Enabling this setting presents an intermediate page to developers so that the log can be examined before continuing to the destination page.'), + ); + $form['devel_page_alter'] = array('#type' => 'checkbox', + '#title' => t('Display $page array'), + '#default_value' => variable_get('devel_page_alter', FALSE), + '#description' => t('Display $page array from hook_page_alter() in the messages area of each page.'), + ); + $form['devel_raw_names'] = array('#type' => 'checkbox', + '#title' => t('Display machine names of permissions and modules'), + '#default_value' => variable_get('devel_raw_names', FALSE), + '#description' => t('Display the language-independent machine names of the permissions in mouse-over hints on the !Permissions page and the module base file names on the @Permissions and !Modules pages.', array('!Permissions' => l(t('Permissions'), 'admin/people/permissions'), '@Permissions' => t('Permissions'), '!Modules' => l(t('Modules'), 'admin/modules'))), + ); + + $error_handlers = devel_get_handlers(); + $form['devel_error_handlers'] = array( + '#type' => 'select', + '#title' => t('Error handlers'), + '#options' => array( + DEVEL_ERROR_HANDLER_NONE => t('None'), + DEVEL_ERROR_HANDLER_STANDARD => t('Standard Drupal'), + DEVEL_ERROR_HANDLER_BACKTRACE_DPM => t('Krumo backtrace in the message area'), + DEVEL_ERROR_HANDLER_BACKTRACE_KRUMO => t('Krumo backtrace above the rendered page'), + ), + '#multiple' => TRUE, + '#default_value' => empty($error_handlers) ? DEVEL_ERROR_HANDLER_NONE : $error_handlers, + '#description' => t('Select the error handler(s) to use, in case you choose to show errors on screen.', array('@choose' => url('admin/config/development/logging'))) . '
    ' . + '
  • ' . t('None is a good option when stepping through the site in your debugger.') . '
  • ' . + '
  • ' . t('Standard Drupal does not display all the information that is often needed to resolve an issue.') . '
  • ' . + '
  • ' . t('Krumo backtrace displays nice debug information when any type of error is noticed, but only to users with the %perm permission.', array('%perm' => t('Access developer information'))) . '
' . + t('Depending on the situation, the theme, the size of the call stack and the arguments, etc., some handlers may not display their messages, or display them on the subsequent page. Select Standard Drupal and Krumo backtrace above the rendered page to maximize your chances of not missing any messages.') . '
' . + t('Demonstrate the current error handler(s):') . ' ' . l('notice+warning', $_GET['q'], array('query' => array('demo' => 'warning'))) . ', ' . l('notice+warning+error', $_GET['q'], array('query' => array('demo' => 'error'))) . ' ' . t('(The presentation of the @error is determined by PHP.)', array('@error' => 'error')), + ); + $form['devel_error_handlers']['#size'] = count($form['devel_error_handlers']['#options']); + if (empty($_POST) && !empty($_GET['demo'])) { + devel_demonstrate_error_handlers($_GET['demo']); + } + + $options = drupal_map_assoc(array('default', 'blue', 'green', 'orange', 'white', 'disabled')); + $form['devel_krumo_skin'] = array( + '#type' => 'radios', + '#title' => t('Krumo display'), + '#description' => t('Select a skin for your debug messages or select disabled to display object and array output in standard PHP format.'), + '#options' => $options, + '#default_value' => variable_get('devel_krumo_skin', 'default'), + ); + + $form['devel_rebuild_theme_registry'] = array( + '#type' => 'checkbox', + '#title' => t('Rebuild the theme registry on every page load'), + '#description' => t('While creating new templates and theme_ overrides the theme registry needs to be rebuilt.'), + '#default_value' => variable_get('devel_rebuild_theme_registry', FALSE), + ); + + $form['devel_use_uncompressed_jquery'] = array( + '#type' => 'checkbox', + '#title' => t('Use uncompressed jQuery'), + '#default_value' => variable_get('devel_use_uncompressed_jquery', FALSE), + '#description' => t("Use a human-readable version of jQuery instead of the minified version that ships with Drupal, to make JavaScript debugging easier."), + ); + + return system_settings_form($form); +} + +function devel_demonstrate_error_handlers($severity) { + switch ($severity) { + case 'warning': + $undefined = $undefined; + 1/0; + break; + case 'error': + $undefined = $undefined; + 1/0; + devel_undefined_function(); + break; + } +} diff --git a/sites/all/modules/contrib/devel/devel.css b/sites/all/modules/contrib/devel/devel.css new file mode 100644 index 0000000..7049059 --- /dev/null +++ b/sites/all/modules/contrib/devel/devel.css @@ -0,0 +1,138 @@ +.dev-query, .dev-timer, .dev-memory-usage { + padding: 1em; +} + +.devel-obj-output .field { + color: red; +} + +.devel-obj-output dd { + display: block; +} + +/** + * Query summary + */ +div.dev-query { + font-size:11px; + background:#fff; + border-top:3px solid #ccc; + color:#333; + /*padding:.5em;*/ + } + +div.dev-query .marker { + color: #f00; + font-weight: bold; +} + +/** + * Querylog + */ +div.devel-querylog { + color:#333; + border-bottom:1px solid #eee; + font-size:11px; + line-height:100%; + padding-left:30em; + padding-right:2em; + position:relative; + overflow:hidden; + } + +div.devel-querylog .marker { + color: #f00; + font-weight: bold; +} + +div.devel-querylog-header { + border-top:3px solid #ccc; + background:#fff; + font-weight:bold; + } + +div.devel-querylog-even { + background:#fff; + } + +div.devel-querylog-odd { + background:#f8f8f8; + } + +div.devel-querylog div.cell { + overflow:hidden; + padding: 1em .5em; + } + + div.devel-querylog div.cell-1 { + position:absolute; + left:0px; + width:4em; + } + + div.devel-querylog div.cell-2 { + position:absolute; + left:4em; + width:3em; + } + + div.devel-querylog div.cell-3 { + position:absolute; + left:6em; + width:19em; + } + + div.devel-querylog div.cell-4 { + position:absolute; + left:26em; + width:4em; + } + + div.devel-querylog-even div.cell-5, + div.devel-querylog-odd div.cell-5 { + /*max-height:18em;*/ + font-family: 'Andale Mono', monospace; + } + + div.devel-querylog div.cell-6 { + position:absolute; + right:0em; + top:0em; + /*width:9em;*/ + } + + +/** + * Switch User block + */ + +div#content div#block-devel-switch-user ul.links, +div#footer div#block-devel-switch-user ul.links { + margin-left: 0; + padding-left: 0; +} + +div#content div#block-devel-switch-user ul.links li, +div#footer div#block-devel-switch-user ul.links li { + display: inline-block; + margin-left: 0; + margin-right: 1.5em; + padding-right: 0; +} + +div#footer div#block-devel-switch-user ul.links li a { + margin: 0; + padding: 0; + border: none; +} + +div#content div#block-devel-switch-user div.form-item-username, +div#footer div#block-devel-switch-user div.form-item-username { + float: left; + margin-right: 2em; +} + +div#content div#block-devel-switch-user #edit-submit, +div#footer div#block-devel-switch-user #edit-submit { + margin-top: 5px; +} diff --git a/sites/all/modules/contrib/devel/devel.drush.inc b/sites/all/modules/contrib/devel/devel.drush.inc new file mode 100644 index 0000000..b4d8505 --- /dev/null +++ b/sites/all/modules/contrib/devel/devel.drush.inc @@ -0,0 +1,207 @@ + dt('Downloads the FirePHP library from http://firephp.org/.'), + 'arguments' => array( + 'path' => dt('Path to the download folder. This path is relative to the Drupal root. If omitted Drush will use the default location (sites/all/libraries/FirePHPCore).'), + ), + ); + $items['devel-reinstall'] = array( + 'description' => dt('Disable, Uninstall, and Install a list of projects.'), + 'drush dependencies' => array('pm'), + 'arguments' => array( + 'projects' => dt('A space-separated list of project names.'), + ), + 'allow-additional-options' => array('pm-disable', 'pm-uninstall', 'pm-enable'), + 'required-arguments' => 1, + 'aliases' => array('dre'), + ); + $items['fn-hook'] = array( + 'description' => 'List implementations of a given hook and explore the source of the selected one.', + 'arguments' => array( + 'hook' => 'The name of the hook to explore (e.g. "menu" for hook_menu()).' + ), + 'examples' => array( + 'fn-hook cron' => 'List implementations of hook_cron().', + ), + 'allow-additional-options' => array('fn-view'), + 'required-arguments' => 1, + 'aliases' => array('fnh', 'hook'), + ); + $items['fn-view'] = array( + 'description' => 'Show the source of specified function or method.', + 'arguments' => array( + 'function' => 'The name of the function or method to view.', + ), + 'options' => array( + 'pipe' => 'Output just the filename of the function', + 'format' => 'Specify how the filename should be printed. Available placeholders are !startline, !endline and !file', + ), + 'examples' => array( + 'fn-view drupal_set_breadcrumb' => 'View the source code for function "drupal_set_breadcrumb"', + 'vi `drush --pipe fn-view user_access --format=\'+!startline !file\'`' => 'Edit the file that contains the function "user_access"', + 'fn-view NodeController::load' => 'View the source code for method load in the class NodeController' + ), + 'aliases' => array('fnv'), + 'required-arguments' => 1, + ); + $items['devel-token'] = array( + 'description' => dt('List available tokens'), + 'aliases' => array('token'), + 'core' => array(7), // Remove once 3.0 is released. + //@todo support --format option for json, csv, etc. + ); + return $items; +} + +/** + * A command callback. This is faster than 3 separate bootstraps. + */ +function drush_devel_reinstall() { + $projects = func_get_args(); + + $args = array_merge(array('pm-disable'), $projects); + call_user_func_array('drush_invoke', $args); + + $args = array_merge(array('pm-uninstall'), $projects); + call_user_func_array('drush_invoke', $args); + + $args = array_merge(array('pm-enable'), $projects); + call_user_func_array('drush_invoke', $args); +} + +/** + * A command callback. + */ +function drush_devel_download($path = NULL) { + // If no path is provided by the user, set our default path. + if (is_null($path)) { + // We use devel folder for legacy reason. + $path = drupal_get_path('module', 'devel') . '/FirePHPCore'; + } + // If FirePHP is not installed and libraries module is enabled, + // try to find FirePHP by its own means. + if (!is_dir($path)) { + if (module_exists('libraries')) { + // Libraries 1.x will return a path even if it doesn't exist + // while 2.x will return FALSE. + $path = libraries_get_path('FirePHPCore'); + if (!$path) { + $path = 'sites/all/libraries/FirePHPCore'; + } + } + } + if (is_dir($path)) { + drush_log(dt('FirePHP already present at @path. No download required.', array('@path' => $path)), 'ok'); + } + elseif (drush_shell_exec('svn export http://firephp.googlecode.com/svn/branches/Library-FirePHPCore-0.3 %s', $path)) { + drush_log(dt('FirePHP has been exported via svn to @path.', array('@path' => $path)), 'success'); + } + else { + drush_log(dt('Drush was unable to export FirePHP to @path.', array('@path' => $path)), 'warning'); + } +} + +/** + * Command handler. Show hook implementations. + */ +function drush_devel_fn_hook($hook) { + // Get implementations in the .install files as well. + include_once './includes/install.inc'; + drupal_load_updates(); + + if ($hook_implementations = module_implements($hook)) { + if ($choice = drush_choice(array_combine($hook_implementations, $hook_implementations), 'Enter the number of the hook implementation you wish to view.')) { + return drush_devel_fn_view($choice . "_$hook"); + } + } + else { + drush_log(dt('No implementations.'), 'ok'); + } +} + +/** + * Command handler. Show source code of specified function or method. + */ +function drush_devel_fn_view($function_name) { + // Get implementations in the .install files as well. + include_once './includes/install.inc'; + drupal_load_updates(); + + if (strpos($function_name, '::') === FALSE) { + if (!function_exists($function_name)) { + return drush_set_error(dt('Function not found')); + } + $reflect = new ReflectionFunction($function_name); + } + else { + list($class, $method) = explode('::', $function_name); + if (!method_exists($class, $method)) { + return drush_set_error(dt('Method not found')); + } + $reflect = new ReflectionMethod($class, $method); + } + $func_info = array('!file' => $reflect->getFileName(), '!startline' => $reflect->getStartLine(), '!endline' => $reflect->getEndLine()); + $format = drush_get_option('format', '!file'); + drush_print_pipe(dt($format, $func_info)); + drush_print(dt("// file: !file, lines !startline-!endline", $func_info)); + + _drush_devel_print_function($reflect->getFileName(), $reflect->getStartLine(), $reflect->getEndLine()); +} + +/** + * Command callback. List available tokens. + */ +function drush_devel_token() { + $rows[] = array(dt('Group'), dt('Token'), dt('Name')); + $all = token_info(); + foreach ($all['tokens'] as $group => $tokens) { + foreach ($tokens as $key => $token) { + $rows[] = array($group, $key, $token['name']); + } + } + drush_print_table($rows, TRUE); +} + + +/** + * Print the specified function, including any + * doxygen-style comments that come before it. + */ +function _drush_devel_print_function($file, $start_line, $end_line) { + $line_num = 0; + $doxygen = NULL; + $fp = fopen( $file, 'r' ); + + while (!feof($fp) && ($line_num < ($start_line - 1))) { + $line = fgets($fp); + ++$line_num; + + if (substr($line,0,3) == '/**') { + $doxygen = $line; + } + elseif (isset($doxygen)) { + $doxygen .= $line; + if ($line_num + 1 == $start_line) { + drush_print(rtrim($doxygen)); + } + if (strstr($line, '*/') !== FALSE) { + $doxygen = NULL; + } + } + } + while (!feof($fp) && ($line_num < $end_line)) { + $line = fgets($fp); + ++$line_num; + drush_print(rtrim($line)); + } +} diff --git a/sites/all/modules/contrib/devel/devel.info b/sites/all/modules/contrib/devel/devel.info new file mode 100644 index 0000000..f53d43d --- /dev/null +++ b/sites/all/modules/contrib/devel/devel.info @@ -0,0 +1,15 @@ +name = Devel +description = Various blocks, pages, and functions for developers. +package = Development +core = 7.x +configure = admin/config/development/devel +tags[] = developer +files[] = devel.test +files[] = devel.mail.inc + +; Information added by Drupal.org packaging script on 2014-05-01 +version = "7.x-1.5" +core = "7.x" +project = "devel" +datestamp = "1398963366" + diff --git a/sites/all/modules/contrib/devel/devel.install b/sites/all/modules/contrib/devel/devel.install new file mode 100644 index 0000000..f082857 --- /dev/null +++ b/sites/all/modules/contrib/devel/devel.install @@ -0,0 +1,135 @@ +fields(array( + 'weight' => 88, + )) + ->condition('type', 'module') + ->condition('name', 'devel') + ->execute(); + + // Create a custom menu, if Menu module is enabled. + // @see devel_modules_installed() + if (module_exists('menu')) { + $menu = array( + 'menu_name' => 'devel', + 'title' => $t('Development'), + 'description' => $t('Development link'), + ); + menu_save($menu); + } +} + +/** + * Implements hook_uninstall(). + */ +function devel_uninstall() { + variable_del('devel_execution'); + variable_del('dev_timer'); + variable_del('devel_query_display'); + variable_del('devel_redirect_page'); + variable_del('devel_api_url'); + variable_del('devel_memory'); + variable_del('devel_error_handlers'); + variable_del('devel_raw_names'); + variable_del('devel_switch_user_list_size'); + variable_del('devel_switch_user_include_anon'); + variable_del('devel_switch_user_show_form'); + variable_del('devel_krumo_skin'); + variable_del('devel_page_alter'); + variable_del('devel_query_sort'); + variable_del('devel_rebuild_theme_registry'); + variable_del('devel_use_uncompressed_jquery'); + variable_del('devel_xhprof_directory'); + variable_del('devel_xhprof_enabled'); + variable_del('devel_xhprof_url'); + variable_del('devel_debug_mail_file_format'); + variable_del('devel_debug_mail_directory'); + + // Delete the development menu. + if (module_exists('menu')) { + if ($devel_menu = menu_load('devel')) { + menu_delete($devel_menu); + } + } +} + +/** + * Remove feature for storing queries. Cleanup deprecated tables and variables. + */ +function devel_update_7000() { + db_drop_table('devel_queries'); + db_drop_table('devel_times'); +} + +/** + * Rebuild the menus since everything is defined by devel_menu(). + */ +function devel_update_7001() { + db_delete('menu_links') + ->condition('module', 'devel') + ->execute(); + variable_set('menu_rebuild_needed', TRUE); + return t('Devel module menu links will be rebuilt.'); +} + +/** + * Remove deprecated variables - dev_query, devel_code_coverage + */ +function devel_update_7002() { + variable_del('dev_query'); // Sad trombone. http://drupalcode.org/viewvc/drupal/drupal/includes/database.mysql.inc?revision=1.2&view=markup + variable_del('devel_code_coverage'); +} + +/** + * As per issue #813132: change schablon.com to white for krumo. + */ +function devel_update_7003() { + if (variable_get('devel_krumo_skin', 'white') == 'schablon.com') { + variable_set('devel_krumo_skin', 'white'); + } +} + +/** + * Convert devel_error_handler variable to devel_error_handlers array. + */ +function devel_update_7004() { + define('DEVEL_ERROR_HANDLER_BACKTRACE_AND_MESSAGE', 3); + + $error_handler = variable_get('devel_error_handler', NULL); + if (isset($error_handler)) { + if ($error_handler == DEVEL_ERROR_HANDLER_BACKTRACE_AND_MESSAGE) { + $error_handlers = array(DEVEL_ERROR_HANDLER_STANDARD, DEVEL_ERROR_HANDLER_BACKTRACE_KRUMO); + } + else { + $error_handlers = array($error_handler); + } + variable_del('devel_error_handler'); + variable_set('devel_error_handlers', drupal_map_assoc($error_handlers)); + } +} + +/** + * Delete variable 'devel_form_weights' from database as it was removed from code. + */ +function devel_update_7005() { + variable_del('devel_form_weights'); +} + +/** + * Change variable 'dev_mem' to 'devel_memory'. + */ +function devel_update_7006() { + if (variable_get('dev_mem', NULL) !== NULL) { + variable_set('devel_memory', variable_get('dev_mem')); + } + + variable_del('dev_mem'); +} diff --git a/sites/all/modules/contrib/devel/devel.js b/sites/all/modules/contrib/devel/devel.js new file mode 100644 index 0000000..c23cc94 --- /dev/null +++ b/sites/all/modules/contrib/devel/devel.js @@ -0,0 +1,45 @@ +(function ($) { + +// Explain link in query log +Drupal.behaviors.devel_explain = { + attach: function(context, settings) { + $('a.dev-explain').click(function () { + qid = $(this).attr("qid"); + cell = $('#devel-query-' + qid); + $('.dev-explain', cell).load(settings.basePath + '?q=devel/explain/' + settings.devel.request_id + '/' + qid).show(); + $('.dev-placeholders', cell).hide(); + $('.dev-arguments', cell).hide(); + return false; + }); + } +} + +// Arguments link in query log +Drupal.behaviors.devel_arguments = { + attach: function(context, settings) { + $('a.dev-arguments').click(function () { + qid = $(this).attr("qid"); + cell = $('#devel-query-' + qid); + $('.dev-arguments', cell).load(settings.basePath + '?q=devel/arguments/' + settings.devel.request_id + '/' + qid).show(); + $('.dev-placeholders', cell).hide(); + $('.dev-explain', cell).hide(); + return false; + }); + } +} + +// Placeholders link in query log +Drupal.behaviors.devel_placeholders = { + attach: function(context, settings) { + $('a.dev-placeholders').click(function () { + qid = $(this).attr("qid"); + cell = $('#devel-query-' + qid); + $('.dev-explain', cell).hide(); + $('.dev-arguments', cell).hide(); + $('.dev-placeholders', cell).show(); + return false; + }); + } +} + +})(jQuery); diff --git a/sites/all/modules/contrib/devel/devel.mail.inc b/sites/all/modules/contrib/devel/devel.mail.inc new file mode 100644 index 0000000..d6f9ad5 --- /dev/null +++ b/sites/all/modules/contrib/devel/devel.mail.inc @@ -0,0 +1,82 @@ + 'DevelMailLog', + *); + * + * Saves to temporary://devel-mails dir by default. Can be changed using + * 'devel_debug_mail_directory' variable. Filename pattern controlled by + * 'devel_debug_mail_file_format' variable. + * + */ + +class DevelMailLog extends DefaultMailSystem { + + public function composeMessage($message) { + $mimeheaders = array(); + $message['headers']['To'] = $message['to']; + foreach ($message['headers'] as $name => $value) { + $mimeheaders[] = $name . ': ' . mime_header_encode($value); + } + + $line_endings = variable_get('mail_line_endings', MAIL_LINE_ENDINGS); + $output = join($line_endings, $mimeheaders) . $line_endings; + // 'Subject:' is a mail header and should not be translated. + $output .= 'Subject: ' . $message['subject'] . $line_endings; + // Blank line to separate headers from body. + $output .= $line_endings; + $output .= preg_replace('@\r?\n@', $line_endings, $message['body']); + return $output; + } + + public function getFileName($message) { + $output_directory = $this->getOutputDirectory(); + $this->makeOutputDirectory($output_directory); + + $output_file_format = variable_get('devel_debug_mail_file_format', '%to-%subject-%datetime.mail.txt'); + $tokens = array( + '%to' => $message['to'], + '%subject' => $message['subject'], + '%datetime' => date('y-m-d_his'), + ); + return $output_directory . '/' . $this->dirify(str_replace(array_keys($tokens), array_values($tokens), $output_file_format)); + } + + private function dirify($string) { + return preg_replace('/[^a-zA-Z0-9_\-\.@]/', '_', $string); + } + /** + * Save an e-mail message to a file, using Drupal variables and default settings. + * + * @see http://php.net/manual/en/function.mail.php + * @see drupal_mail() + * + * @param $message + * A message array, as described in hook_mail_alter(). + * @return + * TRUE if the mail was successfully accepted, otherwise FALSE. + */ + public function mail(array $message) { + $output = $this->composeMessage($message); + $output_file = $this->getFileName($message); + + return file_put_contents($output_file, $output); + } + + protected function makeOutputDirectory($output_directory) { + if (!file_prepare_directory($output_directory, FILE_CREATE_DIRECTORY)) { + throw new Exception("Unable to continue sending mail, $output_directory is not writable"); + } + } + + public function getOutputDirectory() { + return variable_get('devel_debug_mail_directory', 'temporary://devel-mails'); + } +} +?> diff --git a/sites/all/modules/contrib/devel/devel.module b/sites/all/modules/contrib/devel/devel.module new file mode 100644 index 0000000..624ac7d --- /dev/null +++ b/sites/all/modules/contrib/devel/devel.module @@ -0,0 +1,2154 @@ +' . t('This is a list of defined user functions that generated this current request lifecycle. Click on a function name to view its documentation.') . '

'; + case 'devel/session': + return '

' . t('Here are the contents of your $_SESSION variable.') . '

'; + case 'devel/variable': + $api = variable_get('devel_api_url', 'api.drupal.org'); + return '

' . t('This is a list of the variables and their values currently stored in variables table and the $conf array of your settings.php file. These variables are usually accessed with variable_get() and variable_set(). Variables that are too long can slow down your pages.', array('@variable-get-doc' => "http://$api/api/HEAD/function/variable_get", '@variable-set-doc' => "http://$api/api/HEAD/function/variable_set")) . '

'; + case 'devel/reinstall': + return t('Warning - will delete your module tables and variables.'); + } +} + +/** + * Implements hook_modules_installed(). + * + * @see devel_install() + */ +function devel_modules_installed($modules) { + if (in_array('menu', $modules)) { + $menu = array( + 'menu_name' => 'devel', + 'title' => t('Development'), + 'description' => t('Development link'), + ); + menu_save($menu); + } +} + +/** + * Implements hook_menu(). + */ +function devel_menu() { + // Note: we can't dynamically append destination to querystring. + // Do so at theme layer. Fix in D7? + $items['devel/cache/clear'] = array( + 'title' => 'Clear cache', + 'page callback' => 'devel_cache_clear', + 'description' => 'Clear the CSS cache and all database cache tables which store page, node, theme and variable caches.', + 'access arguments' => array('access devel information'), + 'file' => 'devel.pages.inc', + 'menu_name' => 'devel', + ); + + $items['devel/reference'] = array( + 'title' => 'Function reference', + 'description' => 'View a list of currently defined user functions with documentation links.', + 'page callback' => 'devel_function_reference', + 'access arguments' => array('access devel information'), + 'file' => 'devel.pages.inc', + 'menu_name' => 'devel', + ); + $items['devel/reinstall'] = array( + 'title' => 'Reinstall modules', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('devel_reinstall'), + 'description' => 'Run hook_uninstall() and then hook_install() for a given module.', + 'access arguments' => array('access devel information'), + 'file' => 'devel.pages.inc', + 'menu_name' => 'devel', + ); + $items['devel/menu/reset'] = array( + 'title' => 'Rebuild menus', + 'description' => 'Rebuild menu based on hook_menu() and revert any custom changes. All menu items return to their default settings.', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('devel_menu_rebuild'), + 'access arguments' => array('access devel information'), + 'file' => 'devel.pages.inc', + 'menu_name' => 'devel', + ); + $items['devel/menu/item'] = array( + 'title' => 'Menu item', + 'description' => 'Details about a given menu item.', + 'page callback' => 'devel_menu_item', + 'access arguments' => array('access devel information'), + 'file' => 'devel.pages.inc', + 'menu_name' => 'devel', + ); + $items['devel/variable'] = array( + 'title' => 'Variable editor', + 'description' => 'Edit and delete site variables.', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('devel_variable_form'), + 'access arguments' => array('access devel information'), + 'file' => 'devel.pages.inc', + 'menu_name' => 'devel', + ); + // We don't want the abbreviated version provided by status report. + $items['devel/phpinfo'] = array( + 'title' => 'PHPinfo()', + 'description' => 'View your server\'s PHP configuration', + 'page callback' => 'devel_phpinfo', + 'access arguments' => array('access devel information'), + 'file' => 'devel.pages.inc', + 'menu_name' => 'devel', + ); + $items['devel/php'] = array( + 'title' => 'Execute PHP Code', + 'description' => 'Execute some PHP code', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('devel_execute_form'), + 'access arguments' => array('execute php code'), + 'file' => 'devel.pages.inc', + 'menu_name' => 'devel', + ); + $items['devel/theme/registry'] = array( + 'title' => 'Theme registry', + 'description' => 'View a list of available theme functions across the whole site.', + 'page callback' => 'devel_theme_registry', + 'access arguments' => array('access devel information'), + 'file' => 'devel.pages.inc', + 'menu_name' => 'devel', + ); + $items['devel/entity/info'] = array( + 'title' => 'Entity info', + 'description' => 'View entity information across the whole site.', + 'page callback' => 'devel_entity_info_page', + 'access arguments' => array('access devel information'), + 'file' => 'devel.pages.inc', + 'menu_name' => 'devel', + ); + $items['devel/field/info'] = array( + 'title' => 'Field info', + 'description' => 'View fields information across the whole site.', + 'page callback' => 'devel_field_info_page', + 'access arguments' => array('access devel information'), + 'file' => 'devel.pages.inc', + 'menu_name' => 'devel', + ); + $items['devel/elements'] = array( + 'title' => 'Hook_elements()', + 'description' => 'View the active form/render elements for this site.', + 'page callback' => 'devel_elements_page', + 'access arguments' => array('access devel information'), + 'file' => 'devel.pages.inc', + 'menu_name' => 'devel', + ); + $items['devel/variable/edit/%'] = array( + 'title' => 'Variable editor', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('devel_variable_edit', 3), + 'access arguments' => array('access devel information'), + 'type' => MENU_CALLBACK, + 'file' => 'devel.pages.inc', + 'menu_name' => 'devel', + ); + $items['devel/session'] = array( + 'title' => 'Session viewer', + 'description' => 'List the contents of $_SESSION.', + 'page callback' => 'devel_session', + 'access arguments' => array('access devel information'), + 'file' => 'devel.pages.inc', + 'menu_name' => 'devel', + ); + $items['devel/switch'] = array( + 'title' => 'Switch user', + 'page callback' => 'devel_switch_user', + 'access callback' => '_devel_switch_user_access', + 'access arguments' => array(2), + 'type' => MENU_CALLBACK, + 'file' => 'devel.pages.inc', + 'menu_name' => 'devel', + ); + $items['devel/explain'] = array( + 'title' => 'Explain query', + 'page callback' => 'devel_querylog_explain', + 'description' => 'Run an EXPLAIN on a given query. Used by query log', + 'access arguments' => array('access devel information'), + 'file' => 'devel.pages.inc', + 'type' => MENU_CALLBACK, + ); + $items['devel/arguments'] = array( + 'title' => 'Arguments query', + 'page callback' => 'devel_querylog_arguments', + 'description' => 'Return a given query, with arguments instead of placeholders. Used by query log', + 'access arguments' => array('access devel information'), + 'file' => 'devel.pages.inc', + 'type' => MENU_CALLBACK, + ); + $items['devel/run-cron'] = array( + 'title' => 'Run cron', + 'page callback' => 'system_run_cron', + 'access arguments' => array('administer site configuration'), + 'file' => 'system.admin.inc', + 'file path' => drupal_get_path('module', 'system'), + 'menu_name' => 'devel', + ); + + // Duplicate path in 2 different menus. See http://drupal.org/node/601788. + $items['devel/settings'] = array( + 'title' => 'Devel settings', + 'description' => 'Helper functions, pages, and blocks to assist Drupal developers. The devel blocks can be managed via the block administration page.', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('devel_admin_settings'), + 'access arguments' => array('administer site configuration'), + 'file' => 'devel.admin.inc', + 'menu_name' => 'devel', + ); + $items['admin/config/development/devel'] = array( + 'title' => 'Devel settings', + 'description' => 'Helper functions, pages, and blocks to assist Drupal developers. The devel blocks can be managed via the block administration page.', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('devel_admin_settings'), + 'file' => 'devel.admin.inc', + 'access arguments' => array('administer site configuration'), + ); + + $items['node/%node/devel'] = array( + 'title' => 'Devel', + 'page callback' => 'devel_load_object', + 'page arguments' => array('node', 1), + 'access arguments' => array('access devel information'), + 'type' => MENU_LOCAL_TASK, + 'file' => 'devel.pages.inc', + 'weight' => 100, + ); + $items['node/%node/devel/load'] = array( + 'title' => 'Load', + 'type' => MENU_DEFAULT_LOCAL_TASK, + ); + $items['node/%node/devel/render'] = array( + 'title' => 'Render', + 'page callback' => 'devel_render_object', + 'page arguments' => array('node', 1), + 'access arguments' => array('access devel information'), + 'file' => 'devel.pages.inc', + 'type' => MENU_LOCAL_TASK, + 'weight' => 100, + ); + $items['comment/%comment/devel'] = array( + 'title' => 'Devel', + 'page callback' => 'devel_load_object', + 'page arguments' => array('comment', 1), + 'access arguments' => array('access devel information'), + 'type' => MENU_LOCAL_TASK, + 'file' => 'devel.pages.inc', + 'weight' => 100, + ); + $items['comment/%comment/devel/load'] = array( + 'title' => 'Load', + 'type' => MENU_DEFAULT_LOCAL_TASK, + ); + $items['comment/%comment/devel/render'] = array( + 'title' => 'Render', + 'page callback' => 'devel_render_object', + 'page arguments' => array('comment', 1), + 'access arguments' => array('access devel information'), + 'type' => MENU_LOCAL_TASK, + 'file' => 'devel.pages.inc', + 'weight' => 100, + ); + $items['user/%user/devel'] = array( + 'title' => 'Devel', + 'page callback' => 'devel_load_object', + 'page arguments' => array('user', 1), + 'access arguments' => array('access devel information'), + 'type' => MENU_LOCAL_TASK, + 'file' => 'devel.pages.inc', + 'weight' => 100, + ); + $items['user/%user/devel/load'] = array( + 'title' => 'Load', + 'type' => MENU_DEFAULT_LOCAL_TASK, + ); + $items['user/%user/devel/render'] = array( + 'title' => 'Render', + 'page callback' => 'devel_render_object', + 'page arguments' => array('user', 1), + 'access arguments' => array('access devel information'), + 'file' => 'devel.pages.inc', + 'type' => MENU_LOCAL_TASK, + 'weight' => 100, + ); + $items['taxonomy/term/%taxonomy_term/devel'] = array( + 'title' => 'Devel', + 'page callback' => 'devel_load_object', + 'page arguments' => array('taxonomy_term', 2, 'term'), + 'access arguments' => array('access devel information'), + 'file' => 'devel.pages.inc', + 'type' => MENU_LOCAL_TASK, + 'weight' => 100, + ); + $items['taxonomy/term/%taxonomy_term/devel/load'] = array( + 'title' => 'Load', + 'type' => MENU_DEFAULT_LOCAL_TASK, + ); + $items['taxonomy/term/%taxonomy_term/devel/render'] = array( + 'title' => 'Render', + 'page callback' => 'devel_render_object', + 'page arguments' => array('taxonomy_term', 2, 'term'), + 'access arguments' => array('access devel information'), + 'type' => MENU_LOCAL_TASK, + 'file' => 'devel.pages.inc', + 'weight' => 100, + ); + + return $items; +} + +/** + * Menu item access callback - check permission and token for Switch User. + */ +function _devel_switch_user_access($name) { + // Suppress notices when on other pages when menu system still checks access. + return user_access('switch users') && drupal_valid_token(@$_GET['token'], "devel/switch/$name|" . @$_GET['destination'], TRUE); +} + +/** + * Implements hook_admin_paths(). + */ +function devel_admin_paths() { + $paths = array( + 'devel/*' => TRUE, + 'node/*/devel' => TRUE, + 'node/*/devel/*' => TRUE, + 'comment/*/devel' => TRUE, + 'comment/*/devel/*' => TRUE, + 'user/*/devel' => TRUE, + 'user/*/devel/*' => TRUE, + 'taxonomy/term/*/devel' => TRUE, + 'taxonomy/term/*/devel/*' => TRUE, + ); + return $paths; +} + +/** + * Returns destinations. + */ +function devel_menu_need_destination() { + return array('devel/cache/clear', 'devel/reinstall', 'devel/menu/reset', + 'devel/variable', 'admin/reports/status/run-cron'); +} + +/** + * Implements hook_menu_link_alter(). + * + * Flag this link as needing alter at display time. + * This is more robust than setting alter in hook_menu(). + * @see devel_translated_menu_link_alter() + * + **/ +function devel_menu_link_alter(&$item) { + if (in_array($item['link_path'], devel_menu_need_destination()) || $item['link_path'] == 'devel/menu/item') { + $item['options']['alter'] = TRUE; + } +} + +/** + * Implements hook_translated_menu_item_alter(). + * + * Append dynamic querystring 'destination' to several of our own menu items. + **/ +function devel_translated_menu_link_alter(&$item) { + if (in_array($item['href'], devel_menu_need_destination())) { + $item['localized_options']['query'] = drupal_get_destination(); + } + elseif ($item['href'] == 'devel/menu/item') { + $item['localized_options']['query'] = array('path' => $_GET['q']); + } +} + +/** + * Implements hook_theme(). + */ +function devel_theme() { + return array( + 'devel_querylog' => array( + 'variables' => array('header' => array(), 'rows' => array()), + ), + 'devel_querylog_row' => array( + 'variables' => array('row' => array()), + ), + ); +} + +/** + * Implements hook_init(). + */ +function devel_init() { + if (!devel_silent()) { + if (user_access('access devel information')) { + devel_set_handler(devel_get_handlers()); + // We want to include the class early so that anyone may call krumo() + // as needed. See http://krumo.sourceforge.net/ + has_krumo(); + + // See http://www.firephp.org/HQ/Install.htm + $path = NULL; + if ((@include_once 'fb.php') || (@include_once 'FirePHPCore/fb.php')) { + // FirePHPCore is in include_path. Probably a PEAR installation. + $path = ''; + } + elseif (module_exists('libraries')) { + // Support Libraries API - http://drupal.org/project/libraries + $firephp_path = libraries_get_path('FirePHPCore'); + $firephp_path = ($firephp_path ? $firephp_path . '/lib/FirePHPCore/' : ''); + $chromephp_path = libraries_get_path('chromephp'); + } + else { + $firephp_path = './' . drupal_get_path('module', 'devel') . '/FirePHPCore/lib/FirePHPCore/'; + $chromephp_path = './' . drupal_get_path('module', 'devel') . '/chromephp'; + } + + // Include FirePHP if it exists. + if (!empty($firephp_path) && file_exists($firephp_path . 'fb.php')) { + include_once $firephp_path . 'fb.php'; + include_once $firephp_path . 'FirePHP.class.php'; + } + + // Include ChromePHP if it exists. + if (!empty($chromephp_path) && file_exists($chromephp_path .= '/ChromePhp.php')) { + include_once $chromephp_path; + } + + // Add CSS for query log if should be displayed. + if (variable_get('devel_query_display', 0)) { + drupal_add_css(drupal_get_path('module', 'devel') . '/devel.css'); + drupal_add_js(drupal_get_path('module', 'devel') . '/devel.js'); + } + } + } + if (variable_get('devel_rebuild_theme_registry', FALSE)) { + drupal_theme_rebuild(); + if (flood_is_allowed('devel_rebuild_registry_warning', 1)) { + flood_register_event('devel_rebuild_registry_warning'); + if (!devel_silent() && user_access('access devel information')) { + drupal_set_message(t('The theme registry is being rebuilt on every request. Remember to turn off this feature on production websites.', array("!url" => url('admin/config/development/devel')))); + } + } + } +} + +/** + * Sets message. + */ +function devel_set_message($msg, $type = NULL) { + $function = function_exists('drush_log') ? 'drush_log' : 'drupal_set_message'; + $function($msg, $type); + } + +/** + * Returns boolean. No need for cache here. + */ +function has_krumo() { + @include_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'devel') . '/krumo/class.krumo.php'; + if (function_exists('krumo') && !drupal_is_cli()) { + drupal_add_js(drupal_get_path('module', 'devel') . '/devel_krumo_path.js'); + return TRUE; + } + return FALSE; +} + +/** + * Decides whether or not to print a debug variable using krumo(). + * + * @param array|object $input + * The value to check. + * + * @return boolean + */ +function merits_krumo($input) { + return (is_object($input) || is_array($input)) && has_krumo() && variable_get('devel_krumo_skin', '') != 'disabled'; +} + +/** + * Calls the http://www.firephp.org/ fb() function if it is found. + */ +function dfb() { + if (function_exists('fb') && user_access('access devel information') && !headers_sent()) { + $args = func_get_args(); + call_user_func_array('fb', $args); + } +} + +/** + * Calls dfb() to output a backtrace. + */ +function dfbt($label) { + dfb($label, FirePHP::TRACE); +} + +/** + * Wrapper for ChromePHP Class log method. + */ +function dcp() { + if (class_exists('ChromePhp', FALSE) && user_access('access devel information')) { + $args = func_get_args(); + call_user_func_array(array('ChromePhp', 'log'), $args); + } +} + +/** + * Implements hook_watchdog(). + */ +function devel_watchdog(array $log_entry) { + if (class_exists('FirePHP', FALSE) && !drupal_is_cli()) { + switch ($log_entry['severity']) { + case WATCHDOG_EMERGENCY: + case WATCHDOG_ALERT: + case WATCHDOG_CRITICAL: + case WATCHDOG_ERROR: + $type = FirePHP::ERROR; + break; + + case WATCHDOG_WARNING: + $type = FirePHP::WARN; + break; + + case WATCHDOG_NOTICE: + case WATCHDOG_INFO: + $type = FirePHP::INFO; + break; + + case WATCHDOG_DEBUG: + default: + $type = FirePHP::LOG; + } + } + else { + $type = 'watchdog'; + } + $function = function_exists('decode_entities') ? 'decode_entities' : 'html_entity_decode'; + $watchdog = array( + 'type' => $log_entry['type'], + 'message' => $function(strtr($log_entry['message'], (array) $log_entry['variables'])), + ); + if (isset($log_entry['link'])) { + $watchdog['link'] = $log_entry['link']; + } + dfb($watchdog, $type); +} + +/** + * Gets error handlers. + */ +function devel_get_handlers() { + $error_handlers = variable_get('devel_error_handlers', array(DEVEL_ERROR_HANDLER_STANDARD => DEVEL_ERROR_HANDLER_STANDARD)); + if (!empty($error_handlers)) { + unset($error_handlers[DEVEL_ERROR_HANDLER_NONE]); + } + return $error_handlers; +} + +/** + * Sets a new error handler or restores the prior one. + */ +function devel_set_handler($handlers) { + if (empty($handlers)) { + restore_error_handler(); + } + elseif (count($handlers) == 1 && isset($handlers[DEVEL_ERROR_HANDLER_STANDARD])) { + // Do nothing. + } + else { + if (has_krumo()) { + set_error_handler('backtrace_error_handler'); + } + } +} + +/** + * Checks whether Devel may be active. + */ +function devel_silent() { + // isset($_GET['q']) is needed when calling the front page. q is not set. + // Don't interfere with private files/images. + return + function_exists('drupal_is_cli') && drupal_is_cli() || + (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'ApacheBench') !== FALSE) || + !empty($_REQUEST['XDEBUG_PROFILE']) || + isset($GLOBALS['devel_shutdown']) || + strstr($_SERVER['PHP_SELF'], 'update.php') || + (isset($_GET['q']) && ( + in_array($_GET['q'], array('admin/content/node-settings/rebuild')) || + substr($_GET['q'], 0, strlen('system/files')) == 'system/files' || + substr($_GET['q'], 0, strlen('batch')) == 'batch' || + substr($_GET['q'], 0, strlen('file/ajax')) == 'file/ajax') + ); +} + +/** + * Enables xhprof. + */ +function devel_xhprof_enable() { + if (devel_xhprof_is_enabled()) { + if ($path = variable_get('devel_xhprof_directory', '')) { + include_once $path . '/xhprof_lib/utils/xhprof_lib.php'; + include_once $path . '/xhprof_lib/utils/xhprof_runs.php'; + // @todo: consider a variable per-flag instead. + xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY); + } + } +} + +/** + * Checks if xhprof is enabled. + */ +function devel_xhprof_is_enabled() { + return extension_loaded('xhprof') && variable_get('devel_xhprof_enabled', FALSE); +} + +/** + * Implements hook_boot(). + * + * Runs even for cached pages. + */ +function devel_boot() { + // Initialize XHProf. + devel_xhprof_enable(); + + if (!devel_silent()) { + if (variable_get('devel_memory', 0)) { + global $memory_init; + $memory_init = memory_get_usage(); + } + + if (devel_query_enabled()) { + @include_once DRUPAL_ROOT . '/includes/database/log.inc'; + Database::startLog('devel');; + } + } + + // We need user_access() in the shutdown function. make sure it gets loaded. + // Also prime the drupal_get_filename() static with user.module's location to + // avoid a stray query. + drupal_get_filename('module', 'user', 'modules/user/user.module'); + drupal_load('module', 'user'); + drupal_register_shutdown_function('devel_shutdown'); +} + +/** + * Displays backtrace showing the route of calls to the current error. + * + * @param int $error_level + * The level of the error raised. + * @param string $message + * The error message. + * @param string $filename + * The filename that the error was raised in. + * @param int $line + * The line number the error was raised at. + * @param array $context + * An array that points to the active symbol table at the point the error + * occurred. + */ +function backtrace_error_handler($error_level, $message, $filename, $line, $context) { + // Hide stack trace and parameters from unqualified users. + if (!user_access('access devel information')) { + // Do what core does in bootstrap.inc and errors.inc. + // (We need to duplicate the core code here rather than calling it + // to avoid having the backtrace_error_handler() on top of the call stack.) + require_once DRUPAL_ROOT . '/includes/errors.inc'; + if ($error_level & error_reporting()) { + $types = drupal_error_levels(); + list($severity_msg, $severity_level) = $types[$error_level]; + $backtrace = debug_backtrace(); + $caller = _drupal_get_last_caller($backtrace); + if (!function_exists('filter_xss_admin')) { + require_once DRUPAL_ROOT . '/includes/common.inc'; + } + // We treat recoverable errors as fatal. + _drupal_log_error(array( + '%type' => isset($types[$error_level]) ? $severity_msg : 'Unknown error', + // The standard PHP error handler considers that the error messages + // are HTML. We mimick this behavior here. + '!message' => filter_xss_admin($message), + '%function' => $caller['function'], + '%file' => $caller['file'], + '%line' => $caller['line'], + 'severity_level' => $severity_level, + ), $error_level == E_RECOVERABLE_ERROR); + } + return; + } + // Don't respond to the error if it was suppressed with a '@' + if (error_reporting() == 0) { + return; + } + // Don't respond to warning caused by ourselves. + if (preg_match('#Cannot modify header information - headers already sent by \\([^\\)]*[/\\\\]devel[/\\\\]#', $message)) { + return; + } + if ($error_level & error_reporting()) { + // Only write each distinct NOTICE message once, as repeats do not give any + // further information and can choke the page output. + if ($error_level == E_NOTICE) { + static $written = array(); + if (!empty($written[$line][$filename][$message])) { + return; + } + $written[$line][$filename][$message] = TRUE; + } + + require_once DRUPAL_ROOT . '/includes/errors.inc'; + $types = drupal_error_levels(); + $type = $types[$error_level]; + $backtrace = debug_backtrace(); + $variables = array( + '%error' => $type[0], + '%message' => $message, + '%function' => $backtrace[1]['function'] . '()', + '%file' => $filename, + '%line' => $line, + ); + + $msg = t('%error: %message in %function (line %line of %file).', $variables); + + // Show message if error_level is ERROR_REPORTING_DISPLAY_SOME or higher. + // (This is Drupal's error_level, which is different from $error_level, + // and we purposely ignore the difference between _SOME and _ALL, + // see #970688!) + if (variable_get('error_level', 1) >= 1) { + $error_handlers = devel_get_handlers(); + if (!empty($error_handlers[DEVEL_ERROR_HANDLER_STANDARD])) { + drupal_set_message($msg, ($type[1] <= WATCHDOG_ERROR ? 'error' : 'warning')); + } + if (!empty($error_handlers[DEVEL_ERROR_HANDLER_BACKTRACE_KRUMO])) { + print $msg . " =>\n"; + ddebug_backtrace(FALSE, 1); + } + if (!empty($error_handlers[DEVEL_ERROR_HANDLER_BACKTRACE_DPM])) { + dpm(ddebug_backtrace(TRUE, 1), $msg, 'warning'); + } + } + + $watchdog = 'watchdog'; + $watchdog('php', $msg, array(), $type[1]); + } +} + +/** + * Implements hook_permission(). + */ +function devel_permission() { + return array( + 'access devel information' => array( + 'description' => t('View developer output like variable printouts, query log, etc.'), + 'title' => t('Access developer information'), + 'restrict access' => TRUE, + ), + 'execute php code' => array( + 'title' => t('Execute PHP code'), + 'description' => t('Run arbitrary PHP from a block.'), + 'restrict access' => TRUE, + ), + 'switch users' => array( + 'title' => t('Switch users'), + 'description' => t('Become any user on the site with just a click.'), + 'restrict access' => TRUE, + ), + ); +} + +/** + * Implements hook_block_info(). + */ +function devel_block_info() { + $blocks['execute_php'] = array( + 'info' => t('Execute PHP'), + 'cache' => DRUPAL_NO_CACHE, + ); + $blocks['switch_user'] = array( + 'info' => t('Switch user'), + 'cache' => DRUPAL_NO_CACHE, + ); + return $blocks; +} + +/** + * Implements hook_block_configure(). + */ +function devel_block_configure($delta) { + if ($delta == 'switch_user') { + $form['list_size'] = array( + '#type' => 'textfield', + '#title' => t('Number of users to display in the list'), + '#default_value' => variable_get('devel_switch_user_list_size', 10), + '#size' => '3', + '#maxlength' => '4', + ); + $form['include_anon'] = array( + '#type' => 'checkbox', + '#title' => t('Include %anonymous', array('%anonymous' => format_username(drupal_anonymous_user()))), + '#default_value' => variable_get('devel_switch_user_include_anon', FALSE), + ); + $form['show_form'] = array( + '#type' => 'checkbox', + '#title' => t('Allow entering any user name'), + '#default_value' => variable_get('devel_switch_user_show_form', TRUE), + ); + return $form; + } +} + +/** + * Implements hook_block_save(). + */ +function devel_block_save($delta, $edit = array()) { + if ($delta == 'switch_user') { + variable_set('devel_switch_user_list_size', $edit['list_size']); + variable_set('devel_switch_user_include_anon', $edit['include_anon']); + variable_set('devel_switch_user_show_form', $edit['show_form']); + } +} + +/** + * Implements hook_block_view(). + */ +function devel_block_view($delta) { + $block = array(); + switch ($delta) { + case 'switch_user': + $block = devel_block_switch_user(); + break; + + case 'execute_php': + if (user_access('execute php code')) { + $block['content'] = drupal_get_form('devel_execute_block_form'); + } + break; + } + return $block; +} + +/** + * Provides the Switch user block. + */ +function devel_block_switch_user() { + $links = devel_switch_user_list(); + if (!empty($links) || user_access('switch users')) { + drupal_add_css(drupal_get_path('module', 'devel') . '/devel.css'); + $block['subject'] = t('Switch user'); + $build['devel_links'] = array('#theme' => 'links', '#links' => $links); + if (variable_get('devel_switch_user_show_form', TRUE)) { + $build['devel_form'] = drupal_get_form('devel_switch_user_form'); + } + $block['content'] = $build; + return $block; + } +} + +/** + * Provides the Switch user list. + */ +function devel_switch_user_list() { + global $user; + + $links = array(); + if (user_access('switch users')) { + $list_size = variable_get('devel_switch_user_list_size', 10); + if ($include_anon = variable_get('devel_switch_user_include_anon', FALSE)) { + --$list_size; + } + $dest = drupal_get_destination(); + // Try to find at least $list_size users that can switch. + // Inactive users are omitted from all of the following db selects. + $roles = user_roles(TRUE, 'switch users'); + $query = db_select('users', 'u'); + $query->addField('u', 'uid'); + $query->addField('u', 'access'); + $query->distinct(); + $query->condition('u.uid', 0, '>'); + $query->condition('u.status', 0, '>'); + $query->orderBy('u.access', 'DESC'); + $query->range(0, $list_size); + + if (!isset($roles[DRUPAL_AUTHENTICATED_RID])) { + $query->leftJoin('users_roles', 'r', 'u.uid = r.uid'); + $or_condition = db_or(); + $or_condition->condition('u.uid', 1); + if (!empty($roles)) { + $or_condition->condition('r.rid', array_keys($roles), 'IN'); + } + $query->condition($or_condition); + } + + $uids = $query->execute()->fetchCol(); + $accounts = user_load_multiple($uids); + + foreach ($accounts as $account) { + $path = 'devel/switch/' . $account->name; + $links[$account->uid] = array( + 'title' => drupal_placeholder(format_username($account)), + 'href' => $path, + 'query' => $dest + array('token' => drupal_get_token($path . '|' . $dest['destination'])), + 'attributes' => array('title' => t('This user can switch back.')), + 'html' => TRUE, + 'last_access' => $account->access, + ); + } + $num_links = count($links); + if ($num_links < $list_size) { + // If we don't have enough, add distinct uids until we hit $list_size. + $uids = db_query_range('SELECT uid FROM {users} WHERE uid > 0 AND uid NOT IN (:uids) AND status > 0 ORDER BY access DESC', 0, $list_size - $num_links, array(':uids' => array_keys($links)))->fetchCol(); + $accounts = user_load_multiple($uids); + foreach ($accounts as $account) { + $path = 'devel/switch/' . $account->name; + $links[$account->uid] = array( + 'title' => format_username($account), + 'href' => $path, + 'query' => $dest + array('token' => drupal_get_token($path . '|' . $dest['destination'])), + 'attributes' => array('title' => t('Caution: this user will be unable to switch back.')), + 'last_access' => $account->access, + ); + } + uasort($links, '_devel_switch_user_list_cmp'); + } + if ($include_anon) { + $path = 'devel/switch'; + $link = array( + 'title' => format_username(drupal_anonymous_user()), + 'href' => $path, + 'query' => $dest + array('token' => drupal_get_token($path . '/|' . $dest['destination'])), + 'attributes' => array('title' => t('Caution: the anonymous user will be unable to switch back.')), + ); + if (user_access('switch users', drupal_anonymous_user())) { + $link['title'] = drupal_placeholder($link['title']); + $link['attributes'] = array('title' => t('This user can switch back.')); + $link['html'] = TRUE; + } + $links[] = $link; + } + } + if (array_key_exists($user->uid, $links)) { + $links[$user->uid]['title'] = '' . $links[$user->uid]['title'] . ''; + } + return $links; +} + +/** + * Comparison helper function for uasort() in devel_switch_user_list(). + * + * Sorts the Switch User links by the user's last access timestamp. + */ +function _devel_switch_user_list_cmp($a, $b) { + return $b['last_access'] - $a['last_access']; +} + +/** + * Provides the Switch user form. + */ +function devel_switch_user_form() { + $form['username'] = array( + '#type' => 'textfield', + '#description' => t('Enter username'), + '#autocomplete_path' => 'user/autocomplete', + '#maxlength' => USERNAME_MAX_LENGTH, + '#size' => 16, + ); + $form['submit'] = array( + '#type' => 'submit', + '#value' => t('Switch'), + ); + $form['#attributes'] = array('class' => array('clearfix')); + return $form; +} + +/** + * Provides the devel docs form. + */ +function devel_doc_function_form() { + $version = devel_get_core_version(VERSION); + $form['function'] = array( + '#type' => 'textfield', + '#description' => t('Enter function name for api lookup'), + '#size' => 16, + '#maxlength' => 255, + ); + $form['version'] = array('#type' => 'value', '#value' => $version); + $form['submit_button'] = array( + '#type' => 'submit', + '#value' => t('Submit'), + ); + return $form; +} + +/** + * Submit handler for the API lookup form. + */ +function devel_doc_function_form_submit($form, &$form_state) { + $version = $form_state['values']['version']; + $function = $form_state['values']['function']; + $api = variable_get('devel_api_url', 'api.drupal.org'); + $form_state['redirect'] = "http://$api/api/function/$function/$version"; +} + +/** + * Validate handler for the Switch user form. + */ +function devel_switch_user_form_validate($form, &$form_state) { + if (!$account = user_load_by_name($form_state['values']['username'])) { + form_set_error('username', t('Username not found')); + } +} + +/** + * Submit handler for the Switch user form. + */ +function devel_switch_user_form_submit($form, &$form_state) { + $path = 'devel/switch/' . $form_state['values']['username']; + $form_state['redirect'] = array( + $path, + array( + 'query' => array( + 'destination' => '', + 'token' => drupal_get_token($path . '|'), + ))); +} + +/** + * Implements hook_drupal_goto_alter(). + */ +function devel_drupal_goto_alter($path, $options, $http_response_code) { + global $user; + + if (isset($path) && !devel_silent()) { + // The page we are leaving is a drupal_goto(). Present a redirection page + // so that the developer can see the intermediate query log. + // We don't want to load user module here, so keep function_exists() call. + if (isset($user) && function_exists('user_access') && user_access('access devel information') && variable_get('devel_redirect_page', 0)) { + $destination = function_exists('url') ? url($path, $options) : $path; + $output = t_safe('

The user is being redirected to @destination.

', array('@destination' => $destination)); + drupal_deliver_page($output); + + // Don't allow the automatic redirect to happen. + exit(); + } + else { + $GLOBALS['devel_redirecting'] = TRUE; + } + } +} + +/** + * Implements hook_library_alter(). + */ +function devel_library_alter(&$libraries, $module) { + // Use an uncompressed version of jQuery for debugging. + if ($module === 'system' && variable_get('devel_use_uncompressed_jquery', FALSE) && isset($libraries['jquery'])) { + // Make sure we're not changing the jQuery version used on the site. + if (version_compare($libraries['jquery']['version'], '1.4.4', '=')) { + $libraries['jquery']['js'] = array( + drupal_get_path('module', 'devel') . '/jquery-1.4.4-uncompressed.js' => array('weight' => JS_LIBRARY - 20), + ); + } + else { + if (!devel_silent() && user_access('access devel information')) { + drupal_set_message(t('jQuery could not be replaced with an uncompressed version of 1.4.4, because jQuery @version is running on the site.', array('@version' => $libraries['jquery']['version']))); + } + + } + } +} + +/** + * Runs on shutdown to clean up and display developer information. + * + * devel_boot() registers this function as a shutdown function. + * The bulk of the work is done in devel_shutdown_real(). + */ +function devel_shutdown() { + // Register the real shutdown function so it runs after other shutdown + // functions. + drupal_register_shutdown_function('devel_shutdown_real'); + + global $devel_run_id; + $devel_run_id = devel_xhprof_is_enabled() ? devel_shutdown_xhprof() : NULL; + if ($devel_run_id && function_exists('drush_log')) { + drush_log('xhprof link: ' . devel_xhprof_link($devel_run_id, 'url'), 'notice'); + } +} + +/** + * Implements hook_page_alter(). + */ +function devel_page_alter($page) { + if (variable_get('devel_page_alter', FALSE) && user_access('access devel information')) { + dpm($page, 'page'); + } +} + +/** + * Implements hook_ajax_render_alter(). + * + * Disables our footer stuff based on ajax response. + * + * AJAX render reponses sometimes are sent as text/html. We have to catch them + * here and disable our footer stuff. + */ +function devel_ajax_render_alter() { + $GLOBALS['devel_shutdown'] = FALSE; +} + +/** + * Runs on shutdown to display developer information in the footer. + * + * devel_shutdown() registers this function as a shutdown function. + */ +function devel_shutdown_real() { + global $user; + $output = $txt = ''; + + // Set $GLOBALS['devel_shutdown'] = FALSE in order to supress the + // devel footer for a page. Not necessary if your page outputs any + // of the Content-type http headers tested below (e.g. text/xml, + // text/javascript, etc). This is is advised where applicable. + if (!devel_silent() && !isset($GLOBALS['devel_shutdown']) && !isset($GLOBALS['devel_redirecting'])) { + // Try not to break non html pages. + if (function_exists('drupal_get_http_header')) { + $header = drupal_get_http_header('content-type'); + if ($header) { + $formats = array('xml', 'javascript', 'json', 'plain', 'image', + 'application', 'csv', 'x-comma-separated-values'); + foreach ($formats as $format) { + if (strstr($header, $format)) { + return; + } + } + } + } + + if (isset($user) && user_access('access devel information')) { + $queries = (devel_query_enabled() ? Database::getLog('devel', 'default') : NULL); + $output .= devel_shutdown_summary($queries); + $output .= devel_shutdown_query($queries); + } + + if ($output) { + // TODO: gzip this text if we are sending a gzip page. + // See drupal_page_header(). + // For some reason, this is not actually printing for cached pages even + // though it gets executed and $output looks good. + print $output; + } + } +} + +/** + * Returns the rendered shutdown summary. + */ +function devel_shutdown_summary($queries) { + $sum = 0; + $output = ''; + list($counts, $query_summary) = devel_query_summary($queries); + + if (variable_get('devel_query_display', FALSE)) { + // Query log on. + $output .= $query_summary; + $output .= t_safe(' Queries exceeding @threshold ms are highlighted.', array('@threshold' => variable_get('devel_execution', 5))); + } + + if (variable_get('dev_timer', 0)) { + $output .= devel_timer(); + } + + if (devel_xhprof_is_enabled()) { + $output .= ' ' . devel_xhprof_link($GLOBALS['devel_run_id']); + } + + $output .= devel_shutdown_memory(); + + if ($output) { + return '
' . $output . '
'; + } +} + +/** + * Returns the XHProf run ID. + */ +function devel_shutdown_xhprof() { + // Namespace for your application. + $namespace = variable_get('site_name', ''); + $xhprof_data = xhprof_disable(); + $xhprof_runs = new XHProfRuns_Default(); + return $xhprof_runs->save_run($xhprof_data, $namespace); +} + +/** + * Returns the XHProf link. + */ +function devel_xhprof_link($run_id, $type = 'link') { + // @todo: render results from within Drupal. + $xhprof_url = variable_get('devel_xhprof_url', ''); + // Namespace for your application. + $namespace = variable_get('site_name', ''); + if ($xhprof_url) { + $url = $xhprof_url . '/index.php?run=' . urlencode($run_id) . '&source=' . urlencode($namespace); + return $type == 'url' ? $url : t('XHProf output. ', array('@xhprof' => $url)); + } +} + +/** + * Returns the rendered memory usage. + */ +function devel_shutdown_memory() { + global $memory_init; + + if (variable_get('devel_memory', FALSE)) { + $memory_shutdown = memory_get_usage(); + $args = array( + '@memory_boot' => round($memory_init / 1024 / 1024, 2), + '@memory_shutdown' => round($memory_shutdown / 1024 / 1024, 2), + '@memory_peak' => round(memory_get_peak_usage(TRUE) / 1024 / 1024, 2) + ); + $msg = ' Memory used at: devel_boot()=@memory_boot MB, devel_shutdown()=@memory_shutdown MB, PHP peak=@memory_peak MB.'; + // theme() may not be available. not t() either. + return t_safe($msg, $args); + } +} + +/** + * Returns the rendered query log. + */ +function devel_shutdown_query($queries) { + if (!empty($queries)) { + if (function_exists('theme_get_registry') && theme_get_registry()) { + // Safe to call theme('table). + list($counts, $query_summary) = devel_query_summary($queries); + $output = devel_query_table($queries, $counts); + + // Save all queries to a file in temp dir. Retrieved via AJAX. + devel_query_put_contents($queries); + } + else { + $output = '' . dprint_r($queries, TRUE); + } + return $output; + } +} + +/** + * Writes the variables information to a file. + * + * It will be retrieved on demand via AJAX. + */ +function devel_query_put_contents($queries) { + $request_id = mt_rand(1, 1000000); + $path = "temporary://devel_querylog"; + + // Create the devel_querylog within the temp folder, if needed. + file_prepare_directory($path, FILE_CREATE_DIRECTORY); + + // Occassionally wipe the querylog dir so that files don't accumulate. + if (mt_rand(1, 1000) == 401) { + devel_empty_dir($path); + } + + $path .= "/$request_id.txt"; + $path = file_stream_wrapper_uri_normalize($path); + // Save queries as a json array. Suppress errors due to recursion () + file_put_contents($path, @json_encode($queries)); + $settings['devel'] = array( + // A random string that is sent to the browser. + // It enables the AJAX to retrieve queries from this request. + 'request_id' => $request_id, + ); + print '\n"; +} + +/** + * Returns whether query logging is enabled. + */ +function devel_query_enabled() { + return method_exists('Database', 'getLog') && variable_get('devel_query_display', FALSE); +} + +/** + * Returns the query summary. + */ +function devel_query_summary($queries) { + if (variable_get('devel_query_display', FALSE) && is_array($queries)) { + $sum = 0; + foreach ($queries as $query) { + $text[] = $query['query']; + $sum += $query['time']; + } + $counts = array_count_values($text); + return array( + $counts, + t_safe('Executed @queries queries in @time ms.', + array('@queries' => count($queries), '@time' => round($sum * 1000, 2))), + ); + } +} + +/** + * Devel's t_safe() function. + */ +function t_safe($string, $args) { + // get_t() caused problems here with the theme registry after changing on + // admin/build/modules. The theme_get_registry() call is needed! + if (function_exists('t') && function_exists('theme_get_registry')) { + theme_get_registry(); + return t($string, $args); + } + else { + strtr($string, $args); + } +} + +/** + * Returns the core version. + */ +function devel_get_core_version($version) { + $version_parts = explode('.', $version); + // Map from 4.7.10 -> 4.7 + if ($version_parts[0] < 5) { + return $version_parts[0] . '.' . $version_parts[1]; + } + // Map from 5.5 -> 5 or 6.0-beta2 -> 6 + else { + return $version_parts[0]; + } +} + +/** + * Returns whether the optimizer is compatible. + */ +function devel_is_compatible_optimizer() { + // See http://drupal.org/node/126098. + ob_start(); + phpinfo(); + $info = ob_get_contents(); + ob_end_clean(); + + // Match the Zend Optimizer version in the phpinfo information. + $found = preg_match('/Zend Optimizer v([0-9])\.([0-9])\.([0-9])/', $info, $matches); + + if ($matches) { + $major = $matches[1]; + $minor = $matches[2]; + $build = $matches[3]; + + if ($major >= 3) { + if ($minor >= 3) { + return TRUE; + } + elseif ($minor == 2 && $build >= 8) { + return TRUE; + } + else { + return FALSE; + } + } + else { + return FALSE; + } + } + else { + return TRUE; + } +} + +/** + * Generates the execute block form. + */ +function devel_execute_block_form() { + $form['execute'] = array( + '#type' => 'fieldset', + '#title' => t('Execute PHP Code'), + '#collapsible' => TRUE, + '#collapsed' => (!isset($_SESSION['devel_execute_code'])), + ); + $form['#submit'] = array('devel_execute_form_submit'); + return array_merge_recursive($form, devel_execute_form()); +} + +/** + * Generates the execute form. + */ +function devel_execute_form() { + $form['execute']['code'] = array( + '#type' => 'textarea', + '#title' => t('PHP code to execute'), + '#description' => t('Enter some code. Do not use <?php ?> tags.'), + '#default_value' => (isset($_SESSION['devel_execute_code']) ? $_SESSION['devel_execute_code'] : ''), + '#rows' => 20, + ); + $form['execute']['op'] = array('#type' => 'submit', '#value' => t('Execute')); + $form['#redirect'] = FALSE; + if (isset($_SESSION['devel_execute_code'])) { + unset($_SESSION['devel_execute_code']); + } + return $form; +} + +/** + * Processes PHP execute form submissions. + */ +function devel_execute_form_submit($form, &$form_state) { + ob_start(); + print eval($form_state['values']['code']); + $_SESSION['devel_execute_code'] = $form_state['values']['code']; + dsm(ob_get_clean()); +} + +/** + * Switches to a different user. + * + * We don't call session_save_session() because we really want to change users. + * Usually unsafe! + * + * @param string $name + * The username to switch to, or NULL to log out. + */ +function devel_switch_user($name = NULL) { + global $user; + + if ($user->uid) { + module_invoke_all('user_logout', $user); + } + if (isset($name) && $account = user_load_by_name($name)) { + $old_uid = $user->uid; + $user = $account; + $user->timestamp = time() - 9999; + if (!$old_uid) { + // Switch from anonymous to authorized. + drupal_session_regenerate(); + } + $edit = array(); + user_module_invoke('login', $edit, $user); + } + elseif ($user->uid) { + session_destroy(); + } + drupal_goto(); +} + +/** + * Prints an object using either Krumo (if installed) or devel_print_object(). + * + * @param array|object $object + * An array or object to print. + * @param string $prefix + * Prefix for output items. + */ +function kdevel_print_object($object, $prefix = NULL) { + return has_krumo() ? krumo_ob($object) : devel_print_object($object, $prefix); +} + +/** + * Saves krumo html using output buffering. + */ +function krumo_ob($object) { + ob_start(); + krumo($object); + $output = ob_get_contents(); + ob_end_clean(); + return $output; +} + +/** + * Displays an object or array. + * + * @param array|object $object + * The object or array to display. + * @param string $prefix + * Prefix for the output items (example "$node->", "$user->", "$"). + * @param boolean $header + * Set to FALSE to suppress the output of the h3 tag. + */ +function devel_print_object($object, $prefix = NULL, $header = TRUE) { + drupal_add_css(drupal_get_path('module', 'devel') . '/devel.css'); + $output = '
'; + if ($header) { + $output .= '

' . t('Display of !type !obj', array( + '!type' => str_replace(array('$', '->'), '', $prefix), + '!obj' => gettype($object), + ) + ) . '

'; + } + $output .= _devel_print_object($object, $prefix); + $output .= '
'; + return $output; +} + +/** + * Returns formatted listing for an array or object. + * + * Recursive (and therefore magical) function goes through an array or object + * and returns a nicely formatted listing of its contents. + * + * @param array|object $obj + * Array or object to recurse through. + * @param string $prefix + * Prefix for the output items (example "$node->", "$user->", "$"). + * @param string $parents + * Used by recursion. + * @param boolean $object + * Used by recursion. + * + * @return string + * Formatted html. + * + * @todo + * currently there are problems sending an array with a varname + */ +function _devel_print_object($obj, $prefix = NULL, $parents = NULL, $object = FALSE) { + static $root_type, $out_format; + + // TODO: support objects with references. See http://drupal.org/node/234581. + if (isset($obj->view)) { + return; + } + + if (!isset($root_type)) { + $root_type = gettype($obj); + if ($root_type == 'object') { + $object = TRUE; + } + } + + if (is_object($obj)) { + $obj = (array) $obj; + } + if (is_array($obj)) { + $output = "
\n"; + foreach ($obj as $field => $value) { + if ($field === 'devel_flag_reference') { + continue; + } + if (!is_null($parents)) { + if ($object) { + $field = $parents . '->' . $field; + } + else { + if (is_int($field)) { + $field = $parents . '[' . $field . ']'; + } + else { + $field = $parents . '[\'' . $field . '\']'; + } + } + } + + $type = gettype($value); + + $show_summary = TRUE; + $summary = NULL; + if ($show_summary) { + switch ($type) { + case 'string': + case 'float': + case 'integer': + if (strlen($value) == 0) { + $summary = t("{empty}"); + } + elseif (strlen($value) < 40) { + $summary = htmlspecialchars($value); + } + else { + $summary = format_plural(drupal_strlen($value), '1 character', '@count characters'); + } + break; + case 'array': + case 'object': + $summary = format_plural(count((array) $value), '1 element', '@count elements'); + break; + case 'boolean': + $summary = $value ? t('TRUE') : t('FALSE'); + break; + } + } + if (!is_null($summary)) { + $typesum = '(' . $type . ', ' . $summary . ')'; + } + else { + $typesum = '(' . $type . ')'; + } + + $output .= ''; + $output .= "
{$prefix}{$field} $typesum
\n"; + $output .= "
\n"; + // Check for references. + if (is_array($value) && isset($value['devel_flag_reference'])) { + $value['devel_flag_reference'] = TRUE; + } + // Check for references to prevent errors from recursions. + if (is_array($value) && isset($value['devel_flag_reference']) && !$value['devel_flag_reference']) { + $value['devel_flag_reference'] = FALSE; + $output .= _devel_print_object($value, $prefix, $field); + } + elseif (is_object($value)) { + $value->devel_flag_reference = FALSE; + $output .= _devel_print_object((array) $value, $prefix, $field, TRUE); + } + else { + $value = is_bool($value) ? ($value ? 'TRUE' : 'FALSE') : $value; + $output .= htmlspecialchars(print_r($value, TRUE)) . "\n"; + } + $output .= "
\n"; + } + $output .= "
\n"; + } + return $output; +} + +/** + * Shows all the queries for the page. + * + * Adds a table at the bottom of the page cataloguing data on all the database + * queries that were made to generate the page. + */ +function devel_query_table($queries, $counts) { + $version = devel_get_core_version(VERSION); + $header = array('ms', '#', 'where', 'ops', 'query', 'target'); + $i = 0; + $api = variable_get('devel_api_url', 'api.drupal.org'); + foreach ($queries as $query) { + $function = !empty($query['caller']['class']) ? $query['caller']['class'] . '::' : ''; + $function .= $query['caller']['function']; + $count = isset($counts[$query['query']]) ? $counts[$query['query']] : 0; + + $diff = round($query['time'] * 1000, 2); + if ($diff > variable_get('devel_execution', 5)) { + $cell[$i][] = array('data' => $diff, 'class' => 'marker'); + } + else { + $cell[$i][] = $diff; + } + $cell[$i][] = $count; + $cell[$i][] = l($function, "http://$api/api/function/$function/$version"); + $ops[] = l(t('P'), '', array( + 'attributes' => array( + 'title' => 'Show placeholders', + 'class' => array('dev-placeholders'), + 'qid' => $i, + ))); + $ops[] = l(t('A'), '', array( + 'attributes' => array( + 'title' => 'Show arguments', + 'class' => array('dev-arguments'), + 'qid' => $i, + ))); + // EXPLAIN only valid for select queries. + if (strpos($query['query'], 'UPDATE') === FALSE && strpos($query['query'], 'INSERT') === FALSE && strpos($query['query'], 'DELETE') === FALSE) { + $ops[] = l(t('E'), '', array( + 'attributes' => array( + 'title' => 'Show EXPLAIN', + 'class' => array('dev-explain'), + 'qid' => $i, + ))); + } + $cell[$i][] = implode(' ', $ops); + // 3 divs for each variation of the query. Last 2 are hidden by default. + $placeholders = '
' . check_plain($query['query']) . "
\n"; + $args = '' . "\n"; + $explain = '' . "\n"; + $cell[$i][] = array( + 'id' => "devel-query-$i", + 'data' => $placeholders . $args . $explain, + ); + $cell[$i][] = $query['target']; + $i++; + unset($diff, $count, $ops); + } + if (variable_get('devel_query_sort', DEVEL_QUERY_SORT_BY_SOURCE)) { + usort($cell, '_devel_table_sort'); + } + return theme('devel_querylog', array('header' => $header, 'rows' => $cell)); +} + +/** + * Themes devel's querylog row. + */ +function theme_devel_querylog_row($variables) { + $row = $variables['row']; + $i = 0; + $output = ''; + foreach ($row as $cell) { + $i++; + + if (is_array($cell)) { + $data = !empty($cell['data']) ? $cell['data'] : ''; + unset($cell['data']); + $attr = $cell; + } + else { + $data = $cell; + $attr = array(); + } + + if (!empty($attr['class'])) { + $attr['class'] .= " cell cell-$i"; + } + else { + $attr['class'] = "cell cell-$i"; + } + $attr = drupal_attributes($attr); + + $output .= "
$data
"; + } + return $output; +} + +/** + * Themes devel's querylog. + */ +function theme_devel_querylog($variables) { + $header = $variables['header']; + $rows = $variables['rows']; + $output = ''; + if (!empty($header)) { + $output .= "
"; + $output .= theme('devel_querylog_row', array('row' => $header)); + $output .= "
"; + } + if (!empty($rows)) { + $i = 0; + foreach ($rows as $row) { + $i++; + $zebra = ($i % 2) == 0 ? 'even' : 'odd'; + $output .= "
"; + $output .= theme('devel_querylog_row', array('row' => $row)); + $output .= "
"; + } + } + return $output; +} + +/** + * Devel's table sort. + */ +function _devel_table_sort($a, $b) { + $a = is_array($a[0]) ? $a[0]['data'] : $a[0]; + $b = is_array($b[0]) ? $b[0]['data'] : $b[0]; + if ($a < $b) { + return 1; + } + if ($a > $b) { + return -1; + } + return 0; +} + +/** + * Displays page execution time at the bottom of the page. + */ +function devel_timer() { + $time = timer_read('page'); + return t_safe(' Page execution time was @time ms.', array('@time' => $time)); +} + +/** + * An alias for drupal_debug(). + */ +function dd($data, $label = NULL) { + return drupal_debug($data, $label); +} + +/** + * Logs a variable to a drupal_debug.txt in the site's temp directory. + * + * @param mixed $data + * The variable to log to the drupal_debug.txt log file. + * @param string $label + * (optional) If set, a label to output before $data in the log file. + * + * @return void|false + * Empty if successful, FALSE if the log file could not be written. + * + * @see dd() + * @see http://drupal.org/node/314112 + */ +function drupal_debug($data, $label = NULL) { + $out = ($label ? $label . ': ' : '') . print_r($data, TRUE) . "\n"; + + // The temp directory does vary across multiple simpletest instances. + $file = file_directory_temp() . '/drupal_debug.txt'; + if (file_put_contents($file, $out, FILE_APPEND) === FALSE) { + drupal_set_message(t('Devel was unable to write to %file.', array('%file' => $file)), 'error'); + return FALSE; + } +} + +/** + * Prints the arguments passed into the current function. + */ +function dargs($always = TRUE) { + static $printed; + if ($always || !$printed) { + $bt = debug_backtrace(); + print kdevel_print_object($bt[1]['args']); + $printed = TRUE; + } +} + +/** + * Prints a SQL string from a DBTNG Select object. Includes quoted arguments. + * + * Includes quoted arguments. + * + * @param object $query + * An object that implements the SelectQueryInterface interface. + * @param string $return + * Whether to return the string. Default is FALSE, meaning to print it + * and return $query instead. + * @param string $name + * Optional name for identifying the output. + * @return object|string + * The $query object, or the query string if $return was TRUE. + */ +function dpq($query, $return = FALSE, $name = NULL) { + if (user_access('access devel information')) { + if (method_exists($query, 'preExecute')) { + $query->preExecute(); + } + $sql = (string) $query; + $quoted = array(); + $connection = Database::getConnection(); + foreach ((array) $query->arguments() as $key => $val) { + $quoted[$key] = $connection->quote($val); + } + $sql = strtr($sql, $quoted); + if ($return) { + return $sql; + } + dpm($sql, $name); + } + return ($return ? NULL : $query); +} + +/** + * Prints a variable to the 'message' area of the page. + * + * Uses drupal_set_message(). + * + * @param $input + * An arbitrary value to output. + * @param string $name + * Optional name for identifying the output. + * @param string $type + * Optional message type for drupal_set_message(), defaults to 'status'. + * + * @return input + * The unaltered input value. + */ +function dpm($input, $name = NULL, $type = 'status') { + if (user_access('access devel information')) { + $export = kprint_r($input, TRUE, $name); + drupal_set_message($export, $type); + } + return $input; +} + +/** + * Displays a drupal_var_export() variable to the 'message' area of the page. + * + * Uses drupal_set_message(). + * + * @param $input + * An arbitrary value to output. + * @param string $name + * Optional name for identifying the output. + * + * @return input + * The unaltered input value. + */ +function dvm($input, $name = NULL) { + if (user_access('access devel information')) { + $export = dprint_r($input, TRUE, $name, 'drupal_var_export', FALSE); + drupal_set_message($export); + } + return $input; +} + +/** + * Legacy function that was poorly named. + * + * Use dpm() instead, since the 'p' maps to 'print_r'. + */ +function dsm($input, $name = NULL) { + return dpm($input, $name); +} + +/** + * An alias for dprint_r(). Saves carpal tunnel syndrome. + */ +function dpr($input, $return = FALSE, $name = NULL) { + return dprint_r($input, $return, $name); +} + +/** + * An alias for kprint_r(). Saves carpal tunnel syndrome. + */ +function kpr($input, $return = FALSE, $name = NULL) { + return kprint_r($input, $return, $name); +} + +/** + * Like dpr(), but uses drupal_var_export() instead. + */ +function dvr($input, $return = FALSE, $name = NULL) { + return dprint_r($input, $return, $name, 'drupal_var_export', FALSE); +} + +/** + * Krumo print. + */ +function kprint_r($input, $return = FALSE, $name = NULL, $function = 'print_r') { + // We do not want to krumo() strings and integers and such. + if (merits_krumo($input)) { + if (user_access('access devel information')) { + return $return ? (isset($name) ? $name . ' => ' : '') . krumo_ob($input) : krumo($input); + } + } + else { + return dprint_r($input, $return, $name, $function); + } +} + +/** + * Pretty-print a variable to the browser (no krumo). + * + * Displays only for users with proper permissions. If + * you want a string returned instead of a print, use the 2nd param. + */ +function dprint_r($input, $return = FALSE, $name = NULL, $function = 'print_r', $check= TRUE) { + if (user_access('access devel information')) { + if ($name) { + $name .= ' => '; + } + if ($function == 'drupal_var_export') { + include_once DRUPAL_ROOT . '/includes/utility.inc'; + $output = drupal_var_export($input); + } + else { + ob_start(); + $function($input); + $output = ob_get_clean(); + } + + if ($check) { + $output = check_plain($output); + } + if (count($input, COUNT_RECURSIVE) > DEVEL_MIN_TEXTAREA) { + // Don't use fapi here because sometimes fapi will not be loaded. + $printed_value = "'; + } + else { + $printed_value = '
' . $name . $output . '
'; + } + + if ($return) { + return $printed_value; + } + else { + print $printed_value; + } + } +} + +/** + * Prints a renderable array element to the screen using kprint_r(). + * + * #pre_render and/or #post_render pass-through callback for kprint_r(). + * + * @todo Investigate appending to #suffix. + * @todo Investigate label derived from #id, #title, #name, and #theme. + */ +function devel_render() { + $args = func_get_args(); + // #pre_render and #post_render pass the rendered $element as last argument. + kprint_r(end($args)); + // #pre_render and #post_render expect the first argument to be returned. + return reset($args); +} + +/** + * Prints the function call stack. + * + * @param $return + * Pass TRUE to return the formatted backtrace rather than displaying it in + * the browser via kprint_r(). + * @param $pop + * How many items to pop from the top of the stack; useful when calling from + * an error handler. + * @param $options + * Options to pass on to PHP's debug_backtrace(), depending on your PHP + * version. + * + * @return string|NULL + * The formatted backtrace, if requested, or NULL. + * + * @see http://php.net/manual/en/function.debug-backtrace.php + */ +function ddebug_backtrace($return = FALSE, $pop = 0, $options = TRUE) { + if (user_access('access devel information')) { + $backtrace = debug_backtrace($options); + while ($pop-- > 0) { + array_shift($backtrace); + } + $counter = count($backtrace); + $path = $backtrace[$counter - 1]['file']; + $path = substr($path, 0, strlen($path) - 10); + $paths[$path] = strlen($path) + 1; + $paths[DRUPAL_ROOT] = strlen(DRUPAL_ROOT) + 1; + $nbsp = "\xC2\xA0"; + + // Show message if error_level is ERROR_REPORTING_DISPLAY_SOME or higher. + // (This is Drupal's error_level, which is different from $error_level, + // and we purposely ignore the difference between _SOME and _ALL, + // see #970688!) + if (variable_get('error_level', 1) >= 1) { + while (!empty($backtrace)) { + $call = array(); + if (isset($backtrace[0]['file'])) { + $call['file'] = $backtrace[0]['file']; + foreach ($paths as $path => $len) { + if (strpos($backtrace[0]['file'], $path) === 0) { + $call['file'] = substr($backtrace[0]['file'], $len); + } + } + $call['file'] .= ':' . $backtrace[0]['line']; + } + if (isset($backtrace[1])) { + if (isset($backtrace[1]['class'])) { + $function = $backtrace[1]['class'] . $backtrace[1]['type'] . $backtrace[1]['function'] . '()'; + } + else { + $function = $backtrace[1]['function'] . '()'; + } + $backtrace[1] += array('args' => array()); + $call['args'] = $backtrace[1]['args']; + } + else { + $function = 'main()'; + $call['args'] = $_GET; + } + $nicetrace[($counter <= 10 ? $nbsp : '') . --$counter . ': ' . $function] = $call; + array_shift($backtrace); + } + if ($return) { + return $nicetrace; + } + kprint_r($nicetrace); + } + } +} + +/** + * Deletes all files in a dir. + */ +function devel_empty_dir($dir) { + foreach (new DirectoryIterator($dir) as $file_info) { + if ($file_info->isFile()) { + unlink($file_info->getPathname()); + } + } +} + +/* + * Migration-related functions. + */ + +/** + * Regenerates the data in node_comment_statistics table. + * Technique - http://www.artfulsoftware.com/infotree/queries.php?&bw=1280#101 + * + * @return void + */ +function devel_rebuild_node_comment_statistics() { + // Empty table. + db_truncate('node_comment_statistics')->execute(); + + // TODO: DBTNG. Ignore keyword is Mysql only? Is only used in the rare case + // when two comments on the same node share same timestamp. + $sql = " + INSERT IGNORE INTO {node_comment_statistics} (nid, cid, last_comment_timestamp, last_comment_name, last_comment_uid, comment_count) ( + SELECT c.nid, c.cid, c.created, c.name, c.uid, c2.comment_count FROM {comment} c + JOIN ( + SELECT c.nid, MAX(c.created) AS created, COUNT(*) AS comment_count FROM {comment} c WHERE status = 1 GROUP BY c.nid + ) AS c2 ON c.nid = c2.nid AND c.created = c2.created + )"; + db_query($sql, array(':published' => COMMENT_PUBLISHED)); + + // Insert records into the node_comment_statistics for nodes that are missing. + $query = db_select('node', 'n'); + $query->leftJoin('node_comment_statistics', 'ncs', 'ncs.nid = n.nid'); + $query->addField('n', 'changed', 'last_comment_timestamp'); + $query->addField('n', 'uid', 'last_comment_uid'); + $query->addField('n', 'nid'); + $query->addExpression('0', 'comment_count'); + $query->addExpression('NULL', 'last_comment_name'); + $query->isNull('ncs.comment_count'); + + db_insert('node_comment_statistics', array('return' => Database::RETURN_NULL)) + ->from($query) + ->execute(); +} + +/** + * Implements hook_form_alter(). + * + * Adds mouse-over hints on the Permissions page to display + * language-independent machine names and module base names. + */ +function devel_form_user_admin_permissions_alter(&$form, &$form_state) { + if (user_access('access devel information') && variable_get('devel_raw_names', FALSE)) { + foreach ($form['permission'] as $perm => $data) { + if (is_numeric($perm)) { + $form['permission'][$perm]['#markup'] = '' . $form['permission'][$perm]['#markup'] . ''; + } + else { + $form['permission'][$perm]['#markup'] = '' . $form['permission'][$perm]['#markup'] . ''; + } + } + } +} + +/** + * Implements hook_form_alter(). + * + * Adds mouse-over hints on the Modules page to display module base names. + */ +function devel_form_system_modules_alter(&$form, &$form_state) { + if (user_access('access devel information') && variable_get('devel_raw_names', FALSE) && isset($form['modules']) && is_array($form['modules'])) { + foreach (element_children($form['modules']) as $key) { + if (isset($form['modules'][$key]['name']['#markup'])) { + $form['modules'][$key]['name']['#markup'] = '' . $form['modules'][$key]['name']['#markup'] . ''; + } + elseif (is_array($form['modules'][$key])) { + foreach (element_children($form['modules'][$key]) as $key2) { + if (isset($form['modules'][$key][$key2]['name']['#markup'])) { + $form['modules'][$key][$key2]['name']['#markup'] = '' . $form['modules'][$key][$key2]['name']['#markup'] . ''; + } + } + } + } + } +} diff --git a/sites/all/modules/contrib/devel/devel.pages.inc b/sites/all/modules/contrib/devel/devel.pages.inc new file mode 100644 index 0000000..7a137da --- /dev/null +++ b/sites/all/modules/contrib/devel/devel.pages.inc @@ -0,0 +1,298 @@ + $links)); +} + +/** + * Menu callback; clears all caches, then redirects to the previous page. + */ +function devel_cache_clear() { + drupal_flush_all_caches(); + + drupal_set_message('Cache cleared.'); + + drupal_goto(); +} + +// A menu callback. Called by the AJAX link in query log. +function devel_querylog_explain($request_id, $qid) { + if (!is_numeric($request_id)) { + return MENU_ACCESS_DENIED; + } + + $path = "temporary://devel_querylog/$request_id.txt"; + $path = file_stream_wrapper_uri_normalize($path); + $queries = json_decode(file_get_contents($path)); + $query = $queries[$qid]; + $result = db_query('EXPLAIN ' . $query->query, (array)$query->args)->fetchAllAssoc('table'); + $i = 1; + foreach ($result as $row) { + $row = (array)$row; + if ($i == 1) { + $header = array_keys($row); + } + $rows[] = array_values($row); + $i++; + } + // Print and return nothing thus avoiding page wrapper. + $output = theme('table', array('header' => $header, 'rows' => $rows)); + print $output; + $GLOBALS['devel_shutdown'] = FALSE; +} + +// A menu callback. Called by the AJAX link in query log. +function devel_querylog_arguments($request_id, $qid) { + if (!is_numeric($request_id)) { + return MENU_ACCESS_DENIED; + } + + $path = "temporary://devel_querylog/$request_id.txt"; + $path = file_stream_wrapper_uri_normalize($path); + $queries = json_decode(file_get_contents($path)); + $query = $queries[$qid]; + $conn = Database::getConnection(); + $quoted = array(); + foreach ((array)$query->args as $key => $val) { + $quoted[$key] = $conn->quote($val); + } + $output = strtr($query->query, $quoted); + + // print and return nothing thus avoiding page wrapper. + print $output; + $GLOBALS['devel_shutdown'] = FALSE; +} + +/** + * Menu callback; clear the database, resetting the menu to factory defaults. + */ +function devel_menu_rebuild() { + menu_rebuild(); + drupal_set_message(t('The menu router has been rebuilt.')); + drupal_goto(); +} + +/** + * Display a dropdown of installed modules with the option to reinstall them. + */ +function devel_reinstall($form, &$form_state) { + $output = ''; + $modules = module_list(); + sort($modules); + $options = drupal_map_assoc($modules); + $form['list'] = array( + '#type' => 'checkboxes', + '#options' => $options, + '#description' => t('Uninstall and then install the selected modules. hook_uninstall() and hook_install() will be executed and the schema version number will be set to the most recent update number. You may have to manually clear out any existing tables first if the module doesn\'t implement hook_uninstall().'), + ); + $form['submit'] = array( + '#value' => t('Reinstall'), + '#type' => 'submit', + ); + return $form; +} + +/** + * Process reinstall menu form submissions. + */ +function devel_reinstall_submit($form, &$form_state) { + // require_once './includes/install.inc'; + $modules = array_filter($form_state['values']['list']); + module_disable($modules, FALSE); + drupal_uninstall_modules($modules, FALSE); + module_enable($modules, FALSE); + drupal_set_message(t('Uninstalled and installed: %names.', array('%names' => implode(', ', $modules)))); +} + +// Menu callback. +function devel_theme_registry() { + drupal_theme_initialize(); + $hooks = theme_get_registry(); + ksort($hooks); + return kprint_r($hooks, TRUE); +} + +// Menu callback. $entity_type argument not currently used in the UI. +function devel_entity_info_page($entity_type = NULL) { + $info = entity_get_info($entity_type); + ksort($info); + return kprint_r($info, TRUE); +} + +// Menu callback. +function devel_field_info_page() { + $info = field_info_fields(); + $output = kprint_r($info, TRUE, t('Fields')); + $info = field_info_instances(); + $output .= kprint_r($info, TRUE, t('Instances')); + $info = field_info_bundles(); + $output .= kprint_r($info, TRUE, t('Bundles')); + $info = field_info_field_types(); + $output .= kprint_r($info, TRUE, t('Field types')); + $info = field_info_formatter_types(); + $output .= kprint_r($info, TRUE, t('Formatter types')); + $info = field_info_storage_types(); + $output .= kprint_r($info, TRUE, t('Storage types')); + $info = field_info_widget_types(); + $output .= kprint_r($info, TRUE, t('Widget types')); + return $output; +} + +function devel_variable_form() { + $header = array( + 'name' => array('data' => t('Name'), 'field' => 'name', 'sort' => 'asc'), + 'value' => array('data' => t('Value'), 'field' => 'value'), + 'length' => array('data' => t('Length'), 'field' => 'length'), + 'edit' => array('data' => t('Operations')), + ); + // TODO: we could get variables out of $conf but that would include hard coded ones too. ideally i would highlight overrridden/hard coded variables + $query = db_select('variable', 'v')->extend('TableSort'); + $query->fields('v', array('name', 'value')); + switch (db_driver()) { + case 'mssql': + $query->addExpression("LEN(v.value)", 'length'); + break; + default: + $query->addExpression("LENGTH(v.value)", 'length'); + break; + } + $result = $query + ->orderByHeader($header) + ->execute(); + + foreach ($result as $row) { + // $variables[$row->name] = ''; + $options[$row->name]['name'] = check_plain($row->name); + if (merits_krumo($row->value)) { + $value = krumo_ob(variable_get($row->name, NULL)); + } + else { + if (drupal_strlen($row->value) > 70) { + $value = check_plain(drupal_substr($row->value, 0, 65)) .'...'; + } + else { + $value = check_plain($row->value); + } + } + $options[$row->name]['value'] = $value; + $options[$row->name]['length'] = $row->length; + $options[$row->name]['edit'] = l(t('Edit'), "devel/variable/edit/$row->name"); + } + $form['variables'] = array( + '#type' => 'tableselect', + '#header' => $header, + '#options' => $options, + '#empty' => t('No variables.'), + ); + $form['submit'] = array( + '#type' => 'submit', + '#value' => t('Delete'), + ); + + // krumo($form); + return $form; +} + +function devel_variable_form_submit($form, &$form_state) { + $deletes = array_filter($form_state['values']['variables']); + array_walk($deletes, 'variable_del'); + if (count($deletes)) { + drupal_set_message(format_plural(count($deletes), 'One variable deleted.', '@count variables deleted.')); + } +} + +function devel_variable_edit($form, &$form_state, $name) { + $value = variable_get($name, 'not found'); + $form['name'] = array( + '#type' => 'value', + '#value' => $name + ); + $form['value'] = array( + '#type' => 'item', + '#title' => t('Old value'), + '#markup' => dpr($value, TRUE), + ); + if (is_string($value) || is_numeric($value)) { + $form['new'] = array( + '#type' => 'textarea', + '#title' => t('New value'), + '#default_value' => $value + ); + $form['submit'] = array( + '#type' => 'submit', + '#value' => t('Submit'), + ); + } + else { + $api = variable_get('devel_api_url', 'api.drupal.org'); + $form['new'] = array( + '#type' => 'item', + '#title' => t('New value'), + '#markup' => t('Sorry, complex variable types may not be edited yet. Use the Execute PHP block and the variable_set() function.', array('@variable-set-doc' => "http://$api/api/HEAD/function/variable_set")) + ); + } + drupal_set_title($name); + return $form; +} + +function devel_variable_edit_submit($form, &$form_state) { + variable_set($form_state['values']['name'], $form_state['values']['new']); + drupal_set_message(t('Saved new value for %name.', array('%name' => $form_state['values']['name']))); + 'devel/variable'; +} + +/** + * Menu callback: display the session. + */ +function devel_session() { + global $user; + $output = kprint_r($_SESSION, TRUE); + $headers = array(t('Session name'), t('Session ID')); + $output .= theme('table', array('headers' => $headers, 'rows' => array(array(session_name(), session_id())))); + return $output; +} + +/** + * Menu callback; prints the loaded structure of the current node/user. + */ +function devel_load_object($type, $object, $name = NULL) { + $name = isset($name) ? $name : $type; + return kdevel_print_object($object, '$'. $name .'->'); +} + +/** + * Menu callback; prints the render structure of the current object (currently node or user). + */ +function devel_render_object($type, $object, $name = NULL) { + $name = isset($name) ? $name : $type; + $function = $type . '_view'; + $build = $function($object); + return kdevel_print_object($build, '$'. $name .'->'); +} + +function devel_elements_page() { + return kdevel_print_object(module_invoke_all('element_info')); +} + +function devel_phpinfo() { + print phpinfo(); + drupal_exit(); +} diff --git a/sites/all/modules/contrib/devel/devel.rules.inc b/sites/all/modules/contrib/devel/devel.rules.inc new file mode 100644 index 0000000..0a7a078 --- /dev/null +++ b/sites/all/modules/contrib/devel/devel.rules.inc @@ -0,0 +1,24 @@ + array( + 'base' => 'devel_rules_debug_action', + 'label' => t('Debug value'), + 'group' => t('Devel'), + 'parameter' => array( + 'value' => array('type' => 'unknown', 'label' => t('Value to debug')), + ), + ), + ); +} + +/** + * Rules action for debugging values. + */ +function devel_rules_debug_action($value) { + dpm($value); +} diff --git a/sites/all/modules/contrib/devel/devel.test b/sites/all/modules/contrib/devel/devel.test new file mode 100644 index 0000000..50defcf --- /dev/null +++ b/sites/all/modules/contrib/devel/devel.test @@ -0,0 +1,53 @@ + 'Devel Mail interface', + 'description' => 'Test sending mails with debug interface', + 'group' => 'Devel', + ); + } + + function setUp() { + parent::setUp(); + } + + /** + * Test mail logging functionality. + */ + function testMail() { + require_once ('devel.mail.inc'); + $message = array(); + $message['to'] = 'drupal@example.com'; + $message['subject'] = 'Test mail'; + $message['headers'] = array( + 'From' => 'postmaster@example.com', + 'X-stupid' => 'dumb', + ); + $message['body'] = "I am the body of this message"; + $d = new DevelMailLog(); + + $filename = $d->getFileName($message); + $content = $d->composeMessage($message); + $expected_filename = $d->getOutputDirectory() . '/drupal@example.com-Test_mail-' . date('y-m-d_his') . '.mail.txt'; + $this->assertEqual($filename, $expected_filename); + $this->assertEqual($content, 'From: postmaster@example.com +X-stupid: dumb +To: drupal@example.com +Subject: Test mail + +I am the body of this message'); + } + +} diff --git a/sites/all/modules/contrib/devel/develDrushTest.php b/sites/all/modules/contrib/devel/develDrushTest.php new file mode 100644 index 0000000..11e54ca --- /dev/null +++ b/sites/all/modules/contrib/devel/develDrushTest.php @@ -0,0 +1,25 @@ +setUpDrupal(1, TRUE); + $options = array( + 'root' => $this->webroot(), + 'uri' => key($sites), + ); + $this->drush('pm-download', array('devel'), $options + array('cache' => NULL)); + $this->drush('pm-enable', array('devel'), $options + array('skip' => NULL, 'yes' => NULL)); + + $this->drush('fn-view', array('drush_main'), $options); + $output = $this->getOutput(); + $this->assertContains('@return', $output, 'Output contain @return Doxygen.'); + $this->assertContains('function drush_main() {', $output, 'Output contains function drush_main() declaration'); + } +} \ No newline at end of file diff --git a/sites/all/modules/contrib/devel/devel_generate/devel_generate.drush.inc b/sites/all/modules/contrib/devel/devel_generate/devel_generate.drush.inc new file mode 100644 index 0000000..65ae382 --- /dev/null +++ b/sites/all/modules/contrib/devel/devel_generate/devel_generate.drush.inc @@ -0,0 +1,238 @@ + 'drush_devel_generate_users', + 'description' => 'Create users.', + 'arguments' => array( + 'number_users' => 'Number of users to generate.', + ), + 'options' => array( + 'kill' => 'Delete all users before generating new ones.', + 'roles' => 'A comma delimited list of role IDs which should be granted to the new users. No need to specify authenticated user role.', + 'pass' => 'Specify a password to be set for all generated users.', + ), + 'aliases' => array('genu'), + ); + $items['generate-terms'] = array( + 'callback' => 'drush_devel_generate_terms', + 'description' => 'Create terms in specified vocabulary.', + 'arguments' => array( + 'machine_name' => 'Vocabulary machine name into which new terms will be inserted.', + 'number_terms' => 'Number of terms to insert. Defaults to 10.', + ), + 'options' => array( + 'kill' => 'Delete all terms in specified vocabulary before generating.', + 'feedback' => 'An integer representing interval for insertion rate logging. Defaults to 1000', + ), + 'aliases' => array('gent'), + + ); + $items['generate-vocabs'] = array( + 'callback' => 'drush_devel_generate_vocabs', + 'description' => 'Create vocabularies.', + 'arguments' => array( + 'num_vocabs' => 'Number of vocabularies to create. Defaults to 1.', + ), + 'options' => array( + 'kill' => 'Delete all vocabularies before generating.', + ), + 'aliases' => array('genv'), + ); + $items['generate-content'] = array( + 'callback' => 'drush_devel_generate_content', + 'description' => 'Create content.', + 'drupal dependencies' => array('devel_generate'), + 'arguments' => array( + 'number_nodes' => 'Number of nodes to generate.', + 'maximum_comments' => 'Maximum number of comments to generate.', + ), + 'options' => array( + 'kill' => 'Delete all content before generating new content.', + 'types' => 'A comma delimited list of content types to create. Defaults to page,article.', + 'feedback' => 'An integer representing interval for insertion rate logging. Defaults to 1000', + 'skip-fields' => 'A comma delimited list of fields to omit when generating random values', + 'languages' => 'A comma-separated list of language codes', + ), + 'aliases' => array('genc'), + ); + $items['generate-menus'] = array( + 'callback' => 'drush_devel_generate_menus', + 'description' => 'Create menus and menu items.', + 'drupal dependencies' => array('devel_generate'), // Remove these once devel.module is moved down a directory. http://drupal.org/node/925246 + 'arguments' => array( + 'number_menus' => 'Number of menus to generate. Defaults to 2.', + 'number_links' => 'Number of links to generate. Defaults to 50.', + 'max_depth' => 'Max link depth. Defaults to 3', + 'max_width' => 'Max width of first level of links. Defaults to 8.', + ), + 'options' => array( + 'kill' => 'Delete all previously generated menus and links before generating new menus and links.', + ), + 'aliases' => array('genm'), + ); + return $items; +} + + +/** + * Command callback. Generate a number of users. + */ +function drush_devel_generate_users($num_users = NULL) { + if (drush_generate_is_number($num_users) == FALSE) { + return drush_set_error('DEVEL_GENERATE_INVALID_INPUT', t('Invalid number of users.')); + } + drush_generate_include_devel(); + $roles = drush_get_option('roles') ? explode(',', drush_get_option('roles')) : array(); + $pass = drush_get_option('pass', NULL); + devel_create_users($num_users, drush_get_option('kill'), 0, $roles, $pass); + drush_log(t('Generated @number users.', array('@number' => $num_users)), 'success'); +} + +/** + * Command callback. Generate a number of terms in given vocabs. + */ +function drush_devel_generate_terms($vname = NULL, $num_terms = 10) { + // Try to convert machine name to a vocab ID + if (!$vocab = taxonomy_vocabulary_machine_name_load($vname)) { + return drush_set_error('DEVEL_GENERATE_INVALID_INPUT', dt('Invalid vocabulary name: !name', array('!name' => $vname))); + } + if (drush_generate_is_number($num_terms) == FALSE) { + return drush_set_error('DEVEL_GENERATE_INVALID_INPUT', dt('Invalid number of terms: !num', array('!num' => $num_terms))); + } + + drush_generate_include_devel(); + if (drush_get_option('kill')) { + devel_generate_delete_vocabulary_terms($vocab->vid); + drush_log(dt('Deleted existing terms.'), 'success'); + } + $new_terms = devel_generate_terms($num_terms, array($vocab->vid => $vocab), '12'); + if (!empty($new_terms)) { + drush_log(dt("Created the following new terms:\n!terms", array('!terms' => implode("\n", $new_terms))), 'success'); + } +} + +/** + * Command callback. Generate a number of vocabularies. + */ +function drush_devel_generate_vocabs($num_vocab = 1) { + if (drush_generate_is_number($num_vocab) == FALSE) { + return drush_set_error('DEVEL_GENERATE_INVALID_INPUT', dt('Invalid number of vocabularies: !num.', array('!num' => $num_vocab))); + } + drush_generate_include_devel(); + if (drush_get_option('kill')) { + devel_generate_delete_vocabularies(); + drush_log(dt('Deleted existing vocabularies.'), 'success'); + } + $new_vocs = devel_generate_vocabs($num_vocab, '12'); + if (!empty($new_vocs)) { + drush_log(dt("Created the following new vocabularies:\n!vocs", array('!vocs' => implode("\n", $new_vocs))), 'success'); + } +} + +/** + * Command callback. Generate a number of nodes and comments. + */ +function drush_devel_generate_content($num_nodes = NULL, $max_comments = NULL) { + if (drush_generate_is_number($num_nodes) == FALSE) { + return drush_set_error('DEVEL_GENERATE_INVALID_INPUT', dt('Invalid number of nodes')); + } + if (!empty($max_comments) && drush_generate_is_number($max_comments) == FALSE) { + return drush_set_error('DEVEL_GENERATE_INVALID_INPUT', dt('Invalid number of comments.')); + } + + $add_language = drush_get_option('languages'); + if (!empty($add_language)) { + $add_language = explode(',', str_replace(' ', '', $add_language)); + // Intersect with the enabled languages to make sure the language args + // passed are actually enabled. + $values['values']['add_language'] = array_intersect($add_language, array_keys(locale_language_list())); + } + + // Load user 1; is needed for creating *published* comments. + if ($max_comments) { + global $user; + $user_one = user_load(1); + $user = $user_one; + drupal_save_session(FALSE); + } + + $values['values']['kill_content'] = drush_get_option('kill'); + $values['values']['title_length'] = 6; + $values['values']['num_nodes'] = $num_nodes; + $values['values']['max_comments'] = $max_comments; + $values['values']['node_types'] = drupal_map_assoc(explode(',', drush_get_option('types', 'page,article'))); + $node_types = array_filter($values['values']['node_types']); + if (!empty($values['values']['kill_content']) && empty($node_types)) { + return drush_set_error('DEVEL_GENERATE_INVALID_INPUT', dt('Please provide content type (--types) in which you want to delete the content.')); + } + drush_generate_include_devel(); + devel_generate_content($values); + drush_log(t('Generated @num_nodes nodes, @max_comments comments (or less) per node.', array('@num_nodes' => (int)$num_nodes, '@max_comments' => (int)$max_comments)), 'success'); +} + +/** + * Command callback. Generate a number of menus and menu links. + */ +function drush_devel_generate_menus($number_menus = 2, $number_links = 50, $max_depth = 3, $max_width = 8) { + if (drush_generate_is_number($number_menus) == FALSE) { + return drush_set_error('DEVEL_GENERATE_INVALID_INPUT', dt('Invalid number of menus')); + } + if (drush_generate_is_number($number_links) == FALSE) { + return drush_set_error('DEVEL_GENERATE_INVALID_INPUT', dt('Invalid number of links')); + } + if (drush_generate_is_number($max_depth) == FALSE || $max_depth > 9 || $max_depth < 1) { + return drush_set_error('DEVEL_GENERATE_INVALID_INPUT', dt('Invalid maximum link depth. Use a value between 1 and 9')); + } + if (drush_generate_is_number($max_width) == FALSE || $max_width < 1) { + return drush_set_error('DEVEL_GENERATE_INVALID_INPUT', dt('Invalid maximum menu width. Use a positive numeric value.')); + } + + global $user; + $user_one = user_load(1); + $user = $user_one; + drupal_save_session(FALSE); + + drush_generate_include_devel(); + + // Delete custom menus. + if (drush_get_option('kill')) { + devel_generate_delete_menus(); + drush_log(dt('Deleted existing menus and links.'), 'success'); + } + + // Generate new menus. + $new_menus = devel_generate_menus($number_menus, '12'); + if (!empty($new_menus)) { + drush_log(dt("Created the following new menus:\n!menus", array('!menus' => implode("\n", $new_menus))), 'success'); + } + + // Generate new menu links. + $link_types = drupal_map_assoc(array('node', 'front', 'external')); + $new_links = devel_generate_links($number_links, $new_menus, '12', $link_types, $max_depth, $max_width); + drush_log(dt('Created !count new menu links.', array('!count' => count($new_links))), 'success'); +} + +////////////////////////////////////////////////////////////////////////////// +// Helper functions + +// Verify if param is a number. +function drush_generate_is_number($number) { + if ($number == NULL) return FALSE; + if (!is_numeric($number)) return FALSE; + return TRUE; +} + +// Include devel_generate.inc. +function drush_generate_include_devel() { + $path = drupal_get_path('module', 'devel_generate'); + require_once($path .'/devel_generate.inc'); +} diff --git a/sites/all/modules/contrib/devel/devel_generate/devel_generate.fields.inc b/sites/all/modules/contrib/devel/devel_generate/devel_generate.fields.inc new file mode 100644 index 0000000..b98c068 --- /dev/null +++ b/sites/all/modules/contrib/devel/devel_generate/devel_generate.fields.inc @@ -0,0 +1,98 @@ +{$field['field_name']} + // is necessary here because the forum module has a bug where it + // initializes the property with incorrect data. + // @see http://drupal.org/node/652176 + $object->{$field['field_name']} = array( + $field['translatable'] ? $object->language : LANGUAGE_NONE => $object_field, + ); + } +} + +/** + * A simple function to return multiple values for fields that use + * custom multiple value widgets but don't need any other special multiple + * values handling. This will call the field generation function + * a random number of times and compile the results into a node array. + */ +function devel_generate_multiple($function, $object, $field, $instance, $bundle) { + $object_field = array(); + if (function_exists($function)) { + switch ($field['cardinality']) { + case FIELD_CARDINALITY_UNLIMITED: + $max = rand(0, 3); //just an arbitrary number for 'unlimited' + break; + default: + $max = $field['cardinality'] - 1; + break; + } + for ($i = 0; $i <= $max; $i++) { + $result = $function($object, $field, $instance, $bundle); + if (!empty($result)) { + $object_field[$i] = $result; + } + } + } + return $object_field; +} diff --git a/sites/all/modules/contrib/devel/devel_generate/devel_generate.inc b/sites/all/modules/contrib/devel/devel_generate/devel_generate.inc new file mode 100644 index 0000000..072dafe --- /dev/null +++ b/sites/all/modules/contrib/devel/devel_generate/devel_generate.inc @@ -0,0 +1,722 @@ +fields('u', array('uid')) + ->condition('uid', 1, '>') + ->execute() + ->fetchAllAssoc('uid'); + user_delete_multiple(array_keys($uids)); + drupal_set_message(format_plural(count($uids), '1 user deleted', '@count users deleted.')); + } + // Determine if we should create user pictures. + $pic_config = FALSE; + module_load_include('inc', 'system', 'image.gd'); + if (variable_get('user_pictures', 0) && function_exists('image_gd_check_settings') && image_gd_check_settings()) { + $pic_config['path'] = variable_get('user_picture_path', 'pictures'); + list($pic_config['width'], $pic_config['height']) = explode('x', variable_get('user_picture_dimensions', '85x85')); + } + + if ($num > 0) { + $names = array(); + while (count($names) < $num) { + $name = devel_generate_word(mt_rand(6, 12)); + $names[$name] = ''; + } + + if (empty($roles)) { + $roles = array(DRUPAL_AUTHENTICATED_RID); + } + foreach ($names as $name => $value) { + $edit = array( + 'uid' => NULL, + 'name' => $name, + 'pass' => $pass, + 'mail' => $name . '@' . $url['host'].'.invalid', + 'status' => 1, + 'created' => REQUEST_TIME - mt_rand(0, $age), + 'roles' => drupal_map_assoc($roles), + 'devel_generate' => TRUE // A flag to let hook_user_* know that this is a generated user. + ); + + // Populate all core fields on behalf of field.module + module_load_include('inc', 'devel_generate', 'devel_generate.fields'); + $edit = (object) $edit; + $edit->language = LANGUAGE_NONE; + devel_generate_fields($edit, 'user', 'user'); + $edit = (array) $edit; + + $account = user_save(drupal_anonymous_user(), $edit); + + if ($pic_config) { + // Since the image.module should scale the picture just pick an + // arbitrary size that it's too big for our font. + $im = imagecreatetruecolor(200, 200); + + // Randomize the foreground using the md5 of the user id, then invert it + // for the background color so there's enough contrast to read the text. + $parts = array_map('hexdec', str_split(md5($account->uid), 2)); + $fg = imagecolorallocate($im, $parts[1], $parts[3], $parts[5]); + $bg = imagecolorallocate($im, 255 - $parts[0], 255 - $parts[1], 255 - $parts[2]); + + // Fill the background then print their user info. + imagefill($im, 0, 0, $bg); + imagestring($im, 5, 5, 5, "#" . $account->uid, $fg); + imagestring($im, 5, 5, 25, $account->name, $fg); + + + // Create an empty, managed file where we want the user's picture to + // be so we can have GD overwrite it with the image. + $picture_directory = variable_get('file_default_scheme', 'public') . '://' . variable_get('user_picture_path', 'pictures'); + file_prepare_directory($picture_directory, FILE_CREATE_DIRECTORY); + $destination = file_stream_wrapper_uri_normalize($picture_directory . '/picture-' . $account->uid . '.png'); + $file = file_save_data('', $destination); + + // GD doesn't like stream wrapped paths so convert the URI to a normal + // file system path. + if (isset($file) && $wrapper = file_stream_wrapper_get_instance_by_uri($file->uri)) { + imagepng($im, $wrapper->realpath()); + } + imagedestroy($im); + + // Clear the cached filesize, set the owner and MIME-type then re-save + // the file. + clearstatcache(); + $file->uid = $account->uid; + $file->filemime = 'image/png'; + $file = file_save($file); + + // Save the user record with the new picture. + $edit = (array) $account; + $edit['picture'] = $file; + $edit['pass'] = $pass; // Reassign password as it is replaced with the hashed version in $account + user_save($account, $edit); + } + } + } + drupal_set_message(t('!num_users created.', array('!num_users' => format_plural($num, '1 user', '@count users')))); +} + + +/** + * The main API function for creating content. + * + * See devel_generate_content_form() for the supported keys in + * $form_state['values']. + * Other modules may participate by form_alter() on that form and then handling + * their data during hook_node_insert() or in their own submit handler for the + * form. + * + * @param string $form_state + * @return void + */ +function devel_generate_content($form_state) { + if (!empty($form_state['values']['kill_content'])) { + devel_generate_content_kill($form_state['values']); + } + + if (count($form_state['values']['node_types'])) { + // Generate nodes. + devel_generate_content_pre_node($form_state['values']); + $start = time(); + for ($i = 1; $i <= $form_state['values']['num_nodes']; $i++) { + devel_generate_content_add_node($form_state['values']); + if (function_exists('drush_log') && $i % drush_get_option('feedback', 1000) == 0) { + $now = time(); + drush_log(dt('Completed !feedback nodes (!rate nodes/min)', array('!feedback' => drush_get_option('feedback', 1000), '!rate' => (drush_get_option('feedback', 1000)*60)/($now-$start))), 'ok'); + $start = $now; + } + } + } + + devel_generate_set_message(format_plural($form_state['values']['num_nodes'], '1 node created.', 'Finished creating @count nodes')); +} + +function devel_generate_add_comments($node, $users, $max_comments, $title_length = 8) { + $num_comments = mt_rand(1, $max_comments); + for ($i = 1; $i <= $num_comments; $i++) { + $comment = new stdClass; + $comment->nid = $node->nid; + $comment->cid = NULL; + $comment->name = 'devel generate'; + $comment->mail = 'devel_generate@example.com'; + $comment->timestamp = mt_rand($node->created, REQUEST_TIME); + + switch ($i % 3) { + case 1: + $comment->pid = db_query_range("SELECT cid FROM {comment} WHERE pid = 0 AND nid = :nid ORDER BY RAND()", 0, 1, array(':nid' => $comment->nid))->fetchField(); + break; + case 2: + $comment->pid = db_query_range("SELECT cid FROM {comment} WHERE pid > 0 AND nid = :nid ORDER BY RAND()", 0, 1, array(':nid' => $comment->nid))->fetchField(); + break; + default: + $comment->pid = 0; + } + + // The subject column has a max character length of 64 + // See bug: http://drupal.org/node/1024340 + $comment->subject = substr(devel_create_greeking(mt_rand(2, $title_length), TRUE), 0, 63); + $comment->uid = $users[array_rand($users)]; + $comment->language = LANGUAGE_NONE; + // Populate all core fields on behalf of field.module + module_load_include('inc', 'devel_generate', 'devel_generate.fields'); + devel_generate_fields($comment, 'comment', 'comment_node_' . $node->type); + comment_save($comment); + } +} + +function devel_generate_vocabs($records, $maxlength = 12, $types = array('page', 'article')) { + $vocs = array(); + + // Insert new data: + for ($i = 1; $i <= $records; $i++) { + $voc = new stdClass(); + $voc->name = devel_generate_word(mt_rand(2, $maxlength)); + $voc->machine_name = drupal_strtolower($voc->name); + $voc->description = "description of ". $voc->name; + // TODO: not working + $voc->nodes = array_flip(array($types[array_rand($types)])); + foreach ($voc->nodes as $key => $value) { + $voc->nodes[$key] = $key; + } + + $voc->multiple = 1; + $voc->required = 0; + $voc->relations = 1; + $voc->hierarchy = 1; + $voc->weight = mt_rand(0,10); + $voc->language = LANGUAGE_NONE; + + taxonomy_vocabulary_save($voc); + $vocs[] = $voc->name; + + unset($voc); + } + return $vocs; +} + +/** + * Generates taxonomy terms for a list of given vocabularies. + * + * @param $records + * int number of terms to create in total. + * @param $vocabs + * array list of vocabs to populate. + * @param $maxlength + * int maximum length per term. + * @return + * array the list of names of the created terms. + */ +function devel_generate_terms($records, $vocabs, $maxlength = 12) { + $terms = array(); + + // Insert new data: + $max = db_query('SELECT MAX(tid) FROM {taxonomy_term_data}')->fetchField(); + $start = time(); + for ($i = 1; $i <= $records; $i++) { + $term = new stdClass; + switch ($i % 2) { + case 1: + // Set vid and vocabulary_machine_name properties. + $vocab = $vocabs[array_rand($vocabs)]; + $term->vid = $vocab->vid; + $term->vocabulary_machine_name = $vocab->machine_name; + // Don't set a parent. Handled by taxonomy_save_term() + // $term->parent = 0; + break; + default: + while (TRUE) { + // Keep trying to find a random parent. + $candidate = mt_rand(1, $max); + $query = db_select('taxonomy_term_data', 't'); + $query->innerJoin('taxonomy_vocabulary', 'v', 't.vid = v.vid'); + $parent = $query + ->fields('t', array('tid', 'vid')) + ->fields('v', array('machine_name')) + ->condition('v.vid', array_keys($vocabs), 'IN') + ->condition('t.tid', $candidate, '>=') + ->range(0,1) + ->execute() + ->fetchAssoc(); + if ($parent['tid']) { + break; + } + } + $term->parent = $parent['tid']; + // Slight speedup due to this property being set. + $term->vocabulary_machine_name = $parent['machine_name']; + $term->vid = $parent['vid']; + break; + } + + $term->name = devel_generate_word(mt_rand(2, $maxlength)); + $term->description = "description of ". $term->name; + $term->format = filter_fallback_format(); + $term->weight = mt_rand(0, 10); + $term->language = LANGUAGE_NONE; + + // Populate all core fields on behalf of field.module + module_load_include('inc', 'devel_generate', 'devel_generate.fields'); + devel_generate_fields($term, 'taxonomy_term', $term->vocabulary_machine_name); + + if ($status = taxonomy_term_save($term)) { + $max += 1; + if (function_exists('drush_log')) { + $feedback = drush_get_option('feedback', 1000); + if ($i % $feedback == 0) { + $now = time(); + drush_log(dt('Completed !feedback terms (!rate terms/min)', array('!feedback' => $feedback, '!rate' => $feedback*60 / ($now-$start) )), 'ok'); + $start = $now; + } + } + + // Limit memory usage. Only report first 20 created terms. + if ($i < 20) { + $terms[] = $term->name; + } + + unset($term); + } + } + return $terms; +} + +// TODO: use taxonomy_get_entries once that exists. +function devel_generate_get_terms($vids) { + return db_select('taxonomy_term_data', 'td') + ->fields('td', array('tid')) + ->condition('vid', $vids, 'IN') + ->orderBy('tid', 'ASC') + ->execute() + ->fetchCol('tid'); +} + +/** + * Deletes all terms of a vocabulary. + * + * @param $vid + * int a vocabulary vid. + */ +function devel_generate_delete_vocabulary_terms($vid) { + foreach (taxonomy_get_tree($vid) as $term) { + taxonomy_term_delete($term->tid); + } +} + +/** + * Deletes all vocabularies. + */ +function devel_generate_delete_vocabularies() { + foreach (taxonomy_vocabulary_load_multiple(FALSE) as $vid => $vocab) { + taxonomy_vocabulary_delete($vid); + } +} + +/** + * Deletes custom generated menus + */ +function devel_generate_delete_menus() { + if (module_exists('menu')) { + foreach (menu_get_menus(FALSE) as $menu => $menu_title) { + if (strpos($menu, 'devel-') === 0) { + $menu = menu_load($menu); + menu_delete($menu); + } + } + } + // Delete menu links generated by devel. + $result = db_select('menu_links', 'm') + ->fields('m', array('mlid')) + ->condition('m.menu_name', 'devel', '<>') + // Look for the serialized version of 'devel' => TRUE. + ->condition('m.options', '%' . db_like('s:5:"devel";b:1') . '%', 'LIKE') + ->execute(); + foreach ($result as $link) { + menu_link_delete($link->mlid); + } +} + +/** + * Generates new menus. + */ +function devel_generate_menus($num_menus, $title_length = 12) { + $menus = array(); + + if (!module_exists('menu')) { + $num_menus = 0; + } + + for ($i = 1; $i <= $num_menus; $i++) { + $menu = array(); + $menu['title'] = devel_generate_word(mt_rand(2, max(2, $title_length))); + $menu['menu_name'] = 'devel-' . drupal_strtolower($menu['title']); + $menu['description'] = t('Description of @name', array('@name' => $menu['title'])); + menu_save($menu); + $menus[$menu['menu_name']] = $menu['title']; + } + + return $menus; +} + +/** + * Generates menu links in a tree structure. + */ +function devel_generate_links($num_links, $menus, $title_length, $link_types, $max_depth, $max_width) { + $links = array(); + $menus = array_keys(array_filter($menus)); + $link_types = array_keys(array_filter($link_types)); + + $nids = array(); + for ($i = 1; $i <= $num_links; $i++) { + // Pick a random menu. + $menu_name = $menus[array_rand($menus)]; + // Build up our link. + $link = array( + 'menu_name' => $menu_name, + 'options' => array('devel' => TRUE), + 'weight' => mt_rand(-50, 50), + 'mlid' => 0, + 'link_title' => devel_generate_word(mt_rand(2, max(2, $title_length))), + ); + $link['options']['attributes']['title'] = t('Description of @title.', array('@title' => $link['link_title'])); + + // For the first $max_width items, make first level links. + if ($i <= $max_width) { + $depth = 0; + } + else { + // Otherwise, get a random parent menu depth. + $depth = mt_rand(1, max(1, $max_depth - 1)); + } + // Get a random parent link from the proper depth. + do { + $link['plid'] = db_select('menu_links', 'm') + ->fields('m', array('mlid')) + ->condition('m.menu_name', $menus, 'IN') + ->condition('m.depth', $depth) + ->range(0, 1) + ->orderRandom() + ->execute() + ->fetchField(); + $depth--; + } while (!$link['plid'] && $depth > 0); + if (!$link['plid']) { + $link['plid'] = 0; + } + + $link_type = array_rand($link_types); + switch ($link_types[$link_type]) { + case 'node': + // Grab a random node ID. + $select = db_select('node', 'n') + ->fields('n', array('nid', 'title')) + ->condition('n.status', 1) + ->range(0, 1) + ->orderRandom(); + // Don't put a node into the menu twice. + if (!empty($nids[$menu_name])) { + $select->condition('n.nid', $nids[$menu_name], 'NOT IN'); + } + $node = $select->execute()->fetchAssoc(); + if (isset($node['nid'])) { + $nids[$menu_name][] = $node['nid']; + $link['link_path'] = $link['router_path'] = 'node/' . $node['nid']; + $link['link_title'] = $node['title']; + break; + } + case 'external': + $link['link_path'] = 'http://www.example.com/'; + break; + case 'front': + $link['link_path'] = $link['router_path'] = ''; + break; + default: + $link['devel_link_type'] = $link_type; + break; + } + + menu_link_save($link); + + $links[$link['mlid']] = $link['link_title']; + } + + return $links; +} + +function devel_generate_word($length){ + mt_srand((double)microtime()*1000000); + + $vowels = array("a", "e", "i", "o", "u"); + $cons = array("b", "c", "d", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "u", "v", "w", "tr", + "cr", "br", "fr", "th", "dr", "ch", "ph", "wr", "st", "sp", "sw", "pr", "sl", "cl", "sh"); + + $num_vowels = count($vowels); + $num_cons = count($cons); + $word = ''; + + while(strlen($word) < $length){ + $word .= $cons[mt_rand(0, $num_cons - 1)] . $vowels[mt_rand(0, $num_vowels - 1)]; + } + + return substr($word, 0, $length); +} + +function devel_create_content($type = NULL) { + $nparas = mt_rand(1,12); + $type = empty($type) ? mt_rand(0,3) : $type; + + $output = ""; + switch($type % 3) { + // MW: This appears undesireable. Was giving

in text fields + // case 1: // html + // for ($i = 1; $i <= $nparas; $i++) { + // $output .= devel_create_para(mt_rand(10,60),1); + // } + // break; + // + // case 2: // brs only + // for ($i = 1; $i <= $nparas; $i++) { + // $output .= devel_create_para(mt_rand(10,60),2); + // } + // break; + + default: // plain text + for ($i = 1; $i <= $nparas; $i++) { + $output .= devel_create_para(mt_rand(10,60)) ."\n\n"; + } + } + + return $output; +} + +function devel_create_para($words, $type = 0) { + $output = ''; + switch ($type) { + case 1: + $output .= "

" . devel_create_greeking($words) . "

"; + break; + + case 2: + $output .= devel_create_greeking($words) . "
"; + break; + + default: + $output .= devel_create_greeking($words); + } + return $output; +} + +function devel_create_greeking($word_count, $title = FALSE) { + $dictionary = array("abbas", "abdo", "abico", "abigo", "abluo", "accumsan", + "acsi", "ad", "adipiscing", "aliquam", "aliquip", "amet", "antehabeo", + "appellatio", "aptent", "at", "augue", "autem", "bene", "blandit", + "brevitas", "caecus", "camur", "capto", "causa", "cogo", "comis", + "commodo", "commoveo", "consectetuer", "consequat", "conventio", "cui", + "damnum", "decet", "defui", "diam", "dignissim", "distineo", "dolor", + "dolore", "dolus", "duis", "ea", "eligo", "elit", "enim", "erat", + "eros", "esca", "esse", "et", "eu", "euismod", "eum", "ex", "exerci", + "exputo", "facilisi", "facilisis", "fere", "feugiat", "gemino", + "genitus", "gilvus", "gravis", "haero", "hendrerit", "hos", "huic", + "humo", "iaceo", "ibidem", "ideo", "ille", "illum", "immitto", + "importunus", "imputo", "in", "incassum", "inhibeo", "interdico", + "iriure", "iusto", "iustum", "jugis", "jumentum", "jus", "laoreet", + "lenis", "letalis", "lobortis", "loquor", "lucidus", "luctus", "ludus", + "luptatum", "macto", "magna", "mauris", "melior", "metuo", "meus", + "minim", "modo", "molior", "mos", "natu", "neo", "neque", "nibh", + "nimis", "nisl", "nobis", "nostrud", "nulla", "nunc", "nutus", "obruo", + "occuro", "odio", "olim", "oppeto", "os", "pagus", "pala", "paratus", + "patria", "paulatim", "pecus", "persto", "pertineo", "plaga", "pneum", + "populus", "praemitto", "praesent", "premo", "probo", "proprius", + "quadrum", "quae", "qui", "quia", "quibus", "quidem", "quidne", "quis", + "ratis", "refero", "refoveo", "roto", "rusticus", "saepius", + "sagaciter", "saluto", "scisco", "secundum", "sed", "si", "similis", + "singularis", "sino", "sit", "sudo", "suscipere", "suscipit", "tamen", + "tation", "te", "tego", "tincidunt", "torqueo", "tum", "turpis", + "typicus", "ulciscor", "ullamcorper", "usitas", "ut", "utinam", + "utrum", "uxor", "valde", "valetudo", "validus", "vel", "velit", + "veniam", "venio", "vereor", "vero", "verto", "vicis", "vindico", + "virtus", "voco", "volutpat", "vulpes", "vulputate", "wisi", "ymo", + "zelus"); + $dictionary_flipped = array_flip($dictionary); + + $greeking = ''; + + if (!$title) { + $words_remaining = $word_count; + while ($words_remaining > 0) { + $sentence_length = mt_rand(3, 10); + $words = array_rand($dictionary_flipped, $sentence_length); + $sentence = implode(' ', $words); + $greeking .= ucfirst($sentence) . '. '; + $words_remaining -= $sentence_length; + } + } + else { + // Use slightly different method for titles. + $words = array_rand($dictionary_flipped, $word_count); + $words = is_array($words) ? implode(' ', $words) : $words; + $greeking = ucwords($words); + } + + // Work around possible php garbage collection bug. Without an unset(), this + // function gets very expensive over many calls (php 5.2.11). + unset($dictionary, $dictionary_flipped); + return trim($greeking); +} + +function devel_generate_add_terms(&$node) { + $vocabs = taxonomy_get_vocabularies($node->type); + foreach ($vocabs as $vocab) { + $sql = "SELECT tid FROM {taxonomy_term_data} WHERE vid = :vid ORDER BY RAND()"; + $result = db_query_range($sql, 0, 5 , array(':vid' => $vocab->vid)); + foreach($result as $row) { + $node->taxonomy[] = $row->tid; + if (!$vocab->multiple) { + break; + } + } + } +} + +function devel_get_users() { + $users = array(); + $result = db_query_range("SELECT uid FROM {users}", 0, 50); + foreach ($result as $record) { + $users[] = $record->uid; + } + return $users; +} + +/** + * Generate statistics information for a node. + * + * @param $node + * A node object. + */ +function devel_generate_add_statistics($node) { + $statistic = array( + 'nid' => $node->nid, + 'totalcount' => mt_rand(0, 500), + 'timestamp' => REQUEST_TIME - mt_rand(0, $node->created), + ); + $statistic['daycount'] = mt_rand(0, $statistic['totalcount']); + db_insert('node_counter')->fields($statistic)->execute(); +} + +/** + * Handle the devel_generate_content_form request to kill all of the content. + * This is used by both the batch and non-batch branches of the code. + * + * @param $num + * array of options obtained from devel_generate_content_form. + */ +function devel_generate_content_kill($values) { + $results = db_select('node', 'n') + ->fields('n', array('nid')) + ->condition('type', $values['node_types'], 'IN') + ->execute(); + foreach ($results as $result) { + $nids[] = $result->nid; + } + + if (!empty($nids)) { + node_delete_multiple($nids); + drupal_set_message(t('Deleted %count nodes.', array('%count' => count($nids)))); + } +} + +/** + * Pre-process the devel_generate_content_form request. This is needed so + * batch api can get the list of users once. This is used by both the batch + * and non-batch branches of the code. + * + * @param $num + * array of options obtained from devel_generate_content_form. + */ +function devel_generate_content_pre_node(&$results) { + // Get user id. + $users = devel_get_users(); + $users = array_merge($users, array('0')); + $results['users'] = $users; +} + +/** + * Create one node. Used by both batch and non-batch code branches. + * + * @param $num + * array of options obtained from devel_generate_content_form. + */ +function devel_generate_content_add_node(&$results) { + $node = new stdClass(); + $node->nid = NULL; + + // Insert new data: + $node->type = array_rand($results['node_types']); + node_object_prepare($node); + $users = $results['users']; + $node->uid = $users[array_rand($users)]; + $type = node_type_get_type($node); + $node->revision = mt_rand(0,1); + $node->promote = mt_rand(0, 1); + + if ($type->has_title) { + // We should not use the random function if the value is not random + if ($results['title_length'] < 2) { + $node->title = devel_create_greeking(1, TRUE); + } + else { + $node->title = devel_create_greeking(mt_rand(1, $results['title_length']), TRUE); + } + } + + // Avoid NOTICE. + if (!isset($results['time_range'])) { + $results['time_range'] = 0; + } + + devel_generate_set_language($results, $node); + + $node->created = REQUEST_TIME - mt_rand(0, $results['time_range']); + + // A flag to let hook_node_insert() implementations know that this is a + // generated node. + $node->devel_generate = $results; + + // Populate all core fields on behalf of field.module + module_load_include('inc', 'devel_generate', 'devel_generate.fields'); + devel_generate_fields($node, 'node', $node->type); + + // See devel_generate_node_insert() for actions that happen before and after + // this save. + node_save($node); +} + +/* + * Populate $object->language based on $results + */ +function devel_generate_set_language($results, $object) { + if (isset($results['add_language'])) { + $languages = $results['add_language']; + $object->language = $languages[array_rand($languages)]; + } + else { + $default = language_default('language'); + $object->language = $default == 'en' ? LANGUAGE_NONE : $default; + } +} diff --git a/sites/all/modules/contrib/devel/devel_generate/devel_generate.info b/sites/all/modules/contrib/devel/devel_generate/devel_generate.info new file mode 100644 index 0000000..b45159f --- /dev/null +++ b/sites/all/modules/contrib/devel/devel_generate/devel_generate.info @@ -0,0 +1,14 @@ +name = Devel generate +description = Generate dummy users, nodes, and taxonomy terms. +package = Development +core = 7.x +tags[] = developer +configure = admin/config/development/generate +files[] = devel_generate.test + +; Information added by Drupal.org packaging script on 2014-05-01 +version = "7.x-1.5" +core = "7.x" +project = "devel" +datestamp = "1398963366" + diff --git a/sites/all/modules/contrib/devel/devel_generate/devel_generate.module b/sites/all/modules/contrib/devel/devel_generate/devel_generate.module new file mode 100644 index 0000000..11bc291 --- /dev/null +++ b/sites/all/modules/contrib/devel/devel_generate/devel_generate.module @@ -0,0 +1,522 @@ + 'Generate users', + 'description' => 'Generate a given number of users. Optionally delete current users.', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('devel_generate_users_form'), + 'access arguments' => array('administer users'), + ); + $items['admin/config/development/generate/content'] = array( + 'title' => 'Generate content', + 'description' => 'Generate a given number of nodes and comments. Optionally delete current items.', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('devel_generate_content_form'), + 'access arguments' => array('administer nodes'), + ); + if (module_exists('taxonomy')) { + $items['admin/config/development/generate/taxonomy'] = array( + 'title' => 'Generate terms', + 'description' => 'Generate a given number of terms. Optionally delete current terms.', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('devel_generate_term_form'), + 'access arguments' => array('administer taxonomy'), + ); + $items['admin/config/development/generate/vocabs'] = array( + 'title' => 'Generate vocabularies', + 'description' => 'Generate a given number of vocabularies. Optionally delete current vocabularies.', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('devel_generate_vocab_form'), + 'access arguments' => array('administer taxonomy'), + ); + } + $items['admin/config/development/generate/menu'] = array( + 'title' => 'Generate menus', + 'description' => 'Generate a given number of menus and menu links. Optionally delete current menus.', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('devel_generate_menu_form'), + 'access arguments' => array('administer menu'), + ); + + return $items; +} + +/** + * Generates users using FormAPI. + */ +function devel_generate_users_form() { + $form['num'] = array( + '#type' => 'textfield', + '#title' => t('How many users would you like to generate?'), + '#default_value' => 50, + '#size' => 10, + ); + $form['kill_users'] = array( + '#type' => 'checkbox', + '#title' => t('Delete all users (except user id 1) before generating new users.'), + '#default_value' => FALSE, + ); + $options = user_roles(TRUE); + unset($options[DRUPAL_AUTHENTICATED_RID]); + $form['roles'] = array( + '#type' => 'checkboxes', + '#title' => t('Which roles should the users receive?'), + '#description' => t('Users always receive the authenticated user role.'), + '#options' => $options, + ); + + $form['pass'] = array( + '#type' => 'textfield', + '#title' => t('Password to be set'), + '#default_value' => NULL, + '#size' => 32, + '#description' => t('Leave this field empty if you do not need to set a password.'), + ); + + $options = array(1 => t('Now')); + foreach (array(3600, 86400, 604800, 2592000, 31536000) as $interval) { + $options[$interval] = format_interval($interval, 1) . ' ' . t('ago'); + } + $form['time_range'] = array( + '#type' => 'select', + '#title' => t('How old should user accounts be?'), + '#description' => t('User ages will be distributed randomly from the current time, back to the selected time.'), + '#options' => $options, + '#default_value' => 604800, + ); + + $form['submit'] = array( + '#type' => 'submit', + '#value' => t('Generate'), + ); + return $form; +} + +/** + * FormAPI submission to generate users. + */ +function devel_generate_users_form_submit($form, &$form_state) { + module_load_include('inc', 'devel_generate'); + $values = $form_state['values']; + devel_create_users($values['num'], $values['kill_users'], $values['time_range'], $values['roles'], $values['pass']); +} + +/** + * Generates nodes using FormAPI. + */ +function devel_generate_content_form() { + $options = array(); + + if (module_exists('content')) { + $types = content_types(); + foreach ($types as $type) { + $warn = ''; + if (count($type['fields'])) { + $warn = t('. This type contains CCK fields which will only be populated by fields that implement the content_generate hook.'); + } + $options[$type['type']] = t($type['name']). $warn; + } + } + else { + $types = node_type_get_types(); + foreach ($types as $type) { + $options[$type->type] = array( + 'type' => t($type->name), + ); + if (module_exists('comment')) { + $default = variable_get('comment_' . $type->type, COMMENT_NODE_OPEN); + $map = array(t('Hidden'), t('Closed'), t('Open')); + $options[$type->type]['comments'] = ''. $map[$default]. ''; + } + } + } + // we cannot currently generate valid polls. + unset($options['poll']); + + if (empty($options)) { + drupal_set_message(t('You do not have any content types that can be generated. Go create a new content type already!', array('@create-type' => url('admin/structure/types/add'))), 'error', FALSE); + return; + } + + $header = array( + 'type' => t('Content type'), + ); + if (module_exists('comment')) { + $header['comments'] = t('Comments'); + } + + $form['node_types'] = array( + '#type' => 'tableselect', + '#header' => $header, + '#options' => $options, + '#required' => TRUE, + ); + if (module_exists('checkall')) $form['node_types']['#checkall'] = TRUE; + $form['kill_content'] = array( + '#type' => 'checkbox', + '#title' => t('Delete all content in these content types before generating new content.'), + '#default_value' => FALSE, + ); + $form['num_nodes'] = array( + '#type' => 'textfield', + '#title' => t('How many nodes would you like to generate?'), + '#default_value' => 50, + '#size' => 10, + ); + + $options = array(1 => t('Now')); + foreach (array(3600, 86400, 604800, 2592000, 31536000) as $interval) { + $options[$interval] = format_interval($interval, 1) . ' ' . t('ago'); + } + $form['time_range'] = array( + '#type' => 'select', + '#title' => t('How far back in time should the nodes be dated?'), + '#description' => t('Node creation dates will be distributed randomly from the current time, back to the selected time.'), + '#options' => $options, + '#default_value' => 604800, + ); + + $form['max_comments'] = array( + '#type' => module_exists('comment') ? 'textfield' : 'value', + '#title' => t('Maximum number of comments per node.'), + '#description' => t('You must also enable comments for the content types you are generating. Note that some nodes will randomly receive zero comments. Some will receive the max.'), + '#default_value' => 0, + '#size' => 3, + '#access' => module_exists('comment'), + ); + $form['title_length'] = array( + '#type' => 'textfield', + '#title' => t('Maximum number of words in titles'), + '#default_value' => 4, + '#size' => 10, + ); + $form['add_alias'] = array( + '#type' => 'checkbox', + '#disabled' => !module_exists('path'), + '#description' => t('Requires path.module'), + '#title' => t('Add an url alias for each node.'), + '#default_value' => FALSE, + ); + $form['add_statistics'] = array( + '#type' => 'checkbox', + '#title' => t('Add statistics for each node (node_counter table).'), + '#default_value' => TRUE, + '#access' => module_exists('statistics'), + ); + + unset($options); + $options[LANGUAGE_NONE] = t('Language neutral'); + if (module_exists('locale')) { + $options += locale_language_list(); + } + $form['add_language'] = array( + '#type' => 'select', + '#title' => t('Set language on nodes'), + '#multiple' => TRUE, + '#disabled' => !module_exists('locale'), + '#description' => t('Requires locale.module'), + '#options' => $options, + '#default_value' => array(LANGUAGE_NONE), + ); + + $form['submit'] = array( + '#type' => 'submit', + '#value' => t('Generate'), + ); + $form['#redirect'] = FALSE; + + return $form; +} + +/** + * FormAPI validation before generate nodes. + */ +function devel_generate_content_form_validate($form, &$form_state) { + form_set_value($form['node_types'], array_filter($form_state['values']['node_types']) , $form_state); + if (!empty($form_state['values']['kill_content']) && empty($form_state['values']['node_types'])) { + form_set_error('', t('Please select at least one content type to delete the content.')); + } +} + +/** + * FormAPI submission to generate nodes. + */ +function devel_generate_content_form_submit($form, &$form_state) { + module_load_include('inc', 'devel_generate', 'devel_generate'); + if ($form_state['values']['num_nodes'] <= 50 && $form_state['values']['max_comments'] <= 10) { + module_load_include('inc', 'devel_generate'); + devel_generate_content($form_state); + } + else { + module_load_include('inc', 'devel_generate', 'devel_generate_batch'); + devel_generate_batch_content($form_state); + } +} + +/** + * Generates taxonomy terms using FormAPI. + */ +function devel_generate_term_form() { + $options = array(); + foreach (taxonomy_get_vocabularies() as $vid => $vocab) { + $options[$vid] = $vocab->machine_name; + } + $form['vids'] = array( + '#type' => 'select', + '#multiple' => TRUE, + '#title' => t('Vocabularies'), + '#required' => TRUE, + '#options' => $options, + '#description' => t('Restrict terms to these vocabularies.'), + ); + $form['num_terms'] = array( + '#type' => 'textfield', + '#title' => t('Number of terms?'), + '#default_value' => 10, + '#size' => 10, + ); + $form['title_length'] = array( + '#type' => 'textfield', + '#title' => t('Maximum number of characters in term names'), + '#default_value' => 12, + '#size' => 10, + ); + $form['kill_taxonomy'] = array( + '#type' => 'checkbox', + '#title' => t('Delete existing terms in specified vocabularies before generating new terms.'), + '#default_value' => FALSE, + ); + $form['submit'] = array( + '#type' => 'submit', + '#value' => t('Generate'), + ); + return $form; +} + +/** + * Generates taxonomy vocabularies using FormAPI. + */ +function devel_generate_vocab_form() { + $form['num_vocabs'] = array( + '#type' => 'textfield', + '#title' => t('Number of vocabularies?'), + '#default_value' => 1, + '#size' => 10, + ); + $form['title_length'] = array( + '#type' => 'textfield', + '#title' => t('Maximum number of characters in vocabulary names'), + '#default_value' => 12, + '#size' => 10, + ); + $form['kill_taxonomy'] = array( + '#type' => 'checkbox', + '#title' => t('Delete existing vocabularies before generating new ones.'), + '#default_value' => FALSE, + ); + $form['submit'] = array( + '#type' => 'submit', + '#value' => t('Generate'), + ); + return $form; +} + +/** + * FormAPI submission to generate taxonomy terms. + */ +function devel_generate_term_form_submit($form, &$form_state) { + $values = $form_state['values']; + module_load_include('inc', 'devel_generate'); + if ($values['kill_taxonomy']) { + foreach ($values['vids'] as $vid) { + devel_generate_delete_vocabulary_terms($vid); + } + drupal_set_message(t('Deleted existing terms.')); + } + $vocabs = taxonomy_vocabulary_load_multiple($values['vids']); + $new_terms = devel_generate_terms($values['num_terms'], $vocabs, $values['title_length']); + if (!empty($new_terms)) { + drupal_set_message(t('Created the following new terms: !terms', array('!terms' => implode(', ', $new_terms)))); + } +} + +/** + * FormAPI submission to generate taxonomy vocabularies. + */ +function devel_generate_vocab_form_submit($form, &$form_state) { + $values = $form_state['values']; + module_load_include('inc', 'devel_generate'); + if ($values['kill_taxonomy']) { + devel_generate_delete_vocabularies(); + drupal_set_message(t('Deleted existing vocabularies.')); + } + $new_vocs = devel_generate_vocabs($values['num_vocabs'], $values['title_length']); + if (!empty($new_vocs)) { + drupal_set_message(t('Created the following new vocabularies: !vocs', array('!vocs' => implode(', ', $new_vocs)))); + } +} + +/** + * Inserts nodes properly based on generation options. + * + * @param $node + * The base node created on submit. Inspects $node->devel_generate. + */ +function devel_generate_node_insert($node) { + if (isset($node->devel_generate)) { + $results = $node->devel_generate; + + if (!empty($results['max_comments']) && $node->comment >= COMMENT_NODE_OPEN) { + devel_generate_add_comments($node, $results['users'], $results['max_comments'], $results['title_length']); + } + + + // Add an url alias. Cannot happen before save because we don't know the nid. + if (!empty($results['add_alias'])) { + $path = array( + 'source' => 'node/' . $node->nid, + 'alias' => 'node-' . $node->nid . '-' . $node->type, + ); + path_save($path); + } + + // Add node statistics. + if (!empty($results['add_statistics']) && module_exists('statistics')) { + devel_generate_add_statistics($node); + } + } +} + +/** + * Set a message for either drush or the web interface. + * + * @param $msg + * The message to display. + * @param $type + * The message type, as defined by drupal_set_message(). + * + * @return + * Context-appropriate message output. + */ +function devel_generate_set_message($msg, $type = 'status') { + $function = function_exists('drush_log') ? 'drush_log' : 'drupal_set_message'; + $function($msg, $type); +} + +/** + * Generates menus using FormAPI. + */ +function devel_generate_menu_form() { + $menu_enabled = module_exists('menu'); + if ($menu_enabled) { + $menus = array('__new-menu__' => t('Create new menu(s)')) + menu_get_menus(); + } + else { + $menus = menu_list_system_menus(); + } + $form['existing_menus'] = array( + '#type' => 'checkboxes', + '#title' => t('Generate links for these menus'), + '#options' => $menus, + '#default_value' => array('__new-menu__'), + '#required' => TRUE, + ); + if ($menu_enabled) { + $form['num_menus'] = array( + '#type' => 'textfield', + '#title' => t('Number of new menus to create'), + '#default_value' => 2, + '#size' => 10, + '#states' => array( + 'visible' => array( + ':input[name=existing_menus[__new-menu__]]' => array('checked' => TRUE), + ), + ), + ); + } + $form['num_links'] = array( + '#type' => 'textfield', + '#title' => t('Number of links to generate'), + '#default_value' => 50, + '#size' => 10, + '#required' => TRUE, + ); + $form['title_length'] = array( + '#type' => 'textfield', + '#title' => t('Maximum number of characters in menu and menu link names'), + '#description' => t("The minimum length is 2."), + '#default_value' => 12, + '#size' => 10, + '#required' => TRUE, + ); + $form['link_types'] = array( + '#type' => 'checkboxes', + '#title' => t('Types of links to generate'), + '#options' => array( + 'node' => t('Nodes'), + 'front' => t('Front page'), + 'external' => t('External'), + ), + '#default_value' => array('node', 'front', 'external'), + '#required' => TRUE, + ); + $form['max_depth'] = array( + '#type' => 'select', + '#title' => t('Maximum link depth'), + '#options' => range(0, MENU_MAX_DEPTH), + '#default_value' => floor(MENU_MAX_DEPTH / 2), + '#required' => TRUE, + ); + unset($form['max_depth']['#options'][0]); + $form['max_width'] = array( + '#type' => 'textfield', + '#title' => t('Maximum menu width'), + '#default_value' => 6, + '#size' => 10, + '#description' => t("Limit the width of the generated menu's first level of links to a certain number of items."), + '#required' => TRUE, + ); + $form['kill'] = array( + '#type' => 'checkbox', + '#title' => t('Delete existing custom generated menus and menu links before generating new ones.'), + '#default_value' => FALSE, + ); + $form['submit'] = array( + '#type' => 'submit', + '#value' => t('Generate'), + ); + return $form; +} + +/** + * FormAPI submission to generate menus. + */ +function devel_generate_menu_form_submit($form, &$form_state) { + // If the create new menus checkbox is off, set the number of new menus to 0. + if (!isset($form_state['values']['existing_menus']['__new-menu__']) || !$form_state['values']['existing_menus']['__new-menu__']) { + $form_state['values']['num_menus'] = 0; + } + module_load_include('inc', 'devel_generate'); + // Delete custom menus. + if ($form_state['values']['kill']) { + devel_generate_delete_menus(); + drupal_set_message(t('Deleted existing menus and links.')); + } + + // Generate new menus. + $new_menus = devel_generate_menus($form_state['values']['num_menus'], $form_state['values']['title_length']); + if (!empty($new_menus)) { + drupal_set_message(t('Created the following new menus: !menus', array('!menus' => implode(', ', $new_menus)))); + } + + // Generate new menu links. + $menus = $new_menus + $form_state['values']['existing_menus']; + $new_links = devel_generate_links($form_state['values']['num_links'], $menus, $form_state['values']['title_length'], $form_state['values']['link_types'], $form_state['values']['max_depth'], $form_state['values']['max_width']); + drupal_set_message(t('Created @count new menu links.', array('@count' => count($new_links)))); +} diff --git a/sites/all/modules/contrib/devel/devel_generate/devel_generate.test b/sites/all/modules/contrib/devel/devel_generate/devel_generate.test new file mode 100644 index 0000000..c649f02 --- /dev/null +++ b/sites/all/modules/contrib/devel/devel_generate/devel_generate.test @@ -0,0 +1,108 @@ + t('Devel Generate'), + 'description' => t('Tests the logic to generate data.'), + 'group' => t('Devel'), + ); + } + + /** + * Prepares the testing environment + */ + function setUp() { + parent::setUp(array('devel', 'devel_generate', 'taxonomy', 'menu', 'comment')); + + // Create Basic page and Article node types. + if ($this->profile != 'standard') { + $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic Page')); + } + } + + /** + * Tests generate commands + */ + public function testGenerate() { + $user = $this->drupalCreateUser(array( + 'administer taxonomy', + 'administer menu', + 'administer nodes', + )); + $this->drupalLogin($user); + + // Generate taxonomy vocabularies. + $edit = array( + 'num_vocabs' => 5, + 'title_length' => 12, + 'kill_taxonomy' => 1, + ); + $this->drupalPost('admin/config/development/generate/vocabs', + $edit, t('Generate')); + $this->assertText(t('Deleted existing vocabularies.')); + $this->assertText(t('Created the following new vocabularies:')); + + // Generate taxonomy terms. + $form = devel_generate_term_form(); + $vids = array_keys($form['vids']['#options']); + $edit = array( + 'vids[]' => $vids, + 'num_terms' => 5, + 'title_length' => 12, + 'kill_taxonomy' => 1, + ); + $this->drupalPost('admin/config/development/generate/taxonomy', + $edit, t('Generate')); + $this->assertText(t('Deleted existing terms.')); + $this->assertText(t('Created the following new terms: ')); + + // Generate menus. + $edit = array( + 'existing_menus[__new-menu__]' => 1, + 'num_menus' => 2, + 'num_links' => 50, + 'title_length' => 12, + 'link_types[node]' => 1, + 'link_types[front]' => 1, + 'link_types[external]' => 1, + 'max_depth' => 4, + 'max_width' => 6, + 'kill' => 1, + ); + $this->drupalPost('admin/config/development/generate/menu', + $edit, t('Generate')); + $this->assertText(t('Deleted existing menus and links.')); + $this->assertText(t('Created the following new menus:')); + $this->assertText(t('Created 50 new menu links.')); + + // Generate content. + // First we create a node in order to test the Delete content checkbox. + $this->drupalCreateNode(array()); + + // Now submit the generate content form. + $edit = array( + 'node_types[page]' => 1, + 'kill_content' => 1, + 'num_nodes' => 2, + 'time_range' => 604800, + 'max_comments' => 3, + 'title_length' => 4, + ); + $this->drupalPost('admin/config/development/generate/content', $edit, t('Generate')); + $this->assertText(t('Deleted 1 nodes.')); + $this->assertText(t('Finished creating 2 nodes')); + } +} diff --git a/sites/all/modules/contrib/devel/devel_generate/devel_generate_batch.inc b/sites/all/modules/contrib/devel/devel_generate/devel_generate_batch.inc new file mode 100644 index 0000000..2e90357 --- /dev/null +++ b/sites/all/modules/contrib/devel/devel_generate/devel_generate_batch.inc @@ -0,0 +1,68 @@ + t('Generating Content'), + 'operations' => $operations, + 'finished' => 'devel_generate_batch_finished', + 'file' => drupal_get_path('module', 'devel_generate') . '/devel_generate_batch.inc', + ); + batch_set($batch); +} + +/** + * Create Content Batch Functions: + */ + +function devel_generate_batch_content_kill(&$context) { + module_load_include('inc', 'devel_generate', 'devel_generate'); + devel_generate_content_kill($context['results']); +} + +function devel_generate_batch_content_pre_node($vars, &$context) { + $context['results'] = $vars; + $context['results']['num_nids'] = 0; + module_load_include('inc', 'devel_generate', 'devel_generate'); + devel_generate_content_pre_node($context['results']); +} + +function devel_generate_batch_content_add_node(&$context) { + module_load_include('inc', 'devel_generate', 'devel_generate'); + devel_generate_content_add_node($context['results']); + $context['results']['num_nids'] ++; +} + +function devel_generate_batch_finished($success, $results, $operations) { + if ($success) { + $message = t('Finished @num_nids nodes created successfully.', array('@num_nids' => $results['num_nids'])); + } + else { + $message = t('Finished with an error.'); + } + drupal_set_message($message); +} + diff --git a/sites/all/modules/contrib/devel/devel_generate/file.devel_generate.inc b/sites/all/modules/contrib/devel/devel_generate/file.devel_generate.inc new file mode 100644 index 0000000..c4e76ea --- /dev/null +++ b/sites/all/modules/contrib/devel/devel_generate/file.devel_generate.inc @@ -0,0 +1,58 @@ +uri = $path; + $source->uid = 1; // TODO: randomize? use case specific. + $source->filemime = 'text/plain'; + $source->filename = basename($path); + $destination_dir = $field['settings']['uri_scheme'] . '://' . $instance['settings']['file_directory']; + file_prepare_directory($destination_dir, FILE_CREATE_DIRECTORY); + $destination = $destination_dir . '/' . basename($path); + $file = file_move($source, $destination, FILE_CREATE_DIRECTORY); + } + else { + return FALSE; + } + } + if (!$file) { + // In case a previous file operation failed or no file is set, return FALSE + return FALSE; + } + else { + $object_field['fid'] = $file->fid; + $object_field['display'] = $field['settings']['display_default']; + $object_field['description'] = devel_create_greeking(10); + + return $object_field; + } +} + +/** + * Private function for generating a random text file. + */ +function devel_generate_textfile($filesize = 1024) { + if ($tmp_file = drupal_tempnam('temporary://', 'filefield_')) { + $destination = $tmp_file . '.txt'; + file_unmanaged_move($tmp_file, $destination); + + $fp = fopen($destination, 'w'); + fwrite($fp, str_repeat('01', $filesize/2)); + fclose($fp); + + return $destination; + } +} diff --git a/sites/all/modules/contrib/devel/devel_generate/image.devel_generate.inc b/sites/all/modules/contrib/devel/devel_generate/image.devel_generate.inc new file mode 100644 index 0000000..df4ff58 --- /dev/null +++ b/sites/all/modules/contrib/devel/devel_generate/image.devel_generate.inc @@ -0,0 +1,94 @@ +uri = $path; + $source->uid = 1; // TODO: randomize? Use case specific. + $source->filemime = 'image/' . pathinfo($path, PATHINFO_EXTENSION); + $source->filename = basename($path); + $destination_dir = $field['settings']['uri_scheme'] . '://' . $instance['settings']['file_directory']; + file_prepare_directory($destination_dir, FILE_CREATE_DIRECTORY); + $destination = $destination_dir . '/' . basename($path); + $file = file_move($source, $destination, FILE_CREATE_DIRECTORY); + $images[$extension][$min_resolution][$max_resolution][$file->fid] = $file; + } + else { + return FALSE; + } + } + else { + // Select one of the images we've already generated for this field. + $file = new stdClass(); + $file->fid = array_rand($images[$extension][$min_resolution][$max_resolution]); + } + + $object_field['fid'] = $file->fid; + $object_field['alt'] = devel_create_greeking(4); + $object_field['title'] = devel_create_greeking(4); + return $object_field; +} + +/** + * Private function for creating a random image. + * + * This function only works with the GD toolkit. ImageMagick is not supported. + */ +function devel_generate_image($extension = 'png', $min_resolution, $max_resolution) { + if ($tmp_file = drupal_tempnam('temporary://', 'imagefield_')) { + $destination = $tmp_file . '.' . $extension; + file_unmanaged_move($tmp_file, $destination, FILE_CREATE_DIRECTORY); + + $min = explode('x', $min_resolution); + $max = explode('x', $max_resolution); + + $width = rand((int)$min[0], (int)$max[0]); + $height = rand((int)$min[1], (int)$max[1]); + + // Make an image split into 4 sections with random colors. + $im = imagecreate($width, $height); + for ($n = 0; $n < 4; $n++) { + $color = imagecolorallocate($im, rand(0, 255), rand(0, 255), rand(0, 255)); + $x = $width/2 * ($n % 2); + $y = $height/2 * (int) ($n >= 2); + imagefilledrectangle($im, $x, $y, $x + $width/2, $y + $height/2, $color); + } + + // Make a perfect circle in the image middle. + $color = imagecolorallocate($im, rand(0, 255), rand(0, 255), rand(0, 255)); + $smaller_dimension = min($width, $height); + $smaller_dimension = ($smaller_dimension % 2) ? $smaller_dimension : $smaller_dimension; + imageellipse($im, $width/2, $height/2, $smaller_dimension, $smaller_dimension, $color); + + $save_function = 'image'. ($extension == 'jpg' ? 'jpeg' : $extension); + $save_function($im, drupal_realpath($destination)); + } + return $destination; +} diff --git a/sites/all/modules/contrib/devel/devel_generate/list.devel_generate.inc b/sites/all/modules/contrib/devel/devel_generate/list.devel_generate.inc new file mode 100644 index 0000000..d8101c7 --- /dev/null +++ b/sites/all/modules/contrib/devel/devel_generate/list.devel_generate.inc @@ -0,0 +1,20 @@ + $vocabulary->vid))->fetchField()) { + $candidate = mt_rand(1, $max); + $query = db_select('taxonomy_term_data', 't'); + $tid = $query + ->fields('t', array('tid')) + ->condition('t.vid', $vocabulary->vid, '=') + ->condition('t.tid', $candidate, '>=') + ->range(0,1) + ->execute() + ->fetchField(); + // If there are no terms for the taxonomy, the query will fail, in which + // case we return NULL. + if ($tid === FALSE) { + return NULL; + } + $object_field['tid'] = (int) $tid; + return $object_field; + } +} diff --git a/sites/all/modules/contrib/devel/devel_generate/text.devel_generate.inc b/sites/all/modules/contrib/devel/devel_generate/text.devel_generate.inc new file mode 100644 index 0000000..c63a92e --- /dev/null +++ b/sites/all/modules/contrib/devel/devel_generate/text.devel_generate.inc @@ -0,0 +1,35 @@ +'); + + var krumo_name = []; + var krumo_type = []; + + function krumo_traverse(el) { + krumo_name.push($(el).html()); + krumo_type.push($(el).siblings('em').html().match(/\w*/)[0]); + + if ($(el).closest('.krumo-nest').length > 0) { + krumo_traverse($(el).closest('.krumo-nest').prev().find('.krumo-name')); + } + } + + $('.krumo-child > div:first-child', context).dblclick( + function(e) { + if ($(this).find('> .krumo-php-path').length > 0) { + // Remove path if shown. + $(this).find('> .krumo-php-path').remove(); + } + else { + // Get elements. + krumo_traverse($(this).find('> a.krumo-name')); + + // Create path. + var krumo_path_string = ''; + for (var i = krumo_name.length - 1; i >= 0; --i) { + // Start element. + if ((krumo_name.length - 1) == i) + krumo_path_string += '$' + krumo_name[i]; + + if (typeof krumo_name[(i-1)] !== 'undefined') { + if (krumo_type[i] == 'Array') { + krumo_path_string += "["; + if (!/^\d*$/.test(krumo_name[(i-1)])) + krumo_path_string += "'"; + krumo_path_string += krumo_name[(i-1)]; + if (!/^\d*$/.test(krumo_name[(i-1)])) + krumo_path_string += "'"; + krumo_path_string += "]"; + } + if (krumo_type[i] == 'Object') + krumo_path_string += '->' + krumo_name[(i-1)]; + } + } + $(this).append('
' + krumo_path_string + '
'); + + // Reset arrays. + krumo_name = []; + krumo_type = []; + } + } + ); + } +}; + +})(jQuery); diff --git a/sites/all/modules/contrib/devel/devel_node_access.api.php b/sites/all/modules/contrib/devel/devel_node_access.api.php new file mode 100644 index 0000000..aacf9a6 --- /dev/null +++ b/sites/all/modules/contrib/devel/devel_node_access.api.php @@ -0,0 +1,78 @@ +realm == 'mymodule_myrealm') { + if ($row->grant_view) { + $role = user_role_load($row->gid); + return 'Role ' . drupal_placeholder($role->name) . ' may view this node.'; + } + else { + return 'No access.'; + } + } +} + +/** + * Acknowledge ownership of 'alien' grant records. + * + * Some node access modules store grant records directly into the {node_access} + * table rather than returning them through hook_node_access_records(). This + * practice is not recommended and DNA will flag all such records as 'alien'. + * + * If this is unavoidable, a module can confess to being the owner of these + * grant records, so that DNA can properly attribute them. + * + * @see hook_node_access_records() + * + * @ingroup node_access + */ +function hook_node_access_acknowledge($grant) { + if ($grant['realm'] == 'mymodule_all' && $grant['nid'] == 0) { + return TRUE; + } +} + +/** + * @} End of "addtogroup hooks". + */ diff --git a/sites/all/modules/contrib/devel/devel_node_access.info b/sites/all/modules/contrib/devel/devel_node_access.info new file mode 100644 index 0000000..22b82bc --- /dev/null +++ b/sites/all/modules/contrib/devel/devel_node_access.info @@ -0,0 +1,14 @@ +name = Devel node access +description = Developer blocks and page illustrating relevant node_access records. +package = Development +dependencies[] = menu +core = 7.x +configure = admin/config/development/devel +tags[] = developer + +; Information added by Drupal.org packaging script on 2014-05-01 +version = "7.x-1.5" +core = "7.x" +project = "devel" +datestamp = "1398963366" + diff --git a/sites/all/modules/contrib/devel/devel_node_access.install b/sites/all/modules/contrib/devel/devel_node_access.install new file mode 100644 index 0000000..0088d78 --- /dev/null +++ b/sites/all/modules/contrib/devel/devel_node_access.install @@ -0,0 +1,13 @@ +' + + '' + + Drupal.t('Error: could not explain access') + + '' + + '' + ) + .addClass('ajax-processed'); + // Call this function again. + devel_node_access_user_ajax(context, settings); + } + }, + 3000 + ); + + } + } + + /** + * Attach the access by user behavior which initiates ajax. + */ + Drupal.behaviors.develNodeAccessUserAjax = { + attach: function(context, settings) { + // Start the ajax. + devel_node_access_user_ajax(context, settings); + } + }; + +})(jQuery); diff --git a/sites/all/modules/contrib/devel/devel_node_access.module b/sites/all/modules/contrib/devel/devel_node_access.module new file mode 100644 index 0000000..74e927e --- /dev/null +++ b/sites/all/modules/contrib/devel/devel_node_access.module @@ -0,0 +1,1393 @@ + array( + 'description' => t('View the node access information blocks on node pages and the summary page.'), + 'title' => t('Access DNA information'), + 'restrict access' => TRUE, + ), + ); +} + +/** + * Implements hook_help(). + */ +function devel_node_access_help($path, $arg) { + switch ($path) { + case 'admin/settings/modules#description': + return t('Development helper for node_access table'); + break; + case 'admin/help#devel_node_access': + $output = '

' . t('This module helps in site development. Specifically, when an access control module is used to limit access to some or all nodes, this module provides some feedback showing the node_access table in the database.') . "

\n"; + $output .= '

' . t('The node_access table is one method Drupal provides to hide content from some users while displaying it to others. By default, Drupal shows all nodes to all users. There are a number of optional modules which may be installed to hide content from some users.') . "

\n"; + $output .= '

' . t('If you have not installed any of these modules, you really have no need for the devel_node_access module. This module is intended for use during development, so that developers and admins can confirm that the node_access table is working as expected. You probably do not want this module enabled on a production site.') . "

\n"; + $output .= '

' . t('This module provides two blocks. One called Devel Node Access by User is visible when a single node is shown on a page. This block shows which users can view, update or delete the node shown. Note that this block uses an inefficient algorithm to produce its output. You should only enable this block on sites with very few user accounts.') . "

\n"; + $output .= '

' . t('The second block provided by this module shows the entries in the node_access table for any nodes shown on the current page. You can enable the debug mode on the settings page to display much more information, but this can cause considerable overhead. Because the tables shown are wide, it is recommended to enable the blocks in the page footer rather than a sidebar.', + array('@settings_page' => url('admin/config/development/devel', array('fragment' => 'edit-devel-node-access'))) + ) . "

\n"; + $output .= '

' . t('This module also provides a summary page which shows general information about your node_access table. If you have installed the Views module, you may browse node_access by realm.', + array('@summary_page' => url('devel/node_access/summary')) + ) . "

\n"; + return $output; + } +} + +/** + * Implements hook_menu(). + */ +function devel_node_access_menu() { + $items = array(); + + if (!module_exists('devel')) { + if (!menu_load('devel')) { + // we have to create the 'devel' menu ourselves + $menu = array( + 'menu_name' => 'devel', + 'title' => 'Development', + 'description' => 'Development link', + ); + menu_save($menu); + } + + // we have to create the 'Devel settings' menu item ourselves + $items['admin/config/development/devel'] = array( + 'title' => 'Devel settings', + 'description' => 'Helper pages and blocks to assist Drupal developers and admins with node_access. The devel blocks can be managed via the block administration page.', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('devel_node_access_admin_settings'), + 'access arguments' => array('administer site configuration'), + ); + $items['devel/settings'] = $items['admin/config/development/devel'] + array( + 'menu_name' => 'devel', + ); + } + + // create a callback for use by devel_node_access_user_ajax(). + $items['devel/node_access/by_user/%/%'] = array( + 'page callback' => 'devel_node_access_user_ajax', + 'page arguments' => array(3, 4), + 'access arguments' => array(DNA_ACCESS_VIEW), + 'type' => MENU_CALLBACK, + ); + + // add this to the custom menu 'devel' created by the devel module. + $items['devel/node_access/summary'] = array( + 'title' => 'Node_access summary', + 'page callback' => 'dna_summary', + 'access arguments' => array(DNA_ACCESS_VIEW), + 'menu_name' => 'devel', + ); + + return $items; +} + +function devel_node_access_admin_settings() { + $form = array(); + return system_settings_form($form); +} + +function devel_node_access_form_alter(&$form, $form_state, $form_id) { + $tr = 't'; + if ($form_id == 'devel_admin_settings' || $form_id == 'devel_node_access_admin_settings') { + $form['devel_node_access'] = array( + '#type' => 'fieldset', + '#title' => t('Devel Node Access'), + '#collapsible' => TRUE, + ); + $form['devel_node_access']['devel_node_access_debug_mode'] = array( + '#type' => 'checkbox', + '#title' => t('Debug mode'), + '#default_value' => variable_get('devel_node_access_debug_mode', FALSE), + '#description' => t('Debug mode verifies the grant records in the node_access table against those that would be set by running !Rebuild_permissions, and displays them all; this can cause considerable overhead.
For even more information enable the %DNAbU block, too.', array( + '!Rebuild_permissions' => l('[' . $tr('Rebuild permissions') . ']', 'admin/reports/status/rebuild'), + '%DNAbU' => t('Devel Node Access by User'), + '@link' => url('admin/structure/block/list'), + )), + ); + $form['devel_node_access']['devel_node_access_user_ajax'] = array( + '#type' => 'checkbox', + '#title' => t('Asynchronously populate the Devel Node Access by User block'), + '#default_value' => variable_get('devel_node_access_user_ajax', FALSE), + '#description' => t("Use Ajax to populate the second DNA block. This loads the initial page faster and uses dynamic calls to build the data in the table, one request at a time. It's especially useful during development, if some of the calls are failing.") . '
' . t('JavaScript must be enabled in your browser.'), + ); + // push the Save button down + $form['actions']['#weight'] = 10; + } +} + +function dna_summary() { + // warn user if they have any entries that could grant access to all nodes + $output = ''; + $result = db_query('SELECT DISTINCT realm FROM {node_access} WHERE nid = 0 AND gid = 0'); + $rows = array(); + foreach ($result as $row) { + $rows[] = array($row->realm); + } + if (!empty($rows)) { + $output .= '

' . t('Access Granted to All Nodes (All Users)') . "

\n"; + $output .= '

' . t('Your node_access table contains entries that may be granting all users access to all nodes. Depending on which access control module(s) you use, you may want to delete these entries. If you are not using an access control module, you should probably leave these entries as is.') . "

\n"; + $headers = array(t('realm')); + $output .= theme('table', array('header' => $headers, 'rows' => $rows)); + $access_granted_to_all_nodes = TRUE; + } + + // how many nodes are not represented in the node_access table + $num = db_query('SELECT COUNT(n.nid) AS num_nodes FROM {node} n LEFT JOIN {node_access} na ON n.nid = na.nid WHERE na.nid IS NULL')->fetchField(); + if ($num) { + $output .= '

' . t('Legacy Nodes') . "

\n"; + $output .= '

' . + t('You have !num nodes in your node table which are not represented in your node_access table. If you have an access control module installed, these nodes may be hidden from all users. This could be caused by publishing nodes before enabling the access control module. If this is the case, manually updating each node should add it to the node_access table and fix the problem.', array('!num' => l($num, 'devel/node_access/view/NULL'))) + . "

\n"; + if (!empty($access_granted_to_all_nodes)) { + $output .= '

' . + t('This issue may be masked by the one above, so look into the former first.') + . "

\n"; + } + } + else { + $output .= '

' . t('All Nodes Represented') . "

\n"; + $output .= '

' . t('All nodes are represented in the node_access table.') . "

\n"; + } + + + // a similar warning to the one above, but slightly more specific + $result = db_query('SELECT DISTINCT realm FROM {node_access} WHERE nid = 0 AND gid <> 0'); + $rows = array(); + foreach ($result as $row) { + $rows[] = array($row->realm); + } + if (!empty($rows)) { + $output .= '

' . t('Access Granted to All Nodes (Some Users)') . "

\n"; + $output .= '

' . t('Your node_access table contains entries that may be granting some users access to all nodes. This may be perfectly normal, depending on which access control module(s) you use.') . "

\n"; + $headers = array(t('realm')); + $output .= theme('table', array('header' => $headers, 'rows' => $rows)); + } + + + // find specific nodes which may be visible to all users + $result = db_query('SELECT DISTINCT realm, COUNT(DISTINCT nid) as node_count FROM {node_access} WHERE gid = 0 AND nid > 0 GROUP BY realm'); + $rows = array(); + foreach ($result as $row) { + $rows[] = array( + $row->realm, + array( + 'data' => $row->node_count, + 'align' => 'center', + ), + ); + } + if (!empty($rows)) { + $output .= '

' . t('Access Granted to Some Nodes') . "

\n"; + $output .= '

' . + t('The following realms appear to grant all users access to some specific nodes. This may be perfectly normal, if some of your content is available to the public.') + . "

\n"; + $headers = array(t('realm'), t('public nodes')); + $output .= theme('table', array('header' => $headers, 'rows' => $rows, 'caption' => t('Public Nodes'))); + } + + + // find specific nodes protected by node_access table + $result = db_query('SELECT DISTINCT realm, COUNT(DISTINCT nid) as node_count FROM {node_access} WHERE gid <> 0 AND nid > 0 GROUP BY realm'); + $rows = array(); + foreach ($result as $row) { + // no Views yet: + //$rows[] = array(l($row->realm, "devel/node_access/view/$row->realm"), + $rows[] = array( + $row->realm, + array( + 'data' => $row->node_count, + 'align' => 'center', + ), + ); + } + if (!empty($rows)) { + $output .= '

' . t('Summary by Realm') . "

\n"; + $output .= '

' . t('The following realms grant limited access to some specific nodes.') . "

\n"; + $headers = array(t('realm'), t('private nodes')); + $output .= theme('table', array('header' => $headers, 'rows' => $rows, 'caption' => t('Protected Nodes'))); + } + + return $output; +} + +function dna_visible_nodes($nid = NULL) { + static $nids = array(); + if ($nid) { + $nids[$nid] = $nid; + } + elseif (empty($nids)) { + $menu_item = menu_get_item(); + $map = $menu_item['original_map']; + if ($map[0] == 'node' && isset($map[1]) && is_numeric($map[1]) && !isset($map[2])) { + // show DNA information on node/NID even if access is denied (IF the user has the 'view devel_node_access information' permission)! + return array($map[1]); + } + } + return $nids; +} + +function devel_node_access_node_view($node, $build_mode) { + // remember this node, for display in our block + dna_visible_nodes($node->nid); +} + +function _devel_node_access_module_invoke_all() { // array and scalar returns + $args = func_get_args(); + $hook = $args[0]; + unset($args[0]); + $return = array(); + foreach (module_implements($hook) as $module) { + $function = $module . '_' . $hook; + if (function_exists($function)) { + $result = call_user_func_array($function, $args); + if (isset($result)) { + if (is_array($result)) { + foreach ($result as $key => $value) { + // add name of module that returned the value: + $result[$key]['#module'] = $module; + } + } + else { + // build array with result keyed by $module: + $result = array($module => $result); + } + $return = array_merge_recursive($return, $result); + } + } + } + return $return; +} + +/** + * Helper function to build an associative array of grant records and their + * history. If there are duplicate records, display an error message. + * + * @param $grants + * An indexed array of grant records, augmented by the '#module' key, + * as created by _devel_node_access_module_invoke_all('node_access_records'). + * + * @param $node + * The node that the grant records belong to. + * + * @param $function + * The name of the hook that produced the grants array, in case we need to + * display an error message. + * + * @return + * See _devel_node_access_nar_alter() for the description of the result. + */ +function _devel_node_access_build_nar_data($grants, $node, $function) { + $data = array(); + $duplicates = array(); + foreach ($grants as $grant) { + if (empty($data[$grant['realm']][$grant['gid']])) { + $data[$grant['realm']][$grant['gid']] = array('original' => $grant, 'current' => $grant, 'changes' => array()); + } + else { + if (empty($duplicates[$grant['realm']][$grant['gid']])) { + $duplicates[$grant['realm']][$grant['gid']][] = $data[$grant['realm']][$grant['gid']]['original']; + } + $duplicates[$grant['realm']][$grant['gid']][] = $grant; + } + } + if (!empty($duplicates)) { + // generate an error message + $msg = t('Devel Node Access has detected duplicate records returned from %function:', array('%function' => $function)); + $msg .= '
    '; + foreach ($duplicates as $realm => $data_by_realm) { + foreach ($data_by_realm as $gid => $data_by_realm_gid) { + $msg .= '
    • '; + foreach ($data_by_realm_gid as $grant) { + $msg .= "
    • $node->nid/$realm/$gid/" . ($grant['grant_view'] ? 1 : 0) . ($grant['grant_update'] ? 1 : 0) . ($grant['grant_delete'] ? 1 : 0) . ' by ' . $grant['#module'] . '
    • '; + } + $msg .= '
  • '; + } + } + $msg .= '
'; + drupal_set_message($msg, 'error', FALSE); + } + return $data; +} + +/** + * Helper function to mimic hook_node_access_records_alter() and trace what + * each module does with it. + * + * @param object $grants + * An indexed array of grant records, augmented by the '#module' key, + * as created by _devel_node_access_module_invoke_all('node_access_records'). + * This array is updated by the hook_node_access_records_alter() + * implementations. + * + * @param $node + * The node that the grant records belong to. + * + * @return + * A tree representation of the grant records in $grants including their + * history: + * $data[$realm][$gid] + * ['original'] - grant record before processing + * ['current'] - grant record after processing (if still present) + * ['changes'][]['op'] - change message (add/change/delete by $module) + * ['grant'] - grant record after change (unless deleted) + */ +function _devel_node_access_nar_alter(&$grants, $node) { + //dpm($grants, '_devel_node_access_nar_alter(): grants IN'); + $dummy = array(); + drupal_alter('node_access_records', $dummy, $node); + static $drupal_static = array(); + isset($drupal_static['drupal_alter']) || ($drupal_static['drupal_alter'] = &drupal_static('drupal_alter')); + $functions = $drupal_static['drupal_alter']; + + // build the initial tree (and check for duplicates) + $data = _devel_node_access_build_nar_data($grants, $node, 'hook_node_access_records()'); + + // simulate drupal_alter('node_access_records', $grants, $node); + foreach ($functions['node_access_records'] as $function) { + // call hook_node_access_records_alter() for one module at a time and analyze + $function($grants, $node); // <== + $module = substr($function, 0, strlen($function) - 26); + + foreach ($grants as $i => $grant) { + if (empty($data[$grant['realm']][$grant['gid']]['current'])) { + // it's an added grant + $data[$grant['realm']][$grant['gid']]['current'] = $grant; + $data[$grant['realm']][$grant['gid']]['current']['#module'] = $module; + $data[$grant['realm']][$grant['gid']]['changes'][] = array( + 'op' => 'added by ' . $module, + 'grant' => $grant, + ); + $grants[$i]['#module'] = $module; + } + else { + // it's an existing grant, check for changes + $view = $update = $delete = FALSE; + foreach (array('view', 'update', 'delete') as $op) { + $$op = $grant["grant_$op"] - $data[$grant['realm']][$grant['gid']]['current']["grant_$op"]; + } + $priority = $grant['priority'] - $data[$grant['realm']][$grant['gid']]['current']['priority']; + if ($view || $update || $delete || $priority) { + // it was changed + $data[$grant['realm']][$grant['gid']]['current'] = $grant; + $data[$grant['realm']][$grant['gid']]['current']['#module'] = $module; + $data[$grant['realm']][$grant['gid']]['changes'][] = array( + 'op' => 'altered by ' . $module, + 'grant' => $grant, + ); + $grants[$i]['#module'] = $module; + } + } + $data[$grant['realm']][$grant['gid']]['found'] = TRUE; + } + + // check for newly introduced duplicates + _devel_node_access_build_nar_data($grants, $node, 'hook_node_access_records_alter()'); + + // look for grant records that have disappeared + foreach ($data as $realm => $data2) { + foreach ($data2 as $gid => $data3) { + if (empty($data[$realm][$gid]['found']) && isset($data[$realm][$gid]['current'])) { + unset($data[$realm][$gid]['current']); + $data[$realm][$gid]['changes'][] = array('op' => 'removed by ' . $module); + } + else { + unset($data[$realm][$gid]['found']); + } + } + } + } + //dpm($data, '_devel_node_access_nar_alter() returns'); + //dpm($grants, '_devel_node_access_nar_alter(): grants OUT'); + return $data; +} + +/** + * Helper function to mimic hook_node_grants_alter() and trace what + * each module does with it. + * + * @param object $grants + * An indexed array of grant records, augmented by the '#module' key, + * as created by _devel_node_access_module_invoke_all('node_grants'). + * This array is updated by the hook_node_grants_alter() + * implementations. + * + * @param $node + * The node that the grant records belong to. + * + * @return + * A tree representation of the grant records in $grants including their + * history: + * $data[$realm][$gid] + * ['cur'] - TRUE or FALSE whether the gid is present or not + * ['ori'][] - array of module names that contributed this grant (if any) + * ['chg'][] - array of changes, such as + * - 'added' if module name is a prefix if the $realm, + * - 'added by module' otherwise, or + * - 'removed by module' + */ +function _devel_node_access_ng_alter(&$grants, $account, $op) { + //dpm($grants, '_devel_node_access_ng_alter(): grants IN'); + $dummy = array(); + drupal_alter('node_grants', $dummy, $account, $op); + static $drupal_static = array(); + isset($drupal_static['drupal_alter']) || ($drupal_static['drupal_alter'] = &drupal_static('drupal_alter')); + $functions = $drupal_static['drupal_alter']; + + // build the initial structure + $data = array(); + foreach ($grants as $realm => $gids) { + foreach ($gids as $i => $gid) { + if ($i !== '#module') { + $data[$realm][$gid]['cur'] = TRUE; + $data[$realm][$gid]['ori'][] = $gids['#module']; + } + } + unset($grants[$realm]['#module']); + } + + // simulate drupal_alter('node_grants', $grants, $account, $op); + foreach ($functions['node_grants'] as $function) { + // call hook_node_grants_alter() for one module at a time and analyze + $function($grants, $account, $op); // <== + $module = substr($function, 0, strlen($function) - 18); + + // check for new gids + foreach ($grants as $realm => $gids) { + foreach ($gids as $i => $gid) { + if (empty($data[$realm][$gid]['cur'])) { + $data[$realm][$gid]['cur'] = TRUE; + $data[$realm][$gid]['chg'][] = 'added by ' . $module; + } + } + } + + // check for removed gids + foreach ($data as $realm => $gids) { + foreach ($gids as $gid => $history) { + if ($history['cur'] && array_search($gid, $grants[$realm]) === FALSE) { + $data[$realm][$gid]['cur'] = FALSE; + $data[$realm][$gid]['chg'][] = 'removed by ' . $module; + } + } + } + } + + //dpm($data, '_devel_node_access_ng_alter() returns'); + //dpm($grants, '_devel_node_access_ng_alter(): grants OUT'); + return $data; +} + +/** + * Implements hook_block_info(). + */ +function devel_node_access_block_info() { + $blocks['dna_node'] = array( + 'info' => t('Devel Node Access'), + 'region' => 'footer', + 'status' => 1, + 'cache' => DRUPAL_NO_CACHE, + ); + $blocks['dna_user'] = array( + 'info' => t('Devel Node Access by User'), + 'region' => 'footer', + 'status' => 0, + 'cache' => DRUPAL_NO_CACHE, + ); + return $blocks; +} + +/** + * Implements hook_block_view(). + */ +function devel_node_access_block_view($delta) { + global $user; + global $theme_key; + static $block1_visible, $hint = ''; + if (!isset($block1_visible)) { + $block1_visible = db_query("SELECT status FROM {block} WHERE module = 'devel_node_access' AND delta = 'dna_user' AND theme = :theme", array( + ':theme' => $theme_key, + ))->fetchField(); + if (!$block1_visible) { + $hint = t('For per-user access permissions enable the %DNAbU block.', array('@link' => url('admin/structure/block'), '%DNAbU' => t('Devel Node Access by User'))); + } + } + + if (!user_access(DNA_ACCESS_VIEW)) { + return; + } + + $output = array(); + + switch ($delta) { + case 'dna_node': + if (!count(dna_visible_nodes())) { + return; + } + + // include rows where nid == 0 + $nids = array_merge(array(0 => 0), dna_visible_nodes()); + $query = db_select('node_access', 'na'); + $query + ->fields('na') + ->condition('na.nid', $nids, 'IN') + ->orderBy('na.nid') + ->orderBy('na.realm') + ->orderBy('na.gid'); + $nodes = node_load_multiple($nids); + + if (!variable_get('devel_node_access_debug_mode', FALSE)) { + $headers = array(t('node'), t('realm'), t('gid'), t('view'), t('update'), t('delete'), t('explained')); + $rows = array(); + foreach ($query->execute() as $row) { + $explained = module_invoke_all('node_access_explain', $row); + $rows[] = array( + (empty($row->nid) ? '0' : '' . _devel_node_access_get_node_title($nodes[$row->nid], TRUE) . ''), + $row->realm, + $row->gid, + $row->grant_view, + $row->grant_update, + $row->grant_delete, + implode('
', $explained), + ); + } + $output[] = array( + '#theme' => 'table', + '#header' => $headers, + '#rows' => $rows, + '#attributes' => array('style' => 'text-align: left') + ); + + $hint = t('To see more details enable debug mode.', array('@debug_mode' => url('admin/config/development/devel', array('fragment' => 'edit-devel-node-access')))) . (empty($hint) ? '' : ' ' . $hint); + } + else { + $tr = 't'; + $variables = array('!na' => '{node_access}'); + $states = array( + 'default' => array(t('default'), 'ok', t('Default grant supplied by core in the absence of any other non-empty grants; in !na.', $variables)), + 'ok' => array(t('ok'), 'ok', t('Highest priority grant; in !na.', $variables)), + 'removed' => array(t('removed'), '', t('Was removed in @func; not in !na.', $variables + array('@func' => 'hook_node_access_records_alter()'))), + 'static' => array(t('static'), 'ok', t('Non-standard grant in !na.', $variables)), + 'unexpected' => array(t('unexpected'), 'warning', t('The 0/all/0/... grant applies to all nodes and all users -- usually it should not be present in !na if any node access module is active!')), + 'ignored' => array(t('ignored'), 'warning', t('Lower priority grant; not in !na and thus ignored.', $variables)), + 'empty' => array(t('empty'), 'warning', t('Does not grant any access, but could block lower priority grants; not in !na.', $variables)), + 'wrong' => array(t('wrong'), 'error', t('Is rightfully in !na but at least one access flag is wrong!', $variables)), + 'missing' => array(t('missing'), 'error', t("Should be in !na but isn't!", $variables)), + 'removed!' => array(t('removed!'), 'error', t('Was removed in @func; should NOT be in !na!', $variables + array('@func' => 'hook_node_access_records_alter()'))), + 'illegitimate' => array(t('illegitimate'), 'error', t('Should NOT be in !na because of lower priority!', $variables)), + 'alien' => array(t('alien'), 'error', t('Should NOT be in !na because of unknown origin!', $variables)), + ); + $active_states = array('default', 'ok', 'static', 'unexpected', 'wrong', 'illegitimate', 'alien'); + $headers = array(t('node'), t('prio'), t('status'), t('realm'), t('gid'), t('view'), t('update'), t('delete'), t('explained')); + $headers = _devel_node_access_format_row($headers); + $active_grants = array(); + foreach ($query->execute() as $active_grant) { + $active_grants[$active_grant->nid][$active_grant->realm][$active_grant->gid] = $active_grant; + } + $all_grants = $checked_grants = $published_nid = array(); + foreach ($nids as $nid) { + $acquired_grants_nid = array(); + if ($node = node_load($nid)) { + // check node_access_acquire_grants() + $grants = _devel_node_access_module_invoke_all('node_access_records', $node); + // check drupal_alter('node_access_records') + $data = _devel_node_access_nar_alter($grants, $node); + /* (This was the D6 implementation that didn't analyze the hook_node_access_records_alter() details.) + if (!empty($grants)) { + $top_priority = NULL; + foreach ($grants as $grant) { + $priority = intval($grant['priority']); + $top_priority = (isset($top_priority) ? max($top_priority, $priority) : $priority); + $grant['priority'] = (isset($grant['priority']) ? $priority : '– '); + $acquired_grants_nid[$priority][$grant['realm']][$grant['gid']] = $grant + array( + '#title' => _devel_node_access_get_node_title($node, TRUE), + '#module' => (isset($grant['#module']) ? $grant['#module'] : ''), + ); + } + krsort($acquired_grants_nid); + } + /*/ + // (This is the new D7 implementation; it retains backward compatibility.) + if (!empty($data)) { + foreach ($data as $data_by_realm) { + foreach ($data_by_realm as $data_by_realm_gid) { // by gid + if (isset($data_by_realm_gid['current'])) { + $grant = $data_by_realm_gid['current']; + } + elseif (isset($data_by_realm_gid['original'])) { + $grant = $data_by_realm_gid['original']; + $grant['#removed'] = 1; + } + else { + continue; + } + $priority = intval($grant['priority']); + $top_priority = (isset($top_priority) ? max($top_priority, $priority) : $priority); + $grant['priority'] = (isset($grant['priority']) ? $priority : '– '); + $grant['history'] = $data_by_realm_gid; + $acquired_grants_nid[$priority][$grant['realm']][$grant['gid']] = $grant + array( + '#title' => _devel_node_access_get_node_title($node), + '#module' => (isset($grant['#module']) ? $grant['#module'] : ''), + ); + } + } + krsort($acquired_grants_nid); + } + /**/ + //dpm($acquired_grants_nid, "acquired_grants_nid ="); + // check node_access_grants() + $published_nid[$nid] = $node->status; + if ($node->nid) { + foreach (array('view', 'update', 'delete') as $op) { + $grants = _devel_node_access_module_invoke_all('node_grants', $user, $op); + // call all hook_node_grants_alter() implementations + $ng_alter_datas[$op] = _devel_node_access_ng_alter($grants, $user, $op); + $checked_grants[$nid][$op] = array_merge(array('all' => array(0)), $grants); + } + } + } + + // check for grants in the node_access table that aren't returned by node_access_acquire_grants() + + if (isset($active_grants[$nid])) { + foreach ($active_grants[$nid] as $realm => $active_grants_realm) { + foreach ($active_grants_realm as $gid => $active_grant) { + $found = FALSE; + $count_nonempty_grants = 0; + foreach ($acquired_grants_nid as $priority => $acquired_grants_nid_priority) { + if (isset($acquired_grants_nid_priority[$realm][$gid])) { + $found = TRUE; + } + } + if ($acquired_grants_nid_priority = reset($acquired_grants_nid)) { // highest priority only + foreach ($acquired_grants_nid_priority as $acquired_grants_nid_priority_realm) { + foreach ($acquired_grants_nid_priority_realm as $acquired_grants_nid_priority_realm_gid) { + $count_nonempty_grants += (!empty($acquired_grants_nid_priority_realm_gid['grant_view']) || !empty($acquired_grants_nid_priority_realm_gid['grant_update']) || !empty($acquired_grants_nid_priority_realm_gid['grant_delete'])); + } + } + } + $fixed_grant = (array) $active_grant; + if ($count_nonempty_grants == 0 && $realm == 'all' && $gid == 0) { + $fixed_grant += array( + 'priority' => '–', + 'state' => 'default', + ); + } + elseif (!$found) { + $acknowledged = _devel_node_access_module_invoke_all('node_access_acknowledge', $fixed_grant); + if (empty($acknowledged)) { + // no module acknowledged this record, mark it as alien + $fixed_grant += array( + 'priority' => '?', + 'state' => 'alien', + ); + } + else { + // at least one module acknowledged the record, attribute it to the first one + $acknowledged_keys = array_keys($acknowledged); + $fixed_grant += array( + 'priority' => '–', + 'state' => 'static', + '#module' => reset($acknowledged_keys), + ); + } + } + else { + continue; + } + $fixed_grant += array( + 'nid' => $nid, + '#title' => _devel_node_access_get_node_title($node), + ); + $all_grants[] = $fixed_grant; + } + } + } + + // order grants and evaluate their status + foreach ($acquired_grants_nid as $priority => $acquired_grants_priority) { + ksort($acquired_grants_priority); + foreach ($acquired_grants_priority as $realm => $acquired_grants_realm) { + ksort($acquired_grants_realm); + foreach ($acquired_grants_realm as $gid => $acquired_grant) { + if ($priority == $top_priority) { + if (empty($acquired_grant['grant_view']) && empty($acquired_grant['grant_update']) && empty($acquired_grant['grant_delete'])) { + $acquired_grant['state'] = 'empty'; + } + else { + if (isset($active_grants[$nid][$realm][$gid])) { + $acquired_grant['state'] = (isset($acquired_grant['#removed']) ? 'removed!' : 'ok'); + } + else { + $acquired_grant['state'] = (isset($acquired_grant['#removed']) ? 'removed' : 'missing'); + } + if ($acquired_grant['state'] == 'ok') { + foreach (array('view', 'update', 'delete') as $op) { + $active_grant = (array) $active_grants[$nid][$realm][$gid]; + if (empty($acquired_grant["grant_$op"]) != empty($active_grant["grant_$op"])) { + $acquired_grant["grant_$op!"] = $active_grant["grant_$op"]; + } + } + } + } + } + else { + $acquired_grant['state'] = (isset($active_grants[$nid][$realm][$gid]) ? 'illegitimate' : 'ignored'); + } + $all_grants[] = $acquired_grant + array('nid' => $nid); + } + } + } + } + + // fill in the table rows + $rows = array(); + $error_count = 0; + foreach ($all_grants as $grant) { + $row = new stdClass(); + $row->nid = $grant['nid']; + $row->title = $grant['#title']; + $row->priority = $grant['priority']; + $row->state = array('data' => $states[$grant['state']][0], 'title' => $states[$grant['state']][2]); + $row->realm = $grant['realm']; + $row->gid = $grant['gid']; + $row->grant_view = $grant['grant_view']; + $row->grant_update = $grant['grant_update']; + $row->grant_delete = $grant['grant_delete']; + $row->explained = implode('
', module_invoke_all('node_access_explain', $row)); + unset($row->title); // possibly needed above + if ($row->nid == 0 && $row->gid == 0 && $row->realm == 'all' && count($all_grants) > 1) { + $row->state = array('data' => $states['unexpected'][0], 'title' => $states['unexpected'][2]); + $class = $states['unexpected'][1]; + } + else { + $class = $states[$grant['state']][1]; + } + $row = (array) $row; + foreach (array('view', 'update', 'delete') as $op) { + $row["grant_$op"] = array('data' => $row["grant_$op"]); + if ((isset($checked_grants[$grant['nid']][$op][$grant['realm']]) && in_array($grant['gid'], $checked_grants[$grant['nid']][$op][$grant['realm']]) || ($row['nid'] == 0 && $row['gid'] == 0 && $row['realm'] == 'all')) && !empty($row["grant_$op"]['data']) && in_array($grant['state'], $active_states)) { + $row["grant_$op"]['data'] .= '′'; + $row["grant_$op"]['title'] = t('This entry grants access to this node to this user.'); + } + if (isset($grant["grant_$op!"])) { + $row["grant_$op"]['data'] = $grant["grant_$op!"] . '>' . (!$row["grant_$op"]['data'] ? 0 : $row["grant_$op"]['data']); + $row["grant_$op"]['class'][] = 'error'; + if ($class == 'ok') { + $row['state'] = array('data' => $states['wrong'][0], 'title' => $states['wrong'][2]); + $class = $states['wrong'][1]; + } + } + } + $error_count += ($class == 'error'); + $row['nid'] = array( + 'data' => '' . $row['nid'] . '', + 'title' => $grant['#title'], + ); + if (empty($grant['#module']) || strpos($grant['realm'], $grant['#module']) === 0) { + $row['realm'] = $grant['realm']; + } + else { + $row['realm'] = array( + 'data' => $grant['#module'] . ':
' . $grant['realm'], + 'title' => t("The '@module' module fails to adhere to the best practice of naming its realm(s) after itself.", array('@module' => $grant['#module'])), + ); + } + + // prepend information from the D7 hook_node_access_records_alter() + $next_style = array(); + if (isset($grant['history'])) { + $history = $grant['history']; + if (($num_changes = count($history['changes']) - empty($history['current'])) > 0) { + $first_row = TRUE; + while (isset($history['original']) || $num_changes--) { + if (isset($history['original'])) { + $this_grant = $history['original']; + $this_action = '[ Original by ' . $this_grant['#module'] . ':'; + unset($history['original']); + } + else { + $change = $history['changes'][0]; + $this_grant = $change['grant']; + $this_action = ($first_row ? '[ ' : '') . $change['op'] . ':'; + array_shift($history['changes']); + } + $rows[] = array( + 'data' => array( + 'data' => array( + 'data' => $this_action, + 'style' => array('padding-bottom: 0;'), + ), + ), + 'style' => array_merge(($first_row ? array() : array('border-top-style: dashed;', 'border-top-width: 1px;')), array('border-bottom-style: none;')), + ); + $next_style = array('border-top-style: none;'); + if (count($history['changes'])) { + $g = $this_grant; + $rows[] = array( + 'data' => array('v', $g['priority'], '', $g['realm'], $g['gid'], $g['grant_view'], $g['grant_update'], $g['grant_delete'], 'v'), + 'style' => array('border-top-style: none;', 'border-bottom-style: dashed;'), + ); + $next_style = array('border-top-style: dashed;'); + } + $first_row = FALSE; + } + } + } + + // fix up the main row cells with the proper class (needed for Bartik) + foreach ($row as $key => $value) { + if (!is_array($value)) { + $row[$key] = array('data' => $value); + } + $row[$key]['class'] = array($class); + } + // add the main row + $will_append = empty($history['current']) && !empty($history['changes']); + $rows[] = array( + 'data' => array_values($row), + 'class' => array($class), + 'style' => array_merge($next_style, ($will_append ? array('border-bottom-style: none;') : array())), + ); + + // append information from the D7 hook_node_access_records_alter() + if ($will_append) { + $last_change = end($history['changes']); + $rows[] = array( + 'data' => array( + 'data' => array( + 'data' => $last_change['op'] . ' ]', + 'style' => array('padding-top: 0;'), + ), + ), + 'style' => array('border-top-style: none;'), + ); + } + } + + foreach ($rows as $i => $row) { + $rows[$i] = _devel_node_access_format_row($row); + } + + $output[] = array( + '#theme' => 'table', + '#header' => $headers, + '#rows' => $rows, + '#attributes' => array( + 'class' => array('system-status-report'), + 'style' => 'text-align: left;', + ), + ); + + $output[] = array( + '#theme' => 'form_element', + '#description' => t('(Some of the table elements provide additional information if you hover your mouse over them.)'), + ); + + if ($error_count > 0) { + $variables['!Rebuild_permissions'] = '' . $tr('Rebuild permissions') . ''; + $output[] = array( + '#prefix' => "\n
", + '#markup' => t("You have errors in your !na table! You may be able to fix these for now by running !Rebuild_permissions, but this is likely to destroy the evidence and make it impossible to identify the underlying issues. If you don't fix those, the errors will probably come back again.
DON'T do this just yet if you intend to ask for help with this situation.", $variables), + '#suffix' => "

\n", + ); + } + + // Explain whether access is granted or denied, and why (using code from node_access()). + $tr = 't'; + array_shift($nids); // remove the 0 + $accounts = array(); + $variables += array( + '!username' => '' . theme('username', array('account' => $user)) . '', + '%uid' => $user->uid, + ); + + if (user_access('bypass node access')) { + $variables['%bypass_node_access'] = $tr('bypass node access'); + $output[] = array( + '#markup' => t('!username has the %bypass_node_access permission and thus full access to all nodes.', $variables), + '#suffix' => '
 ', + ); + } + else { + $variables['!list'] = '
' . _devel_node_access_get_grant_list($nid, $ng_alter_datas['view']) . '
'; + $variables['%access'] = 'view'; + $output[] = array( + '#prefix' => "\n
", + '#markup' => t('!username (user %uid) can use these grants (if they are present above) for %access access: !list', $variables), + '#suffix' => "
\n", + ); + $accounts[] = $user; + } + $menu_item = menu_get_item(); + $map = $menu_item['original_map']; + if ($map[0] == 'node' && isset($map[1]) && is_numeric($map[1]) && !isset($map[2]) && !$block1_visible) { + // only for single nodes + if (user_is_logged_in()) { + $accounts[] = user_load(0); // Anonymous, too + } + foreach ($accounts as $account) { + $account_items = array(); + $nid_items = array(); + foreach ($nids as $nid) { + $op_items = array(); + foreach (array('create', 'view', 'update', 'delete') as $op) { + $explain = _devel_node_access_explain_access($op, $nid, $account); + $op_items[] = "
" . t('%op:', array('%op' => $op)) . '
' . $explain[2]; + } + $nid_items[] = array( + '#theme' => 'item_list', + '#items' => $op_items, + '#type' => 'ul', + '#prefix' => t('to node !nid:', array('!nid' => l($nid, 'node/' . $nid))) . "\n
", + '#suffix' => '
', + ); + } + if (count($nid_items) == 1) { + $account_items = $nid_items[0]; + } + else { + $account_items = array( + '#theme' => 'item_list', + '#items' => $nid_items, + '#type' => 'ul', + '#prefix' => "\n
", + '#suffix' => '
', + ); + } + $variables['!username'] = '' . theme('username', array('account' => $account)) . ''; + $output[] = array( + '#prefix' => "\n
", + '#type' => 'item', + 'lead-in' => array('#markup' => t("!username has the following access", $variables) . ' '), + 'items' => $account_items, + '#suffix' => "\n
\n", + ); + } + } + } + + if (!empty($hint)) { + $output[] = array( + '#theme' => 'form_element', + '#description' => '(' . $hint . ')', + ); + } + $output[]['#markup'] = '

'; + $subject = t('node_access entries for nodes shown on this page'); + return array('subject' => $subject, 'content' => $output); + + case 'dna_user': + // show which users can access this node + $menu_item = menu_get_item(); + $map = $menu_item['original_map']; + if ($map[0] != 'node' || !isset($map[1]) || !is_numeric($map[1]) || isset($map[2])) { + // Ignore anything but node/%. + return; + } + + if (isset($menu_item['map'][1]) && is_object($node = $menu_item['map'][1])) { + // We have the node. + } + elseif (is_numeric($menu_item['original_map'][1])) { + $node = node_load($menu_item['original_map'][1]); + } + if (isset($node)) { + $nid = $node->nid; + $node_type = node_type_get_type($node); + $variables = array('@Node_type' => ($node_type ? $node_type->name : $node->type)); + $create_header = '' . t('create') . ''; + if (!$node_type) { + $create_header .= '
' . t("(missing type: '@Node_type')", $variables) . ''; + } + $headers = array(t('username'), $create_header, t('view'), t('update'), t('delete')); + $rows = array(); + // Determine whether to use Ajax or prepopulate the tables. + if ($ajax = variable_get('devel_node_access_user_ajax', FALSE)) { + drupal_add_js(drupal_get_path('module', 'devel_node_access') . '/devel_node_access.js'); + } + // Find all users. The following operations are very inefficient, so we + // limit the number of users returned. It would be better to make a + // pager query, or at least make the number of users configurable. If + // anyone is up for that please submit a patch. + $query = db_select('users', 'u') + ->fields('u', array('uid')) + ->orderBy('u.access', 'DESC') + ->range(0, 9); + $uids = $query->execute()->fetchCol(); + array_unshift($uids, 0); + $accounts = user_load_multiple($uids); + foreach ($accounts as $account) { + $username = theme('username', array('account' => $account)); + if ($account->uid == $user->uid) { + $username = '' . $username . ''; + } + $rows[] = array( + $username, + array( + 'id' => 'create-' . $nid . '-' . $account->uid, + 'class' => 'dna-permission', + 'data' => $ajax ? NULL : theme('dna_permission', array('permission' => _devel_node_access_explain_access('create', $nid, $account))), + ), + array( + 'id' => 'view-' . $nid . '-' . $account->uid, + 'class' => 'dna-permission', + 'data' => $ajax ? NULL : theme('dna_permission', array('permission' => _devel_node_access_explain_access('view', $nid, $account))), + ), + array( + 'id' => 'update-' . $nid . '-' . $account->uid, + 'class' => 'dna-permission', + 'data' => $ajax ? NULL : theme('dna_permission', array('permission' => _devel_node_access_explain_access('update', $nid, $account))), + ), + array( + 'id' => 'delete-' . $nid . '-' . $account->uid, + 'class' => 'dna-permission', + 'data' => $ajax ? NULL : theme('dna_permission', array('permission' => _devel_node_access_explain_access('delete', $nid, $account))), + ), + ); + } + if (count($rows)) { + $output[] = array( + '#theme' => 'table', + '#header' => $headers, + '#rows' => $rows, + '#attributes' => array('style' => 'text-align: left'), + ); + $output[] = array( + '#theme' => 'form_element', + '#description' => t('(This table lists the most-recently active users. Hover your mouse over each result for more details.)'), + ); + + return array( + 'subject' => t('Access permissions by user'), + 'content' => $output, + ); + } + } + break; + } +} + +/** + * Callback function for node access by user block ajax. + */ +function devel_node_access_user_ajax($data_type, $cell) { + list($op, $nid, $uid) = explode('-', $cell); + $account = user_load($uid); + $output = array( + '#theme' => 'dna_permission', + '#permission' => _devel_node_access_explain_access($op, $nid, $account), + ); + // JSON output for Ajax callbacks. + if ($data_type == 'json') { + drupal_json_output(drupal_render($output)); + exit; + } + // HTML output for error message click-throughs. + if ($node = node_load($nid)) { + $node_title = l($node->title, 'node/' . $node->nid); + } + else { + $node_title = t('unknown node %nid', array('%nid' => $nid)); + } + drupal_set_title( + t( + 'Devel node access: %op permission for !user on !node', + array( + '%op' => $op, + '!user' => theme('username', array('account' => $account)), + '!node' => $node_title, + ) + ), + PASS_THROUGH + ); + return $output; +} + +/** + * Helper function that mimicks node.module's node_access() function. + * + * Unfortunately, this needs to be updated manually whenever node.module changes! + * + * @return + * An array suitable for theming with theme_dna_permission(). + */ +function _devel_node_access_explain_access($op, $node, $account = NULL) { + global $user; + + if (is_numeric($node) && !($node = node_load($node))) { + return array( + FALSE, + '???', + t('Unable to load the node – this should never happen!'), + ); + } + if (!in_array($op, array('view', 'update', 'delete', 'create'), TRUE)) { + return array( + FALSE, + t('!NO: invalid $op', array('!NO' => t('NO'))), + t("'@op' is an invalid operation!", array('@op' => $op)), + ); + } + + if ($op == 'create' && is_object($node)) { + $node = $node->type; + } + + if (!empty($account)) { + // To try to get the most authentic result we impersonate the given user! + // This may reveal bugs in other modules, leading to contradictory results. + $saved_user = $user; + drupal_save_session(FALSE); + $user = $account; + $result = _devel_node_access_explain_access($op, $node, NULL); + $user = $saved_user; + drupal_save_session(TRUE); + $second_opinion = node_access($op, $node, $account); + if ($second_opinion != $result[0]) { + $result[1] .= '*'; + } + return $result; + } + + $variables = array( + '!NO' => t('NO'), + '!YES' => t('YES'), + '!bypass_node_access' => t('bypass node access'), + '!access_content' => t('access content'), + ); + + if (user_access('bypass node access')) { + return array( + TRUE, + t('!YES: bypass node access', $variables), + t("!YES: This user has the '!bypass_node_access' permission and may do everything with nodes.", $variables), + ); + } + + if (!user_access('access content')) { + return array( + FALSE, + t('!NO: access content', $variables), + t("!NO: This user does not have the '!access_content' permission and is denied doing anything with content.", $variables), + ); + } + + foreach (module_implements('node_access') as $module) { + $function = $module . '_node_access'; + if (function_exists($function)) { + $result = $function($node, $op, $user); + if ($module == 'node') { + $module = 'node (permissions)'; + } + if (isset($result)) { + if ($result === NODE_ACCESS_DENY) { + $denied_by[] = $module; + } + elseif ($result === NODE_ACCESS_ALLOW) { + $allowed_by[] = $module; + } + $access[] = $result; + } + } + } + $variables += array( + '@deniers' => (empty($denied_by) ? NULL : implode(', ', $denied_by)), + '@allowers' => (empty($allowed_by) ? NULL : implode(', ', $allowed_by)), + ); + if (!empty($denied_by)) { + $variables += array( + '%module' => $denied_by[0] . (count($denied_by) > 1 ? '+' : ''), + ); + return array( + FALSE, + t('!NO: by %module', $variables), + empty($allowed_by) + ? t("!NO: hook_node_access() of the following module(s) denies this: @deniers.", $variables) + : t("!NO: hook_node_access() of the following module(s) denies this: @deniers – even though the following module(s) would allow it: @allowers.", $variables), + ); + } + if (!empty($allowed_by)) { + $variables += array( + '%module' => $allowed_by[0] . (count($allowed_by) > 1 ? '+' : ''), + '!view_own_unpublished_content' => t('view own unpublished content'), + ); + return array( + TRUE, + t('!YES: by %module', $variables), + t("!YES: hook_node_access() of the following module(s) allows this: @allowers.", $variables), + ); + } + + if ($op == 'view' && !$node->status && user_access('view own unpublished content') && $user->uid == $node->uid && $user->uid != 0) { + return array( + TRUE, + t('!YES: view own unpublished content', $variables), + t("!YES: The node is unpublished, but the user has the '!view_own_unpublished_content' permission.", $variables), + ); + } + + if ($op != 'create' && $node->nid) { + if (node_access($op, $node)) { // delegate this part + $variables['@node_access_table'] = '{node_access}'; + return array( + TRUE, + t('!YES: @node_access_table', $variables), + t('!YES: Node access allows this based on one or more records in the @node_access_table table (see the other DNA block!).', $variables), + ); + } + } + + return array( + FALSE, + t('!NO: no reason', $variables), + t("!NO: None of the checks resulted in allowing this, so it's denied.", $variables) + . ($op == 'create' ? ' ' . t('This is most likely due to a withheld permission.') : ''), + ); +} + +/** + * Helper function to create a list of the grants returned by hook_node_grants(). + */ +function _devel_node_access_get_grant_list($nid, $ng_alter_data) { + //dpm($ng_alter_data, "_devel_node_access_get_grant_list($nid,"); + $ng_alter_data = array_merge(array('all' => array(0 => array('cur' => TRUE, 'ori' => array('all')))), $ng_alter_data); + $items = array(); + if (count($ng_alter_data)) { + foreach ($ng_alter_data as $realm => $gids) { + ksort($gids); + $gs = array(); + foreach ($gids as $gid => $history) { + if ($history['cur']) { + if (isset($history['ori'])) { + $g = $gid; // original grant, still active + } + else { + $g = '' . $gid . ''; // new grant, still active + } + } + else { + $g = '' . $gid . ''; // deleted grant + } + + $ghs = array(); + if (isset($history['ori']) && strpos($realm, $history['ori'][0]) !== 0) { + $ghs[] = 'by ' . $history['ori'][0]; + } + if (isset($history['chg'])) { + foreach ($history['chg'] as $h) { + $ghs[] = $h; + } + } + if (!empty($ghs)) { + $g .= ' (' . implode(', ', $ghs) . ')'; + } + $gs[] = $g; + } + $items[] = $realm . ': ' . implode(', ', $gs); + } + if (!empty($items)) { + return theme('item_list', array('items' => $items, 'type' => 'ul')); + } + } +} + +/** + * Implements hook_node_access_explain(). + */ +function devel_node_access_node_access_explain($row) { + if ($row->gid == 0 && $row->realm == 'all') { + foreach (array('view', 'update', 'delete') as $op) { + $gop = 'grant_' . $op; + if (!empty($row->$gop)) { + $ops[] = $op; + } + } + if (empty($ops)) { + return '(No access granted to ' . ($row->nid == 0 ? 'any nodes.)' : 'this node.)'); + } + else { + return 'All users may ' . implode('/', $ops) . ($row->nid == 0 ? ' all nodes.' : ' this node.'); + } + } +} + +/** + * Helper function to return a sanitized node title. + */ +function _devel_node_access_get_node_title($node, $clip_and_decorate = FALSE) { + if (isset($node)) { + if (isset($node->title)) { + $node_title = check_plain(!is_array($node->title) ? $node->title : $node->title[LANGUAGE_NONE][0]['value']); + if ($clip_and_decorate) { + if (drupal_strlen($node_title) > 20) { + $node_title = "" . drupal_substr($node_title, 0, 15) . '...'; + } + $node_title = '' . $node_title . ''; + } + return $node_title; + } + elseif (isset($node->nid)) { + return $node->nid; + } + } + return '—'; +} + +/** + * Helper function to apply common formatting to a debug-mode table row. + */ +function _devel_node_access_format_row($row, $may_unpack = TRUE) { + if ($may_unpack && isset($row['data'])) { + $row['data'] = _devel_node_access_format_row($row['data'], FALSE); + $row['class'][] = 'even'; + return $row; + } + if (count($row) == 1) { + if (is_scalar($row['data'])) { + $row['data'] = array('data' => $row['data']); + } + $row['data']['colspan'] = 9; + } + else { + $row = array_values($row); + foreach (array(0, 1, 4) as $j) { // node, prio, gid + if (is_scalar($row[$j])) { + $row[$j] = array('data' => $row[$j]); + } + $row[$j]['style'][] = 'text-align: right;'; + } + } + return $row; +} + +/** + * Implements hook_theme(). + */ +function devel_node_access_theme() { + return array( + 'dna_permission' => array( + 'variables' => array( + 'permission' => NULL, + ), + ), + ); +} + +/** + * Indicate whether user has a permission or not. + */ +function theme_dna_permission($variables) { + $permission = &$variables['permission']; + return '' . $permission[1] . ''; +} diff --git a/sites/all/modules/contrib/devel/jquery-1.4.4-uncompressed.js b/sites/all/modules/contrib/devel/jquery-1.4.4-uncompressed.js new file mode 100644 index 0000000..2ddcf99 --- /dev/null +++ b/sites/all/modules/contrib/devel/jquery-1.4.4-uncompressed.js @@ -0,0 +1,7179 @@ +/*! + * jQuery JavaScript Library v1.4.4 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Thu Nov 11 19:04:53 2010 -0500 + */ +(function( window, undefined ) { + +// Use the correct document accordingly with window argument (sandbox) +var document = window.document; +var jQuery = (function() { + +// Define a local copy of jQuery +var jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context ); + }, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // A central reference to the root jQuery(document) + rootjQuery, + + // A simple way to check for HTML strings or ID strings + // (both of which we optimize for) + quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/, + + // Is it a simple selector + isSimple = /^.[^:#\[\.,]*$/, + + // Check if a string has a non-whitespace character in it + rnotwhite = /\S/, + rwhite = /\s/, + + // Used for trimming whitespace + trimLeft = /^\s+/, + trimRight = /\s+$/, + + // Check for non-word characters + rnonword = /\W/, + + // Check for digits + rdigit = /\d/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, + rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + + // Useragent RegExp + rwebkit = /(webkit)[ \/]([\w.]+)/, + ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, + rmsie = /(msie) ([\w.]+)/, + rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, + + // Keep a UserAgent string for use with jQuery.browser + userAgent = navigator.userAgent, + + // For matching the engine and version of the browser + browserMatch, + + // Has the ready events already been bound? + readyBound = false, + + // The functions to execute on DOM ready + readyList = [], + + // The ready event handler + DOMContentLoaded, + + // Save a reference to some core methods + toString = Object.prototype.toString, + hasOwn = Object.prototype.hasOwnProperty, + push = Array.prototype.push, + slice = Array.prototype.slice, + trim = String.prototype.trim, + indexOf = Array.prototype.indexOf, + + // [[Class]] -> type pairs + class2type = {}; + +jQuery.fn = jQuery.prototype = { + init: function( selector, context ) { + var match, elem, ret, doc; + + // Handle $(""), $(null), or $(undefined) + if ( !selector ) { + return this; + } + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + } + + // The body element only exists once, optimize finding it + if ( selector === "body" && !context && document.body ) { + this.context = document; + this[0] = document.body; + this.selector = "body"; + this.length = 1; + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + match = quickExpr.exec( selector ); + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + doc = (context ? context.ownerDocument || context : document); + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + ret = rsingleTag.exec( selector ); + + if ( ret ) { + if ( jQuery.isPlainObject( context ) ) { + selector = [ document.createElement( ret[1] ) ]; + jQuery.fn.attr.call( selector, context, true ); + + } else { + selector = [ doc.createElement( ret[1] ) ]; + } + + } else { + ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); + selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes; + } + + return jQuery.merge( this, selector ); + + // HANDLE: $("#id") + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $("TAG") + } else if ( !context && !rnonword.test( selector ) ) { + this.selector = selector; + this.context = document; + selector = document.getElementsByTagName( selector ); + return jQuery.merge( this, selector ); + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return (context || rootjQuery).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return jQuery( context ).find( selector ); + } + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if (selector.selector !== undefined) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.4.4", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return slice.call( this, 0 ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this.slice(num)[ 0 ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = jQuery(); + + if ( jQuery.isArray( elems ) ) { + push.apply( ret, elems ); + + } else { + jQuery.merge( ret, elems ); + } + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) { + ret.selector = this.selector + (this.selector ? " " : "") + selector; + } else if ( name ) { + ret.selector = this.selector + "." + name + "(" + selector + ")"; + } + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Attach the listeners + jQuery.bindReady(); + + // If the DOM is already ready + if ( jQuery.isReady ) { + // Execute the function immediately + fn.call( document, jQuery ); + + // Otherwise, remember the function for later + } else if ( readyList ) { + // Add the function to the wait list + readyList.push( fn ); + } + + return this; + }, + + eq: function( i ) { + return i === -1 ? + this.slice( i ) : + this.slice( i, +i + 1 ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ), + "slice", slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || jQuery(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + noConflict: function( deep ) { + window.$ = _$; + + if ( deep ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Handle when the DOM is ready + ready: function( wait ) { + // A third-party is pushing the ready event forwards + if ( wait === true ) { + jQuery.readyWait--; + } + + // Make sure that the DOM is not already loaded + if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready, 1 ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + if ( readyList ) { + // Execute all of them + var fn, + i = 0, + ready = readyList; + + // Reset the list of functions + readyList = null; + + while ( (fn = ready[ i++ ]) ) { + fn.call( document, jQuery ); + } + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger( "ready" ).unbind( "ready" ); + } + } + } + }, + + bindReady: function() { + if ( readyBound ) { + return; + } + + readyBound = true; + + // Catch cases where $(document).ready() is called after the + // browser event has already occurred. + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + return setTimeout( jQuery.ready, 1 ); + } + + // Mozilla, Opera and webkit nightlies currently support this event + if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", jQuery.ready, false ); + + // If IE event model is used + } else if ( document.attachEvent ) { + // ensure firing before onload, + // maybe late but safe also for iframes + document.attachEvent("onreadystatechange", DOMContentLoaded); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", jQuery.ready ); + + // If IE and not a frame + // continually check to see if the document is ready + var toplevel = false; + + try { + toplevel = window.frameElement == null; + } catch(e) {} + + if ( document.documentElement.doScroll && toplevel ) { + doScrollCheck(); + } + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + // A crude way of determining if an object is a window + isWindow: function( obj ) { + return obj && typeof obj === "object" && "setInterval" in obj; + }, + + isNaN: function( obj ) { + return obj == null || !rdigit.test( obj ) || isNaN( obj ); + }, + + type: function( obj ) { + return obj == null ? + String( obj ) : + class2type[ toString.call(obj) ] || "object"; + }, + + isPlainObject: function( obj ) { + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + // Not own constructor property must be Object + if ( obj.constructor && + !hasOwn.call(obj, "constructor") && + !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + for ( var name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw msg; + }, + + parseJSON: function( data ) { + if ( typeof data !== "string" || !data ) { + return null; + } + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test(data.replace(rvalidescape, "@") + .replace(rvalidtokens, "]") + .replace(rvalidbraces, "")) ) { + + // Try to use the native JSON parser first + return window.JSON && window.JSON.parse ? + window.JSON.parse( data ) : + (new Function("return " + data))(); + + } else { + jQuery.error( "Invalid JSON: " + data ); + } + }, + + noop: function() {}, + + // Evalulates a script in a global context + globalEval: function( data ) { + if ( data && rnotwhite.test(data) ) { + // Inspired by code by Andrea Giammarchi + // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html + var head = document.getElementsByTagName("head")[0] || document.documentElement, + script = document.createElement("script"); + + script.type = "text/javascript"; + + if ( jQuery.support.scriptEval ) { + script.appendChild( document.createTextNode( data ) ); + } else { + script.text = data; + } + + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709). + head.insertBefore( script, head.firstChild ); + head.removeChild( script ); + } + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, + length = object.length, + isObj = length === undefined || jQuery.isFunction(object); + + if ( args ) { + if ( isObj ) { + for ( name in object ) { + if ( callback.apply( object[ name ], args ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.apply( object[ i++ ], args ) === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isObj ) { + for ( name in object ) { + if ( callback.call( object[ name ], name, object[ name ] ) === false ) { + break; + } + } + } else { + for ( var value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {} + } + } + + return object; + }, + + // Use native String.trim function wherever possible + trim: trim ? + function( text ) { + return text == null ? + "" : + trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); + }, + + // results is for internal usage only + makeArray: function( array, results ) { + var ret = results || []; + + if ( array != null ) { + // The window, strings (and functions) also have 'length' + // The extra typeof function check is to prevent crashes + // in Safari 2 (See: #3039) + // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 + var type = jQuery.type(array); + + if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { + push.call( ret, array ); + } else { + jQuery.merge( ret, array ); + } + } + + return ret; + }, + + inArray: function( elem, array ) { + if ( array.indexOf ) { + return array.indexOf( elem ); + } + + for ( var i = 0, length = array.length; i < length; i++ ) { + if ( array[ i ] === elem ) { + return i; + } + } + + return -1; + }, + + merge: function( first, second ) { + var i = first.length, + j = 0; + + if ( typeof second.length === "number" ) { + for ( var l = second.length; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var ret = [], retVal; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( var i = 0, length = elems.length; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var ret = [], value; + + // Go through the array, translating each of the items to their + // new value (or values). + for ( var i = 0, length = elems.length; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + return ret.concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + proxy: function( fn, proxy, thisObject ) { + if ( arguments.length === 2 ) { + if ( typeof proxy === "string" ) { + thisObject = fn; + fn = thisObject[ proxy ]; + proxy = undefined; + + } else if ( proxy && !jQuery.isFunction( proxy ) ) { + thisObject = proxy; + proxy = undefined; + } + } + + if ( !proxy && fn ) { + proxy = function() { + return fn.apply( thisObject || this, arguments ); + }; + } + + // Set the guid of unique handler to the same of original handler, so it can be removed + if ( fn ) { + proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; + } + + // So proxy can be declared as an argument + return proxy; + }, + + // Mutifunctional method to get and set values to a collection + // The value/s can be optionally by executed if its a function + access: function( elems, key, value, exec, fn, pass ) { + var length = elems.length; + + // Setting many attributes + if ( typeof key === "object" ) { + for ( var k in key ) { + jQuery.access( elems, k, key[k], exec, fn, value ); + } + return elems; + } + + // Setting one attribute + if ( value !== undefined ) { + // Optionally, function values get executed if exec is true + exec = !pass && exec && jQuery.isFunction(value); + + for ( var i = 0; i < length; i++ ) { + fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); + } + + return elems; + } + + // Getting an attribute + return length ? fn( elems[0], key ) : undefined; + }, + + now: function() { + return (new Date()).getTime(); + }, + + // Use of jQuery.browser is frowned upon. + // More details: http://docs.jquery.com/Utilities/jQuery.browser + uaMatch: function( ua ) { + ua = ua.toLowerCase(); + + var match = rwebkit.exec( ua ) || + ropera.exec( ua ) || + rmsie.exec( ua ) || + ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || + []; + + return { browser: match[1] || "", version: match[2] || "0" }; + }, + + browser: {} +}); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +browserMatch = jQuery.uaMatch( userAgent ); +if ( browserMatch.browser ) { + jQuery.browser[ browserMatch.browser ] = true; + jQuery.browser.version = browserMatch.version; +} + +// Deprecated, use jQuery.browser.webkit instead +if ( jQuery.browser.webkit ) { + jQuery.browser.safari = true; +} + +if ( indexOf ) { + jQuery.inArray = function( elem, array ) { + return indexOf.call( array, elem ); + }; +} + +// Verify that \s matches non-breaking spaces +// (IE fails on this test) +if ( !rwhite.test( "\xA0" ) ) { + trimLeft = /^[\s\xA0]+/; + trimRight = /[\s\xA0]+$/; +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); + +// Cleanup functions for the document ready method +if ( document.addEventListener ) { + DOMContentLoaded = function() { + document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + jQuery.ready(); + }; + +} else if ( document.attachEvent ) { + DOMContentLoaded = function() { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( document.readyState === "complete" ) { + document.detachEvent( "onreadystatechange", DOMContentLoaded ); + jQuery.ready(); + } + }; +} + +// The DOM ready check for Internet Explorer +function doScrollCheck() { + if ( jQuery.isReady ) { + return; + } + + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + document.documentElement.doScroll("left"); + } catch(e) { + setTimeout( doScrollCheck, 1 ); + return; + } + + // and execute any waiting functions + jQuery.ready(); +} + +// Expose jQuery to the global object +return (window.jQuery = window.$ = jQuery); + +})(); + + +(function() { + + jQuery.support = {}; + + var root = document.documentElement, + script = document.createElement("script"), + div = document.createElement("div"), + id = "script" + jQuery.now(); + + div.style.display = "none"; + div.innerHTML = "
a"; + + var all = div.getElementsByTagName("*"), + a = div.getElementsByTagName("a")[0], + select = document.createElement("select"), + opt = select.appendChild( document.createElement("option") ); + + // Can't get basic test support + if ( !all || !all.length || !a ) { + return; + } + + jQuery.support = { + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: div.firstChild.nodeType === 3, + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName("tbody").length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName("link").length, + + // Get the style information from getAttribute + // (IE uses .cssText insted) + style: /red/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: a.getAttribute("href") === "/a", + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.55$/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Make sure that if no value is specified for a checkbox + // that it defaults to "on". + // (WebKit defaults to "" instead) + checkOn: div.getElementsByTagName("input")[0].value === "on", + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: opt.selected, + + // Will be defined later + deleteExpando: true, + optDisabled: false, + checkClone: false, + scriptEval: false, + noCloneEvent: true, + boxModel: null, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableHiddenOffsets: true + }; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as diabled) + select.disabled = true; + jQuery.support.optDisabled = !opt.disabled; + + script.type = "text/javascript"; + try { + script.appendChild( document.createTextNode( "window." + id + "=1;" ) ); + } catch(e) {} + + root.insertBefore( script, root.firstChild ); + + // Make sure that the execution of code works by injecting a script + // tag with appendChild/createTextNode + // (IE doesn't support this, fails, and uses .text instead) + if ( window[ id ] ) { + jQuery.support.scriptEval = true; + delete window[ id ]; + } + + // Test to see if it's possible to delete an expando from an element + // Fails in Internet Explorer + try { + delete script.test; + + } catch(e) { + jQuery.support.deleteExpando = false; + } + + root.removeChild( script ); + + if ( div.attachEvent && div.fireEvent ) { + div.attachEvent("onclick", function click() { + // Cloning a node shouldn't copy over any + // bound event handlers (IE does this) + jQuery.support.noCloneEvent = false; + div.detachEvent("onclick", click); + }); + div.cloneNode(true).fireEvent("onclick"); + } + + div = document.createElement("div"); + div.innerHTML = ""; + + var fragment = document.createDocumentFragment(); + fragment.appendChild( div.firstChild ); + + // WebKit doesn't clone checked state correctly in fragments + jQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked; + + // Figure out if the W3C box model works as expected + // document.body must exist before we can do this + jQuery(function() { + var div = document.createElement("div"); + div.style.width = div.style.paddingLeft = "1px"; + + document.body.appendChild( div ); + jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2; + + if ( "zoom" in div.style ) { + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + // (IE < 8 does this) + div.style.display = "inline"; + div.style.zoom = 1; + jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2; + + // Check if elements with layout shrink-wrap their children + // (IE 6 does this) + div.style.display = ""; + div.innerHTML = "
"; + jQuery.support.shrinkWrapBlocks = div.offsetWidth !== 2; + } + + div.innerHTML = "
t
"; + var tds = div.getElementsByTagName("td"); + + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + // (only IE 8 fails this test) + jQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0; + + tds[0].style.display = ""; + tds[1].style.display = "none"; + + // Check if empty table cells still have offsetWidth/Height + // (IE < 8 fail this test) + jQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0; + div.innerHTML = ""; + + document.body.removeChild( div ).style.display = "none"; + div = tds = null; + }); + + // Technique from Juriy Zaytsev + // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/ + var eventSupported = function( eventName ) { + var el = document.createElement("div"); + eventName = "on" + eventName; + + var isSupported = (eventName in el); + if ( !isSupported ) { + el.setAttribute(eventName, "return;"); + isSupported = typeof el[eventName] === "function"; + } + el = null; + + return isSupported; + }; + + jQuery.support.submitBubbles = eventSupported("submit"); + jQuery.support.changeBubbles = eventSupported("change"); + + // release memory in IE + root = script = div = all = a = null; +})(); + + + +var windowData = {}, + rbrace = /^(?:\{.*\}|\[.*\])$/; + +jQuery.extend({ + cache: {}, + + // Please use with caution + uuid: 0, + + // Unique for each copy of jQuery on the page + expando: "jQuery" + jQuery.now(), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + data: function( elem, name, data ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + elem = elem == window ? + windowData : + elem; + + var isNode = elem.nodeType, + id = isNode ? elem[ jQuery.expando ] : null, + cache = jQuery.cache, thisCache; + + if ( isNode && !id && typeof name === "string" && data === undefined ) { + return; + } + + // Get the data from the object directly + if ( !isNode ) { + cache = elem; + + // Compute a unique ID for the element + } else if ( !id ) { + elem[ jQuery.expando ] = id = ++jQuery.uuid; + } + + // Avoid generating a new cache unless none exists and we + // want to manipulate it. + if ( typeof name === "object" ) { + if ( isNode ) { + cache[ id ] = jQuery.extend(cache[ id ], name); + + } else { + jQuery.extend( cache, name ); + } + + } else if ( isNode && !cache[ id ] ) { + cache[ id ] = {}; + } + + thisCache = isNode ? cache[ id ] : cache; + + // Prevent overriding the named cache with undefined values + if ( data !== undefined ) { + thisCache[ name ] = data; + } + + return typeof name === "string" ? thisCache[ name ] : thisCache; + }, + + removeData: function( elem, name ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + elem = elem == window ? + windowData : + elem; + + var isNode = elem.nodeType, + id = isNode ? elem[ jQuery.expando ] : elem, + cache = jQuery.cache, + thisCache = isNode ? cache[ id ] : id; + + // If we want to remove a specific section of the element's data + if ( name ) { + if ( thisCache ) { + // Remove the section of cache data + delete thisCache[ name ]; + + // If we've removed all the data, remove the element's cache + if ( isNode && jQuery.isEmptyObject(thisCache) ) { + jQuery.removeData( elem ); + } + } + + // Otherwise, we want to remove all of the element's data + } else { + if ( isNode && jQuery.support.deleteExpando ) { + delete elem[ jQuery.expando ]; + + } else if ( elem.removeAttribute ) { + elem.removeAttribute( jQuery.expando ); + + // Completely remove the data cache + } else if ( isNode ) { + delete cache[ id ]; + + // Remove all fields from the object + } else { + for ( var n in elem ) { + delete elem[ n ]; + } + } + } + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + if ( elem.nodeName ) { + var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; + + if ( match ) { + return !(match === true || elem.getAttribute("classid") !== match); + } + } + + return true; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var data = null; + + if ( typeof key === "undefined" ) { + if ( this.length ) { + var attr = this[0].attributes, name; + data = jQuery.data( this[0] ); + + for ( var i = 0, l = attr.length; i < l; i++ ) { + name = attr[i].name; + + if ( name.indexOf( "data-" ) === 0 ) { + name = name.substr( 5 ); + dataAttr( this[0], name, data[ name ] ); + } + } + } + + return data; + + } else if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + var parts = key.split("."); + parts[1] = parts[1] ? "." + parts[1] : ""; + + if ( value === undefined ) { + data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); + + // Try to fetch any internally stored data first + if ( data === undefined && this.length ) { + data = jQuery.data( this[0], key ); + data = dataAttr( this[0], key, data ); + } + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + + } else { + return this.each(function() { + var $this = jQuery( this ), + args = [ parts[0], value ]; + + $this.triggerHandler( "setData" + parts[1] + "!", args ); + jQuery.data( this, key, value ); + $this.triggerHandler( "changeData" + parts[1] + "!", args ); + }); + } + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + data = elem.getAttribute( "data-" + key ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + !jQuery.isNaN( data ) ? parseFloat( data ) : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + + + + +jQuery.extend({ + queue: function( elem, type, data ) { + if ( !elem ) { + return; + } + + type = (type || "fx") + "queue"; + var q = jQuery.data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( !data ) { + return q || []; + } + + if ( !q || jQuery.isArray(data) ) { + q = jQuery.data( elem, type, jQuery.makeArray(data) ); + + } else { + q.push( data ); + } + + return q; + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + fn = queue.shift(); + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + } + + if ( fn ) { + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift("inprogress"); + } + + fn.call(elem, function() { + jQuery.dequeue(elem, type); + }); + } + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + } + + if ( data === undefined ) { + return jQuery.queue( this[0], type ); + } + return this.each(function( i ) { + var queue = jQuery.queue( this, type, data ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; + type = type || "fx"; + + return this.queue( type, function() { + var elem = this; + setTimeout(function() { + jQuery.dequeue( elem, type ); + }, time ); + }); + }, + + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + } +}); + + + + +var rclass = /[\n\t]/g, + rspaces = /\s+/, + rreturn = /\r/g, + rspecialurl = /^(?:href|src|style)$/, + rtype = /^(?:button|input)$/i, + rfocusable = /^(?:button|input|object|select|textarea)$/i, + rclickable = /^a(?:rea)?$/i, + rradiocheck = /^(?:radio|checkbox)$/i; + +jQuery.props = { + "for": "htmlFor", + "class": "className", + readonly: "readOnly", + maxlength: "maxLength", + cellspacing: "cellSpacing", + rowspan: "rowSpan", + colspan: "colSpan", + tabindex: "tabIndex", + usemap: "useMap", + frameborder: "frameBorder" +}; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, name, value, true, jQuery.attr ); + }, + + removeAttr: function( name, fn ) { + return this.each(function(){ + jQuery.attr( this, name, "" ); + if ( this.nodeType === 1 ) { + this.removeAttribute( name ); + } + }); + }, + + addClass: function( value ) { + if ( jQuery.isFunction(value) ) { + return this.each(function(i) { + var self = jQuery(this); + self.addClass( value.call(this, i, self.attr("class")) ); + }); + } + + if ( value && typeof value === "string" ) { + var classNames = (value || "").split( rspaces ); + + for ( var i = 0, l = this.length; i < l; i++ ) { + var elem = this[i]; + + if ( elem.nodeType === 1 ) { + if ( !elem.className ) { + elem.className = value; + + } else { + var className = " " + elem.className + " ", + setClass = elem.className; + + for ( var c = 0, cl = classNames.length; c < cl; c++ ) { + if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) { + setClass += " " + classNames[c]; + } + } + elem.className = jQuery.trim( setClass ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + if ( jQuery.isFunction(value) ) { + return this.each(function(i) { + var self = jQuery(this); + self.removeClass( value.call(this, i, self.attr("class")) ); + }); + } + + if ( (value && typeof value === "string") || value === undefined ) { + var classNames = (value || "").split( rspaces ); + + for ( var i = 0, l = this.length; i < l; i++ ) { + var elem = this[i]; + + if ( elem.nodeType === 1 && elem.className ) { + if ( value ) { + var className = (" " + elem.className + " ").replace(rclass, " "); + for ( var c = 0, cl = classNames.length; c < cl; c++ ) { + className = className.replace(" " + classNames[c] + " ", " "); + } + elem.className = jQuery.trim( className ); + + } else { + elem.className = ""; + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function(i) { + var self = jQuery(this); + self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.split( rspaces ); + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space seperated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + } else if ( type === "undefined" || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery.data( this, "__className__", this.className ); + } + + // toggle whole className + this.className = this.className || value === false ? "" : jQuery.data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " "; + for ( var i = 0, l = this.length; i < l; i++ ) { + if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + if ( !arguments.length ) { + var elem = this[0]; + + if ( elem ) { + if ( jQuery.nodeName( elem, "option" ) ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + + // We need to handle select boxes special + if ( jQuery.nodeName( elem, "select" ) ) { + var index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type === "select-one"; + + // Nothing was selected + if ( index < 0 ) { + return null; + } + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + // Don't return options that are disabled or in a disabled optgroup + if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && + (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { + + // Get the specific value for the option + value = jQuery(option).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + } + + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) { + return elem.getAttribute("value") === null ? "on" : elem.value; + } + + + // Everything else, we just grab the value + return (elem.value || "").replace(rreturn, ""); + + } + + return undefined; + } + + var isFunction = jQuery.isFunction(value); + + return this.each(function(i) { + var self = jQuery(this), val = value; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call(this, i, self.val()); + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray(val) ) { + val = jQuery.map(val, function (value) { + return value == null ? "" : value + ""; + }); + } + + if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) { + this.checked = jQuery.inArray( self.val(), val ) >= 0; + + } else if ( jQuery.nodeName( this, "select" ) ) { + var values = jQuery.makeArray(val); + + jQuery( "option", this ).each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + this.selectedIndex = -1; + } + + } else { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + attrFn: { + val: true, + css: true, + html: true, + text: true, + data: true, + width: true, + height: true, + offset: true + }, + + attr: function( elem, name, value, pass ) { + // don't set attributes on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) { + return undefined; + } + + if ( pass && name in jQuery.attrFn ) { + return jQuery(elem)[name](value); + } + + var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ), + // Whether we are setting (or getting) + set = value !== undefined; + + // Try to normalize/fix the name + name = notxml && jQuery.props[ name ] || name; + + // These attributes require special treatment + var special = rspecialurl.test( name ); + + // Safari mis-reports the default selected property of an option + // Accessing the parent's selectedIndex property fixes it + if ( name === "selected" && !jQuery.support.optSelected ) { + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + + // If applicable, access the attribute via the DOM 0 way + // 'in' checks fail in Blackberry 4.7 #6931 + if ( (name in elem || elem[ name ] !== undefined) && notxml && !special ) { + if ( set ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) { + jQuery.error( "type property can't be changed" ); + } + + if ( value === null ) { + if ( elem.nodeType === 1 ) { + elem.removeAttribute( name ); + } + + } else { + elem[ name ] = value; + } + } + + // browsers index elements by id/name on forms, give priority to attributes. + if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) { + return elem.getAttributeNode( name ).nodeValue; + } + + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + if ( name === "tabIndex" ) { + var attributeNode = elem.getAttributeNode( "tabIndex" ); + + return attributeNode && attributeNode.specified ? + attributeNode.value : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + + return elem[ name ]; + } + + if ( !jQuery.support.style && notxml && name === "style" ) { + if ( set ) { + elem.style.cssText = "" + value; + } + + return elem.style.cssText; + } + + if ( set ) { + // convert the value to a string (all browsers do this but IE) see #1070 + elem.setAttribute( name, "" + value ); + } + + // Ensure that missing attributes return undefined + // Blackberry 4.7 returns "" from getAttribute #6938 + if ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) { + return undefined; + } + + var attr = !jQuery.support.hrefNormalized && notxml && special ? + // Some attributes require a special call on IE + elem.getAttribute( name, 2 ) : + elem.getAttribute( name ); + + // Non-existent attributes return null, we normalize to undefined + return attr === null ? undefined : attr; + } +}); + + + + +var rnamespaces = /\.(.*)$/, + rformElems = /^(?:textarea|input|select)$/i, + rperiod = /\./g, + rspace = / /g, + rescape = /[^\w\s.|`]/g, + fcleanup = function( nm ) { + return nm.replace(rescape, "\\$&"); + }, + focusCounts = { focusin: 0, focusout: 0 }; + +/* + * A number of helper functions used for managing events. + * Many of the ideas behind this code originated from + * Dean Edwards' addEvent library. + */ +jQuery.event = { + + // Bind an event to an element + // Original by Dean Edwards + add: function( elem, types, handler, data ) { + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // For whatever reason, IE has trouble passing the window object + // around, causing it to be cloned in the process + if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) { + elem = window; + } + + if ( handler === false ) { + handler = returnFalse; + } else if ( !handler ) { + // Fixes bug #7229. Fix recommended by jdalton + return; + } + + var handleObjIn, handleObj; + + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + } + + // Make sure that the function being executed has a unique ID + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure + var elemData = jQuery.data( elem ); + + // If no elemData is found then we must be trying to bind to one of the + // banned noData elements + if ( !elemData ) { + return; + } + + // Use a key less likely to result in collisions for plain JS objects. + // Fixes bug #7150. + var eventKey = elem.nodeType ? "events" : "__events__", + events = elemData[ eventKey ], + eventHandle = elemData.handle; + + if ( typeof events === "function" ) { + // On plain objects events is a fn that holds the the data + // which prevents this data from being JSON serialized + // the function does not need to be called, it just contains the data + eventHandle = events.handle; + events = events.events; + + } else if ( !events ) { + if ( !elem.nodeType ) { + // On plain objects, create a fn that acts as the holder + // of the values to avoid JSON serialization of event data + elemData[ eventKey ] = elemData = function(){}; + } + + elemData.events = events = {}; + } + + if ( !eventHandle ) { + elemData.handle = eventHandle = function() { + // Handle the second event of a trigger and when + // an event is called after a page has unloaded + return typeof jQuery !== "undefined" && !jQuery.event.triggered ? + jQuery.event.handle.apply( eventHandle.elem, arguments ) : + undefined; + }; + } + + // Add elem as a property of the handle function + // This is to prevent a memory leak with non-native events in IE. + eventHandle.elem = elem; + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = types.split(" "); + + var type, i = 0, namespaces; + + while ( (type = types[ i++ ]) ) { + handleObj = handleObjIn ? + jQuery.extend({}, handleObjIn) : + { handler: handler, data: data }; + + // Namespaced event handlers + if ( type.indexOf(".") > -1 ) { + namespaces = type.split("."); + type = namespaces.shift(); + handleObj.namespace = namespaces.slice(0).sort().join("."); + + } else { + namespaces = []; + handleObj.namespace = ""; + } + + handleObj.type = type; + if ( !handleObj.guid ) { + handleObj.guid = handler.guid; + } + + // Get the current list of functions bound to this event + var handlers = events[ type ], + special = jQuery.event.special[ type ] || {}; + + // Init the event handler queue + if ( !handlers ) { + handlers = events[ type ] = []; + + // Check for a special event handler + // Only use addEventListener/attachEvent if the special + // events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add the function to the element's handler list + handlers.push( handleObj ); + + // Keep track of which events have been used, for global triggering + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + global: {}, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, pos ) { + // don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + if ( handler === false ) { + handler = returnFalse; + } + + var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType, + eventKey = elem.nodeType ? "events" : "__events__", + elemData = jQuery.data( elem ), + events = elemData && elemData[ eventKey ]; + + if ( !elemData || !events ) { + return; + } + + if ( typeof events === "function" ) { + elemData = events; + events = events.events; + } + + // types is actually an event object here + if ( types && types.type ) { + handler = types.handler; + types = types.type; + } + + // Unbind all events for the element + if ( !types || typeof types === "string" && types.charAt(0) === "." ) { + types = types || ""; + + for ( type in events ) { + jQuery.event.remove( elem, type + types ); + } + + return; + } + + // Handle multiple events separated by a space + // jQuery(...).unbind("mouseover mouseout", fn); + types = types.split(" "); + + while ( (type = types[ i++ ]) ) { + origType = type; + handleObj = null; + all = type.indexOf(".") < 0; + namespaces = []; + + if ( !all ) { + // Namespaced event handlers + namespaces = type.split("."); + type = namespaces.shift(); + + namespace = new RegExp("(^|\\.)" + + jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + eventType = events[ type ]; + + if ( !eventType ) { + continue; + } + + if ( !handler ) { + for ( j = 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( all || namespace.test( handleObj.namespace ) ) { + jQuery.event.remove( elem, origType, handleObj.handler, j ); + eventType.splice( j--, 1 ); + } + } + + continue; + } + + special = jQuery.event.special[ type ] || {}; + + for ( j = pos || 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( handler.guid === handleObj.guid ) { + // remove the given handler for the given type + if ( all || namespace.test( handleObj.namespace ) ) { + if ( pos == null ) { + eventType.splice( j--, 1 ); + } + + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + + if ( pos != null ) { + break; + } + } + } + + // remove generic event handler if no more handlers exist + if ( eventType.length === 0 || pos != null && eventType.length === 1 ) { + if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + ret = null; + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + var handle = elemData.handle; + if ( handle ) { + handle.elem = null; + } + + delete elemData.events; + delete elemData.handle; + + if ( typeof elemData === "function" ) { + jQuery.removeData( elem, eventKey ); + + } else if ( jQuery.isEmptyObject( elemData ) ) { + jQuery.removeData( elem ); + } + } + }, + + // bubbling is internal + trigger: function( event, data, elem /*, bubbling */ ) { + // Event object or event type + var type = event.type || event, + bubbling = arguments[3]; + + if ( !bubbling ) { + event = typeof event === "object" ? + // jQuery.Event object + event[ jQuery.expando ] ? event : + // Object literal + jQuery.extend( jQuery.Event(type), event ) : + // Just the event type (string) + jQuery.Event(type); + + if ( type.indexOf("!") >= 0 ) { + event.type = type = type.slice(0, -1); + event.exclusive = true; + } + + // Handle a global trigger + if ( !elem ) { + // Don't bubble custom events when global (to avoid too much overhead) + event.stopPropagation(); + + // Only trigger if we've ever bound an event for it + if ( jQuery.event.global[ type ] ) { + jQuery.each( jQuery.cache, function() { + if ( this.events && this.events[type] ) { + jQuery.event.trigger( event, data, this.handle.elem ); + } + }); + } + } + + // Handle triggering a single element + + // don't do events on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) { + return undefined; + } + + // Clean up in case it is reused + event.result = undefined; + event.target = elem; + + // Clone the incoming data, if any + data = jQuery.makeArray( data ); + data.unshift( event ); + } + + event.currentTarget = elem; + + // Trigger the event, it is assumed that "handle" is a function + var handle = elem.nodeType ? + jQuery.data( elem, "handle" ) : + (jQuery.data( elem, "__events__" ) || {}).handle; + + if ( handle ) { + handle.apply( elem, data ); + } + + var parent = elem.parentNode || elem.ownerDocument; + + // Trigger an inline bound script + try { + if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) { + if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) { + event.result = false; + event.preventDefault(); + } + } + + // prevent IE from throwing an error for some elements with some event types, see #3533 + } catch (inlineError) {} + + if ( !event.isPropagationStopped() && parent ) { + jQuery.event.trigger( event, data, parent, true ); + + } else if ( !event.isDefaultPrevented() ) { + var old, + target = event.target, + targetType = type.replace( rnamespaces, "" ), + isClick = jQuery.nodeName( target, "a" ) && targetType === "click", + special = jQuery.event.special[ targetType ] || {}; + + if ( (!special._default || special._default.call( elem, event ) === false) && + !isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) { + + try { + if ( target[ targetType ] ) { + // Make sure that we don't accidentally re-trigger the onFOO events + old = target[ "on" + targetType ]; + + if ( old ) { + target[ "on" + targetType ] = null; + } + + jQuery.event.triggered = true; + target[ targetType ](); + } + + // prevent IE from throwing an error for some elements with some event types, see #3533 + } catch (triggerError) {} + + if ( old ) { + target[ "on" + targetType ] = old; + } + + jQuery.event.triggered = false; + } + } + }, + + handle: function( event ) { + var all, handlers, namespaces, namespace_re, events, + namespace_sort = [], + args = jQuery.makeArray( arguments ); + + event = args[0] = jQuery.event.fix( event || window.event ); + event.currentTarget = this; + + // Namespaced event handlers + all = event.type.indexOf(".") < 0 && !event.exclusive; + + if ( !all ) { + namespaces = event.type.split("."); + event.type = namespaces.shift(); + namespace_sort = namespaces.slice(0).sort(); + namespace_re = new RegExp("(^|\\.)" + namespace_sort.join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + event.namespace = event.namespace || namespace_sort.join("."); + + events = jQuery.data(this, this.nodeType ? "events" : "__events__"); + + if ( typeof events === "function" ) { + events = events.events; + } + + handlers = (events || {})[ event.type ]; + + if ( events && handlers ) { + // Clone the handlers to prevent manipulation + handlers = handlers.slice(0); + + for ( var j = 0, l = handlers.length; j < l; j++ ) { + var handleObj = handlers[ j ]; + + // Filter the functions by class + if ( all || namespace_re.test( handleObj.namespace ) ) { + // Pass in a reference to the handler function itself + // So that we can later remove it + event.handler = handleObj.handler; + event.data = handleObj.data; + event.handleObj = handleObj; + + var ret = handleObj.handler.apply( this, args ); + + if ( ret !== undefined ) { + event.result = ret; + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + + if ( event.isImmediatePropagationStopped() ) { + break; + } + } + } + } + + return event.result; + }, + + props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // store a copy of the original event object + // and "clone" to set read-only properties + var originalEvent = event; + event = jQuery.Event( originalEvent ); + + for ( var i = this.props.length, prop; i; ) { + prop = this.props[ --i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Fix target property, if necessary + if ( !event.target ) { + // Fixes #1925 where srcElement might not be defined either + event.target = event.srcElement || document; + } + + // check if target is a textnode (safari) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && event.fromElement ) { + event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement; + } + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && event.clientX != null ) { + var doc = document.documentElement, + body = document.body; + + event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); + event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); + } + + // Add which for key events + if ( event.which == null && (event.charCode != null || event.keyCode != null) ) { + event.which = event.charCode != null ? event.charCode : event.keyCode; + } + + // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) + if ( !event.metaKey && event.ctrlKey ) { + event.metaKey = event.ctrlKey; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && event.button !== undefined ) { + event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); + } + + return event; + }, + + // Deprecated, use jQuery.guid instead + guid: 1E8, + + // Deprecated, use jQuery.proxy instead + proxy: jQuery.proxy, + + special: { + ready: { + // Make sure the ready event is setup + setup: jQuery.bindReady, + teardown: jQuery.noop + }, + + live: { + add: function( handleObj ) { + jQuery.event.add( this, + liveConvert( handleObj.origType, handleObj.selector ), + jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) ); + }, + + remove: function( handleObj ) { + jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj ); + } + }, + + beforeunload: { + setup: function( data, namespaces, eventHandle ) { + // We only want to do this special case on windows + if ( jQuery.isWindow( this ) ) { + this.onbeforeunload = eventHandle; + } + }, + + teardown: function( namespaces, eventHandle ) { + if ( this.onbeforeunload === eventHandle ) { + this.onbeforeunload = null; + } + } + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + if ( elem.detachEvent ) { + elem.detachEvent( "on" + type, handle ); + } + }; + +jQuery.Event = function( src ) { + // Allow instantiation without the 'new' keyword + if ( !this.preventDefault ) { + return new jQuery.Event( src ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + // Event type + } else { + this.type = src; + } + + // timeStamp is buggy for some events on Firefox(#3843) + // So we won't rely on the native value + this.timeStamp = jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +function returnFalse() { + return false; +} +function returnTrue() { + return true; +} + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + preventDefault: function() { + this.isDefaultPrevented = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + + // if preventDefault exists run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // otherwise set the returnValue property of the original event to false (IE) + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + this.isPropagationStopped = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + // if stopPropagation exists run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + // otherwise set the cancelBubble property of the original event to true (IE) + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +// Checks if an event happened on an element within another element +// Used in jQuery.event.special.mouseenter and mouseleave handlers +var withinElement = function( event ) { + // Check if mouse(over|out) are still within the same parent element + var parent = event.relatedTarget; + + // Firefox sometimes assigns relatedTarget a XUL element + // which we cannot access the parentNode property of + try { + // Traverse up the tree + while ( parent && parent !== this ) { + parent = parent.parentNode; + } + + if ( parent !== this ) { + // set the correct event type + event.type = event.data; + + // handle event if we actually just moused on to a non sub-element + jQuery.event.handle.apply( this, arguments ); + } + + // assuming we've left the element since we most likely mousedover a xul element + } catch(e) { } +}, + +// In case of event delegation, we only need to rename the event.type, +// liveHandler will take care of the rest. +delegate = function( event ) { + event.type = event.data; + jQuery.event.handle.apply( this, arguments ); +}; + +// Create mouseenter and mouseleave events +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + setup: function( data ) { + jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig ); + }, + teardown: function( data ) { + jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement ); + } + }; +}); + +// submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function( data, namespaces ) { + if ( this.nodeName.toLowerCase() !== "form" ) { + jQuery.event.add(this, "click.specialSubmit", function( e ) { + var elem = e.target, + type = elem.type; + + if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) { + e.liveFired = undefined; + return trigger( "submit", this, arguments ); + } + }); + + jQuery.event.add(this, "keypress.specialSubmit", function( e ) { + var elem = e.target, + type = elem.type; + + if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) { + e.liveFired = undefined; + return trigger( "submit", this, arguments ); + } + }); + + } else { + return false; + } + }, + + teardown: function( namespaces ) { + jQuery.event.remove( this, ".specialSubmit" ); + } + }; + +} + +// change delegation, happens here so we have bind. +if ( !jQuery.support.changeBubbles ) { + + var changeFilters, + + getVal = function( elem ) { + var type = elem.type, val = elem.value; + + if ( type === "radio" || type === "checkbox" ) { + val = elem.checked; + + } else if ( type === "select-multiple" ) { + val = elem.selectedIndex > -1 ? + jQuery.map( elem.options, function( elem ) { + return elem.selected; + }).join("-") : + ""; + + } else if ( elem.nodeName.toLowerCase() === "select" ) { + val = elem.selectedIndex; + } + + return val; + }, + + testChange = function testChange( e ) { + var elem = e.target, data, val; + + if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) { + return; + } + + data = jQuery.data( elem, "_change_data" ); + val = getVal(elem); + + // the current data will be also retrieved by beforeactivate + if ( e.type !== "focusout" || elem.type !== "radio" ) { + jQuery.data( elem, "_change_data", val ); + } + + if ( data === undefined || val === data ) { + return; + } + + if ( data != null || val ) { + e.type = "change"; + e.liveFired = undefined; + return jQuery.event.trigger( e, arguments[1], elem ); + } + }; + + jQuery.event.special.change = { + filters: { + focusout: testChange, + + beforedeactivate: testChange, + + click: function( e ) { + var elem = e.target, type = elem.type; + + if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) { + return testChange.call( this, e ); + } + }, + + // Change has to be called before submit + // Keydown will be called before keypress, which is used in submit-event delegation + keydown: function( e ) { + var elem = e.target, type = elem.type; + + if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") || + (e.keyCode === 32 && (type === "checkbox" || type === "radio")) || + type === "select-multiple" ) { + return testChange.call( this, e ); + } + }, + + // Beforeactivate happens also before the previous element is blurred + // with this event you can't trigger a change event, but you can store + // information + beforeactivate: function( e ) { + var elem = e.target; + jQuery.data( elem, "_change_data", getVal(elem) ); + } + }, + + setup: function( data, namespaces ) { + if ( this.type === "file" ) { + return false; + } + + for ( var type in changeFilters ) { + jQuery.event.add( this, type + ".specialChange", changeFilters[type] ); + } + + return rformElems.test( this.nodeName ); + }, + + teardown: function( namespaces ) { + jQuery.event.remove( this, ".specialChange" ); + + return rformElems.test( this.nodeName ); + } + }; + + changeFilters = jQuery.event.special.change.filters; + + // Handle when the input is .focus()'d + changeFilters.focus = changeFilters.beforeactivate; +} + +function trigger( type, elem, args ) { + args[0].type = type; + return jQuery.event.handle.apply( elem, args ); +} + +// Create "bubbling" focus and blur events +if ( document.addEventListener ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + jQuery.event.special[ fix ] = { + setup: function() { + if ( focusCounts[fix]++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --focusCounts[fix] === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + + function handler( e ) { + e = jQuery.event.fix( e ); + e.type = fix; + return jQuery.event.trigger( e, null, e.target ); + } + }); +} + +jQuery.each(["bind", "one"], function( i, name ) { + jQuery.fn[ name ] = function( type, data, fn ) { + // Handle object literals + if ( typeof type === "object" ) { + for ( var key in type ) { + this[ name ](key, data, type[key], fn); + } + return this; + } + + if ( jQuery.isFunction( data ) || data === false ) { + fn = data; + data = undefined; + } + + var handler = name === "one" ? jQuery.proxy( fn, function( event ) { + jQuery( this ).unbind( event, handler ); + return fn.apply( this, arguments ); + }) : fn; + + if ( type === "unload" && name !== "one" ) { + this.one( type, data, fn ); + + } else { + for ( var i = 0, l = this.length; i < l; i++ ) { + jQuery.event.add( this[i], type, handler, data ); + } + } + + return this; + }; +}); + +jQuery.fn.extend({ + unbind: function( type, fn ) { + // Handle object literals + if ( typeof type === "object" && !type.preventDefault ) { + for ( var key in type ) { + this.unbind(key, type[key]); + } + + } else { + for ( var i = 0, l = this.length; i < l; i++ ) { + jQuery.event.remove( this[i], type, fn ); + } + } + + return this; + }, + + delegate: function( selector, types, data, fn ) { + return this.live( types, data, fn, selector ); + }, + + undelegate: function( selector, types, fn ) { + if ( arguments.length === 0 ) { + return this.unbind( "live" ); + + } else { + return this.die( types, null, fn, selector ); + } + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + + triggerHandler: function( type, data ) { + if ( this[0] ) { + var event = jQuery.Event( type ); + event.preventDefault(); + event.stopPropagation(); + jQuery.event.trigger( event, data, this[0] ); + return event.result; + } + }, + + toggle: function( fn ) { + // Save reference to arguments for access in closure + var args = arguments, + i = 1; + + // link all the functions, so any of them can unbind this click handler + while ( i < args.length ) { + jQuery.proxy( fn, args[ i++ ] ); + } + + return this.click( jQuery.proxy( fn, function( event ) { + // Figure out which function to execute + var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i; + jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 ); + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ lastToggle ].apply( this, arguments ) || false; + })); + }, + + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +}); + +var liveMap = { + focus: "focusin", + blur: "focusout", + mouseenter: "mouseover", + mouseleave: "mouseout" +}; + +jQuery.each(["live", "die"], function( i, name ) { + jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) { + var type, i = 0, match, namespaces, preType, + selector = origSelector || this.selector, + context = origSelector ? this : jQuery( this.context ); + + if ( typeof types === "object" && !types.preventDefault ) { + for ( var key in types ) { + context[ name ]( key, data, types[key], selector ); + } + + return this; + } + + if ( jQuery.isFunction( data ) ) { + fn = data; + data = undefined; + } + + types = (types || "").split(" "); + + while ( (type = types[ i++ ]) != null ) { + match = rnamespaces.exec( type ); + namespaces = ""; + + if ( match ) { + namespaces = match[0]; + type = type.replace( rnamespaces, "" ); + } + + if ( type === "hover" ) { + types.push( "mouseenter" + namespaces, "mouseleave" + namespaces ); + continue; + } + + preType = type; + + if ( type === "focus" || type === "blur" ) { + types.push( liveMap[ type ] + namespaces ); + type = type + namespaces; + + } else { + type = (liveMap[ type ] || type) + namespaces; + } + + if ( name === "live" ) { + // bind live handler + for ( var j = 0, l = context.length; j < l; j++ ) { + jQuery.event.add( context[j], "live." + liveConvert( type, selector ), + { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } ); + } + + } else { + // unbind live handler + context.unbind( "live." + liveConvert( type, selector ), fn ); + } + } + + return this; + }; +}); + +function liveHandler( event ) { + var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret, + elems = [], + selectors = [], + events = jQuery.data( this, this.nodeType ? "events" : "__events__" ); + + if ( typeof events === "function" ) { + events = events.events; + } + + // Make sure we avoid non-left-click bubbling in Firefox (#3861) + if ( event.liveFired === this || !events || !events.live || event.button && event.type === "click" ) { + return; + } + + if ( event.namespace ) { + namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + event.liveFired = this; + + var live = events.live.slice(0); + + for ( j = 0; j < live.length; j++ ) { + handleObj = live[j]; + + if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) { + selectors.push( handleObj.selector ); + + } else { + live.splice( j--, 1 ); + } + } + + match = jQuery( event.target ).closest( selectors, event.currentTarget ); + + for ( i = 0, l = match.length; i < l; i++ ) { + close = match[i]; + + for ( j = 0; j < live.length; j++ ) { + handleObj = live[j]; + + if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) ) { + elem = close.elem; + related = null; + + // Those two events require additional checking + if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) { + event.type = handleObj.preType; + related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0]; + } + + if ( !related || related !== elem ) { + elems.push({ elem: elem, handleObj: handleObj, level: close.level }); + } + } + } + } + + for ( i = 0, l = elems.length; i < l; i++ ) { + match = elems[i]; + + if ( maxLevel && match.level > maxLevel ) { + break; + } + + event.currentTarget = match.elem; + event.data = match.handleObj.data; + event.handleObj = match.handleObj; + + ret = match.handleObj.origHandler.apply( match.elem, arguments ); + + if ( ret === false || event.isPropagationStopped() ) { + maxLevel = match.level; + + if ( ret === false ) { + stop = false; + } + if ( event.isImmediatePropagationStopped() ) { + break; + } + } + } + + return stop; +} + +function liveConvert( type, selector ) { + return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspace, "&"); +} + +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + if ( fn == null ) { + fn = data; + data = null; + } + + return arguments.length > 0 ? + this.bind( name, data, fn ) : + this.trigger( name ); + }; + + if ( jQuery.attrFn ) { + jQuery.attrFn[ name ] = true; + } +}); + +// Prevent memory leaks in IE +// Window isn't included so as not to unbind existing unload events +// More info: +// - http://isaacschlueter.com/2006/10/msie-memory-leaks/ +if ( window.attachEvent && !window.addEventListener ) { + jQuery(window).bind("unload", function() { + for ( var id in jQuery.cache ) { + if ( jQuery.cache[ id ].handle ) { + // Try/Catch is to handle iframes being unloaded, see #4280 + try { + jQuery.event.remove( jQuery.cache[ id ].handle.elem ); + } catch(e) {} + } + } + }); +} + + +/*! + * Sizzle CSS Selector Engine - v1.0 + * Copyright 2009, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){ + +var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, + done = 0, + toString = Object.prototype.toString, + hasDuplicate = false, + baseHasDuplicate = true; + +// Here we check if the JavaScript engine is using some sort of +// optimization where it does not always call our comparision +// function. If that is the case, discard the hasDuplicate value. +// Thus far that includes Google Chrome. +[0, 0].sort(function() { + baseHasDuplicate = false; + return 0; +}); + +var Sizzle = function( selector, context, results, seed ) { + results = results || []; + context = context || document; + + var origContext = context; + + if ( context.nodeType !== 1 && context.nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + var m, set, checkSet, extra, ret, cur, pop, i, + prune = true, + contextXML = Sizzle.isXML( context ), + parts = [], + soFar = selector; + + // Reset the position of the chunker regexp (start from head) + do { + chunker.exec( "" ); + m = chunker.exec( soFar ); + + if ( m ) { + soFar = m[3]; + + parts.push( m[1] ); + + if ( m[2] ) { + extra = m[3]; + break; + } + } + } while ( m ); + + if ( parts.length > 1 && origPOS.exec( selector ) ) { + + if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { + set = posProcess( parts[0] + parts[1], context ); + + } else { + set = Expr.relative[ parts[0] ] ? + [ context ] : + Sizzle( parts.shift(), context ); + + while ( parts.length ) { + selector = parts.shift(); + + if ( Expr.relative[ selector ] ) { + selector += parts.shift(); + } + + set = posProcess( selector, set ); + } + } + + } else { + // Take a shortcut and set the context if the root selector is an ID + // (but not if it'll be faster if the inner selector is an ID) + if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && + Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { + + ret = Sizzle.find( parts.shift(), context, contextXML ); + context = ret.expr ? + Sizzle.filter( ret.expr, ret.set )[0] : + ret.set[0]; + } + + if ( context ) { + ret = seed ? + { expr: parts.pop(), set: makeArray(seed) } : + Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); + + set = ret.expr ? + Sizzle.filter( ret.expr, ret.set ) : + ret.set; + + if ( parts.length > 0 ) { + checkSet = makeArray( set ); + + } else { + prune = false; + } + + while ( parts.length ) { + cur = parts.pop(); + pop = cur; + + if ( !Expr.relative[ cur ] ) { + cur = ""; + } else { + pop = parts.pop(); + } + + if ( pop == null ) { + pop = context; + } + + Expr.relative[ cur ]( checkSet, pop, contextXML ); + } + + } else { + checkSet = parts = []; + } + } + + if ( !checkSet ) { + checkSet = set; + } + + if ( !checkSet ) { + Sizzle.error( cur || selector ); + } + + if ( toString.call(checkSet) === "[object Array]" ) { + if ( !prune ) { + results.push.apply( results, checkSet ); + + } else if ( context && context.nodeType === 1 ) { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { + results.push( set[i] ); + } + } + + } else { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && checkSet[i].nodeType === 1 ) { + results.push( set[i] ); + } + } + } + + } else { + makeArray( checkSet, results ); + } + + if ( extra ) { + Sizzle( extra, origContext, results, seed ); + Sizzle.uniqueSort( results ); + } + + return results; +}; + +Sizzle.uniqueSort = function( results ) { + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( var i = 1; i < results.length; i++ ) { + if ( results[i] === results[ i - 1 ] ) { + results.splice( i--, 1 ); + } + } + } + } + + return results; +}; + +Sizzle.matches = function( expr, set ) { + return Sizzle( expr, null, null, set ); +}; + +Sizzle.matchesSelector = function( node, expr ) { + return Sizzle( expr, null, null, [node] ).length > 0; +}; + +Sizzle.find = function( expr, context, isXML ) { + var set; + + if ( !expr ) { + return []; + } + + for ( var i = 0, l = Expr.order.length; i < l; i++ ) { + var match, + type = Expr.order[i]; + + if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { + var left = match[1]; + match.splice( 1, 1 ); + + if ( left.substr( left.length - 1 ) !== "\\" ) { + match[1] = (match[1] || "").replace(/\\/g, ""); + set = Expr.find[ type ]( match, context, isXML ); + + if ( set != null ) { + expr = expr.replace( Expr.match[ type ], "" ); + break; + } + } + } + } + + if ( !set ) { + set = context.getElementsByTagName( "*" ); + } + + return { set: set, expr: expr }; +}; + +Sizzle.filter = function( expr, set, inplace, not ) { + var match, anyFound, + old = expr, + result = [], + curLoop = set, + isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); + + while ( expr && set.length ) { + for ( var type in Expr.filter ) { + if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { + var found, item, + filter = Expr.filter[ type ], + left = match[1]; + + anyFound = false; + + match.splice(1,1); + + if ( left.substr( left.length - 1 ) === "\\" ) { + continue; + } + + if ( curLoop === result ) { + result = []; + } + + if ( Expr.preFilter[ type ] ) { + match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); + + if ( !match ) { + anyFound = found = true; + + } else if ( match === true ) { + continue; + } + } + + if ( match ) { + for ( var i = 0; (item = curLoop[i]) != null; i++ ) { + if ( item ) { + found = filter( item, match, i, curLoop ); + var pass = not ^ !!found; + + if ( inplace && found != null ) { + if ( pass ) { + anyFound = true; + + } else { + curLoop[i] = false; + } + + } else if ( pass ) { + result.push( item ); + anyFound = true; + } + } + } + } + + if ( found !== undefined ) { + if ( !inplace ) { + curLoop = result; + } + + expr = expr.replace( Expr.match[ type ], "" ); + + if ( !anyFound ) { + return []; + } + + break; + } + } + } + + // Improper expression + if ( expr === old ) { + if ( anyFound == null ) { + Sizzle.error( expr ); + + } else { + break; + } + } + + old = expr; + } + + return curLoop; +}; + +Sizzle.error = function( msg ) { + throw "Syntax error, unrecognized expression: " + msg; +}; + +var Expr = Sizzle.selectors = { + order: [ "ID", "NAME", "TAG" ], + + match: { + ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, + ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/, + TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, + CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/, + POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, + PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ + }, + + leftMatch: {}, + + attrMap: { + "class": "className", + "for": "htmlFor" + }, + + attrHandle: { + href: function( elem ) { + return elem.getAttribute( "href" ); + } + }, + + relative: { + "+": function(checkSet, part){ + var isPartStr = typeof part === "string", + isTag = isPartStr && !/\W/.test( part ), + isPartStrNotTag = isPartStr && !isTag; + + if ( isTag ) { + part = part.toLowerCase(); + } + + for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { + if ( (elem = checkSet[i]) ) { + while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} + + checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? + elem || false : + elem === part; + } + } + + if ( isPartStrNotTag ) { + Sizzle.filter( part, checkSet, true ); + } + }, + + ">": function( checkSet, part ) { + var elem, + isPartStr = typeof part === "string", + i = 0, + l = checkSet.length; + + if ( isPartStr && !/\W/.test( part ) ) { + part = part.toLowerCase(); + + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + var parent = elem.parentNode; + checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; + } + } + + } else { + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + checkSet[i] = isPartStr ? + elem.parentNode : + elem.parentNode === part; + } + } + + if ( isPartStr ) { + Sizzle.filter( part, checkSet, true ); + } + } + }, + + "": function(checkSet, part, isXML){ + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !/\W/.test(part) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); + }, + + "~": function( checkSet, part, isXML ) { + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !/\W/.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); + } + }, + + find: { + ID: function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }, + + NAME: function( match, context ) { + if ( typeof context.getElementsByName !== "undefined" ) { + var ret = [], + results = context.getElementsByName( match[1] ); + + for ( var i = 0, l = results.length; i < l; i++ ) { + if ( results[i].getAttribute("name") === match[1] ) { + ret.push( results[i] ); + } + } + + return ret.length === 0 ? null : ret; + } + }, + + TAG: function( match, context ) { + return context.getElementsByTagName( match[1] ); + } + }, + preFilter: { + CLASS: function( match, curLoop, inplace, result, not, isXML ) { + match = " " + match[1].replace(/\\/g, "") + " "; + + if ( isXML ) { + return match; + } + + for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { + if ( elem ) { + if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n]/g, " ").indexOf(match) >= 0) ) { + if ( !inplace ) { + result.push( elem ); + } + + } else if ( inplace ) { + curLoop[i] = false; + } + } + } + + return false; + }, + + ID: function( match ) { + return match[1].replace(/\\/g, ""); + }, + + TAG: function( match, curLoop ) { + return match[1].toLowerCase(); + }, + + CHILD: function( match ) { + if ( match[1] === "nth" ) { + // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' + var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec( + match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || + !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); + + // calculate the numbers (first)n+(last) including if they are negative + match[2] = (test[1] + (test[2] || 1)) - 0; + match[3] = test[3] - 0; + } + + // TODO: Move to normal caching system + match[0] = done++; + + return match; + }, + + ATTR: function( match, curLoop, inplace, result, not, isXML ) { + var name = match[1].replace(/\\/g, ""); + + if ( !isXML && Expr.attrMap[name] ) { + match[1] = Expr.attrMap[name]; + } + + if ( match[2] === "~=" ) { + match[4] = " " + match[4] + " "; + } + + return match; + }, + + PSEUDO: function( match, curLoop, inplace, result, not ) { + if ( match[1] === "not" ) { + // If we're dealing with a complex expression, or a simple one + if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { + match[3] = Sizzle(match[3], null, null, curLoop); + + } else { + var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); + + if ( !inplace ) { + result.push.apply( result, ret ); + } + + return false; + } + + } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { + return true; + } + + return match; + }, + + POS: function( match ) { + match.unshift( true ); + + return match; + } + }, + + filters: { + enabled: function( elem ) { + return elem.disabled === false && elem.type !== "hidden"; + }, + + disabled: function( elem ) { + return elem.disabled === true; + }, + + checked: function( elem ) { + return elem.checked === true; + }, + + selected: function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + elem.parentNode.selectedIndex; + + return elem.selected === true; + }, + + parent: function( elem ) { + return !!elem.firstChild; + }, + + empty: function( elem ) { + return !elem.firstChild; + }, + + has: function( elem, i, match ) { + return !!Sizzle( match[3], elem ).length; + }, + + header: function( elem ) { + return (/h\d/i).test( elem.nodeName ); + }, + + text: function( elem ) { + return "text" === elem.type; + }, + radio: function( elem ) { + return "radio" === elem.type; + }, + + checkbox: function( elem ) { + return "checkbox" === elem.type; + }, + + file: function( elem ) { + return "file" === elem.type; + }, + password: function( elem ) { + return "password" === elem.type; + }, + + submit: function( elem ) { + return "submit" === elem.type; + }, + + image: function( elem ) { + return "image" === elem.type; + }, + + reset: function( elem ) { + return "reset" === elem.type; + }, + + button: function( elem ) { + return "button" === elem.type || elem.nodeName.toLowerCase() === "button"; + }, + + input: function( elem ) { + return (/input|select|textarea|button/i).test( elem.nodeName ); + } + }, + setFilters: { + first: function( elem, i ) { + return i === 0; + }, + + last: function( elem, i, match, array ) { + return i === array.length - 1; + }, + + even: function( elem, i ) { + return i % 2 === 0; + }, + + odd: function( elem, i ) { + return i % 2 === 1; + }, + + lt: function( elem, i, match ) { + return i < match[3] - 0; + }, + + gt: function( elem, i, match ) { + return i > match[3] - 0; + }, + + nth: function( elem, i, match ) { + return match[3] - 0 === i; + }, + + eq: function( elem, i, match ) { + return match[3] - 0 === i; + } + }, + filter: { + PSEUDO: function( elem, match, i, array ) { + var name = match[1], + filter = Expr.filters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + + } else if ( name === "contains" ) { + return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0; + + } else if ( name === "not" ) { + var not = match[3]; + + for ( var j = 0, l = not.length; j < l; j++ ) { + if ( not[j] === elem ) { + return false; + } + } + + return true; + + } else { + Sizzle.error( "Syntax error, unrecognized expression: " + name ); + } + }, + + CHILD: function( elem, match ) { + var type = match[1], + node = elem; + + switch ( type ) { + case "only": + case "first": + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + if ( type === "first" ) { + return true; + } + + node = elem; + + case "last": + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + return true; + + case "nth": + var first = match[2], + last = match[3]; + + if ( first === 1 && last === 0 ) { + return true; + } + + var doneName = match[0], + parent = elem.parentNode; + + if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { + var count = 0; + + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.nodeIndex = ++count; + } + } + + parent.sizcache = doneName; + } + + var diff = elem.nodeIndex - last; + + if ( first === 0 ) { + return diff === 0; + + } else { + return ( diff % first === 0 && diff / first >= 0 ); + } + } + }, + + ID: function( elem, match ) { + return elem.nodeType === 1 && elem.getAttribute("id") === match; + }, + + TAG: function( elem, match ) { + return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match; + }, + + CLASS: function( elem, match ) { + return (" " + (elem.className || elem.getAttribute("class")) + " ") + .indexOf( match ) > -1; + }, + + ATTR: function( elem, match ) { + var name = match[1], + result = Expr.attrHandle[ name ] ? + Expr.attrHandle[ name ]( elem ) : + elem[ name ] != null ? + elem[ name ] : + elem.getAttribute( name ), + value = result + "", + type = match[2], + check = match[4]; + + return result == null ? + type === "!=" : + type === "=" ? + value === check : + type === "*=" ? + value.indexOf(check) >= 0 : + type === "~=" ? + (" " + value + " ").indexOf(check) >= 0 : + !check ? + value && result !== false : + type === "!=" ? + value !== check : + type === "^=" ? + value.indexOf(check) === 0 : + type === "$=" ? + value.substr(value.length - check.length) === check : + type === "|=" ? + value === check || value.substr(0, check.length + 1) === check + "-" : + false; + }, + + POS: function( elem, match, i, array ) { + var name = match[2], + filter = Expr.setFilters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } + } + } +}; + +var origPOS = Expr.match.POS, + fescape = function(all, num){ + return "\\" + (num - 0 + 1); + }; + +for ( var type in Expr.match ) { + Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); + Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); +} + +var makeArray = function( array, results ) { + array = Array.prototype.slice.call( array, 0 ); + + if ( results ) { + results.push.apply( results, array ); + return results; + } + + return array; +}; + +// Perform a simple check to determine if the browser is capable of +// converting a NodeList to an array using builtin methods. +// Also verifies that the returned array holds DOM nodes +// (which is not the case in the Blackberry browser) +try { + Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; + +// Provide a fallback method if it does not work +} catch( e ) { + makeArray = function( array, results ) { + var i = 0, + ret = results || []; + + if ( toString.call(array) === "[object Array]" ) { + Array.prototype.push.apply( ret, array ); + + } else { + if ( typeof array.length === "number" ) { + for ( var l = array.length; i < l; i++ ) { + ret.push( array[i] ); + } + + } else { + for ( ; array[i]; i++ ) { + ret.push( array[i] ); + } + } + } + + return ret; + }; +} + +var sortOrder, siblingCheck; + +if ( document.documentElement.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { + return a.compareDocumentPosition ? -1 : 1; + } + + return a.compareDocumentPosition(b) & 4 ? -1 : 1; + }; + +} else { + sortOrder = function( a, b ) { + var al, bl, + ap = [], + bp = [], + aup = a.parentNode, + bup = b.parentNode, + cur = aup; + + // The nodes are identical, we can exit early + if ( a === b ) { + hasDuplicate = true; + return 0; + + // If the nodes are siblings (or identical) we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + + // If no parents were found then the nodes are disconnected + } else if ( !aup ) { + return -1; + + } else if ( !bup ) { + return 1; + } + + // Otherwise they're somewhere else in the tree so we need + // to build up a full list of the parentNodes for comparison + while ( cur ) { + ap.unshift( cur ); + cur = cur.parentNode; + } + + cur = bup; + + while ( cur ) { + bp.unshift( cur ); + cur = cur.parentNode; + } + + al = ap.length; + bl = bp.length; + + // Start walking down the tree looking for a discrepancy + for ( var i = 0; i < al && i < bl; i++ ) { + if ( ap[i] !== bp[i] ) { + return siblingCheck( ap[i], bp[i] ); + } + } + + // We ended someplace up the tree so do a sibling check + return i === al ? + siblingCheck( a, bp[i], -1 ) : + siblingCheck( ap[i], b, 1 ); + }; + + siblingCheck = function( a, b, ret ) { + if ( a === b ) { + return ret; + } + + var cur = a.nextSibling; + + while ( cur ) { + if ( cur === b ) { + return -1; + } + + cur = cur.nextSibling; + } + + return 1; + }; +} + +// Utility function for retreiving the text value of an array of DOM nodes +Sizzle.getText = function( elems ) { + var ret = "", elem; + + for ( var i = 0; elems[i]; i++ ) { + elem = elems[i]; + + // Get the text from text nodes and CDATA nodes + if ( elem.nodeType === 3 || elem.nodeType === 4 ) { + ret += elem.nodeValue; + + // Traverse everything else, except comment nodes + } else if ( elem.nodeType !== 8 ) { + ret += Sizzle.getText( elem.childNodes ); + } + } + + return ret; +}; + +// Check to see if the browser returns elements by name when +// querying by getElementById (and provide a workaround) +(function(){ + // We're going to inject a fake input element with a specified name + var form = document.createElement("div"), + id = "script" + (new Date()).getTime(), + root = document.documentElement; + + form.innerHTML = ""; + + // Inject it into the root element, check its status, and remove it quickly + root.insertBefore( form, root.firstChild ); + + // The workaround has to do additional checks after a getElementById + // Which slows things down for other browsers (hence the branching) + if ( document.getElementById( id ) ) { + Expr.find.ID = function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + + return m ? + m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? + [m] : + undefined : + []; + } + }; + + Expr.filter.ID = function( elem, match ) { + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + + return elem.nodeType === 1 && node && node.nodeValue === match; + }; + } + + root.removeChild( form ); + + // release memory in IE + root = form = null; +})(); + +(function(){ + // Check to see if the browser returns only elements + // when doing getElementsByTagName("*") + + // Create a fake element + var div = document.createElement("div"); + div.appendChild( document.createComment("") ); + + // Make sure no comments are found + if ( div.getElementsByTagName("*").length > 0 ) { + Expr.find.TAG = function( match, context ) { + var results = context.getElementsByTagName( match[1] ); + + // Filter out possible comments + if ( match[1] === "*" ) { + var tmp = []; + + for ( var i = 0; results[i]; i++ ) { + if ( results[i].nodeType === 1 ) { + tmp.push( results[i] ); + } + } + + results = tmp; + } + + return results; + }; + } + + // Check to see if an attribute returns normalized href attributes + div.innerHTML = ""; + + if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && + div.firstChild.getAttribute("href") !== "#" ) { + + Expr.attrHandle.href = function( elem ) { + return elem.getAttribute( "href", 2 ); + }; + } + + // release memory in IE + div = null; +})(); + +if ( document.querySelectorAll ) { + (function(){ + var oldSizzle = Sizzle, + div = document.createElement("div"), + id = "__sizzle__"; + + div.innerHTML = "

"; + + // Safari can't handle uppercase or unicode characters when + // in quirks mode. + if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { + return; + } + + Sizzle = function( query, context, extra, seed ) { + context = context || document; + + // Make sure that attribute selectors are quoted + query = query.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); + + // Only use querySelectorAll on non-XML documents + // (ID selectors don't work in non-HTML documents) + if ( !seed && !Sizzle.isXML(context) ) { + if ( context.nodeType === 9 ) { + try { + return makeArray( context.querySelectorAll(query), extra ); + } catch(qsaError) {} + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + var old = context.getAttribute( "id" ), + nid = old || id; + + if ( !old ) { + context.setAttribute( "id", nid ); + } + + try { + return makeArray( context.querySelectorAll( "#" + nid + " " + query ), extra ); + + } catch(pseudoError) { + } finally { + if ( !old ) { + context.removeAttribute( "id" ); + } + } + } + } + + return oldSizzle(query, context, extra, seed); + }; + + for ( var prop in oldSizzle ) { + Sizzle[ prop ] = oldSizzle[ prop ]; + } + + // release memory in IE + div = null; + })(); +} + +(function(){ + var html = document.documentElement, + matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector, + pseudoWorks = false; + + try { + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( document.documentElement, "[test!='']:sizzle" ); + + } catch( pseudoError ) { + pseudoWorks = true; + } + + if ( matches ) { + Sizzle.matchesSelector = function( node, expr ) { + // Make sure that attribute selectors are quoted + expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); + + if ( !Sizzle.isXML( node ) ) { + try { + if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { + return matches.call( node, expr ); + } + } catch(e) {} + } + + return Sizzle(expr, null, null, [node]).length > 0; + }; + } +})(); + +(function(){ + var div = document.createElement("div"); + + div.innerHTML = "
"; + + // Opera can't find a second classname (in 9.6) + // Also, make sure that getElementsByClassName actually exists + if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { + return; + } + + // Safari caches class attributes, doesn't catch changes (in 3.2) + div.lastChild.className = "e"; + + if ( div.getElementsByClassName("e").length === 1 ) { + return; + } + + Expr.order.splice(1, 0, "CLASS"); + Expr.find.CLASS = function( match, context, isXML ) { + if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { + return context.getElementsByClassName(match[1]); + } + }; + + // release memory in IE + div = null; +})(); + +function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 && !isXML ){ + elem.sizcache = doneName; + elem.sizset = i; + } + + if ( elem.nodeName.toLowerCase() === cur ) { + match = elem; + break; + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 ) { + if ( !isXML ) { + elem.sizcache = doneName; + elem.sizset = i; + } + + if ( typeof cur !== "string" ) { + if ( elem === cur ) { + match = true; + break; + } + + } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { + match = elem; + break; + } + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +if ( document.documentElement.contains ) { + Sizzle.contains = function( a, b ) { + return a !== b && (a.contains ? a.contains(b) : true); + }; + +} else if ( document.documentElement.compareDocumentPosition ) { + Sizzle.contains = function( a, b ) { + return !!(a.compareDocumentPosition(b) & 16); + }; + +} else { + Sizzle.contains = function() { + return false; + }; +} + +Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; + + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +var posProcess = function( selector, context ) { + var match, + tmpSet = [], + later = "", + root = context.nodeType ? [context] : context; + + // Position selectors must be done after the filter + // And so must :not(positional) so we move all PSEUDOs to the end + while ( (match = Expr.match.PSEUDO.exec( selector )) ) { + later += match[0]; + selector = selector.replace( Expr.match.PSEUDO, "" ); + } + + selector = Expr.relative[selector] ? selector + "*" : selector; + + for ( var i = 0, l = root.length; i < l; i++ ) { + Sizzle( selector, root[i], tmpSet ); + } + + return Sizzle.filter( later, tmpSet ); +}; + +// EXPOSE +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.filters; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})(); + + +var runtil = /Until$/, + rparentsprev = /^(?:parents|prevUntil|prevAll)/, + // Note: This RegExp should be improved, or likely pulled from Sizzle + rmultiselector = /,/, + isSimple = /^.[^:#\[\.,]*$/, + slice = Array.prototype.slice, + POS = jQuery.expr.match.POS; + +jQuery.fn.extend({ + find: function( selector ) { + var ret = this.pushStack( "", "find", selector ), + length = 0; + + for ( var i = 0, l = this.length; i < l; i++ ) { + length = ret.length; + jQuery.find( selector, this[i], ret ); + + if ( i > 0 ) { + // Make sure that the results are unique + for ( var n = length; n < ret.length; n++ ) { + for ( var r = 0; r < length; r++ ) { + if ( ret[r] === ret[n] ) { + ret.splice(n--, 1); + break; + } + } + } + } + } + + return ret; + }, + + has: function( target ) { + var targets = jQuery( target ); + return this.filter(function() { + for ( var i = 0, l = targets.length; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false), "not", selector); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true), "filter", selector ); + }, + + is: function( selector ) { + return !!selector && jQuery.filter( selector, this ).length > 0; + }, + + closest: function( selectors, context ) { + var ret = [], i, l, cur = this[0]; + + if ( jQuery.isArray( selectors ) ) { + var match, selector, + matches = {}, + level = 1; + + if ( cur && selectors.length ) { + for ( i = 0, l = selectors.length; i < l; i++ ) { + selector = selectors[i]; + + if ( !matches[selector] ) { + matches[selector] = jQuery.expr.match.POS.test( selector ) ? + jQuery( selector, context || this.context ) : + selector; + } + } + + while ( cur && cur.ownerDocument && cur !== context ) { + for ( selector in matches ) { + match = matches[selector]; + + if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) { + ret.push({ selector: selector, elem: cur, level: level }); + } + } + + cur = cur.parentNode; + level++; + } + } + + return ret; + } + + var pos = POS.test( selectors ) ? + jQuery( selectors, context || this.context ) : null; + + for ( i = 0, l = this.length; i < l; i++ ) { + cur = this[i]; + + while ( cur ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + + } else { + cur = cur.parentNode; + if ( !cur || !cur.ownerDocument || cur === context ) { + break; + } + } + } + } + + ret = ret.length > 1 ? jQuery.unique(ret) : ret; + + return this.pushStack( ret, "closest", selectors ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + if ( !elem || typeof elem === "string" ) { + return jQuery.inArray( this[0], + // If it receives a string, the selector is used + // If it receives nothing, the siblings are used + elem ? jQuery( elem ) : this.parent().children() ); + } + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context || this.context ) : + jQuery.makeArray( selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? + all : + jQuery.unique( all ) ); + }, + + andSelf: function() { + return this.add( this.prevObject ); + } +}); + +// A painfully simple check to see if an element is disconnected +// from a document (should be improved, where feasible). +function isDisconnected( node ) { + return !node || !node.parentNode || node.parentNode.nodeType === 11; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return jQuery.nth( elem, 2, "nextSibling" ); + }, + prev: function( elem ) { + return jQuery.nth( elem, 2, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( elem.parentNode.firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.makeArray( elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 ? jQuery.unique( ret ) : ret; + + if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret, name, slice.call(arguments).join(",") ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + nth: function( cur, result, dir, elem ) { + result = result || 1; + var num = 0; + + for ( ; cur; cur = cur[dir] ) { + if ( cur.nodeType === 1 && ++num === result ) { + break; + } + } + + return cur; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem, i ) { + return (elem === qualifier) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem, i ) { + return (jQuery.inArray( elem, qualifier ) >= 0) === keep; + }); +} + + + + +var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, + rtagName = /<([\w:]+)/, + rtbody = /\s]+\/)>/g, + wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
", "
" ], + thead: [ 1, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + col: [ 2, "", "
" ], + area: [ 1, "", "" ], + _default: [ 0, "", "" ] + }; + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// IE can't serialize and + +
  • +
    + + + + (NULL) +
    +
  • +$_recursion_marker++) + : @($bee[$_recursion_marker]++); + + $_[0][] =& $bee; + } + + // return all bees + // + return $_[0]; + } + + // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + + /** + * Render a dump for the properties of an array or objeect + * + * @param mixed &$data + * @access private + * @static + */ + Private Static Function _vars(&$data) { + + $_is_object = is_object($data); + + // test for references in order to + // prevent endless recursion loops + // + $_recursion_marker = krumo::_marker(); + $_r = ($_is_object) + ? @$data->$_recursion_marker + : @$data[$_recursion_marker] ; + $_r = (integer) $_r; + + // recursion detected + // + if ($_r > 0) { + return krumo::_recursion(); + } + + // stain it + // + krumo::_hive($data); + + // render it + // + ?> + + + + +
  • + +
    0) {?> onClick="krumo.toggle(this);" + onMouseOver="krumo.over(this);" + onMouseOut="krumo.out(this);"> + + + + (Array, ) + + + + | + (Callback) + ::(); + + +
    + + +
  • + +
  • + +
    0) {?> onClick="krumo.toggle(this);" + onMouseOver="krumo.over(this);" + onMouseOut="krumo.out(this);"> + + + + (Object) + +
    + + +
  • + +
  • + +
    + + + + (Resource) + +
    + +
  • + +
  • + +
    + + + + (Boolean) + +
    + +
  • + +
  • + +
    + + + + (Integer) + +
    + +
  • + +
  • + +
    + + + + (Float) + +
    + +
  • + KRUMO_TRUNCATE_LENGTH) { + $_ = substr($data, 0, KRUMO_TRUNCATE_LENGTH - 3) . '...'; + $_extra = true; + } +?> +
  • + +
    onClick="krumo.toggle(this);" + onMouseOver="krumo.over(this);" + onMouseOut="krumo.out(this);"> + + + + (String, + characters ) + + + + | + (Callback) + (); + + +
    + + + + +
  • + diff --git a/sites/all/modules/contrib/devel/krumo/docs/Krumo/_class.krumo.php.html b/sites/all/modules/contrib/devel/krumo/docs/Krumo/_class.krumo.php.html new file mode 100644 index 0000000..6b3fcf4 --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/docs/Krumo/_class.krumo.php.html @@ -0,0 +1,267 @@ + + + + + + Docs for page class.krumo.php + + + + + +
    +

    File/class.krumo.php

    + + +
    +
    Description
    + +
    + +

    Krumo: Structured information display solution

    +

    Krumo is a debugging tool (PHP5 only), which displays structured information about any PHP variable. It is a nice replacement for print_r() or var_dump() which are used by a lot of PHP developers.

    + + +
    +
    + + +
    +
    Classes
    + +
    + + + + + + + + + +
    ClassDescription
    +  class + krumo + + Krumo API +
    +
    +
    + + + +
    +
    Constants
    + +
    + +
    + +
    + + + DIR_SEP = DIRECTORY_SEPARATOR + (line 22) + +
    + + +

    backward compatibility: the DIR_SEP constant isn't used anymore

    + + +
    + +
    + +
    + + + KRUMO_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR + (line 39) + +
    + + +

    Set the KRUMO_DIR constant up with the absolute path to Krumo files. If it is not defined, include_path will be used. Set KRUMO_DIR only if any other module or application has not already set it up.

    + + +
    + +
    + +
    + + + KRUMO_TRUNCATE_LENGTH = 50 + (line 48) + +
    + + +

    This constant sets the maximum strings of strings that will be shown as they are. Longer strings will be truncated with this length, and their `full form` will be shown in a child node.

    + + +
    + +
    + +
    + + + PATH_SEPARATOR = OS_WINDOWS?';':':' + (line 28) + +
    + + +

    backward compatibility: the PATH_SEPARATOR constant is availble since 4.3.0RC2

    + + +
    +
    +
    + + + +
    +
    Functions
    + +
    + +
    + +
    + + krumo (line 1295) +
    + + +

    Alias of krumo::dump()

    + +
    + void + + krumo + + ([mixed $data,... = ]) +
    + +
      +
    • + mixed + $data,...
    • +
    + + +
    +
    +
    + +

    + Documentation generated on Sun, 02 Dec 2007 09:43:24 +0200 by phpDocumentor 1.4.0a2 +

    +
    + \ No newline at end of file diff --git a/sites/all/modules/contrib/devel/krumo/docs/Krumo/krumo.html b/sites/all/modules/contrib/devel/krumo/docs/Krumo/krumo.html new file mode 100644 index 0000000..ce4d33b --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/docs/Krumo/krumo.html @@ -0,0 +1,900 @@ + + + + + + Docs For Class krumo + + + + + +
    +

     Class krumo

    + + +
    +
    Description
    + +
    + +

    Krumo API

    +

    This class stores the Krumo API for rendering and displaying the structured information it is reporting

    +

    + Located in /class.krumo.php (line 61) +

    + + +
    
    +	
    +			
    +
    + + + + + +
    +
    Method Summary
    + +
    +
    + +
    +  + static void + backtrace + () +
    + +
    +  + static void + classes + () +
    + +
    +  + static void + conf + () +
    + +
    +  + static void + cookie + () +
    + +
    +  + static void + defines + () +
    + +
    +  + static boolean + disable + () +
    + +
    +  + static void + dump + ( $data, mixed $data,...) +
    + +
    +  + static boolean + enable + () +
    + +
    +  + static void + env + () +
    + +
    +  + static void + extensions + () +
    + +
    +  + static void + functions + () +
    + +
    +  + static void + get + () +
    + +
    +  + static void + headers + () +
    + +
    +  + static void + includes + () +
    + +
    +  + static void + ini + (string $ini_file) +
    + +
    +  + static void + interfaces + () +
    + +
    +  + static void + path + () +
    + +
    +  + static void + phpini + () +
    + +
    +  + static void + post + () +
    + +
    +  + static void + request + () +
    + +
    +  + static void + server + () +
    + +
    +  + static void + session + () +
    + +
    +  + static string + version + () +
    +
    +
    +
    + + + +
    +
    Methods
    + +
    + + +
    + +
    + + static backtrace (line 82) +
    + + +

    Prints a debug backtrace

    +
      +
    • access: public
    • +
    + +
    + static void + + backtrace + + () +
    + + + +
    + +
    + +
    + + static classes (line 101) +
    + + +

    Prints a list of all currently declared classes.

    +
      +
    • access: public
    • +
    + +
    + static void + + classes + + () +
    + + + +
    + +
    + +
    + + static conf (line 297) +
    + + +

    Prints a list of all your configuration settings.

    +
      +
    • access: public
    • +
    + +
    + static void + + conf + + () +
    + + + +
    + +
    + +
    + + static cookie (line 441) +
    + + +

    Prints a list of all the values from the $_COOKIE array.

    +
      +
    • access: public
    • +
    + +
    + static void + + cookie + + () +
    + + + +
    + +
    + +
    + + static defines (line 197) +
    + + +

    Prints a list of all currently declared constants.

    +
      +
    • access: public
    • +
    + +
    + static void + + defines + + () +
    + + + +
    + +
    + +
    + + static disable (line 747) +
    + + +

    Disable Krumo

    +
      +
    • access: public
    • +
    + +
    + static boolean + + disable + + () +
    + + + +
    + +
    + +
    + + static dump (line 548) +
    + + +

    Dump information about a variable

    +
      +
    • access: public
    • +
    + +
    + static void + + dump + + ( $data, mixed $data,...) +
    + +
      +
    • + mixed + $data,...
    • +
    • + + $data
    • +
    + + +
    + +
    + +
    + + static enable (line 736) +
    + + +

    Enable Krumo

    +
      +
    • access: public
    • +
    + +
    + static boolean + + enable + + () +
    + + + +
    + +
    + +
    + + static env (line 465) +
    + + +

    Prints a list of all the values from the $_ENV array.

    +
      +
    • access: public
    • +
    + +
    + static void + + env + + () +
    + + + +
    + +
    + +
    + + static extensions (line 221) +
    + + +

    Prints a list of all currently loaded PHP extensions.

    +
      +
    • access: public
    • +
    + +
    + static void + + extensions + + () +
    + + + +
    + +
    + +
    + + static functions (line 173) +
    + + +

    Prints a list of all currently declared functions.

    +
      +
    • access: public
    • +
    + +
    + static void + + functions + + () +
    + + + +
    + +
    + +
    + + static get (line 369) +
    + + +

    Prints a list of all the values from the $_GET array.

    +
      +
    • access: public
    • +
    + +
    + static void + + get + + () +
    + + + +
    + +
    + +
    + + static headers (line 245) +
    + + +

    Prints a list of all HTTP request headers.

    +
      +
    • access: public
    • +
    + +
    + static void + + headers + + () +
    + + + +
    + +
    + +
    + + static includes (line 149) +
    + + +

    Prints a list of all currently included (or required) files.

    +
      +
    • access: public
    • +
    + +
    + static void + + includes + + () +
    + + + +
    + +
    + +
    + + static ini (line 515) +
    + + +

    Prints a list of all the values from an INI file.

    +
      +
    • access: public
    • +
    + +
    + static void + + ini + + (string $ini_file) +
    + +
      +
    • + string + $ini_file
    • +
    + + +
    + +
    + +
    + + static interfaces (line 125) +
    + + +

    Prints a list of all currently declared interfaces (PHP5 only).

    +
      +
    • access: public
    • +
    + +
    + static void + + interfaces + + () +
    + + + +
    + +
    + +
    + + static path (line 321) +
    + + +

    Prints a list of the specified directories under your include_path option.

    +
      +
    • access: public
    • +
    + +
    + static void + + path + + () +
    + + + +
    + +
    + +
    + + static phpini (line 269) +
    + + +

    Prints a list of the configuration settings read from php.ini

    +
      +
    • access: public
    • +
    + +
    + static void + + phpini + + () +
    + + + +
    + +
    + +
    + + static post (line 393) +
    + + +

    Prints a list of all the values from the $_POST array.

    +
      +
    • access: public
    • +
    + +
    + static void + + post + + () +
    + + + +
    + +
    + +
    + + static request (line 345) +
    + + +

    Prints a list of all the values from the $_REQUEST array.

    +
      +
    • access: public
    • +
    + +
    + static void + + request + + () +
    + + + +
    + +
    + +
    + + static server (line 417) +
    + + +

    Prints a list of all the values from the $_SERVER array.

    +
      +
    • access: public
    • +
    + +
    + static void + + server + + () +
    + + + +
    + +
    + +
    + + static session (line 489) +
    + + +

    Prints a list of all the values from the $_SESSION array.

    +
      +
    • access: public
    • +
    + +
    + static void + + session + + () +
    + + + +
    + +
    + +
    + + static version (line 70) +
    + + +

    Return Krumo version

    +
      +
    • access: public
    • +
    + +
    + static string + + version + + () +
    + + + +
    + +
    +
    + + +

    + Documentation generated on Sun, 02 Dec 2007 09:43:24 +0200 by phpDocumentor 1.4.0a2 +

    +
    + \ No newline at end of file diff --git a/sites/all/modules/contrib/devel/krumo/docs/blank.html b/sites/all/modules/contrib/devel/krumo/docs/blank.html new file mode 100644 index 0000000..98c9636 --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/docs/blank.html @@ -0,0 +1,13 @@ + + + Krumo + + + + +

    Krumo

    +Welcome to Krumo!
    +
    +This documentation was generated by phpDocumentor v1.4.0a2
    + + \ No newline at end of file diff --git a/sites/all/modules/contrib/devel/krumo/docs/classtrees_Krumo.html b/sites/all/modules/contrib/devel/krumo/docs/classtrees_Krumo.html new file mode 100644 index 0000000..8123084 --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/docs/classtrees_Krumo.html @@ -0,0 +1,23 @@ + + + + + + + + + + + +

    + +

    +

    Root class krumo

    + + +

    + Documentation generated on Sun, 02 Dec 2007 09:43:24 +0200 by phpDocumentor 1.4.0a2 +

    + + \ No newline at end of file diff --git a/sites/all/modules/contrib/devel/krumo/docs/elementindex.html b/sites/all/modules/contrib/devel/krumo/docs/elementindex.html new file mode 100644 index 0000000..bc89b7a --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/docs/elementindex.html @@ -0,0 +1,392 @@ + + + + + + + + + + +

    Full index

    +

    Package indexes

    + +
    +
    + b + c + d + e + f + g + h + i + k + p + r + s + v +
    + + +
    +
    b
    + +
    +
    +
    +
    + Method + backtrace +
    +
    +
    krumo::backtrace() in class.krumo.php
    +
    Prints a debug backtrace
    +
    +
    + +
    +
    c
    + +
    +
    +
    +
    + Page + class.krumo.php +
    +
    +
    class.krumo.php in class.krumo.php
    +
    +
    + Method + classes +
    +
    +
    krumo::classes() in class.krumo.php
    +
    Prints a list of all currently declared classes.
    +
    +
    + Method + conf +
    +
    +
    krumo::conf() in class.krumo.php
    +
    Prints a list of all your configuration settings.
    +
    +
    + Method + cookie +
    +
    +
    krumo::cookie() in class.krumo.php
    +
    Prints a list of all the values from the $_COOKIE array.
    +
    +
    + +
    +
    d
    + +
    +
    +
    +
    + Method + defines +
    +
    +
    krumo::defines() in class.krumo.php
    +
    Prints a list of all currently declared constants.
    +
    +
    + Constant + DIR_SEP +
    +
    +
    DIR_SEP in class.krumo.php
    +
    backward compatibility: the DIR_SEP constant isn't used anymore
    +
    +
    + Method + disable +
    +
    +
    krumo::disable() in class.krumo.php
    +
    Disable Krumo
    +
    +
    + Method + dump +
    +
    +
    krumo::dump() in class.krumo.php
    +
    Dump information about a variable
    +
    +
    + +
    +
    e
    + +
    +
    +
    +
    + Method + enable +
    +
    +
    krumo::enable() in class.krumo.php
    +
    Enable Krumo
    +
    +
    + Method + env +
    +
    +
    krumo::env() in class.krumo.php
    +
    Prints a list of all the values from the $_ENV array.
    +
    +
    + Method + extensions +
    +
    +
    krumo::extensions() in class.krumo.php
    +
    Prints a list of all currently loaded PHP extensions.
    +
    +
    + +
    +
    f
    + +
    +
    +
    +
    + Method + functions +
    +
    +
    krumo::functions() in class.krumo.php
    +
    Prints a list of all currently declared functions.
    +
    +
    + +
    +
    g
    + +
    +
    +
    +
    + Method + get +
    +
    +
    krumo::get() in class.krumo.php
    +
    Prints a list of all the values from the $_GET array.
    +
    +
    + +
    +
    h
    + +
    +
    +
    +
    + Method + headers +
    +
    +
    krumo::headers() in class.krumo.php
    +
    Prints a list of all HTTP request headers.
    +
    +
    + +
    +
    i
    + +
    +
    +
    +
    + Method + includes +
    +
    +
    krumo::includes() in class.krumo.php
    +
    Prints a list of all currently included (or required) files.
    +
    +
    + Method + ini +
    +
    +
    krumo::ini() in class.krumo.php
    +
    Prints a list of all the values from an INI file.
    +
    +
    + Method + interfaces +
    +
    +
    krumo::interfaces() in class.krumo.php
    +
    Prints a list of all currently declared interfaces (PHP5 only).
    +
    +
    + +
    +
    k
    + +
    +
    +
    +
    + Function + krumo +
    +
    +
    krumo() in class.krumo.php
    +
    Alias of krumo::dump()
    +
    +
    + Class + krumo +
    +
    +
    krumo in class.krumo.php
    +
    Krumo API
    +
    +
    + Constant + KRUMO_DIR +
    +
    +
    KRUMO_DIR in class.krumo.php
    +
    Set the KRUMO_DIR constant up with the absolute path to Krumo files. If it is not defined, include_path will be used. Set KRUMO_DIR only if any other module or application has not already set it up.
    +
    +
    + Constant + KRUMO_TRUNCATE_LENGTH +
    +
    +
    KRUMO_TRUNCATE_LENGTH in class.krumo.php
    +
    This constant sets the maximum strings of strings that will be shown as they are. Longer strings will be truncated with this length, and their `full form` will be shown in a child node.
    +
    +
    + +
    +
    p
    + +
    +
    +
    +
    + Method + path +
    +
    +
    krumo::path() in class.krumo.php
    +
    Prints a list of the specified directories under your include_path option.
    +
    +
    + Constant + PATH_SEPARATOR +
    +
    +
    PATH_SEPARATOR in class.krumo.php
    +
    backward compatibility: the PATH_SEPARATOR constant is availble since 4.3.0RC2
    +
    +
    + Method + phpini +
    +
    +
    krumo::phpini() in class.krumo.php
    +
    Prints a list of the configuration settings read from php.ini
    +
    +
    + Method + post +
    +
    +
    krumo::post() in class.krumo.php
    +
    Prints a list of all the values from the $_POST array.
    +
    +
    + +
    +
    r
    + +
    +
    +
    +
    + Method + request +
    +
    +
    krumo::request() in class.krumo.php
    +
    Prints a list of all the values from the $_REQUEST array.
    +
    +
    + +
    +
    s
    + +
    +
    +
    +
    + Method + server +
    +
    +
    krumo::server() in class.krumo.php
    +
    Prints a list of all the values from the $_SERVER array.
    +
    +
    + Method + session +
    +
    +
    krumo::session() in class.krumo.php
    +
    Prints a list of all the values from the $_SESSION array.
    +
    +
    + +
    +
    v
    + +
    +
    +
    +
    + Method + version +
    +
    +
    krumo::version() in class.krumo.php
    +
    Return Krumo version
    +
    +
    + +
    + b + c + d + e + f + g + h + i + k + p + r + s + v +
    + \ No newline at end of file diff --git a/sites/all/modules/contrib/devel/krumo/docs/elementindex_Krumo.html b/sites/all/modules/contrib/devel/krumo/docs/elementindex_Krumo.html new file mode 100644 index 0000000..39e7477 --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/docs/elementindex_Krumo.html @@ -0,0 +1,389 @@ + + + + + + + + + + +

    [Krumo] element index

    +All elements +
    +
    + b + c + d + e + f + g + h + i + k + p + r + s + v +
    + + +
    +
    b
    + +
    +
    +
    +
    + Method + backtrace +
    +
    +
    krumo::backtrace() in class.krumo.php
    +
    Prints a debug backtrace
    +
    +
    + +
    +
    c
    + +
    +
    +
    +
    + Page + class.krumo.php +
    +
    +
    class.krumo.php in class.krumo.php
    +
    +
    + Method + classes +
    +
    +
    krumo::classes() in class.krumo.php
    +
    Prints a list of all currently declared classes.
    +
    +
    + Method + conf +
    +
    +
    krumo::conf() in class.krumo.php
    +
    Prints a list of all your configuration settings.
    +
    +
    + Method + cookie +
    +
    +
    krumo::cookie() in class.krumo.php
    +
    Prints a list of all the values from the $_COOKIE array.
    +
    +
    + +
    +
    d
    + +
    +
    +
    +
    + Method + defines +
    +
    +
    krumo::defines() in class.krumo.php
    +
    Prints a list of all currently declared constants.
    +
    +
    + Constant + DIR_SEP +
    +
    +
    DIR_SEP in class.krumo.php
    +
    backward compatibility: the DIR_SEP constant isn't used anymore
    +
    +
    + Method + disable +
    +
    +
    krumo::disable() in class.krumo.php
    +
    Disable Krumo
    +
    +
    + Method + dump +
    +
    +
    krumo::dump() in class.krumo.php
    +
    Dump information about a variable
    +
    +
    + +
    +
    e
    + +
    +
    +
    +
    + Method + enable +
    +
    +
    krumo::enable() in class.krumo.php
    +
    Enable Krumo
    +
    +
    + Method + env +
    +
    +
    krumo::env() in class.krumo.php
    +
    Prints a list of all the values from the $_ENV array.
    +
    +
    + Method + extensions +
    +
    +
    krumo::extensions() in class.krumo.php
    +
    Prints a list of all currently loaded PHP extensions.
    +
    +
    + +
    +
    f
    + +
    +
    +
    +
    + Method + functions +
    +
    +
    krumo::functions() in class.krumo.php
    +
    Prints a list of all currently declared functions.
    +
    +
    + +
    +
    g
    + +
    +
    +
    +
    + Method + get +
    +
    +
    krumo::get() in class.krumo.php
    +
    Prints a list of all the values from the $_GET array.
    +
    +
    + +
    +
    h
    + +
    +
    +
    +
    + Method + headers +
    +
    +
    krumo::headers() in class.krumo.php
    +
    Prints a list of all HTTP request headers.
    +
    +
    + +
    +
    i
    + +
    +
    +
    +
    + Method + includes +
    +
    +
    krumo::includes() in class.krumo.php
    +
    Prints a list of all currently included (or required) files.
    +
    +
    + Method + ini +
    +
    +
    krumo::ini() in class.krumo.php
    +
    Prints a list of all the values from an INI file.
    +
    +
    + Method + interfaces +
    +
    +
    krumo::interfaces() in class.krumo.php
    +
    Prints a list of all currently declared interfaces (PHP5 only).
    +
    +
    + +
    +
    k
    + +
    +
    +
    +
    + Function + krumo +
    +
    +
    krumo() in class.krumo.php
    +
    Alias of krumo::dump()
    +
    +
    + Class + krumo +
    +
    +
    krumo in class.krumo.php
    +
    Krumo API
    +
    +
    + Constant + KRUMO_DIR +
    +
    +
    KRUMO_DIR in class.krumo.php
    +
    Set the KRUMO_DIR constant up with the absolute path to Krumo files. If it is not defined, include_path will be used. Set KRUMO_DIR only if any other module or application has not already set it up.
    +
    +
    + Constant + KRUMO_TRUNCATE_LENGTH +
    +
    +
    KRUMO_TRUNCATE_LENGTH in class.krumo.php
    +
    This constant sets the maximum strings of strings that will be shown as they are. Longer strings will be truncated with this length, and their `full form` will be shown in a child node.
    +
    +
    + +
    +
    p
    + +
    +
    +
    +
    + Method + path +
    +
    +
    krumo::path() in class.krumo.php
    +
    Prints a list of the specified directories under your include_path option.
    +
    +
    + Constant + PATH_SEPARATOR +
    +
    +
    PATH_SEPARATOR in class.krumo.php
    +
    backward compatibility: the PATH_SEPARATOR constant is availble since 4.3.0RC2
    +
    +
    + Method + phpini +
    +
    +
    krumo::phpini() in class.krumo.php
    +
    Prints a list of the configuration settings read from php.ini
    +
    +
    + Method + post +
    +
    +
    krumo::post() in class.krumo.php
    +
    Prints a list of all the values from the $_POST array.
    +
    +
    + +
    +
    r
    + +
    +
    +
    +
    + Method + request +
    +
    +
    krumo::request() in class.krumo.php
    +
    Prints a list of all the values from the $_REQUEST array.
    +
    +
    + +
    +
    s
    + +
    +
    +
    +
    + Method + server +
    +
    +
    krumo::server() in class.krumo.php
    +
    Prints a list of all the values from the $_SERVER array.
    +
    +
    + Method + session +
    +
    +
    krumo::session() in class.krumo.php
    +
    Prints a list of all the values from the $_SESSION array.
    +
    +
    + +
    +
    v
    + +
    +
    +
    +
    + Method + version +
    +
    +
    krumo::version() in class.krumo.php
    +
    Return Krumo version
    +
    +
    + +
    + b + c + d + e + f + g + h + i + k + p + r + s + v +
    + \ No newline at end of file diff --git a/sites/all/modules/contrib/devel/krumo/docs/errors.html b/sites/all/modules/contrib/devel/krumo/docs/errors.html new file mode 100644 index 0000000..cf21fd4 --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/docs/errors.html @@ -0,0 +1,15 @@ + + + + + + phpDocumentor Parser Errors and Warnings + + + + Post-parsing
    +

    + Documentation generated on Sun, 02 Dec 2007 09:43:25 +0200 by phpDocumentor 1.4.0a2 +

    + + \ No newline at end of file diff --git a/sites/all/modules/contrib/devel/krumo/docs/index.html b/sites/all/modules/contrib/devel/krumo/docs/index.html new file mode 100644 index 0000000..8276a70 --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/docs/index.html @@ -0,0 +1,24 @@ + + + + + + Krumo + + + + + + + + + + + <H2>Frame Alert</H2> + <P>This document is designed to be viewed using the frames feature. + If you see this message, you are using a non-frame-capable web client.</P> + + + \ No newline at end of file diff --git a/sites/all/modules/contrib/devel/krumo/docs/li_Krumo.html b/sites/all/modules/contrib/devel/krumo/docs/li_Krumo.html new file mode 100644 index 0000000..f353e8d --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/docs/li_Krumo.html @@ -0,0 +1,155 @@ + + + + + + + + + + + + +

    Krumo

    +
    + +
    +

    + Generated by + phpDocumentor 1.4.0a2 +

    + + \ No newline at end of file diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/banner.css b/sites/all/modules/contrib/devel/krumo/docs/media/banner.css new file mode 100644 index 0000000..1b7fa8a --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/docs/media/banner.css @@ -0,0 +1,32 @@ +body +{ + background-color: #EEEEEE; + margin: 0px; + padding: 0px; +} + +/* Banner (top bar) classes */ + +.banner { } + +.banner-menu +{ + clear: both; + padding: .5em; + border-top: 2px solid #AAAAAA; +} + +.banner-title +{ + text-align: right; + font-size: 20pt; + font-weight: bold; + margin: .2em; +} + +.package-selector +{ + background-color: #DDDDDD; + border: 1px solid #AAAAAA; + color: #000090; +} diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/AbstractClass.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/AbstractClass.png new file mode 100644 index 0000000000000000000000000000000000000000..afa9d1d9261500c57ec37cff1de8cf43b31dbf25 GIT binary patch literal 620 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfZSaHJ|V9E z|NjRvPcK>oB;jC!uy7wgKahK+w)SFm^_jG^eUXv70s?k;dvAAg+Gb<3&cI-?g2GG& zh8_lnGzNx)iHU~;0{$Bt?{jhjD)_IizRSYmznt6_Lqnj-|B{khH8nS=tN#}e_{zt( zR#EXk2ggfJ&eakUK)aWTi~nF?_`tyMoPps!1H*L&hBwx{7GaqsHK2b=zCZk2F6c8jl1JVN5*@+%rr7PI}^11C*oaK4^xC05VCJK_3< zud|-<{@_}WT(>@P3->I)OHK!WY*;^8{ZU{D!{pbT`vks!nK+ee*>;`t+%u+Jea(8o vR5x-}=mldp!DT+b`?hi(nsMPiM;)`hf`a|hX9_^KGcb6%`njxgN@xNA_;dCz literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/AbstractClass_logo.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/AbstractClass_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..8f65c390e37b548578390c0bdbe4a4bc469c4d19 GIT binary patch literal 1232 zcmb`F`%jZ+6vq#W@U{$S1TZXV4viCPx3q`=k`4L zo1#BJx0H}AAicqQU>vV%^^<9m|tWsIx<8LP>5;)!-8{5Ba8xawKa^8)JAwolYrP3xG ze;gi;N)W-psLCUuuq7;v;PILTf-XM)dx3ypvzvl~UU4|4;9xV4hpH34zB3F)V?aO$ zn|+nbCFt}9e}9{g&n%sOWyOknOy(?=N>C`M!zl`-mcbw}tb)O4@%Ek}kw)FzM%>+P z&dw7gQYD>^Hi$-;0kAkbTLCIOJjMZr0D1sUQ>kWvt0dArfEIuTfD>f$DGaLt_zu7T zPzaEN77pxLob%;x2CG}`xIIwL@5%qsVT}twSp0*)++a!sc%Q?K z`N@jCeTp+nwyR|s`Xqf{xt8ToY?#m#I3M+++}?TZyynf|!6(h%ZXB5YwRD&DpE->+ zQa?!d&ipfd^zwzIKtBJ~qLA$Mj4wHSb~mtdtP52mbBN=vTM#>mfmycxM}yu)6Bg^4@lw*?MFu3*Llv~ zTq;{9ldCeY*UL|oCB+&|W}C3XvTUffR~(q#WAaNg-nYFVl1oFwjfcGkWO1Lan7mWj zTHAk$B{{PsrhD+|_&Dv{Dq|lMERc7*{?yjm*&4fucG~As73P}JZF+xm+H<2#y7rxG zW9=q?%ZBwC`JJPAZS{(h+4A?WNris0W9rS3rW|*EzKH2={VP|ERZ$+~<|y91p2^}Q nm5>e}t(H)$%7m@A#{7td(X}C*54y81qwfI{akQvb7@z$w+j=f( literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/AbstractMethod.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/AbstractMethod.png new file mode 100644 index 0000000000000000000000000000000000000000..605ccbe58e04d8f1462227f08369ef6d8e5d4fe0 GIT binary patch literal 696 zcmV;p0!RIcP){TiMy!!e(Yf-7_V#G2iUr zLy?{{R5VTt!-qRXx-)@b&OX;WKp!2|aT>;Q#=c z001J6D>1||Q0X(T002sRN{?O-R{#J232;bRa{vGf5&!@T5&_cPe*6Fc02XvbSad^j zWnpw_Z*Cw|X>DZyFf=bPGA}SQ*^*j90000WbVXQnQ*UN;cVTj608L?Ia&K*AWNBd_ zMrm?ocW-iQb0AGvyOAm+0002PNklfMHT-Bv8QIEs=+ZPf$A`E>2c0)H#Sj$PWnk1p@>G(zLXgfTkY(YJ2o$Mf2{EX7&_@CL4Lsu zf=WupE-s;IY31eR9Y|p2?lbS+y#t0XRlwut?cae`au#?*7Bet#3xP1>rMq>1fPxAo zt`Q}{`DrEPiAAXlzKO|2`MIennTZN+nMJAP`9;~q3ceA$Cu*qx)rx`CIv1rTmSpDV zDTHL^rZO0q=o=X68yMf56y*d|@zK-8F{EOS?)lqMO%4*R4`(`@EDFELx7ssVZORd| zq%5HzwQYvlS2%cGPXFHD@~{05-~Gi~FPw_9ndsyAvUly>(4LD`8%wTUDBXMa-M%{6 zPZCGZ>%ZQD?T}l&!`s7tUKsOr`-?Wu<;}Q-LQ_10v>q37%ry4uIK**v&qDxa`a*R3vrciLZ8L}yD) oC>0QH(U@~sMxOVvCC6j?c~N@r8XNCh0zJ>*>FVdQ&MBb@0EQ=S+yDRo literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/AbstractPrivateClass_logo.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/AbstractPrivateClass_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..4e68f570dcb38ee67756ce2231bb5c38e77cce71 GIT binary patch literal 1615 zcmd5)X;Twc6n!ia!lFSW4Jkrc1`LPY$1sj(#lRGf?-K4OF)W1MOFm{ z#7YHOM1d45sY*y?RaT*Ff-H@QqJv;$S_hSqKJ6F#4|-7%db^6N%JBAT-(9*4o%q znVVM{8z&gwu}%jHt3R3eeo)zwv3Rdtk> zHkX%IR8+_c3#BLl`T3*C$>o`ujcI8r9xppPdr&AWJ9+Y=SiH#R_r%1&N)#a> zLp)xoP^jW?x*{TSg~HD8@MMu_J|N&;P>>Mv3@w(yNtt`_4MTNcqLq} z%GI^Y$LAr10vpK)47}svp&}CHWHOh_eLy0K*z8s^S%t^Hv9+Bb5@VQ58Hse=#f8OU z!IlG<%q?^C0ynn}bMx!Y&f#=AmrftS zz{0{8=0u^Owi_rERBYA2Al=^ngo6W*NbJU9H<8F%9BxBfdvV7O=!jBFYZ-~mv9x@x zsR@ORv9^X@%xG!71fbr~a2|np3MB<#5&&q>5CDxxWG?{FDLDW|y1G&TngOW$U}y!L z4IC~XfGhw62!t2_EEWrG`q&@}0J;|r4?^#yB9<>37+4Ughj_fi#GHz2*JLti8^rv7 zu=W9PsQxe5o@p5i8$iZ+2Ey)icfJp`vH6pmki>~-0U~xRPm~y%5D9!j!xLhUM@H~N zaUT4H$i&!$Xd%ugKz7d73jRgE|LdL*87kt(3UD0$@kl^$b|5%85QsCyT&R@#EjpFV zNxB$0{_dMGCPphR1jGN@&Te?$F)~u1_bJ2p$i%={-+*sD-;Or!G|aRk{(Pj}Kd}0H zUF|6ogUq)Y;t|lhxz(~t`eQ_RUoq1-eLFT?AP8E>XkA)fHggqi^htaeb*$=!t4&v9 zqXdHJ6|UE%Zb#CMmiE)kj0RV6b=%tA)%tp^#^=wTC2c+JUMy1oOuKh7@94hZJCoCG zXxaS2yJN@J#J33U`c+%lKU?M&7D~KdDwWEKxzE31HT2^+xj+0k>P|X8pxN^#{*0l; zJtxPg-}2sdI`*|*oC&-#etYRjR+M_H)cIG6TS0l{{gE&BmCtq~sCpA%t$SPejT1KZ zhgY7Xi)In=GWoXzL>tiaEgkbHwlbdGz1?uS;}g9r9hTrqerW-%FO1@shEpP|okxi= zPM5cWANffS>kbM9sa+||;ebojEN0yA9yek&f^IImjYjiE#g2W+w}g5r{lcI0tMbXg zn)g@NIfMqbGFiEQJ-TD7%ey9VJ;gYDC9Ao8C1ZwKf{tkXg^MxlZFwOFr^!}`w~YQU zd1uJz%3r<80}oBt)q-)m&*Rf}D)wh9&K|(^9IVw$da;MNxX>Y)R&c|pBRwc!j(BVG z1gV@=8A+_ZCz$E2gI1@w{L*m@r+H)9vC7|V^Qd`Hj&)~W1WkS8@5e~OE~BI%6gwn= zr*W1_Ms>6Hs`1daQJXsTMk+A3=fdt{i_4foPsd6$>Q%`uT3s3z34l|D0EF>7@e!`_b&3NDRW2J ly0$Y=SuS5{3YHYFR9bNnjKnZ6dJUX%K&SaqC6tg;{{UJF@sa=l literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/AbstractPrivateMethod.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/AbstractPrivateMethod.png new file mode 100644 index 0000000000000000000000000000000000000000..41cc9f021734b6f99a723a687827190f2ae645e2 GIT binary patch literal 874 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vk7#J8+1AIbU z|Ns9Flwsj#1(FdZp_~dll^g2aJA$}1LE7U51%YJBiZnqBFdculhYlSI zePQDH(Aed!@#@v9{V!U0T+*|>Vq|mPaK+-qHfL>(<z;@U}mwJ#*$v?ZZY|dku|t z>TYOnx7uW^y4kR+tIJ@Wf$1uBpzT)k?NpbUwl>yHs;P72AM0gsJN85x|f1nsNASyQ)C^V z5(o6cX?uI1gPQ_$zUt}*MFj!9qne@NAL##8Sy?4sMa%1B#506*U(#MpQkI2X< zc`N_t;!<)|IwT?j3`C$$JEf(8o_)r^aG!xeU0r=914Ae{#Jqy9S^>kcyd=mkm_blU z$=KK>G&D3VtsLmpnX6WvIdc~R-hlxyN~jN}hd;CiI)SsmBeIx*fm;ZK886+f`vVjd zD{+k|aV|AI6tkVJh3R1!8b9vC_gtf zB{NaMEwd=KJijQrSiv`9_e3ofpxV=(E{-7;bCLzbgr`rKFk#BGq?87R>nEOk>FJpx zR5!!H#V1TpU<$_pmPbOx#d~EhvfQbWT_nhq+3L!8?pK_VPC(<7l;G z*2$BHZrL7j2|sUR5%A_P)N-TQ+}Y|GrRdK zV81Pn)+>0zGnMUCiP|Spqc&^AG^y;y-0mPhgGJ5$HDs$bXTdY0@m-PJEq%`?TdG9A z`7w;w(EZ*psMAWc}ikt!qr000(rMObu0a%Ew3 zX>V>IRB3Hx05CK!FfuPNGue__LI3~&s7XXYRCt_C%4rvYKmdi|(V{3Sky0s2sVw0{ z3ns_0{QqBM)L8Df_c<4+W|ZRbuE?ptT;0z>z23f%IS}<{hVT1%ezB)pU1LBR7z?!4 zdf1$>0)?RM<32r|FI3$jzfkuMegO9fmRSW?+;gd{A6?vpl~i!EaT78927Y{aY)A+t zD;|Uj0{6%|rRRA`LWdbZAQrk%Pf@@U0ViwJZw&^h9P>Z*1$ZnRgm9bKlmGw#07*qo IM6N<$g0d3*MgRZ+ literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/Class_logo.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/Class_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..6f223c479a6c6fefab504deb84ab824d2e744713 GIT binary patch literal 1600 zcmd5*`!|$%9DdQB9VXJcrO7tT6s8%5m)$T$<9->p85y@dE{&RXZA?TG%_2nB{k}w+ z>>y&K8JEf>)@4JEu#A%^x8$DGyKmbsyZ^yH=X@^b^L>8!JkR-jlN{|WrKJu_0RSLv zZDr;RS2P?)5fX5&yJ6f47l|;kH4TA4Ow2fl06^Tq(T-*gK@j``L!Zj}+HeO}zBX0; zizS_}vsy(-{E4`_@#vbdi+5fGm5%u5_tDdPtzuhX8qOmN&M4C`MSV{xS#?0cPBr16I(qS$$iDTJrh_s?O!p#8Hcm?#qi{w{Bl~rNTh%>k zux{n)ub}uDC~68~PeK9XP|o0n-x!qAyY4;;IgdbbU2Fb*kj)U}I`FAP@Yeb{ME(1wR2$S zCnkTzwDp5^%MQJH%Za}Qw(J@Sb}rN|#d2rO_**uOn}$u>PW5Z&eqR6^w@vF-EowJR z?ytf7pRC>Vy0c(Xy#ZElT5*>`i$x}PS71@3%2n|0Ix}zDrR23?#T;0%YIu7FmT6El z2Nu24DVZbXi)=HebP7bUa4>sWJ4d9GHAl=E1#c}<6Gn-tBHfgEozyY>%|Y;&c|yW4 zku#~q8L_(3kLUF3#=OE^@6x?8LyQ_DL=9+0x1A2}#zl7MT$&`ZUJ%&*xUeUhY#|}I zSN$R%Hj~6`#Raq+3+8G3+=%z@#4@=!KOxb#LH%4E&aW2hTXDiu02{99&efzpfNj@w zsn?)ZV`*i_sYO_)-;O(09;Z}d95XSL46I%8F`F_qo10kk0*qOr$PC`va_ndpbYvy|{2GJehB@IiF4o$aZ>K{XIGb8+#H_!n;6$gipr{DZ!g z{{X(k{~?NKvs$nq$xth|FaSV)_a(%J{)*XyhiJArolOn#XGi$37y!k`j};QcILGus zTQFISh!9pl7@9&C{EEZET*WV3Qx?OA%?t@f)0jaFfT*WU)YT?}FEiZ9@ONZdo1LLu zF7opRBrE~}wa)fRZUyglRb^$GxSn2Pg91AFWDunfuj18GhDIRNFt3KCaO!XG6XR&1 z28*aehm}!<>IiA_!AaB^KQ(Cz%0e>k6#30Eu? zFVRRBHaEw|$2T?#1h?9*(e0eWnYQm1Hr1B!cKi1WHPMl!yyD`-M9a|7P&O+nm`UBf zx#`hy(nM;f-efI&Ys=m~Cg$M5y1IM!ni-dtGv`C5w7MQkIj2kLO^;6v4}(M!NmW%J zqg~58a-sbR!Ac6xD=uAAR*p0`XIvs=o+nJC@!AI@u?L*fb6sg?her$|Pd^gJMy6kX zyY5=9aetfR0c3@|$s=BsOcoC~V2u4xFqbA7rlWwKMHLuT_IuR@E0N<;1(y5jqdklr zA18PT(&hJAnw&ypeXE(*jBty~<~W1~;xeKKN4`lJ4URwYtcit4vd9TpEPUi`Ko+~! znxf<=Hu;%f(yED6tR88cY6$)$k_sYx5+paB)@w47v$fpK_KbB9<-0uWWx$V$Y(nJvu4LwpP~GnArV?p7r+FCdX3sF>*+w zM8ps6Vm(S|1s-pS4xBiFG!w(f$;lxV0eSz9%%(EsBY==fcwRHDvGW Fe*-2SG_e2x literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/Constant.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/Constant.png new file mode 100644 index 0000000000000000000000000000000000000000..a9c6f28b3591824c0732239096324984401092e5 GIT binary patch literal 752 zcmVOeFFcbb@qHow`d0Y;LfV5s^(xaR!&Cux=r_h zK>yEkwuWTri~;WM?zB!GySux2ODz7(wV9cj|EC>kUsw2=N7!5`|NsB+nG)o;ng6pi z?6#AtQ5D^iW&g!kh=_>Y-QAyDGK@(hpKnk5)xQ6t5&Et%|AnnE%s?=+VL4bRGY=KmW3S?UXD3%7ojB4yZ&Sl06&8RVDFrLHC>x|F0|m!)5=D zWMNxY|E`aEUP|_}Os8!{fqZ!Ru{!;~Pu+z8ja4uIq=V{$Q2oE5_n8Xrj{yJCdF-7Z z_OC#eKOFz28iqL-|EnYarde7~M!IDR)?gv_vy8A<63$a7|GS6&yh+s0%m2(~=8gyd zoe2K4Iq#eo+=dGO)q%E8AK!Z)?wTmWSRMbM5&y4||I~k!LLndTsj>h7010qNS#tmY z3h)2`3h)6!tTdPa001C#MObuGZ)S9NVRB^vO<`klZ*65{X<;BnX>w(EZ*psMAWc}i zkt!qr000(rMObu0a%Ew3X>V>IRB3Hx05CK!FfuPNGue__LI3~&=1D|BRCt_YkcI#b zK`4U(M2Pz6Icht~3ql2S@>nhM`5YqHd=mvh0y@s|8GK1fN}j>Ix{QKA0Y9^hBqh%T z(^Rc&DK|!G1|1(GJ`i8dK0M7tpHq-QLoYCi2h10jNsn_^VK8(|g2;!4`U}LlFfznw zDp-HqkjkAq?C=KG<_Aoa(CHB9TlWKE$_z ijGSU(oWd#~?*ag}r7qqQ?+~c~0000;SsO~ttNgt@c?ITUy+H?~F1$qJv5 zrj%inz4BS|lBY2XpN7wU95Cg+N6)R&S-Wy3tx4&gXH|B=yx^o^#sQu9?QQ>K8~%sZ z{0}Jm@7e#puI6oK)~nE@m)?oj|A$=pANt%j?acp}v%f-5{aU(vY0a7Rz}r@CC;s>y z_~w2^f9i&*uDiZCoO5v6`rY`9vHRwCT`RgWmp`jpSqZe)c-0rXl`kw;yt7~a!fK~g z=)5OIi*oZ8r2!qIu*ouQW?EwBb;IdTOs3w|UZw3aUl-^?yPlho&DXT%Y3a3H_piCa zH_y(z`J!&~1--@#`u#SZWfuag168_I91G66);c&DuZkdK$q?W#UzIB6L*!=K%vvBTz%$TUpUjQPxsc+FV-7 zR7zY|e1`Pi6Tt84q|K9b~#>w5dpFQc%z_t$REF)G#$AI3{PO zi`#}?{&3@lPKQ}}C9A8dZ}IjAKfWk!a7giqTGl_Y+%GXPku##9bLwQK<5PFJZ+-_fA85GosxS7-Us$eq7dr0=(3bNhOU@OqP3*jGIQ@yq)Vq6&7M{#q z477Sr{(QThn~}}e&ZN!sueoC0eDO%k^aC-opNFK(Oq=OhcEPdW>{HKZz2YNN!Y4j; z3AV^N{LRk&iIdY~8yo$^9eXUQx0}^%F{pl^sd+`+YMoB)e`)Cta&kM>a@MPsK9Ml& z)7M|AkoTXLcaDa}VO>_ z%)r1c1j3A$?$-SQ3W}AuMwB=gr6!hS=I1GdWag$a7?|iA80i}r-<%ZX1XQ5_QW2b= zR#Ki=l*-_nm|T>fo0^iDsNj}alvYxA!qX>A zNlIy8vJMV5*3M3^SKHChH*MR#g{~aNJ_mfmqwk-%q}ar&_F&=i{FJ=+5=XdFicd7L z@bKuq?cMu$iKN7hJ&QyoB>wp5$i&=np1gX8$i&uZ%B&^(gI6I0} zGUVzNQK6O$8{S zC}qw=9fKWQ#zRcqIUjNk==S15ts}q2y)L~lP}(>_ogbmaoJrJ0AgwbXi6JhpDPFKT z9$x~a$ENK7000SaNLh0L01EH`01EH{Laa2H0000WbVXQnQ*UN;cVTj608L?Ia&K*A zWNBd_Mrm?ocW-iQb0AGvyOAm+0000MbVXQnLvm$dbZKvHAXI5>WdJZVFEBDMFf-Yb zT0#H-0HH}lK~#90W8iRC=0FAv99%)3!YBe-))JP&C<2Chw%iuNNCHkg-d5alQo;xU z8CL}X4_hHdm;k$sti6G8pr((nFjT%dS9ocX$5n$N$)Tp@>xCyk+k0?wOgH`Q@&JYcT)s zdE3HL%*@Q>)vf*e_W$H#w30>t^on|8F81N2s;a8ZvP6i8i1*uE-QC^)@Pqg0b?wn( z|JsUdXkPpC*^GEfs*66hqd1H2uT%f=o&W#;+=l<-g2$mxWdJZVFEBDMFf-YbT0#H- z0Od(UK~#90V{n52MNTM#0YtFI1j@(B2XI0KbfYa?T|L!(nVh{iK>~u&X4;-2GBUh+ zO#b|wKmqRrZ4q7|2-S~r3FdcW5R3`;1aU+4g;eeQ#5oya13hJAO+rKM?S)kNjI5;@ zxP3%G@<6_jL6VUZKZ6*X3`AZi%uqr{fsw(ANe{{o(+mk>VPxPm*V5M)0)jA)NMTb+ zeg-!Ib2&Lxsjy^C=6G9UE@=igP7RJkK126N2W6fJNk&ef)1_7Xj9k=&ZABS?e6Z)F u#ckM?93xmje28y3`Ng@o#2KYQ-UR?_sW14`Hh}s70000AMyVi9{#UaQ0r%7Fss&l*vy)E6e!K$>FVdQ&MBb@0CA5htN;K2 literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/Index.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/Index.png new file mode 100644 index 0000000000000000000000000000000000000000..6558ec393a6e0b35fb7776a52b4ca9c10da0d5c3 GIT binary patch literal 584 zcmV-O0=NB%P)sGc1s$KlTB|5tUFl&jIZ$KRg6;GCqm5-wl6(B`4Q;1)J+i=@-=`2U5V zz0~Rd#@X$9lDq;jjf$eZgrL)or^gjMgq*e3yWRhls?|-6=3oE-010qNS#tmY3h)2` z3h)6!tTdPa001C#MObuGZ)S9NVRB^vO<`klZ*65{X<;BnX>w(EZ*psMAWc}ikt!qr z000(rMObu0a%Ew3X>V>IRB3Hx05CK!FfuPNGue__LI3~&s!2paRCt^{$?Fn1@%ouFXELYW(Fj^6Z(U`)_51(-|7XseY25!>(WA}p^8eefzIoSOHBLL@ zu5c=u23 zg#EgG*R(4R8Bcv1+IdSoXt7!L5tEf~j@@~uVBhR|_Md6WYSZ+C#*073PQ0UAdtN0gNKbwkHzugYdUHQk=cz1X!nX~(+V z_vf=O_Fb>Npdzh8PLU=1Pe4dSL)YuZgf>gNH%uxGi_eHC{A4Kd*st(Y%3;N2oyz=} znqKw`%X@Y1uQTv0S!*U^fJH$hN@BTe&;g&?!xjVTG>^jPxS@?+*er933 sa(UjQ<*PC{8=_;sg?l=%aQ~mEp5P)i@yk~|9Z;Bfy85}Sb4q9e05`Dm_y7O^ literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/Interface_logo.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/Interface_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..6f223c479a6c6fefab504deb84ab824d2e744713 GIT binary patch literal 1600 zcmd5*`!|$%9DdQB9VXJcrO7tT6s8%5m)$T$<9->p85y@dE{&RXZA?TG%_2nB{k}w+ z>>y&K8JEf>)@4JEu#A%^x8$DGyKmbsyZ^yH=X@^b^L>8!JkR-jlN{|WrKJu_0RSLv zZDr;RS2P?)5fX5&yJ6f47l|;kH4TA4Ow2fl06^Tq(T-*gK@j``L!Zj}+HeO}zBX0; zizS_}vsy(-{E4`_@#vbdi+5fGm5%u5_tDdPtzuhX8qOmN&M4C`MSV{xS#?0cPBr16I(qS$$iDTJrh_s?O!p#8Hcm?#qi{w{Bl~rNTh%>k zux{n)ub}uDC~68~PeK9XP|o0n-x!qAyY4;;IgdbbU2Fb*kj)U}I`FAP@Yeb{ME(1wR2$S zCnkTzwDp5^%MQJH%Za}Qw(J@Sb}rN|#d2rO_**uOn}$u>PW5Z&eqR6^w@vF-EowJR z?ytf7pRC>Vy0c(Xy#ZElT5*>`i$x}PS71@3%2n|0Ix}zDrR23?#T;0%YIu7FmT6El z2Nu24DVZbXi)=HebP7bUa4>sWJ4d9GHAl=E1#c}<6Gn-tBHfgEozyY>%|Y;&c|yW4 zku#~q8L_(3kLUF3#=OE^@6x?8LyQ_DL=9+0x1A2}#zl7MT$&`ZUJ%&*xUeUhY#|}I zSN$R%Hj~6`#Raq+3+8G3+=%z@#4@=!KOxb#LH%4E&aW2hTXDiu02{99&efzpfNj@w zsn?)ZV`*i_sYO_)-;O(09;Z}d95XSL46I%8F`F_qo10kk0*qOr$PC`va_ndpbYvy|{2GJehB@IiF4o$aZ>K{XIGb8+#H_!n;6$gipr{DZ!g z{{X(k{~?NKvs$nq$xth|FaSV)_a(%J{)*XyhiJArolOn#XGi$37y!k`j};QcILGus zTQFISh!9pl7@9&C{EEZET*WV3Qx?OA%?t@f)0jaFfT*WU)YT?}FEiZ9@ONZdo1LLu zF7opRBrE~}wa)fRZUyglRb^$GxSn2Pg91AFWDunfuj18GhDIRNFt3KCaO!XG6XR&1 z28*aehm}!<>IiA_!AaB^KQ(Cz%0e>k6#30Eu? zFVRRBHaEw|$2T?#1h?9*(e0eWnYQm1Hr1B!cKi1WHPMl!yyD`-M9a|7P&O+nm`UBf zx#`hy(nM;f-efI&Ys=m~Cg$M5y1IM!ni-dtGv`C5w7MQkIj2kLO^;6v4}(M!NmW%J zqg~58a-sbR!Ac6xD=uAAR*p0`XIvs=o+nJC@!AI@u?L*fb6sg?her$|Pd^gJMy6kX zyY5=9aetfR0c3@|$s=BsOcoC~V2u4xFqbA7rlWwKMHLuT_IuR@E0N<;1(y5jqdklr zA18PT(&hJAnw&ypeXE(*jBty~<~W1~;xeKKN4`lJ4URwYtcit4vd9TpEPUi`Ko+~! znxf<=Hu;%f(yED6tR88cY6$)$k_sYx5+paB)@w47v$fpK_KbB9<-0uWWx$V$Y(nJvu4LwpP~GnArV?p7r+FCdX3sF>*+w zM8ps6Vm(S|1s-pS4xBiFG!w(f$;lxV0eSz9%%(EsBY==fcwRHDvGW Fe*-2SG_e2x literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/L.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/L.png new file mode 100644 index 0000000000000000000000000000000000000000..eb334edaeac52e2f473ffd92a49b025fb6148ec3 GIT binary patch literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^!ayv*$P6UUaa~gcQtTz3zOL*Scz79Am98pQqyvRG z3p^r=85p=efH0%e8j~47LAC&&5ZCE_)&Kwh7Y~}?0Tf{>3Gxg6&+v4+fftY`;pyTS tQgJK!NBsYWhyUvpj=8p5Ib^(%U@*zon(m*SoDEdN;OXk;vd$@?2>{+EE2IDb literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/Lminus.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/Lminus.png new file mode 100644 index 0000000000000000000000000000000000000000..f7c43c0aa3bebb499e86eb744b1e47b9a9445ba7 GIT binary patch literal 219 zcmeAS@N?(olHy`uVBq!ia0vp^!ayv*!VDzYUPT51DfSXiUsv`EJiLsmQh${X`~(Vd z7I;J!Gca&{0AWU_H6}BFf(8LTA+A9B|NsBf`>KHqVn8Lk#c`lIrjj7P;QtIyw;Ol? zc?O;?jv*Ddk_A|pTm=*lC~zFVdQ&MBb@0OtiQr2qf` literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/Lplus.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/Lplus.png new file mode 100644 index 0000000000000000000000000000000000000000..848ec2fc3bbaab6345864c303684ff8a86559cfb GIT binary patch literal 224 zcmeAS@N?(olHy`uVBq!ia0vp^!ayv*!VDzYUPT51DfSXiUsv`EJiLtR`ZJfMMF533 z3p^r=85p=efH0%e8j~47L4yFF5LY1m|NsB#ebqn)F`$y&;y6$pQ%R6t@PCG<+YP*c zJX22>$B>F!$pS1)t^$e&6gZd#)XV}^6#`leL>0XheB5$;*x1}$U0qr4a0#d>%paztiFSddoE z=FO+Zs9v~B@b&OYf=WY?JVJfcJk32QO)AOb$urFVKXE`Ry)jqsH71)XJB8YEt>{GE zGvwvuGqv|cy!A6?%sp|-T8&j?o?bnP-A{*1r^4t+dqpBkBPV|V>IRB3Hx05CK!FfuPNGue__LI3~& zAaq4obW?9;ba!ELWdKcKV{&h8Wn^h#AVz6&Wp{6KYjYq?Si6xbBme*ayGcYrRCt_Y z&;kMn2M1Xdeh6R)4Ab%Sw6|x9hYPq^SqVCeF?quTBwVb*o#mC81mFUy;m%?#?D`xC z0cWuYe|IAv4`YZxESp$_l#sZsh-s)UL?ALUMqSb?I@nP<)JGU7U}h%a#vI_K=%}q7 zq~RmZ$N<)8;N{4}qYx4zCu$87;NdY>VCC|)P=g6*o7-s0FmMCSfC?zsMKS0(@xufx vP5c-vI3ex;lft~dN-&p#Ny9iND4!ny)Wjn48}#yJ00000NkvXXu0mjf>`)kw literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/Page.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/Page.png new file mode 100644 index 0000000000000000000000000000000000000000..ffe7986ee2e78f7079d6de1a13ef29bff125f7a8 GIT binary patch literal 592 zcmV-W0wTQkb(FJYg{r&I=J@>oPidBsr@_|i|DM0#0xyTVySs>p zi0u&l@7S9O=i(&oFz-*}d|5-wk#ve_0k zZi}ST)an1e-~WcE$O18qgrL(EJcN#?$DzRBm8#XK#^imQz1B}9Gynhq32;bRa{vGe z@Bjb`@Bu=sG?)MY03dWlSaefwW^{L9a%BKbVPkS{ZDnL>VIW3na%FdKa%*!SO<22; zDkJ~^02XvbSad^jWnpw_Z*Cw|X>DZyFf=bPGA}SQ*^*j900025Nkl8X^a6$`;}MU&lC(fZYGN)*U*T&WTYe`t|6?P&^gvL>{}6e8nl zLI{`JKlCFG|LqoMkSE{iD56H;IN0Sraje`6bqbr=>+Ac4L(v&iSUtNMDLgY2KvhT^ eCV+sH1<((?kR=WgbuC-~0000)GO-L0AERF6v)dP%qbhFs5=j^@`6F?l_(@;?;SYFPR0 zI9jbQwZey3=y8ba9+c^JAk$@k`bNJ*XM8mL<6q0r!V+YD551g+rvHRYW=KB^jl71Q zyjUEXf%<=gv{N57&;Ray_CaNWG~<7$j7xBl@^MHtX718|yz^v1Gcq;sXrgWOL-%8| zeAujcX!zyfo16VFq#9G>J(EnWtL=RyR-0NB6V)oy zRmEie9Z=A1gd35_HMMe(FE?E78WVI3@nv91+wgViUAV!rpFqJ)Wl_to!seceCS_?; zZ;4o$E4k0B*A>>Q@@^>L31o}zmDNbO)e5c<%)AP+E5P*1yXjXRr0_e>m1)_fP3L*4 zq>@`n#eK};ri8-Yv`eDs;=aU7t-G*r(;{fc=?O5OKSe$`R3j_d*nP9?x%J(%fQEH%67mU3Hek2mE8BI_V-TD<8{d?o6-ef!PG`p%c&+4{j^aUgcH zPg_HSd3If0jjtfvXN7{Bm9@0` z{!FFF(*y6@p7PEXiOALIn)UNaUZG?FMfe@usLHF4iAJOOeEx9SoR_ols++f6a=J|s z5ggQNwU#-2UgKh&U;x$U?l6kKlg`fF$Kh~T&%}(*P&e;MzM$e1iDYH5)s7SzdNQ)O zW|LFc9?jNAIaVEr_>4^{Y;|6Zw5lrHumeb(iS9?J(ExtAVJMHD8w=kA5FA7#v<61y F{sZ~k(bNC{ literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/PrivateClass.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/PrivateClass.png new file mode 100644 index 0000000000000000000000000000000000000000..470e6d5684f29e52abb36ee6036a4d0b717f92e4 GIT binary patch literal 790 zcmV+x1L^#UP)WmEhNm^6>N2zOCt|Fuvb2MPgIr%?-{0R%gxJKy#3oLoEQio1TB$RW z>}rOS@9*z3X3RRU*Z=?jNYVd(pWkzHbE2lGGqCn7nbbf>Stx6=M8@%WtGpvWd{9$d zW@ctxl-^f`)gwrPNl|4eO^Yjd!Y3yuC{eAu(Bd|2#VxYmFkYoDiPgf`>UMyN)z#HS z%>A{^=P{-CPSgKgi`geqs99WJM7{YbYtFRD+-aQPBu9}dn9Ep?+$&_jF0SJ+!SP*W zX)~JcM@?QQa<)}jTP=IfF8)Ib00009a7bBm000XT000XT0n*)m`~Uy|Aaq4obW?9; zba!ELWdKcKV{&h8Wn^h#AVz6&Wp{6KYjYq?Si6xbBme*a7IZ~ebVG7wVRUJ4ZXi@? zZDjy3G%qkRFEBINl3GFl008buL_t(|oMUj)Q(}VxtyFm#HwHbAypTdL(6@<=mvd%N zQkP73cXv}CPB4cExH8Hr zR9dNMl-WZB*f~Ua3V1C`?H#MY0*R^toKm_>URD+2h7KTs7*P=&Pi7Gj&r(CfOje+P zFt?7JoTp{7PL{MZM8L#S&O(+`PDicC$POfs3ly+qPy-6^M{5QG1%xD+<>aCiZ7tPU z^H~Lf0(?n|mdsYno>sEH;pIUBhYhhT*-1^kj&-m>@4F3035e9 Ui&^Ep{Qv*}07*qoM6N<$f)e~=1ONa4 literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/PrivateClass_logo.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/PrivateClass_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..590e00640baeca2f541347cc1c5067c255030bba GIT binary patch literal 1836 zcmdT^`&Sa!7N)T^!|2#(lU~J2d<$xV*reb%if{uGAB2xcCr~6EBoS~N3`R%8oA1Z9 zjI?x2^HGvbVw2{xv>MSY!8DVxe2kTOO|w!{=Jd;~yVm^+?p|x3z1KPWoOQnaedlBa z1?)G}hv`Eg5JNJFKm!r}(V==^BvfbjfuJYElj%?>bo^=HBn0wFeULw$sMG1d%HLKu zxBzkwfr3JzfTUsI<@w&3l8(u&mT`$j!bTAk>Lj{8{G)6;Xhe<^xY#~9JI zx3?b|Ud!owO;hVQDqYy%2IZmdeCu=a(B{wGi%O+3M75INIh1s3f~0znAN+9Y`W*B2 zYFSHH*zMJT-gTef-zyY~$j*1CuC)_;*9A8gz*V^|uYx-Nq_)2&cB}^f_O_;`#Wz=Dmm0WGd_5vmZPn;Z@Y$?s-xl010-LVn-j7_WpUmV?gQ z#@BnsDCw;D-Mk{e0y63*g(>ik5-}JIM`rWR*c|KVbAjP(z>W_i1`*!8_i(%|;{uGC z=1*tRXf#K<;z00WJ9@QwgxE5?z#+KKmR3oohFArc09Du>_{D}=45RaiWSTAcoE0S( z@N0$7w#FA*`D6m3Ej=?Wu_-VQ{;qw(T^K2l4WQn_MPTm22Kq5Uga8S_V6a;oN&P@u zQzBZxL5Q(6h7b}0@Ff42os>5;w6y`Ds8kaR|6@St|4;V1Z*vQP`#GOQZH!5*#rSH(*E!w%R>-W{9c69(j2#gn5S*Pqeeq^v zzkL7CbksY8FY>ZH_y6!U8jYr2bRG(APR1>F*_YGqtw{Yg0`Hk*&pV0b&!3yS)ld!| zn-f5urNP6I+p~<`D6nDn7fewiT>32o*H`kl6t(#{?$F=*N%E5432(0YCHDnRmtM{%F+ZC$WQDv++M6`c7mUI8vfQsyf=ACU$>$DI+n##uKp{O$Xh-}+|U_|mnTX|Q;*F+<{u+T@*V3jZ|K z&~S*U?dR?=dYp2%b8#zklwvgU3(HA5ZJ*GQU#Pd#ydxV9O*j5)xBk^zxanB&!TRJbl+-sIOMSY7+S!-!q6vOvO6U|hJ<$tucw(e2>IopzU zf2Q#2*c**a=_FsApXeEHs+lu9>UQWW!OhK72-@dJnVPY@2A%?hObj3>@XYkT0K34m Aj{pDw literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/PrivateMethod.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/PrivateMethod.png new file mode 100644 index 0000000000000000000000000000000000000000..d01f2b314b973da7318cdb98a71a326f383e5864 GIT binary patch literal 918 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vk7#J8E0(?ST z|NsBrx}lMUpA{(2slZdYq28zK9FXna5yY)2U{iVAD08bu#A0RNsVOVc1TDmPHTipb zdQ55!GnYS0Uh*_%;nVQBj{~OMck8;@+}kAODC6$#?$PP#(BP7mmKGHirRd(Fy|8-qYX6HC z9+&iNuNW;|w!-GTq4$nAHfL?^c7FHT`aNmOeB(356Bn%kIv{R`xBWrwnKNf)W>PYjD}zLwkAT3uZo(G~1G(Z;{#vR6}oNlA%PpSD}U zF^_6j=PGB;3=*#Y$WwN}P*Q6H7Al^Atid zb5j`%O!N(m^bL$}PKt5@s!#x_2+mI{DNig)W$;Z*F3QhMP037DaLX)8Ezd8?E>`f3 z*ga881*rD2r;B4q#hhdTK`}8wQQ_$c$qh{j*4F9e`#W^>b~G%TwQJr~Z#{D#1vl?l z|LazJX0WSGSg|%ebAsU9Bi!N!<-8wzw);;`Y~fl`b(`(zvrGw95l%-IFCTC1&!2ls zzwGV0^wWWiW15+nU*5!-t};9e3k&TQp8P2% zX10&@>Zv(AJSVl5iLPpE{gyxy^(5I^ sFWFixmIS`k36rN!*Izp!t?eTtSH52M{Yh~%f!<^AboFyt=akR{02;ETy8r+H literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/PrivateVariable.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/PrivateVariable.png new file mode 100644 index 0000000000000000000000000000000000000000..d76b21d4e9e8656a68989f007945ab14507ae23c GIT binary patch literal 772 zcmV+f1N;1mP)%f|KD9dx9b1xbjG4eNtEH2jam85a{u&(X=GITZxLbNk_B|L=MK=xa7(sn)kg@8o`zfK1-9S*@a5ux7 zfmfd7&Z|n=(z?t5000SaNLh0L01EH`01EH{Laa2H0000WbVXQnQ*UN;cVTj608L?I za&K*AWNBd_Mrm?ocW-iQb0AGvyOAm+0000MbVXQnLvm$dbZKvHAXI5>WdJZVFEBDM zFf-YbT0#H-0Od(UK~#90W8e{Sh>wpK_v7H<0s#g#e~U6rcWa$YHYh)|I4&;C+*d}O z2f|lomMalTR8dirW#a+!op`m(q>74+J*{+kKztWlvm~$d^mHFbLpC7aKvFO=TL8$- z(9YH4VPIntQ#1*-Nlnd2bB@(uW8hJbF68FUi^)(>aJDaCV_;(~R6mrqkrNJ-9N zW6+HbC{^VT@L*JM&I(uJVNf@UHVOzZ($7!fbQ1-dZx^5&WvUzCEm6)Q&B_DjGcf1| zBm@>j=z`qG8lcY2t!~7v&IWNmtEDgym~unB%LM?}VJts-{;Z7v0000paztiFSddoE z=FO+Zs9v~B@b&OYf=WY?JVJfcJk32QO)AOb$urFVKXE`Ry)jqsH71)XJB8YEt>{GE zGvwvuGqv|cy!A6?%sp|-T8&j?o?bnP-A{*1r^4t+dqpBkBPV|V>IRB3Hx05CK!FfuPNGue__LI3~& zAaq4obW?9;ba!ELWdKcKV{&h8Wn^h#AVz6&Wp{6KYjYq?Si6xbBme*ayGcYrRCt_Y z&;kMn2M1Xdeh6R)4Ab%Sw6|x9hYPq^SqVCeF?quTBwVb*o#mC81mFUy;m%?#?D`xC z0cWuYe|IAv4`YZxESp$_l#sZsh-s)UL?ALUMqSb?I@nP<)JGU7U}h%a#vI_K=%}q7 zq~RmZ$N<)8;N{4}qYx4zCu$87;NdY>VCC|)P=g6*o7-s0FmMCSfC?zsMKS0(@xufx vP5c-vI3ex;lft~dN-&p#Ny9iND4!ny)Wjn48}#yJ00000NkvXXu0mjf>`)kw literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/StaticVariable.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/StaticVariable.png new file mode 100644 index 0000000000000000000000000000000000000000..8e820193cf930c4147eba542a1b50626933d1f42 GIT binary patch literal 688 zcmV;h0#E&kP)ugtEVnh;=iW%reFK|K(=fyleQ_jJUz6HFV9ct*geON>7>N>(GgmfJ|kL+1=gU z^~Y`c%U_K>y!eySuyp^oG^8 zOJ%3#Pt*VAzglvk(fQzS|Kx&gliM$y+%{plJI?=wq~ZVfjLxV|_|0oEwD7g7kJ`IY z``=&x-kSgDYyawSp@vA;vQq!uhw#*m-@tNLp5*`PleCyn|MHYq)&I_`O8L%mFH&Tq z00009a7bBm000W`000W`0Ya=am;e9(Aaq4obW?9;ba!ELWdKcKV{&h8Wn^h#AVz6& zWp{6KYjYq?Si6xbBme*a7IZ~ebVG7wVRUJ4ZXi@?ZDjy3G%qkRFEBINl3GFl007WQ zL_t(|oMT{NQ!(J+;Bd9(Wn%#W1{OIVrx+F&;*6wS&87O>I`iFMG>&~Wn?kpl^s3aTqPC~9aZgzBhqu>l3V zEJEUe@?l}Z!7lo83@mJN_9niTy1Jpl!gdkiKmisO)({&oUzpiX1}q>a${hye3fnpI z39x|#*m&f1fLvyFNkfn=ASHU{Ea4lA_OTmCm4hW!rK?49w W#UB-s5zQI^0000H> zJR*x37`Q%wFr(8NlNmrkwg8_H*Xe!L|Ns9N51QZs6k#d}@(cdY@N~O@7mz3J>Eakt raVz;p{QriB|LYZwxwcz9n9R-~pRXx?mgVYJpb`d8S3j3^P6#nkpi;(?AirP+hi5m^fE-m% z7srr_TgeFwOpI(f46|1#2yiGY`Di?KiU>FVdQ I&MBb@06e2A@c;k- literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/Tplus.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/Tplus.png new file mode 100644 index 0000000000000000000000000000000000000000..2c8d8f4fd38259b2ef70fc63fad505fb0a0f55a4 GIT binary patch literal 222 zcmeAS@N?(olHy`uVBq!ia0vp^!ayv*!VDzYUPT51DfSXiUsv`EJiLtRLI=-jc>;wv z3p^r=85p=efH0%e8j~47L4yFF5LY1m|NsB#ebqn)F`$y&;y6$pQ%R6t@PCG<+YP*c zJY!E6$B>F!$pS1)t^$e&6gZd#)XV}^6#`leL>0XheB5$;*x1}$U0qr4a0#d>%86hy4NT6+w`tp00i_>zopr0L}p{>Hq)$ literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/Variable.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/Variable.png new file mode 100644 index 0000000000000000000000000000000000000000..8e820193cf930c4147eba542a1b50626933d1f42 GIT binary patch literal 688 zcmV;h0#E&kP)ugtEVnh;=iW%reFK|K(=fyleQ_jJUz6HFV9ct*geON>7>N>(GgmfJ|kL+1=gU z^~Y`c%U_K>y!eySuyp^oG^8 zOJ%3#Pt*VAzglvk(fQzS|Kx&gliM$y+%{plJI?=wq~ZVfjLxV|_|0oEwD7g7kJ`IY z``=&x-kSgDYyawSp@vA;vQq!uhw#*m-@tNLp5*`PleCyn|MHYq)&I_`O8L%mFH&Tq z00009a7bBm000W`000W`0Ya=am;e9(Aaq4obW?9;ba!ELWdKcKV{&h8Wn^h#AVz6& zWp{6KYjYq?Si6xbBme*a7IZ~ebVG7wVRUJ4ZXi@?ZDjy3G%qkRFEBINl3GFl007WQ zL_t(|oMT{NQ!(J+;Bd9(Wn%#W1{OIVrx+F&;*6wS&87O>I`iFMG>&~Wn?kpl^s3aTqPC~9aZgzBhqu>l3V zEJEUe@?l}Z!7lo83@mJN_9niTy1Jpl!gdkiKmisO)({&oUzpiX1}q>a${hye3fnpI z39x|#*m&f1fLvyFNkfn=ASHU{Ea4lA_OTmCm4hW!rK?49w W#UB-s5zQI^0000(x0NIF%{nuT>i_6Z|J+03z&LVrQvdj0nPvbd zPMvIEmeZ?!4s&x# z#i%Uo#W*vP>T-Bh-n}vA&qc6+7`mT2TL1t632;bRa{vGe@Bjb`@Bu=sG?)MY03dWl zSaefwW^{L9a%BKbVPkS{ZDnL>VIW3na%FdKa%*!SO<22;DkJ~^02XvbSad^jWnpw_ zZ*Cw|X>DZyFf=bPGA}SQ*^*j90002ANklU5Ub z)J&2>v72qTTu7E`nx@t2xdQKkZtdZYg4lY+yP)e911YGU#WzGE3Im~vZA6xzk`9>4 zNL8_RMr5ZhnC39*aq{=8RR=h(7tdcVhw%9H0)imQWkC?GbCM*z2n^6y_rKc*n=K%t TSg55|Cs*qzIWRJ6ld^s^>bP0l+XkKHvAUX literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/file.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/file.png new file mode 100644 index 0000000000000000000000000000000000000000..0bb2427f8afe94b50835b0a6fb2f7fc4b6624bb9 GIT binary patch literal 462 zcmeAS@N?(olHy`uVBq!ia0vp^{6H+o!2~3GGZMc6DV-A6h!W?b)Wnj^{5*w_%-mFl zkkV8IBTEIZ#5@Hf0|O%FdgViBVQqh^b}u-UUD* z&H|6fVg?4j!ywFfJby(BP>?0v(btiIVPik{pF~y$21Zp+7srr_TgiX^|F>tp*udH$ zEiL_V#ftUo-3uDh%uP)G{Qt|SZB_7q!9$E~2FI`q8Re^|Ns4w54;**JyG{r3reJX3bz{Zf3vmrZqg`n}6P+S5*tz>i^H* z#2~u%W)Z8#mr%xxhMwd+SvmjaL%%Odb!ew<(5(2Ban^6jjOpAT8-5&KS>(Rw-29d% zNdZfFap?uEMT+k<(v+DOT$Z%I^ZS1lw?N{?lj=*DIus0-A5UO#>EQ|b(2vWFmuh=~9H|IVo^qIey?Dz1hsy_{P4Pvu|$000SaNLh0L01EH`01EH{Laa2H0000W zbVXQnQ*UN;cVTj608L?Ia&K*AWNBd_Mrm?ocW-iQb0AGvyOAm+0000MbVXQnLvm$d zbZKvHAXI5>WdJZVFEBDMFf-YbT0#H-0F6mRK~#90WyotAfiM_=;n!)RO))lyYKg9G zDu)jI|9{59Wq7{b4-9^S|1r5?yt?|k_gEL_vSjsQJ~o|}aLiJr)OMPgdUXK!BBdrI ziX117J(mLBNUinDT$y2+3p0|WwfAs4W|lcJ!*ci>ABPQvf>`e66oz{@WlRWx5Nh&6 i1*3pkRRDgc|J5D1CKP}NM>^*K0000|Jy16 literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/function_folder.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/function_folder.png new file mode 100644 index 0000000000000000000000000000000000000000..8b3d6e3b12902fd6de044496082464dbc7639d42 GIT binary patch literal 605 zcmV-j0;2tiP)|{;@VQH zutK?#8|2oVPNX5otuVc-H2>T~`qMo_z!(4RRPW0<*~LTu^jkBj5P!Tt|K&_$wm39v z5ILL=BqI z!r&0NoVJJLDxgp-+TMLq>XzlVuBikpI}FsMP+>!akcx{yaKxWv;lIWQI-(jqRCU$Q00000NkvXXu0mjfHW&%O literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/minus.gif b/sites/all/modules/contrib/devel/krumo/docs/media/images/minus.gif new file mode 100644 index 0000000000000000000000000000000000000000..f502662bccc750fa7163df74d83beb34041d8509 GIT binary patch literal 54 zcmZ?wbhEHb>%!0InVFe0X3Tk++2-cv|NsBJy}eg}(|db+t*x!g)adv3 z_j7Y|rn=z0$>ZMM-tX`4KW@&Ajg7^{#b#z^wY9a6sobTdrOeFC+TiVjgM-%A*0aLm zTwGj+qT6qh*h+WM*WK!7W@ee0nXJF&WQx{%o7>so?BwU}l&#?3;^@xa?}MP(t-ap6 zEIdd6000SaNLh0L01m?d01m?e$8V@)0000MbVXQnLvm$dbZKvHAXI5>WdJZVFEKJN zFf-)xbMgQH03dWlSaefwW^{L9a%BKbVPkS{ZDnL>VIW3na%FdKa%*!SO<22;DkJ~^ z0ZK_kK~#90g_GNIgCGzd~1b@PXAis>##hF-Lcwks_T5{Gt1=G+~a%dFwQCnQZU3J+k?=iHfkBIVqw%X0=b%mMM4MWsfC|3Za zJLI<3MRLMm2C;EFN?uzwL|DX3a6V)!kcPBr r4(}qx0<9ZuvwaL3$t_-E{1p8KSMoIIFM}#&00000NkvXXu0mjfmFG8p literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/next_button_disabled.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/next_button_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..4a11780fc0ec50dd27cdb6a52f863c511e32b61a GIT binary patch literal 543 zcmV+)0^t3LP)D z03dWlSaefwW^{L9a%BKbVPkS{ZDnL>VIW3na%FdKa%*!SO<22;DkJ~^02XvbSad^j zWnpw_Z*Cw|X>DZyFf=bQGA}SQTlLsPeLfOt#LNVQ}_yWVA&J!XM&=yzgAag0bSrwNq7QKuW}AeCmE|^Nojv;1W49t( zJ^R_7npd}q|9AEYBEEOSPL(b=(wtUnF~5x!^#c9rjMvp>dVHd>fI6h^x!+-x^4?w{ zA}`WpEJtxdM>gE74H3rQb1zDxCZhMp#IYTl92jdPHrzr4kKJTmn+Eji>=$zWWK{du hHd63A_=WQ``UAH88gT1vi|haZ002ovPDHLkV1oT`@4^58 literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/package.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/package.png new file mode 100644 index 0000000000000000000000000000000000000000..b04cf566d4ac41fa95f87664cf65325cc51e8a64 GIT binary patch literal 668 zcmV;N0%QG&P)t@djQ|x-^8(p z?4%BxbRnvSIo8(J;;cKFW&rs3_^P0a=H}+Wz`&@4HsP26zocrIZ4l3l0QR&iRXPBo zdnn+jGIdY@nPvdLr+C=OsEk?wl583Es}SUx0Hl8}w3Siws0*g0p<_e<_q#u(c^k{N zhsBHlt8)OYia^7{zq@__-VIW3na%FdKa%*!SO<22;DkJ~^02XvbSad^jWnpw_ zZ*Cw|X>DZyFf=bPGA}SQ*^*j90002jNklc}6)3g8( z2ru$H580mZyrWAbSccU12f~7K5mUsGBX6FN7o9)y4In#v$>W9q0000@uL8oa~j{sfyu2e|KUjW+DCy{0JN1+^UXT2cmT$oA=$Mq|M6Jhn+c_M3;+0E zbx;8R*gvs`8movsnPvdrmjLt9Kjg6{xsNKVeGbg7FZ<$8{qAY-)kDUkCzNLg*TZiA z)ja?7TfLMa+qE&-lK}C{I^?=9yq74~zG|$36Zh6a^rZm*+(ZBWW~z4x;hqqmcOiRJ z0IiEc|K?4LUIG8;Po#Y-wvr&V>IRB3Hx05CK!FfuPNGue__LI3~&Aaq4obW?9;ba!ELWdKcKV{&h8 zWn^h#AVz6&Wp{6KYjYq?Si6xbBme*aqDe$SRCt_K&07n zYC8yeE(c9}CP^I;-Xj?!ixGY5~lHzpft}vlT9I`brT10000%q?FnVFe0X3Vv2q^)rKP2vv)}0J@jq_P*4*ihjg4kzX1%?=#l^*vtlzDzt>WeD%*@Qz*49dQ&}@*_ zgM)*ny5P~$Sz@EU>hb z00009a7bBm000id000id0mpBsWB>pF7IZ~ebVG7wVRUJ4ZXi@?ZDjy3G%qnSFEBIY z@^kV4001C#MObuGZ)S9NVRB^vO<`klZ*65{X<;BnX>w(EZ*psMAWc}ikt!qr00BTr zL_t(|oOP4!R>L3+K%uvC@aN(<}}S| z_cY8cJz7aQY#zo&M2jq~x36itf~8liMJ`!c@Asvy$I6;i&)Dnru()HiB+edazpMKd zEoJN8-)<(BGm@V>Kss~sJD&cma7A&3Rf z-i?ioW@cust*yny#e;)`TwGjcW@ee0nN!N#@Bjb+32;bRa{vGi!vFvd!vV){sAK>D z03dWlSaefwW^{L9a%BKbVPkS{ZDnL>VIW3na%FdKa%*!SO<22;DkJ~^02XvbSad^j zWnpw_Z*Cw|X>DZyFf=bQGA}SQx z*6k)+-YhrkG_XnH4KgoalbW`Y#C%zLMG(A8#WIe0Sdy)s;aR#>iI`s&ukbi9->Bn; zl^kv0>?j`lHcTk$X~oOxj`mj&)#BNTkGP5zKdfml{jyB_s;gQ~-J%yw(;cg&WqD+e z@4Tv&%scxQ+Swu0bZj8*=8QhlX_YI61C}V0RhrpeSIKn$X;_d%y$~5a%u?9ODEgSKg~J500000NkvXXu0mjffsXN< literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/private_class_logo.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/private_class_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..590e00640baeca2f541347cc1c5067c255030bba GIT binary patch literal 1836 zcmdT^`&Sa!7N)T^!|2#(lU~J2d<$xV*reb%if{uGAB2xcCr~6EBoS~N3`R%8oA1Z9 zjI?x2^HGvbVw2{xv>MSY!8DVxe2kTOO|w!{=Jd;~yVm^+?p|x3z1KPWoOQnaedlBa z1?)G}hv`Eg5JNJFKm!r}(V==^BvfbjfuJYElj%?>bo^=HBn0wFeULw$sMG1d%HLKu zxBzkwfr3JzfTUsI<@w&3l8(u&mT`$j!bTAk>Lj{8{G)6;Xhe<^xY#~9JI zx3?b|Ud!owO;hVQDqYy%2IZmdeCu=a(B{wGi%O+3M75INIh1s3f~0znAN+9Y`W*B2 zYFSHH*zMJT-gTef-zyY~$j*1CuC)_;*9A8gz*V^|uYx-Nq_)2&cB}^f_O_;`#Wz=Dmm0WGd_5vmZPn;Z@Y$?s-xl010-LVn-j7_WpUmV?gQ z#@BnsDCw;D-Mk{e0y63*g(>ik5-}JIM`rWR*c|KVbAjP(z>W_i1`*!8_i(%|;{uGC z=1*tRXf#K<;z00WJ9@QwgxE5?z#+KKmR3oohFArc09Du>_{D}=45RaiWSTAcoE0S( z@N0$7w#FA*`D6m3Ej=?Wu_-VQ{;qw(T^K2l4WQn_MPTm22Kq5Uga8S_V6a;oN&P@u zQzBZxL5Q(6h7b}0@Ff42os>5;w6y`Ds8kaR|6@St|4;V1Z*vQP`#GOQZH!5*#rSH(*E!w%R>-W{9c69(j2#gn5S*Pqeeq^v zzkL7CbksY8FY>ZH_y6!U8jYr2bRG(APR1>F*_YGqtw{Yg0`Hk*&pV0b&!3yS)ld!| zn-f5urNP6I+p~<`D6nDn7fewiT>32o*H`kl6t(#{?$F=*N%E5432(0YCHDnRmtM{%F+ZC$WQDv++M6`c7mUI8vfQsyf=ACU$>$DI+n##uKp{O$Xh-}+|U_|mnTX|Q;*F+<{u+T@*V3jZ|K z&~S*U?dR?=dYp2%b8#zklwvgU3(HA5ZJ*GQU#Pd#ydxV9O*j5)xBk^zxanB&!TRJbl+-sIOMSY7+S!-!q6vOvO6U|hJ<$tucw(e2>IopzU zf2Q#2*c**a=_FsApXeEHs+lu9>UQWW!OhK72-@dJnVPY@2A%?hObj3>@XYkT0K34m Aj{pDw literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/tutorial.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/tutorial.png new file mode 100644 index 0000000000000000000000000000000000000000..bc19737521daf3fdf8ba84693a6c1db275587a5c GIT binary patch literal 431 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfZXr^pAgre zprHL{KJDGRx2LCv!T8Mo|NkA*ZeG25wYa$W-Me?omMzQgdGzervomMTq@|^;S+i#5 z%$Y4ME$=`5xp(j0`I}#l9z7Zv8M$@qR-kNkbv01-`}gk!y^mPGos9)r!CBxDS#iRWF{)OWfrBD=NDxcEBHq2o~We) zR4WEj>s*wYSdy8arx22vo62BdqHkafM2UK~>Od6>JzX3_D(1wVzsPr3frB+*)nX0d z)r+?ozWcww_=ZWek(`gs#BPRvqA|;NeJ*kO*ruqfcq}a9c#C3L?KpBF@G1}eAg_> R{R!w;22WQ%mvv4FO#oMzwKo6& literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/tutorial_folder.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/tutorial_folder.png new file mode 100644 index 0000000000000000000000000000000000000000..2a468b2a06fa3424ba94773373637d424f91f7e0 GIT binary patch literal 572 zcmV-C0>k}@P)>~W@cuiqoe=KGyn8k-rnBK%*_ATKmXxKdU|^Q=uf|NmyHcL<7#inXPLp`VEqaE{#o000SaNLh0L01FZT01FZU z(%pXi0000MbVXQnLvm$dbZKvHAXI5>WdJZVFEBDMFf-YbT0#H-03dWlSaefwW^{L9 za%BKbVPkS{ZDnL>VIW3na%FdKa%*!SO<22;DkJ~^0HH}lK~#90Rm|HGfj|I&;Z-?S zTE~>lvDmU9)2vA$a-s45?_+lx7yird;s>}vSUUa%B5*H?0lB_-jxz$}S+Eu>Tci^} zf*_zRSBAc7nwO;j`bo#VVd?HJ70@Hv7$8pt&R;?fo08O0cTlDBo5&$ zS2)D&L_ip-Xv-c3iad`)mSr0V%M{(b3i`Z5_cW1MYXWTY*ZT`cP91=4{NC>X0000< KMNUMnLSTaQ$PWMj literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/images/up_button.png b/sites/all/modules/contrib/devel/krumo/docs/media/images/up_button.png new file mode 100644 index 0000000000000000000000000000000000000000..ff36c59356d1d67cf8c4d12cef7b5aff7bf4dbc1 GIT binary patch literal 668 zcmV;N0%QG&P)%Pk4nVFe0X3Tq=+TY{p|NsA1fYZIby?c9mt*x!i*Xj57 z_j7Y|p0wcB-0AP{?>}zNjg5_FW@fduwWXz{lda&z#l@+-;@;%(Zjsl_%*=y>gJX); zOLx%L*4A8HT!y3E-rnA{#N%dWW|^6pp||AZ=k2Gu;O6G$tG?unrQUFp*;j$nOL)=N z-H!7B000SaNLh0L01m?d01m?e$8V@)0000WbVXQnQ*UN;cVTj608L?Ia&K*AWNBd_ zMrm?ocW-iQb0AGvyOAm+0000MbVXQnLvm$dbZKvHAXI5>WdJZVFEKJNFf-)xbMgQH z0aZyvK~#90eUl4s!XOZUanyCl+N~BSZdg%F=FV*U|Nm|WGzj(aC4Hp#g}ZVbsUwYZ z&Rzjil!QBIZEnCM*G;mFfhMO*Sgs&ijd4EZ4F>=mqdHh2`yC0Klf6aD**dot!!VqZ z1kM^tYtrbhSZY~S)mve)l_6jX>4Z|XyI6o$PsyzG!CTd_u;_}+68;72Gqbc*E#XaG z{1KHkUhfaBA749OLuPS0vpzyLTx|WwI-s@b{QWyw?8=I(yrMOhmdva(hL@P@CDfl= z3@+A)(FIx?d>#r*+a&qgfBjDR2CScBhYVBOmN=QV;cFbnb7;T&7X-qIrqsl*m$}d$CKcW835(Ow@m?{E zuz;N49J94VK$=2) { + this.childNodes[this.childNodes.length -2]._last = false; + } + while (root.parentNode) { root = root.parentNode; } + if (root.rendered) { + if (this.childNodes.length >= 2) { + document.getElementById(this.childNodes[this.childNodes.length -2].id + '-plus').src = ((this.childNodes[this.childNodes.length -2].folder)?webFXTreeConfig.tMinusIcon:webFXTreeConfig.tIcon); + if (this.childNodes[this.childNodes.length -2].folder) { + this.childNodes[this.childNodes.length -2].plusIcon = webFXTreeConfig.tPlusIcon; + this.childNodes[this.childNodes.length -2].minusIcon = webFXTreeConfig.tMinusIcon; + } + this.childNodes[this.childNodes.length -2]._last = false; + } + this._last = true; + var foo = this; + while (foo.parentNode) { + for (var i = 0; i < foo.parentNode.childNodes.length; i++) { + if (foo.id == foo.parentNode.childNodes[i].id) { break; } + } + if (++i == foo.parentNode.childNodes.length) { foo.parentNode._last = true; } + else { foo.parentNode._last = false; } + foo = foo.parentNode; + } + document.getElementById(this.id + '-cont').insertAdjacentHTML("beforeEnd", node.toString()); + if ((!this.folder) && (!this.openIcon)) { + this.icon = webFXTreeConfig.folderIcon; + this.openIcon = webFXTreeConfig.openFolderIcon; + } + this.folder = true; + this.indent(); + this.expand(); + } + return node; +} + +WebFXTreeAbstractNode.prototype.toggle = function() { + if (this.folder) { + if (this.open) { this.collapse(); } + else { this.expand(); } + } +} + +WebFXTreeAbstractNode.prototype.select = function() { + document.getElementById(this.id + '-anchor').focus(); +} + +WebFXTreeAbstractNode.prototype.focus = function() { + webFXTreeHandler.selected = this; + if ((this.openIcon) && (webFXTreeHandler.behavior != 'classic')) { document.getElementById(this.id + '-icon').src = this.openIcon; } + document.getElementById(this.id + '-anchor').style.backgroundColor = 'highlight'; + document.getElementById(this.id + '-anchor').style.color = 'highlighttext'; + document.getElementById(this.id + '-anchor').focus(); +} + +WebFXTreeAbstractNode.prototype.blur = function() { + if ((this.openIcon) && (webFXTreeHandler.behavior != 'classic')) { document.getElementById(this.id + '-icon').src = this.icon; } + document.getElementById(this.id + '-anchor').style.backgroundColor = 'transparent'; + document.getElementById(this.id + '-anchor').style.color = 'menutext'; +} + +WebFXTreeAbstractNode.prototype.doExpand = function() { + if (webFXTreeHandler.behavior == 'classic') { document.getElementById(this.id + '-icon').src = this.openIcon; } + if (this.childNodes.length) { document.getElementById(this.id + '-cont').style.display = 'block'; } + this.open = true; + webFXTreeHandler.cookies.setCookie(this.id.substr(18,this.id.length - 18), '1'); +} + +WebFXTreeAbstractNode.prototype.doCollapse = function() { + if (webFXTreeHandler.behavior == 'classic') { document.getElementById(this.id + '-icon').src = this.icon; } + if (this.childNodes.length) { document.getElementById(this.id + '-cont').style.display = 'none'; } + this.open = false; + webFXTreeHandler.cookies.setCookie(this.id.substr(18,this.id.length - 18), '0'); +} + +WebFXTreeAbstractNode.prototype.expandAll = function() { + this.expandChildren(); + if ((this.folder) && (!this.open)) { this.expand(); } +} + +WebFXTreeAbstractNode.prototype.expandChildren = function() { + for (var i = 0; i < this.childNodes.length; i++) { + this.childNodes[i].expandAll(); +} } + +WebFXTreeAbstractNode.prototype.collapseAll = function() { + if ((this.folder) && (this.open)) { this.collapse(); } + this.collapseChildren(); +} + +WebFXTreeAbstractNode.prototype.collapseChildren = function() { + for (var i = 0; i < this.childNodes.length; i++) { + this.childNodes[i].collapseAll(); +} } + +WebFXTreeAbstractNode.prototype.indent = function(lvl, del, last, level) { + /* + * Since we only want to modify items one level below ourself, + * and since the rightmost indentation position is occupied by + * the plus icon we set this to -2 + */ + if (lvl == null) { lvl = -2; } + var state = 0; + for (var i = this.childNodes.length - 1; i >= 0 ; i--) { + state = this.childNodes[i].indent(lvl + 1, del, last, level); + if (state) { return; } + } + if (del) { + if (level >= this._level) { + if (this.folder) { + document.getElementById(this.id + '-plus').src = (this.open)?webFXTreeConfig.lMinusIcon:webFXTreeConfig.lPlusIcon; + this.plusIcon = webFXTreeConfig.lPlusIcon; + this.minusIcon = webFXTreeConfig.lMinusIcon; + } + else { document.getElementById(this.id + '-plus').src = webFXTreeConfig.lIcon; } + return 1; + } + } + var foo = document.getElementById(this.id + '-indent-' + lvl); + if (foo) { + if ((del) && (last)) { foo._last = true; } + if (foo._last) { foo.src = webFXTreeConfig.blankIcon; } + else { foo.src = webFXTreeConfig.iIcon; } + } + return 0; +} + +/* + * WebFXTree class + */ + +function WebFXTree(sText, sAction, sBehavior, sIcon, sOpenIcon) { + this.base = WebFXTreeAbstractNode; + this.base(sText, sAction); + this.icon = sIcon || webFXTreeConfig.rootIcon; + this.openIcon = sOpenIcon || webFXTreeConfig.openRootIcon; + /* Defaults to open */ + this.open = (webFXTreeHandler.cookies.getCookie(this.id.substr(18,this.id.length - 18)) == '0')?false:true; + this.folder = true; + this.rendered = false; + if (!webFXTreeHandler.behavior) { webFXTreeHandler.behavior = sBehavior || webFXTreeConfig.defaultBehavior; } + this.targetWindow = 'right'; +} + +WebFXTree.prototype = new WebFXTreeAbstractNode; + +WebFXTree.prototype.setBehavior = function (sBehavior) { + webFXTreeHandler.behavior = sBehavior; +}; + +WebFXTree.prototype.getBehavior = function (sBehavior) { + return webFXTreeHandler.behavior; +}; + +WebFXTree.prototype.getSelected = function() { + if (webFXTreeHandler.selected) { return webFXTreeHandler.selected; } + else { return null; } +} + +WebFXTree.prototype.remove = function() { } + +WebFXTree.prototype.expand = function() { + this.doExpand(); +} + +WebFXTree.prototype.collapse = function() { + this.focus(); + this.doCollapse(); +} + +WebFXTree.prototype.getFirst = function() { + return null; +} + +WebFXTree.prototype.getLast = function() { + return null; +} + +WebFXTree.prototype.getNextSibling = function() { + return null; +} + +WebFXTree.prototype.getPreviousSibling = function() { + return null; +} + +WebFXTree.prototype.keydown = function(key) { + if (key == 39) { this.expand(); return false; } + if (key == 37) { this.collapse(); return false; } + if ((key == 40) && (this.open)) { this.childNodes[0].select(); return false; } + return true; +} + +WebFXTree.prototype.toString = function() { + var str = "
    "; + str += "" + this.text + "
    "; + str += "
    "; + for (var i = 0; i < this.childNodes.length; i++) { + str += this.childNodes[i].toString(i, this.childNodes.length); + } + str += "
    "; + this.rendered = true; + return str; +}; + +/* + * WebFXTreeItem class + */ + +function WebFXTreeItem(sText, sAction, eParent, sIcon, sOpenIcon) { + this.base = WebFXTreeAbstractNode; + this.base(sText, sAction); + /* Defaults to close */ + this.open = (webFXTreeHandler.cookies.getCookie(this.id.substr(18,this.id.length - 18)) == '1')?true:false; + if (eParent) { eParent.add(this); } + if (sIcon) { this.icon = sIcon; } + if (sOpenIcon) { this.openIcon = sOpenIcon; } +} + +WebFXTreeItem.prototype = new WebFXTreeAbstractNode; + +WebFXTreeItem.prototype.remove = function() { + var parentNode = this.parentNode; + var prevSibling = this.getPreviousSibling(true); + var nextSibling = this.getNextSibling(true); + var folder = this.parentNode.folder; + var last = ((nextSibling) && (nextSibling.parentNode) && (nextSibling.parentNode.id == parentNode.id))?false:true; + this.getPreviousSibling().focus(); + this._remove(); + if (parentNode.childNodes.length == 0) { + parentNode.folder = false; + parentNode.open = false; + } + if (last) { + if (parentNode.id == prevSibling.id) { + document.getElementById(parentNode.id + '-icon').src = webFXTreeConfig.fileIcon; + } + else { } + } + if ((!prevSibling.parentNode) || (prevSibling.parentNode != parentNode)) { + parentNode.indent(null, true, last, this._level); + } + if (document.getElementById(prevSibling.id + '-plus')) { + if (nextSibling) { + if ((parentNode == prevSibling) && (parentNode.getNextSibling)) { document.getElementById(prevSibling.id + '-plus').src = webFXTreeConfig.tIcon; } + else if (nextSibling.parentNode != prevSibling) { document.getElementById(prevSibling.id + '-plus').src = webFXTreeConfig.lIcon; } + } + else { document.getElementById(prevSibling.id + '-plus').src = webFXTreeConfig.lIcon; } + } +} + +WebFXTreeItem.prototype._remove = function() { + for (var i = this.childNodes.length - 1; i >= 0; i--) { + this.childNodes[i]._remove(); + } + for (var i = 0; i < this.parentNode.childNodes.length; i++) { + if (this.id == this.parentNode.childNodes[i].id) { + for (var j = i; j < this.parentNode.childNodes.length; j++) { + this.parentNode.childNodes[i] = this.parentNode.childNodes[i+1] + } + this.parentNode.childNodes.length = this.parentNode.childNodes.length - 1; + if (i + 1 == this.parentNode.childNodes.length) { this.parentNode._last = true; } + } + } + webFXTreeHandler.all[this.id] = null; + if (document.getElementById(this.id)) { + document.getElementById(this.id).innerHTML = ""; + document.getElementById(this.id).removeNode(); + } +} + +WebFXTreeItem.prototype.expand = function() { + this.doExpand(); + document.getElementById(this.id + '-plus').src = this.minusIcon; +} + +WebFXTreeItem.prototype.collapse = function() { + this.focus(); + this.doCollapse(); + document.getElementById(this.id + '-plus').src = this.plusIcon; +} + +WebFXTreeItem.prototype.getFirst = function() { + return this.childNodes[0]; +} + +WebFXTreeItem.prototype.getLast = function() { + if (this.childNodes[this.childNodes.length - 1].open) { return this.childNodes[this.childNodes.length - 1].getLast(); } + else { return this.childNodes[this.childNodes.length - 1]; } +} + +WebFXTreeItem.prototype.getNextSibling = function() { + for (var i = 0; i < this.parentNode.childNodes.length; i++) { + if (this == this.parentNode.childNodes[i]) { break; } + } + if (++i == this.parentNode.childNodes.length) { return this.parentNode.getNextSibling(); } + else { return this.parentNode.childNodes[i]; } +} + +WebFXTreeItem.prototype.getPreviousSibling = function(b) { + for (var i = 0; i < this.parentNode.childNodes.length; i++) { + if (this == this.parentNode.childNodes[i]) { break; } + } + if (i == 0) { return this.parentNode; } + else { + if ((this.parentNode.childNodes[--i].open) || (b && this.parentNode.childNodes[i].folder)) { return this.parentNode.childNodes[i].getLast(); } + else { return this.parentNode.childNodes[i]; } +} } + +WebFXTreeItem.prototype.keydown = function(key) { + if ((key == 39) && (this.folder)) { + if (!this.open) { this.expand(); return false; } + else { this.getFirst().select(); return false; } + } + else if (key == 37) { + if (this.open) { this.collapse(); return false; } + else { this.parentNode.select(); return false; } + } + else if (key == 40) { + if (this.open) { this.getFirst().select(); return false; } + else { + var sib = this.getNextSibling(); + if (sib) { sib.select(); return false; } + } } + else if (key == 38) { this.getPreviousSibling().select(); return false; } + return true; +} + +WebFXTreeItem.prototype.toString = function (nItem, nItemCount) { + var foo = this.parentNode; + var indent = ''; + if (nItem + 1 == nItemCount) { this.parentNode._last = true; } + var i = 0; + while (foo.parentNode) { + foo = foo.parentNode; + indent = "" + indent; + i++; + } + this._level = i; + if (this.childNodes.length) { this.folder = 1; } + else { this.open = false; } + if ((this.folder) || (webFXTreeHandler.behavior != 'classic')) { + if (!this.icon) { this.icon = webFXTreeConfig.folderIcon; } + if (!this.openIcon) { this.openIcon = webFXTreeConfig.openFolderIcon; } + } + else if (!this.icon) { this.icon = webFXTreeConfig.fileIcon; } + var label = this.text; + label = label.replace('<', '<'); + label = label.replace('>', '>'); + var str = "
    "; + str += indent; + str += "" + str += "" + label + "
    "; + str += "
    "; + for (var i = 0; i < this.childNodes.length; i++) { + str += this.childNodes[i].toString(i,this.childNodes.length); + } + str += "
    "; + this.plusIcon = ((this.parentNode._last)?webFXTreeConfig.lPlusIcon:webFXTreeConfig.tPlusIcon); + this.minusIcon = ((this.parentNode._last)?webFXTreeConfig.lMinusIcon:webFXTreeConfig.tMinusIcon); + return str; +} \ No newline at end of file diff --git a/sites/all/modules/contrib/devel/krumo/docs/media/stylesheet.css b/sites/all/modules/contrib/devel/krumo/docs/media/stylesheet.css new file mode 100644 index 0000000..498826a --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/docs/media/stylesheet.css @@ -0,0 +1,181 @@ +a { color: #000090; text-decoration: none; } +a:hover, a:active, a:focus { color: highlighttext; background-color: highlight; text-decoration: none; } + +body { background : #FFFFFF; } +body, table { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; } + +a img { border: 0px; } + +/* Page layout/boxes */ + +.info-box { } +.info-box-title { margin: 1em 0em 0em 0em; font-weight: normal; font-size: 14pt; color: #999999; border-bottom: 2px solid #999999; } +.info-box-body { border: 1px solid #999999; padding: .5em; } +.nav-bar { font-size: 8pt; white-space: nowrap; text-align: right; padding: .2em; margin: 0em 0em 1em 0em; } + +.oddrow { background-color: #F8F8F8; border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em} +.evenrow { border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em} + +.page-body { max-width: 800px; margin: auto; } +.tree { } + +/* Index formatting classes */ + +.index-item-body { margin-top: .5em; margin-bottom: .5em} +.index-item-description { margin-top: .25em } +.index-item-details { font-weight: normal; font-style: italic; font-size: 8pt } +.index-letter-section { background-color: #EEEEEE; border: 1px dotted #999999; padding: .5em; margin-bottom: 1em} +.index-letter-title { font-size: 12pt; font-weight: bold } +.index-letter-menu { text-align: center; margin: 1em } +.index-letter { font-size: 12pt } + +/* Docbook classes */ + +.description {} +.short-description { font-weight: bold; color: #666666; } +.tags { padding-left: 0em; margin-left: 3em; color: #666666; list-style-type: square; } +.parameters { padding-left: 0em; margin-left: 3em; color: #014fbe; list-style-type: square; } +.redefinitions { font-size: 8pt; padding-left: 0em; margin-left: 2em; } +.package { font-weight: bold; } +.package-title { font-weight: bold; font-size: 14pt; border-bottom: 1px solid black } +.sub-package { font-weight: bold; } +.tutorial { border-width: thin; border-color: #0066ff; } +.tutorial-nav-box { width: 100%; border: 1px solid #999999; background-color: #F8F8F8; } + +/* Generic formatting */ + +.field { font-weight: bold; } +.detail { font-size: 8pt; } +.notes { font-style: italic; font-size: 8pt; } +.separator { background-color: #999999; height: 2px; } +.warning { color: #FF6600; } +.disabled { font-style: italic; color: #999999; } + +/* Code elements */ + +.line-number { } + +.class-table { width: 100%; } +.class-table-header { border-bottom: 1px dotted #666666; text-align: left} +.class-name { color: #0000AA; font-weight: bold; } + +.method-summary { color: #009000; padding-left: 1em; font-size: 8pt; } +.method-header { } +.method-definition { margin-bottom: .2em } +.method-title { color: #009000; font-weight: bold; } +.method-name { font-weight: bold; } +.method-signature { font-size: 85%; color: #666666; margin: .5em 0em } +.method-result { font-style: italic; } + +.var-summary { padding-left: 1em; font-size: 8pt; } +.var-header { } +.var-title { color: #014fbe; margin-bottom: .3em } +.var-type { font-style: italic; } +.var-name { font-weight: bold; } +.var-default {} +.var-description { font-weight: normal; color: #000000; } + +.include-title { color: #014fbe;} +.include-type { font-style: italic; } +.include-name { font-weight: bold; } + +.const-title { color: #FF6600; } +.const-name { font-weight: bold; } + +/* Syntax highlighting */ + +.src-code { font-family: 'Courier New', Courier, monospace; font-weight: normal; } +.src-line { font-family: 'Courier New', Courier, monospace; font-weight: normal; } + +.src-code a:link { padding: 1px; text-decoration: underline; color: #0000DD; } +.src-code a:visited { text-decoration: underline; color: #0000DD; } +.src-code a:active { background-color: #FFFF66; color: #008000; } +.src-code a:hover { background-color: #FFFF66; text-decoration: overline underline; color: #008000; } + +.src-comm { color: #666666; } +.src-id { color: #FF6600; font-style: italic; } +.src-inc { color: #0000AA; font-weight: bold; } +.src-key { color: #0000AA; font-weight: bold; } +.src-num { color: #CC0000; } +.src-str { color: #CC0000; } +.src-sym { } +.src-var { } + +.src-php { font-weight: bold; } + +.src-doc { color: #666666; } +.src-doc-close-template { color: #666666 } +.src-doc-coretag { color: #008000; } +.src-doc-inlinetag {} +.src-doc-internal {} +.src-doc-tag { color: #0080CC; } +.src-doc-template { color: #666666 } +.src-doc-type { font-style: italic; color: #444444 } +.src-doc-var { color: #444444 } + +.tute-tag { color: #009999 } +.tute-attribute-name { color: #0000FF } +.tute-attribute-value { color: #0099FF } +.tute-entity { font-weight: bold; } +.tute-comment { font-style: italic } +.tute-inline-tag { color: #636311; font-weight: bold } + +/* tutorial */ + +.authors { } +.author { font-style: italic; font-weight: bold } +.author-blurb { margin: .5em 0em .5em 2em; font-size: 85%; font-weight: normal; font-style: normal } +.example { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; } +.listing { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; white-space: nowrap; } +.release-info { font-size: 85%; font-style: italic; margin: 1em 0em } +.ref-title-box { } +.ref-title { } +.ref-purpose { font-style: italic; color: #666666 } +.ref-synopsis { } +.title { font-weight: bold; border-bottom: 1px solid #999999; color: #999999; } +.cmd-synopsis { margin: 1em 0em } +.cmd-title { font-weight: bold } +.toc { margin-left: 2em; padding-left: 0em } + +/*------------------------------------------------------------------------------ + webfx-tree +------------------------------------------------------------------------------*/ + +.webfx-tree-container { + margin: 0px; + padding: 0px; + white-space: nowrap; + font: icon; +} + +.webfx-tree-item { + padding: 0px; + margin: 0px; + color: black; + white-space: nowrap; + font: icon; +} + +.webfx-tree-item a { + margin-left: 3px; + padding: 1px 2px 1px 2px; + color: black; + text-decoration: none; +} + +.webfx-tree-item a:hover, .webfx-tree-item a:active { + color: highlighttext; + background: highlight; + text-decoration: none +} + +.webfx-tree-item img { + vertical-align: middle; + border: 0px; +} + +.webfx-tree-icon { + width: 16px; + height: 16px; +} + diff --git a/sites/all/modules/contrib/devel/krumo/docs/packages.html b/sites/all/modules/contrib/devel/krumo/docs/packages.html new file mode 100644 index 0000000..a4852e3 --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/docs/packages.html @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sites/all/modules/contrib/devel/krumo/docs/ric_INSTALL.html b/sites/all/modules/contrib/devel/krumo/docs/ric_INSTALL.html new file mode 100644 index 0000000..8851703 --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/docs/ric_INSTALL.html @@ -0,0 +1,49 @@ + + + + + + + + + +

    INSTALL

    +
    +------------------------------------------------------------------------------
    +
    +                     SETUP: How to install Krumo ?
    +
    +------------------------------------------------------------------------------
    +
    +In order to use Krumo you have to put it on your (development) server, and 
    +include it in your script. You can put it somewhere in the INCLUDE_PATH, or 
    +specify the full path to the "class.krumo.php" file.
    +
    +You have to modify the "krumo.ini" file too. It is the configuration file for 
    +Krumo. The first option is choosing a skin:
    +
    + [skin]
    + selected = "orange"
    +
    +The value for this setting has to be the name of one of the sub-folders from the 
    +"Krumo/skins/" folder. If the value provided for the skin results in not finding 
    +the skin, the `default` skin will be used instead.
    +
    +The second option is used to set the correct web path to the folder where Krumo 
    +is installed. This is used in order to make the images from Krumo's CSS skins 
    +web-accessible.
    +
    + [css]
    + url = "http://www.example.com/Krumo/"
    +
    +So far those two are the only configuration options.
    +
    +All the CSS files ("skin.css") from the "Krumo/skins/" sub-folders must have the 
    +proper permissions in order to be readable from Krumo. Same applies for 
    +"krumo.ini" and "krumo.js" files.
    +
    +

    + Documentation generated on Sun, 02 Dec 2007 09:43:22 +0200 by phpDocumentor 1.4.0a2 +

    + + \ No newline at end of file diff --git a/sites/all/modules/contrib/devel/krumo/docs/ric_LICENSE.html b/sites/all/modules/contrib/devel/krumo/docs/ric_LICENSE.html new file mode 100644 index 0000000..aa2cad1 --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/docs/ric_LICENSE.html @@ -0,0 +1,522 @@ + + + + + + + + + +

    LICENSE

    +
    +		  GNU LESSER GENERAL PUBLIC LICENSE
    +		       Version 2.1, February 1999
    +
    + Copyright (C) 1991, 1999 Free Software Foundation, Inc.
    +     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    + Everyone is permitted to copy and distribute verbatim copies
    + of this license document, but changing it is not allowed.
    +
    +[This is the first released version of the Lesser GPL.  It also counts
    + as the successor of the GNU Library Public License, version 2, hence
    + the version number 2.1.]
    +
    +			    Preamble
    +
    +  The licenses for most software are designed to take away your
    +freedom to share and change it.  By contrast, the GNU General Public
    +Licenses are intended to guarantee your freedom to share and change
    +free software--to make sure the software is free for all its users.
    +
    +  This license, the Lesser General Public License, applies to some
    +specially designated software packages--typically libraries--of the
    +Free Software Foundation and other authors who decide to use it.  You
    +can use it too, but we suggest you first think carefully about whether
    +this license or the ordinary General Public License is the better
    +strategy to use in any particular case, based on the explanations below.
    +
    +  When we speak of free software, we are referring to freedom of use,
    +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 and use pieces of
    +it in new free programs; and that you are informed that you can do
    +these things.
    +
    +  To protect your rights, we need to make restrictions that forbid
    +distributors to deny you these rights or to ask you to surrender these
    +rights.  These restrictions translate to certain responsibilities for
    +you if you distribute copies of the library or if you modify it.
    +
    +  For example, if you distribute copies of the library, whether gratis
    +or for a fee, you must give the recipients all the rights that we gave
    +you.  You must make sure that they, too, receive or can get the source
    +code.  If you link other code with the library, you must provide
    +complete object files to the recipients, so that they can relink them
    +with the library after making changes to the library and recompiling
    +it.  And you must show them these terms so they know their rights.
    +
    +  We protect your rights with a two-step method: (1) we copyright the
    +library, and (2) we offer you this license, which gives you legal
    +permission to copy, distribute and/or modify the library.
    +
    +  To protect each distributor, we want to make it very clear that
    +there is no warranty for the free library.  Also, if the library is
    +modified by someone else and passed on, the recipients should know
    +that what they have is not the original version, so that the original
    +author's reputation will not be affected by problems that might be
    +introduced by others.
    +
    +  Finally, software patents pose a constant threat to the existence of
    +any free program.  We wish to make sure that a company cannot
    +effectively restrict the users of a free program by obtaining a
    +restrictive license from a patent holder.  Therefore, we insist that
    +any patent license obtained for a version of the library must be
    +consistent with the full freedom of use specified in this license.
    +
    +  Most GNU software, including some libraries, is covered by the
    +ordinary GNU General Public License.  This license, the GNU Lesser
    +General Public License, applies to certain designated libraries, and
    +is quite different from the ordinary General Public License.  We use
    +this license for certain libraries in order to permit linking those
    +libraries into non-free programs.
    +
    +  When a program is linked with a library, whether statically or using
    +a shared library, the combination of the two is legally speaking a
    +combined work, a derivative of the original library.  The ordinary
    +General Public License therefore permits such linking only if the
    +entire combination fits its criteria of freedom.  The Lesser General
    +Public License permits more lax criteria for linking other code with
    +the library.
    +
    +  We call this license the "Lesser" General Public License because it
    +does Less to protect the user's freedom than the ordinary General
    +Public License.  It also provides other free software developers Less
    +of an advantage over competing non-free programs.  These disadvantages
    +are the reason we use the ordinary General Public License for many
    +libraries.  However, the Lesser license provides advantages in certain
    +special circumstances.
    +
    +  For example, on rare occasions, there may be a special need to
    +encourage the widest possible use of a certain library, so that it becomes
    +a de-facto standard.  To achieve this, non-free programs must be
    +allowed to use the library.  A more frequent case is that a free
    +library does the same job as widely used non-free libraries.  In this
    +case, there is little to gain by limiting the free library to free
    +software only, so we use the Lesser General Public License.
    +
    +  In other cases, permission to use a particular library in non-free
    +programs enables a greater number of people to use a large body of
    +free software.  For example, permission to use the GNU C Library in
    +non-free programs enables many more people to use the whole GNU
    +operating system, as well as its variant, the GNU/Linux operating
    +system.
    +
    +  Although the Lesser General Public License is Less protective of the
    +users' freedom, it does ensure that the user of a program that is
    +linked with the Library has the freedom and the wherewithal to run
    +that program using a modified version of the Library.
    +
    +  The precise terms and conditions for copying, distribution and
    +modification follow.  Pay close attention to the difference between a
    +"work based on the library" and a "work that uses the library".  The
    +former contains code derived from the library, whereas the latter must
    +be combined with the library in order to run.
    +
    +		  GNU LESSER GENERAL PUBLIC LICENSE
    +   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
    +
    +  0. This License Agreement applies to any software library or other
    +program which contains a notice placed by the copyright holder or
    +other authorized party saying it may be distributed under the terms of
    +this Lesser General Public License (also called "this License").
    +Each licensee is addressed as "you".
    +
    +  A "library" means a collection of software functions and/or data
    +prepared so as to be conveniently linked with application programs
    +(which use some of those functions and data) to form executables.
    +
    +  The "Library", below, refers to any such software library or work
    +which has been distributed under these terms.  A "work based on the
    +Library" means either the Library or any derivative work under
    +copyright law: that is to say, a work containing the Library or a
    +portion of it, either verbatim or with modifications and/or translated
    +straightforwardly into another language.  (Hereinafter, translation is
    +included without limitation in the term "modification".)
    +
    +  "Source code" for a work means the preferred form of the work for
    +making modifications to it.  For a library, 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 library.
    +
    +  Activities other than copying, distribution and modification are not
    +covered by this License; they are outside its scope.  The act of
    +running a program using the Library is not restricted, and output from
    +such a program is covered only if its contents constitute a work based
    +on the Library (independent of the use of the Library in a tool for
    +writing it).  Whether that is true depends on what the Library does
    +and what the program that uses the Library does.
    +  
    +  1. You may copy and distribute verbatim copies of the Library's
    +complete 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 distribute a copy of this License along with the
    +Library.
    +
    +  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 Library or any portion
    +of it, thus forming a work based on the Library, 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) The modified work must itself be a software library.
    +
    +    b) You must cause the files modified to carry prominent notices
    +    stating that you changed the files and the date of any change.
    +
    +    c) You must cause the whole of the work to be licensed at no
    +    charge to all third parties under the terms of this License.
    +
    +    d) If a facility in the modified Library refers to a function or a
    +    table of data to be supplied by an application program that uses
    +    the facility, other than as an argument passed when the facility
    +    is invoked, then you must make a good faith effort to ensure that,
    +    in the event an application does not supply such function or
    +    table, the facility still operates, and performs whatever part of
    +    its purpose remains meaningful.
    +
    +    (For example, a function in a library to compute square roots has
    +    a purpose that is entirely well-defined independent of the
    +    application.  Therefore, Subsection 2d requires that any
    +    application-supplied function or table used by this function must
    +    be optional: if the application does not supply it, the square
    +    root function must still compute square roots.)
    +
    +These requirements apply to the modified work as a whole.  If
    +identifiable sections of that work are not derived from the Library,
    +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 Library, 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 Library.
    +
    +In addition, mere aggregation of another work not based on the Library
    +with the Library (or with a work based on the Library) on a volume of
    +a storage or distribution medium does not bring the other work under
    +the scope of this License.
    +
    +  3. You may opt to apply the terms of the ordinary GNU General Public
    +License instead of this License to a given copy of the Library.  To do
    +this, you must alter all the notices that refer to this License, so
    +that they refer to the ordinary GNU General Public License, version 2,
    +instead of to this License.  (If a newer version than version 2 of the
    +ordinary GNU General Public License has appeared, then you can specify
    +that version instead if you wish.)  Do not make any other change in
    +these notices.
    +
    +  Once this change is made in a given copy, it is irreversible for
    +that copy, so the ordinary GNU General Public License applies to all
    +subsequent copies and derivative works made from that copy.
    +
    +  This option is useful when you wish to copy part of the code of
    +the Library into a program that is not a library.
    +
    +  4. You may copy and distribute the Library (or a portion or
    +derivative of it, under Section 2) in object code or executable form
    +under the terms of Sections 1 and 2 above provided that you 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.
    +
    +  If distribution of 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 satisfies the requirement to
    +distribute the source code, even though third parties are not
    +compelled to copy the source along with the object code.
    +
    +  5. A program that contains no derivative of any portion of the
    +Library, but is designed to work with the Library by being compiled or
    +linked with it, is called a "work that uses the Library".  Such a
    +work, in isolation, is not a derivative work of the Library, and
    +therefore falls outside the scope of this License.
    +
    +  However, linking a "work that uses the Library" with the Library
    +creates an executable that is a derivative of the Library (because it
    +contains portions of the Library), rather than a "work that uses the
    +library".  The executable is therefore covered by this License.
    +Section 6 states terms for distribution of such executables.
    +
    +  When a "work that uses the Library" uses material from a header file
    +that is part of the Library, the object code for the work may be a
    +derivative work of the Library even though the source code is not.
    +Whether this is true is especially significant if the work can be
    +linked without the Library, or if the work is itself a library.  The
    +threshold for this to be true is not precisely defined by law.
    +
    +  If such an object file uses only numerical parameters, data
    +structure layouts and accessors, and small macros and small inline
    +functions (ten lines or less in length), then the use of the object
    +file is unrestricted, regardless of whether it is legally a derivative
    +work.  (Executables containing this object code plus portions of the
    +Library will still fall under Section 6.)
    +
    +  Otherwise, if the work is a derivative of the Library, you may
    +distribute the object code for the work under the terms of Section 6.
    +Any executables containing that work also fall under Section 6,
    +whether or not they are linked directly with the Library itself.
    +
    +  6. As an exception to the Sections above, you may also combine or
    +link a "work that uses the Library" with the Library to produce a
    +work containing portions of the Library, and distribute that work
    +under terms of your choice, provided that the terms permit
    +modification of the work for the customer's own use and reverse
    +engineering for debugging such modifications.
    +
    +  You must give prominent notice with each copy of the work that the
    +Library is used in it and that the Library and its use are covered by
    +this License.  You must supply a copy of this License.  If the work
    +during execution displays copyright notices, you must include the
    +copyright notice for the Library among them, as well as a reference
    +directing the user to the copy of this License.  Also, you must do one
    +of these things:
    +
    +    a) Accompany the work with the complete corresponding
    +    machine-readable source code for the Library including whatever
    +    changes were used in the work (which must be distributed under
    +    Sections 1 and 2 above); and, if the work is an executable linked
    +    with the Library, with the complete machine-readable "work that
    +    uses the Library", as object code and/or source code, so that the
    +    user can modify the Library and then relink to produce a modified
    +    executable containing the modified Library.  (It is understood
    +    that the user who changes the contents of definitions files in the
    +    Library will not necessarily be able to recompile the application
    +    to use the modified definitions.)
    +
    +    b) Use a suitable shared library mechanism for linking with the
    +    Library.  A suitable mechanism is one that (1) uses at run time a
    +    copy of the library already present on the user's computer system,
    +    rather than copying library functions into the executable, and (2)
    +    will operate properly with a modified version of the library, if
    +    the user installs one, as long as the modified version is
    +    interface-compatible with the version that the work was made with.
    +
    +    c) Accompany the work with a written offer, valid for at
    +    least three years, to give the same user the materials
    +    specified in Subsection 6a, above, for a charge no more
    +    than the cost of performing this distribution.
    +
    +    d) If distribution of the work is made by offering access to copy
    +    from a designated place, offer equivalent access to copy the above
    +    specified materials from the same place.
    +
    +    e) Verify that the user has already received a copy of these
    +    materials or that you have already sent this user a copy.
    +
    +  For an executable, the required form of the "work that uses the
    +Library" must include any data and utility programs needed for
    +reproducing the executable from it.  However, as a special exception,
    +the materials to be 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.
    +
    +  It may happen that this requirement contradicts the license
    +restrictions of other proprietary libraries that do not normally
    +accompany the operating system.  Such a contradiction means you cannot
    +use both them and the Library together in an executable that you
    +distribute.
    +
    +  7. You may place library facilities that are a work based on the
    +Library side-by-side in a single library together with other library
    +facilities not covered by this License, and distribute such a combined
    +library, provided that the separate distribution of the work based on
    +the Library and of the other library facilities is otherwise
    +permitted, and provided that you do these two things:
    +
    +    a) Accompany the combined library with a copy of the same work
    +    based on the Library, uncombined with any other library
    +    facilities.  This must be distributed under the terms of the
    +    Sections above.
    +
    +    b) Give prominent notice with the combined library of the fact
    +    that part of it is a work based on the Library, and explaining
    +    where to find the accompanying uncombined form of the same work.
    +
    +  8. You may not copy, modify, sublicense, link with, or distribute
    +the Library except as expressly provided under this License.  Any
    +attempt otherwise to copy, modify, sublicense, link with, or
    +distribute the Library 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.
    +
    +  9. 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 Library or its derivative works.  These actions are
    +prohibited by law if you do not accept this License.  Therefore, by
    +modifying or distributing the Library (or any work based on the
    +Library), you indicate your acceptance of this License to do so, and
    +all its terms and conditions for copying, distributing or modifying
    +the Library or works based on it.
    +
    +  10. Each time you redistribute the Library (or any work based on the
    +Library), the recipient automatically receives a license from the
    +original licensor to copy, distribute, link with or modify the Library
    +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 with
    +this License.
    +
    +  11. 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 Library at all.  For example, if a patent
    +license would not permit royalty-free redistribution of the Library 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 Library.
    +
    +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.
    +
    +  12. If the distribution and/or use of the Library is restricted in
    +certain countries either by patents or by copyrighted interfaces, the
    +original copyright holder who places the Library 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.
    +
    +  13. The Free Software Foundation may publish revised and/or new
    +versions of the Lesser 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 Library
    +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 Library does not specify a
    +license version number, you may choose any version ever published by
    +the Free Software Foundation.
    +
    +  14. If you wish to incorporate parts of the Library into other free
    +programs whose distribution conditions are incompatible with these,
    +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
    +
    +  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
    +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
    +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
    +OTHER PARTIES PROVIDE THE LIBRARY "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
    +LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
    +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
    +
    +  16. 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 LIBRARY 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
    +LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries
    +
    +  If you develop a new library, and you want it to be of the greatest
    +possible use to the public, we recommend making it free software that
    +everyone can redistribute and change.  You can do so by permitting
    +redistribution under these terms (or, alternatively, under the terms of the
    +ordinary General Public License).
    +
    +  To apply these terms, attach the following notices to the library.  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 library's name and a brief idea of what it does.>
    +    Copyright (C) <year>  <name of author>
    +
    +    This library is free software; you can redistribute it and/or
    +    modify it under the terms of the GNU Lesser General Public
    +    License as published by the Free Software Foundation; either
    +    version 2.1 of the License, or (at your option) any later version.
    +
    +    This library 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
    +    Lesser General Public License for more details.
    +
    +    You should have received a copy of the GNU Lesser General Public
    +    License along with this library; if not, write to the Free Software
    +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
    +Also add information on how to contact you by electronic and paper mail.
    +
    +You should also get your employer (if you work as a programmer) or your
    +school, if any, to sign a "copyright disclaimer" for the library, if
    +necessary.  Here is a sample; alter the names:
    +
    +  Yoyodyne, Inc., hereby disclaims all copyright interest in the
    +  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
    +
    +  <signature of Ty Coon>, 1 April 1990
    +  Ty Coon, President of Vice
    +
    +That's all there is to it!
    +
    +
    +
    +
    +

    + Documentation generated on Sun, 02 Dec 2007 09:43:23 +0200 by phpDocumentor 1.4.0a2 +

    + + \ No newline at end of file diff --git a/sites/all/modules/contrib/devel/krumo/docs/ric_README.html b/sites/all/modules/contrib/devel/krumo/docs/ric_README.html new file mode 100644 index 0000000..02a45c8 --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/docs/ric_README.html @@ -0,0 +1,121 @@ + + + + + + + + + +

    README

    +
    +=============================================================================
    +
    +                               Krumo
    +                            version 0.2.1a
    +
    +=============================================================================
    +
    +You probably got this package from...
    +http://www.sourceforge.net/projects/krumo/
    +
    +If there is no licence agreement with this package please download
    +a version from the location above. You must read and accept that
    +licence to use this software. The file is titled simply LICENSE.
    +
    +OVERVIEW
    +------------------------------------------------------------------------------
    +To put it simply, Krumo is a replacement for print_r() and var_dump(). By 
    +definition Krumo is a debugging tool (for PHP5), which displays structured 
    +information about any PHP variable.
    +
    +A lot of developers use print_r() and var_dump() in the means of debugging 
    +tools. Although they were intended to present human readble information about a 
    +variable, we can all agree that in general they are not. Krumo is an 
    +alternative: it does the same job, but it presents the information beautified 
    +using CSS and DHTML. 
    +
    +EXAMPLES
    +------------------------------------------------------------------------------
    +Here's a basic example, which will return a report on the array variable passed 
    +as argument to it:
    +
    + krumo(array('a1'=> 'A1', 3, 'red'));
    +
    +You can dump simultaneously more then one variable - here's another example:
    +
    + krumo($_SERVER, $_REQUEST);
    +
    +You probably saw from the examples above that some of the nodes are expandable, 
    +so if you want to inspect the nested information, click on them and they will 
    +expand; if you do not need that information shown simply click again on it to 
    +collapse it. Here's an example to test this:
    +
    + $x1->x2->x3->x4->x5->x6->x7->x8->x9 = 'X10';
    + krumo($x1);
    +
    +The krumo() is the only standalone function from the package, and this is 
    +because basic dumps about variables (like print_r() or var_dump()) are the most 
    +common tasks such functionality is used for. The rest of the functionality can 
    +be called using static calls to the Krumo class. Here are several more examples:
    +
    + // print a debug backgrace
    + krumo::backtrace();
    +
    + // print all the included(or required) files
    + krumo::includes();
    + 
    + // print all the included functions
    + krumo::functions();
    + 
    + // print all the declared classes
    + krumo::classes();
    + 
    + // print all the defined constants
    + krumo::defines();
    +
    + ... and so on, etc.
    +
    +A full PHPDocumenter API documentation exists both in this package and at the 
    +project's website.
    +
    +INSTALL
    +------------------------------------------------------------------------------
    +Read the INSTALL file.
    +
    +DOCUMENTATION
    +------------------------------------------------------------------------------
    +As I said, a full PHPDocumenter API documentation can be found both in this
    +package and at the project's website.
    +
    +SKINS
    +------------------------------------------------------------------------------
    +There are several skins pre-installed with this package, but if you wish you can 
    +create skins of your own. The skins are simply CSS files that are prepended to 
    +the result that Krumo prints. If you want to use images in your CSS (for 
    +background, list-style, etc), you have to put "%URL%" in front of the image URL 
    +in order hook it up to the skin folder and make the image web-accessible.
    +
    +Here's an example:
    +
    + ul.krumo-first {background: url(%url%bg.gif);}
    +
    +TODO
    +------------------------------------------------------------------------------
    +You can find the list of stuff that is going to be added to this project in the 
    +TODO file from this very package.
    +
    +CONTRIBUTION
    +-----------------------------------------------------------------------------
    +If you download and use and possibly even extend this tool, please let us know. 
    +Any feedback, even bad, is always welcome and your suggestions are going to be 
    +considered for our next release. Please use our SourceForge page for that:
    + 
    + http://www.sourceforge.net/projects/krumo/
    +
    +
    +

    + Documentation generated on Sun, 02 Dec 2007 09:43:23 +0200 by phpDocumentor 1.4.0a2 +

    + + \ No newline at end of file diff --git a/sites/all/modules/contrib/devel/krumo/docs/ric_TODO.html b/sites/all/modules/contrib/devel/krumo/docs/ric_TODO.html new file mode 100644 index 0000000..82b751e --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/docs/ric_TODO.html @@ -0,0 +1,41 @@ + + + + + + + + + +

    TODO

    +
    +******************************************************************************
    +
    +                                 Krumo: TODO
    +
    +******************************************************************************
    +
    +BUGS
    +----------------
    + - watch the SourceForge.net Bug Tracker
    +
    +Features: PHP
    +----------------
    + - Try to detect anonymous (lambda) functions
    + - Try to detect whether an array is indexed or associated
    + - Add var_export support for arrays and objects
    + - Add JSON support for arrays and objects
    + 
    +Features: GUI
    +----------------
    + - Nicer and friendlier skin(s)
    + - Add top-level links for collapsing and expanding the whole tree
    + - Add object & array -level links for collapsing and expanding all the
    + 	nested nodes
    + - Print all parent classes for the rendered objects
    +
    +

    + Documentation generated on Sun, 02 Dec 2007 09:43:23 +0200 by phpDocumentor 1.4.0a2 +

    + + \ No newline at end of file diff --git a/sites/all/modules/contrib/devel/krumo/docs/ric_VERSION.html b/sites/all/modules/contrib/devel/krumo/docs/ric_VERSION.html new file mode 100644 index 0000000..4590404 --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/docs/ric_VERSION.html @@ -0,0 +1,18 @@ + + + + + + + + + +

    VERSION

    +
    +0.2.1a
    +
    +

    + Documentation generated on Sun, 02 Dec 2007 09:43:23 +0200 by phpDocumentor 1.4.0a2 +

    + + \ No newline at end of file diff --git a/sites/all/modules/contrib/devel/krumo/krumo.ini b/sites/all/modules/contrib/devel/krumo/krumo.ini new file mode 100644 index 0000000..3e20dd9 --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/krumo.ini @@ -0,0 +1,20 @@ +; +; KRUMO CONFIGURATION FILE +; + +[skin] +selected = "white" +; +; Change the above value to set the CSS skin used to render +; Krumo layout. If the skin is not found, then the "default" one +; is going to be used. +; + +[css] +url = "http://www.example.com/Krumo/" +; +; This value is used to set the URL path to +; where the Krumo folder is. This is required in +; order to have web access to Krumo's CSS and +; image files. +; diff --git a/sites/all/modules/contrib/devel/krumo/krumo.js b/sites/all/modules/contrib/devel/krumo/krumo.js new file mode 100644 index 0000000..240af8c --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/krumo.js @@ -0,0 +1,97 @@ +/** +* JavaScript routines for Krumo +* +* @link http://sourceforge.net/projects/krumo +*/ + +///////////////////////////////////////////////////////////////////////////// + +/** +* Krumo JS Class +*/ +function krumo() { + } + +// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +/** +* Add a CSS class to an HTML element +* +* @param HtmlElement el +* @param string className +* @return void +*/ +krumo.reclass = function(el, className) { + if (el.className.indexOf(className) < 0) { + el.className += (' ' + className); + } + } + +// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +/** +* Remove a CSS class to an HTML element +* +* @param HtmlElement el +* @param string className +* @return void +*/ +krumo.unclass = function(el, className) { + if (el.className.indexOf(className) > -1) { + el.className = el.className.replace(className, ''); + } + } + +// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +/** +* Toggle the nodes connected to an HTML element +* +* @param HtmlElement el +* @return void +*/ +krumo.toggle = function(el) { + var ul = el.parentNode.getElementsByTagName('ul'); + for (var i=0; i{>MNZQ2fcl2vVs7B0y#^uvi&zD85|tBkOeW z{Wy-k_?HtGb*{^ry-)kirXt__^KIW(_0Qik-@s$b&#uFZg-*tp6`p)i%vBt +*/ + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +ul.krumo-node { + margin: 0px; + padding: 0px; + } +ul.krumo-node ul { + margin-left: 20px; + } +* html ul.krumo-node ul { + margin-left: 24px; + } +div.krumo-root { + border: solid 1px black; + margin: 1em 0em; + } +ul.krumo-first { + font: normal 12px arial; + border: solid 2px white; + border-top-width:1px; + background: url(%url%bg.gif); + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +li.krumo-child { + display:block; + list-style: none; + padding: 0px; + margin: 0px; + overflow:hidden; + } +div.krumo-element { + cursor:default; + + line-height: 24px; + display:block; + + clear:both; + white-space:nowrap; + + border-top: solid 1px white; + background: #BFDFFF; + padding-left: 10px; + } +* html div.krumo-element { + padding-bottom: 3px; + } +a.krumo-name { + color:navy; + font: bold 13px Arial; + } +a.krumo-name big { + font: bold 20pt Georgia; + line-height: 14px; + position:relative; + top:2px; + left:-2px; + } +* html a.krumo-name big { + font: bold 19pt Georgia; + top: 5px; + left: 0px; + line-height: 9px; + height: 12px; + padding: 0px; + margin: 0px; + } +div.krumo-expand { + background: #AAD5FF; + cursor:pointer; + } +div.krumo-hover { + background: #FFBE7D; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +div.krumo-preview { + font: normal 13px courier new; + padding: 5px 5px 14px 5px; + background: white; + border-top: 0px; + overflow:auto; + white-space: pre; + } +* html div.krumo-preview { + padding-top: 2px; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +li.krumo-footnote { + background:white; + padding: 2px 5px; + list-style:none; + border-top: solid 1px #bebebe; + margin-top:2px; + cursor:default; + } +* html li.krumo-footnote { + line-height: 13px; + } +div.krumo-version { + float:right; + } +li.krumo-footnote h6 { + font: bold 11px verdana; + margin: 0px; + padding: 0px; + color:navy; + display:inline; + } +* html li.krumo-footnote h6 { + margin-right: 3px; + } +li.krumo-footnote a { + font: bold 10px arial; + color: #434343; + text-decoration:none; + } +li.krumo-footnote a:hover { + color:black; + } + +li.krumo-footnote span.krumo-call { + font:normal 11px verdana; + position: relative; + top: 1px; + } +li.krumo-footnote span.krumo-call code { + font-weight:bold; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +div.krumo-title { + font: normal 11px verdana ; + position:relative; + top:9px; + cursor:default; + line-height:2px; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +strong.krumo-array-length, +strong.krumo-string-length { + font-weight: normal; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ diff --git a/sites/all/modules/contrib/devel/krumo/skins/default/bg.gif b/sites/all/modules/contrib/devel/krumo/skins/default/bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..fee4763e77bb256fa39a512338ff9dbd05385ec8 GIT binary patch literal 141 zcmZ?wbhEHbjAGzq*v!E2|NsBfr%yk5@`Qmnp!k!85u{QFM1ag-V6igbP<*-ON7m`$ z`*9q7@h>MX>RgvKd!P23O+~)<=i9!o>Yu-7zJbSv literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/skins/default/skin.css b/sites/all/modules/contrib/devel/krumo/skins/default/skin.css new file mode 100644 index 0000000..5c29d70 --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/skins/default/skin.css @@ -0,0 +1,158 @@ +/** +* Krumo Default Skin +* +* @author Kaloyan K. Tsvetkov +*/ + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +ul.krumo-node { + margin: 0px; + padding: 0px; + } +ul.krumo-node ul { + margin-left: 20px; + } +* html ul.krumo-node ul { + margin-left: 24px; + } +div.krumo-root { + border: solid 1px black; + margin: 1em 0em; + } +ul.krumo-first { + font: normal 12px arial; + border: solid 2px white; + border-top-width:1px; + background: url(%url%bg.gif); + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +li.krumo-child { + display:block; + list-style: none; + padding: 0px; + margin: 0px; + overflow:hidden; + } +div.krumo-element { + cursor:default; + + line-height: 24px; + display:block; + + clear:both; + white-space:nowrap; + + border-top: solid 1px white; + background: #E8E8E8; + padding-left: 10px; + } +* html div.krumo-element { + padding-bottom: 3px; + } +a.krumo-name { + color:#2C5858; + font: bold 13px Arial; + } +a.krumo-name big { + font: bold 20pt Georgia; + line-height: 14px; + position:relative; + top:2px; + left:-2px; + } +* html a.krumo-name big { + font: bold 19pt Georgia; + top: 5px; + left: 0px; + line-height: 9px; + height: 12px; + padding: 0px; + margin: 0px; + } +div.krumo-expand { + background: #CCCCCC; + cursor:pointer; + } +div.krumo-hover { + background: #B7DBDB; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +div.krumo-preview { + font: normal 13px courier new; + padding: 5px 5px 14px 5px; + background: white; + border-top: 0px; + overflow:auto; + white-space: pre; + } +* html div.krumo-preview { + padding-top: 2px; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +li.krumo-footnote { + background:white; + padding: 2px 5px; + list-style:none; + border-top: solid 1px #bebebe; + margin-top:2px; + cursor:default; + } +* html li.krumo-footnote { + line-height: 13px; + } +div.krumo-version { + float:right; + } +li.krumo-footnote h6 { + font: bold 11px verdana; + margin: 0px; + padding: 0px; + color:#366D6D; + display:inline; + } +* html li.krumo-footnote h6 { + margin-right: 3px; + } +li.krumo-footnote a { + font: bold 10px arial; + color: #434343; + text-decoration:none; + } +li.krumo-footnote a:hover { + color:black; + } + +li.krumo-footnote span.krumo-call { + font:normal 11px verdana; + position: relative; + top: 1px; + } +li.krumo-footnote span.krumo-call code { + font-weight:bold; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +div.krumo-title { + font: normal 11px verdana ; + position:relative; + top:9px; + cursor:default; + line-height:2px; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +strong.krumo-array-length, +strong.krumo-string-length { + font-weight: normal; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ diff --git a/sites/all/modules/contrib/devel/krumo/skins/green/bg.gif b/sites/all/modules/contrib/devel/krumo/skins/green/bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..aa4e75ec1636ec9332fe79436b641ac71b89604c GIT binary patch literal 141 zcmZ?wbhEHbjAGzq*v!E2|Nno6GzNx^3`7FOpDc_Zr8*!2WCjC^RX~fv%QZi;P8Z*g z +*/ + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +ul.krumo-node { + margin: 0px; + padding: 0px; + } +ul.krumo-node ul { + margin-left: 20px; + } +* html ul.krumo-node ul { + margin-left: 24px; + } +div.krumo-root { + border: solid 1px black; + margin: 1em 0em; + } +ul.krumo-first { + font: normal 12px arial; + border: solid 2px white; + border-top-width:1px; + background: url(%url%bg.gif); + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +li.krumo-child { + display:block; + list-style: none; + padding: 0px; + margin: 0px; + overflow:hidden; + } +div.krumo-element { + cursor:default; + + line-height: 24px; + display:block; + + clear:both; + white-space:nowrap; + + border-top: solid 1px white; + background: #D7F4CA; + padding-left: 10px; + } +* html div.krumo-element { + padding-bottom: 3px; + } +a.krumo-name { + color:#004000; + font: bold 13px Arial; + } +a.krumo-name big { + font: bold 20pt Georgia; + line-height: 14px; + position:relative; + top:2px; + left:-2px; + } +* html a.krumo-name big { + font: bold 19pt Georgia; + top: 5px; + left: 0px; + line-height: 9px; + height: 12px; + padding: 0px; + margin: 0px; + } +div.krumo-expand { + background: #C0EEAC; + cursor:pointer; + } +div.krumo-hover { + background: gold; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +div.krumo-preview { + font: normal 13px courier new; + padding: 5px 5px 14px 5px; + background: white; + border-top: 0px; + overflow:auto; + white-space: pre; + } +* html div.krumo-preview { + padding-top: 2px; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +li.krumo-footnote { + background:white; + padding: 2px 5px; + list-style:none; + border-top: solid 1px #bebebe; + margin-top:2px; + cursor:default; + } +* html li.krumo-footnote { + line-height: 13px; + } +div.krumo-version { + float:right; + } +li.krumo-footnote h6 { + font: bold 11px verdana; + margin: 0px; + padding: 0px; + color:#008040; + display:inline; + } +* html li.krumo-footnote h6 { + margin-right: 3px; + } +li.krumo-footnote a { + font: bold 10px arial; + color: #434343; + text-decoration:none; + } +li.krumo-footnote a:hover { + color:black; + } + +li.krumo-footnote span.krumo-call { + font:normal 11px verdana; + position: relative; + top: 1px; + } +li.krumo-footnote span.krumo-call code { + font-weight:bold; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +div.krumo-title { + font: normal 11px verdana ; + position:relative; + top:9px; + cursor:default; + line-height:2px; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +strong.krumo-array-length, +strong.krumo-string-length { + font-weight: normal; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ diff --git a/sites/all/modules/contrib/devel/krumo/skins/orange/bg.gif b/sites/all/modules/contrib/devel/krumo/skins/orange/bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..3c71bc9209545a1cca8caed84caac180ac84ce36 GIT binary patch literal 141 zcmZ?wbhEHbjAGzq*v!E29|-m{{J+OQBvAax!U$5T10q0XFtAt!v?#n>^CRnY@%=cC zzWA3D7j>@7n!Qi^&88yX`}1wzSM|@|GvB~t%g?UEi-k_cm=&IUQOs2wwKUwDg~1vC DGv+E? literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/skins/orange/skin.css b/sites/all/modules/contrib/devel/krumo/skins/orange/skin.css new file mode 100644 index 0000000..840680c --- /dev/null +++ b/sites/all/modules/contrib/devel/krumo/skins/orange/skin.css @@ -0,0 +1,158 @@ +/** +* Krumo "Orange" Skin +* +* @author Kaloyan K. Tsvetkov +*/ + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +ul.krumo-node { + margin: 0px; + padding: 0px; + } +ul.krumo-node ul { + margin-left: 20px; + } +* html ul.krumo-node ul { + margin-left: 24px; + } +div.krumo-root { + border: solid 1px black; + margin: 1em 0em; + } +ul.krumo-first { + font: normal 12px arial; + border: solid 2px white; + border-top-width:1px; + background: url(%url%bg.gif); + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +li.krumo-child { + display:block; + list-style: none; + padding: 0px; + margin: 0px; + overflow:hidden; + } +div.krumo-element { + cursor:default; + + line-height: 24px; + display:block; + + clear:both; + white-space:nowrap; + + border-top: solid 1px white; + background: #FCEBA9; + padding-left: 10px; + } +* html div.krumo-element { + padding-bottom: 3px; + } +a.krumo-name { + color:#404000; + font: bold 13px Arial; + } +a.krumo-name big { + font: bold 20pt Georgia; + line-height: 14px; + position:relative; + top:2px; + left:-2px; + } +* html a.krumo-name big { + font: bold 19pt Georgia; + top: 5px; + left: 0px; + line-height: 9px; + height: 12px; + padding: 0px; + margin: 0px; + } +div.krumo-expand { + background: #FADB61; + cursor:pointer; + } +div.krumo-hover { + background: #FF8A4B; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +div.krumo-preview { + font: normal 13px courier new; + padding: 5px 5px 14px 5px; + background: white; + border-top: 0px; + overflow:auto; + white-space: pre; + } +* html div.krumo-preview { + padding-top: 2px; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +li.krumo-footnote { + background:white; + padding: 2px 5px; + list-style:none; + border-top: solid 1px #bebebe; + margin-top:2px; + cursor:default; + } +* html li.krumo-footnote { + line-height: 13px; + } +div.krumo-version { + float:right; + } +li.krumo-footnote h6 { + font: bold 11px verdana; + margin: 0px; + padding: 0px; + color:#E87400; + display:inline; + } +* html li.krumo-footnote h6 { + margin-right: 3px; + } +li.krumo-footnote a { + font: bold 10px arial; + color: #434343; + text-decoration:none; + } +li.krumo-footnote a:hover { + color:black; + } + +li.krumo-footnote span.krumo-call { + font:normal 11px verdana; + position: relative; + top: 1px; + } +li.krumo-footnote span.krumo-call code { + font-weight:bold; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +div.krumo-title { + font: normal 11px verdana ; + position:relative; + top:9px; + cursor:default; + line-height:2px; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +strong.krumo-array-length, +strong.krumo-string-length { + font-weight: normal; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ diff --git a/sites/all/modules/contrib/devel/krumo/skins/white/collapsed.gif b/sites/all/modules/contrib/devel/krumo/skins/white/collapsed.gif new file mode 100644 index 0000000000000000000000000000000000000000..c1a4e7d5f7254b0cde1c912aad7a114305432b14 GIT binary patch literal 102 zcmZ?wbhEHb- NC>7Z>oy~>88UTeX5|sb| literal 0 HcmV?d00001 diff --git a/sites/all/modules/contrib/devel/krumo/skins/white/dotted.gif b/sites/all/modules/contrib/devel/krumo/skins/white/dotted.gif new file mode 100644 index 0000000000000000000000000000000000000000..e009cf1ead6fdd6bf974f4173b9bc2d30ee2675e GIT binary patch literal 91 zcmZ?wbhEHb +*/ + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +ul.krumo-node { + margin: 0px; + padding: 0px; + background-color: white; + } +ul.krumo-node ul { + margin-left: 20px; + } +* html ul.krumo-node ul { + margin-left: 24px; + } +div.krumo-root { + border: solid 1px black; + margin: 1em 0em; + } +ul.krumo-first { + font: normal 11px tahoma, verdana; + border: solid 1px white; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +li.krumo-child { + display:block; + list-style: none; + padding: 0px; + margin: 0px; + overflow:hidden; + } +div.krumo-element { + cursor:default; + display:block; + clear:both; + white-space:nowrap; + + background-color: white; + background-image: url(%url%empty.gif); + background-repeat: no-repeat; + background-position: 6px 5px; + padding: 2px 0px 3px 20px; + } +* html div.krumo-element { + padding-bottom: 3px; + line-height: 13px; + } +div.krumo-expand { + background-image: url(%url%collapsed.gif); + cursor:pointer; + } +div.krumo-hover { + background-color: #BFDFFF; + } +div.krumo-opened { + background-image: url(%url%expanded.gif); + } +a.krumo-name { + color:navy; + font: bold 13px courier new; + line-height:12px; + } +a.krumo-name big { + font: bold 16pt Georgia; + line-height: 10px; + position:relative; + top:2px; + left:-2px; + } +* html a.krumo-name big { + font: bold 15pt Georgia; + float:left; + top: -5px; + left: 0px; + padding: 0px; + margin: 0px; + } +em.krumo-type { + font-style:normal; + margin: 0px 2px; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +div.krumo-preview { + font: normal 13px courier new; + padding: 5px ; + background: lightyellow; + border: solid 1px #808000; + overflow:auto; + margin: 5px 1em 1em 0px; + white-space: pre; + } +* html div.krumo-preview { + padding-top: 2px; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +li.krumo-footnote { + background: white url(%url%dotted.gif) repeat-x; + padding: 4px 5px 3px 5px; + list-style:none; + cursor:default; + } +* html li.krumo-footnote { + line-height: 13px; + } +div.krumo-version { + float:right; + } +li.krumo-footnote h6 { + font: bold 11px verdana; + margin: 0px; + padding: 0px; + color:navy; + display:inline; + } +* html li.krumo-footnote h6 { + margin-right: 3px; + } +li.krumo-footnote a { + font: bold 10px arial; + color: #434343; + text-decoration:none; + } +li.krumo-footnote a:hover { + color:black; + } + + +li.krumo-footnote span.krumo-call { + font:normal 11px tahoma, verdana; + position: relative; + top: 1px; + } +li.krumo-footnote span.krumo-call code { + font-weight:bold; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +div.krumo-title { + font: normal 11px tahoma, verdana; + position:relative; + top:9px; + cursor:default; + line-height:2px; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ + +strong.krumo-array-length, +strong.krumo-string-length { + font-weight: normal; + color: #000099; + } + +/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ diff --git a/sites/all/modules/contrib/devel/runtests.sh b/sites/all/modules/contrib/devel/runtests.sh new file mode 100644 index 0000000..4eb200a --- /dev/null +++ b/sites/all/modules/contrib/devel/runtests.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env sh + +# This script will run phpunit-based test classes using Drush's +# test framework. First, the Drush executable is located, and +# then phpunit is invoked, passing in drush_testcase.inc as +# the bootstrap file. +# +# Any parameters that may be passed to phpunit may also be used +# with runtests.sh. + +DRUSH_PATH="`which drush`" +DRUSH_DIRNAME="`dirname -- "$DRUSH_PATH"`" + +# if [ $# = 0 ] ; then +# phpunit --bootstrap="$DRUSH_DIRNAME/tests/drush_testcase.inc" . +# else +# phpunit --bootstrap="$DRUSH_DIRNAME/tests/drush_testcase.inc" "$@" +# fi + +#Instead, hard code target file so we don't find a simpletest file at +# /lib/Drupal/devel_generate/Tests/DevelGenerateTest.php. +phpunit --bootstrap="$DRUSH_DIRNAME/tests/drush_testcase.inc" develDrushTest.php From f52c2e81732123d6fe56a4ea6c502198d8f609b2 Mon Sep 17 00:00:00 2001 From: Brandon Kesselly Date: Tue, 16 Aug 2016 23:30:34 +0000 Subject: [PATCH 2/4] Added conditional for cg_backend_prod variable --- sites/all/modules/custom/cg_main/cg_main.install | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sites/all/modules/custom/cg_main/cg_main.install b/sites/all/modules/custom/cg_main/cg_main.install index 7e00bb0..34efe8f 100644 --- a/sites/all/modules/custom/cg_main/cg_main.install +++ b/sites/all/modules/custom/cg_main/cg_main.install @@ -15,4 +15,10 @@ function cg_main_enable() { $modules = array('cg_pages'); module_enable($modules); + + $cg_backend_prod = 'cg_backend_prod'; + + if (variable_get($cg_backend_prod) == NULL){ + variable_set($cg_backend_prod, 0); + } } From ba1fed8e7a429f1fb61d0d78877064b66bbf1cc7 Mon Sep 17 00:00:00 2001 From: Brandon Kesselly Date: Tue, 16 Aug 2016 23:40:12 +0000 Subject: [PATCH 3/4] Update for the zero conditional cg_backend_prod variable --- sites/all/modules/custom/cg_main/cg_main.install | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sites/all/modules/custom/cg_main/cg_main.install b/sites/all/modules/custom/cg_main/cg_main.install index 34efe8f..75a5fcf 100644 --- a/sites/all/modules/custom/cg_main/cg_main.install +++ b/sites/all/modules/custom/cg_main/cg_main.install @@ -18,7 +18,13 @@ function cg_main_enable() { $cg_backend_prod = 'cg_backend_prod'; - if (variable_get($cg_backend_prod) == NULL){ + if (variable_get($cg_backend_prod) == null){ variable_set($cg_backend_prod, 0); + } + + if (variable_get($cg_backend_prod) == 0) { + module_enable(array('views_ui', 'devel')) } + + } From dd977336ce21dc4d11f6b099f2d7b6ab29d2f90a Mon Sep 17 00:00:00 2001 From: Brandon Kesselly Date: Wed, 17 Aug 2016 00:09:45 +0000 Subject: [PATCH 4/4] Fixed semicolon issue on line 26 --- sites/all/modules/custom/cg_main/cg_main.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/all/modules/custom/cg_main/cg_main.install b/sites/all/modules/custom/cg_main/cg_main.install index 75a5fcf..09d29a3 100644 --- a/sites/all/modules/custom/cg_main/cg_main.install +++ b/sites/all/modules/custom/cg_main/cg_main.install @@ -23,7 +23,7 @@ function cg_main_enable() { } if (variable_get($cg_backend_prod) == 0) { - module_enable(array('views_ui', 'devel')) + module_enable(array('views_ui', 'devel')); }