From 6fcd4678f9b9b473a36617ee0cc5f9f4359a1d6b Mon Sep 17 00:00:00 2001
From: yama
Date: Sat, 20 Apr 2013 19:28:34 +0900
Subject: [PATCH 001/530] Refactor #9863 Convert to utf-8 all core files
http://tracker.modx.com/issues/9863
---
.../ajaxSearch/ajaxSearch_version_192.txt | 2 +-
install/instprocessor.php | 2 +-
.../media/ImageEditor/assets/EditorContent.js | 2 +-
manager/media/ImageEditor/assets/editor.js | 6 +--
.../mcpuk/connectors/php/connector.php | 41 ++++++++++---------
5 files changed, 27 insertions(+), 26 deletions(-)
diff --git a/assets/snippets/ajaxSearch/ajaxSearch_version_192.txt b/assets/snippets/ajaxSearch/ajaxSearch_version_192.txt
index 75d1d43a2e..0dfca34c16 100644
--- a/assets/snippets/ajaxSearch/ajaxSearch_version_192.txt
+++ b/assets/snippets/ajaxSearch/ajaxSearch_version_192.txt
@@ -104,7 +104,7 @@ Previous versions :
==== Accented characters - search html entities too
The html entity version of the search terms are also searched.
- e.g: "ph&eactute;nomène" and "phnomne" are searched when "phnomne" is searched.
+ e.g: "ph&eactute;nomène" and "phénomène" are searched when "phénomène" is searched.
==== advSearch - exactphrase
diff --git a/install/instprocessor.php b/install/instprocessor.php
index 87b9752956..9088b29426 100755
--- a/install/instprocessor.php
+++ b/install/instprocessor.php
@@ -246,7 +246,7 @@ function parseProperties($propertyString) {
$site_url= ((isset ($_SERVER[\'HTTPS\']) && strtolower($_SERVER[\'HTTPS\']) == \'on\') || $_SERVER[\'SERVER_PORT\'] == $https_port) ? \'https://\' : \'http://\';
$site_url .= $_SERVER[\'HTTP_HOST\'];
if ($_SERVER[\'SERVER_PORT\'] != 80)
- $site_url= str_replace(\':\' . $_SERVER[\'SERVER_PORT\'], \'\', $site_url); // remove port from HTTP_HOST
+ $site_url= str_replace(\':\' . $_SERVER[\'SERVER_PORT\'], \'\', $site_url); // remove port from HTTP_HOST
$site_url .= ($_SERVER[\'SERVER_PORT\'] == 80 || (isset ($_SERVER[\'HTTPS\']) && strtolower($_SERVER[\'HTTPS\']) == \'on\') || $_SERVER[\'SERVER_PORT\'] == $https_port) ? \'\' : \':\' . $_SERVER[\'SERVER_PORT\'];
$site_url .= $base_url;
diff --git a/manager/media/ImageEditor/assets/EditorContent.js b/manager/media/ImageEditor/assets/EditorContent.js
index 97788adf0c..3e2357bfa2 100644
--- a/manager/media/ImageEditor/assets/EditorContent.js
+++ b/manager/media/ImageEditor/assets/EditorContent.js
@@ -237,7 +237,7 @@ function moveContent(e)
}
}
-//Code add for constraints by Frdric Klee
+//Code add for constraints by Frédéric Klee
function moveHandle(e)
{
if (dragapproved)
diff --git a/manager/media/ImageEditor/assets/editor.js b/manager/media/ImageEditor/assets/editor.js
index 99f514ad9e..d247f07ca0 100644
--- a/manager/media/ImageEditor/assets/editor.js
+++ b/manager/media/ImageEditor/assets/editor.js
@@ -37,7 +37,7 @@
editor.setMode(current_action);
//constraints on the scale,
- //code by Frdric Klee
+ //code by Frédéric Klee
if(action == 'scale')
{
var theImage = editor.window.document.getElementById('theImage');
@@ -67,7 +67,7 @@
}
}
- //Togggle constraints, by Frdric Klee
+ //Togggle constraints, by Frédéric Klee
function toggleConstraints()
{
var lock = document.getElementById("scaleConstImg");
@@ -89,7 +89,7 @@
}
}
- //check the constraints, by Frdric Klee
+ //check the constraints, by Frédéric Klee
function checkConstrains(changed)
{
var constrained = document.getElementById('constProp');
diff --git a/manager/media/browser/mcpuk/connectors/php/connector.php b/manager/media/browser/mcpuk/connectors/php/connector.php
index c8e893610a..3c9dd0696c 100644
--- a/manager/media/browser/mcpuk/connectors/php/connector.php
+++ b/manager/media/browser/mcpuk/connectors/php/connector.php
@@ -1,27 +1,28 @@
-
Date: Sat, 20 Apr 2013 19:30:40 +0900
Subject: [PATCH 002/530] Refactor #9861 Should be core files line feed code is
"lf" (part 1) http://tracker.modx.com/issues/9861
---
assets/docs/index.html | 2 +-
assets/docs/license.txt | 560 +++++++++++++++++++-------------------
assets/export/index.html | 2 +-
assets/flash/index.html | 2 +-
assets/images/index.html | 2 +-
assets/js/csshover3.htc | 26 +-
assets/js/index.html | 2 +-
assets/modules/index.html | 2 +-
assets/plugins/index.html | 2 +-
9 files changed, 300 insertions(+), 300 deletions(-)
diff --git a/assets/docs/index.html b/assets/docs/index.html
index fdd3791786..cfb7d0fe18 100755
--- a/assets/docs/index.html
+++ b/assets/docs/index.html
@@ -1,2 +1,2 @@
-Unauthorized access
+Unauthorized access
You're not allowed to access file folder
\ No newline at end of file
diff --git a/assets/docs/license.txt b/assets/docs/license.txt
index 2128a66ea7..960fe7469f 100755
--- a/assets/docs/license.txt
+++ b/assets/docs/license.txt
@@ -1,280 +1,280 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 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.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-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
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 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.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+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
diff --git a/assets/export/index.html b/assets/export/index.html
index fdd3791786..cfb7d0fe18 100644
--- a/assets/export/index.html
+++ b/assets/export/index.html
@@ -1,2 +1,2 @@
-Unauthorized access
+Unauthorized access
You're not allowed to access file folder
\ No newline at end of file
diff --git a/assets/flash/index.html b/assets/flash/index.html
index fdd3791786..cfb7d0fe18 100755
--- a/assets/flash/index.html
+++ b/assets/flash/index.html
@@ -1,2 +1,2 @@
-Unauthorized access
+Unauthorized access
You're not allowed to access file folder
\ No newline at end of file
diff --git a/assets/images/index.html b/assets/images/index.html
index fdd3791786..cfb7d0fe18 100644
--- a/assets/images/index.html
+++ b/assets/images/index.html
@@ -1,2 +1,2 @@
-Unauthorized access
+Unauthorized access
You're not allowed to access file folder
\ No newline at end of file
diff --git a/assets/js/csshover3.htc b/assets/js/csshover3.htc
index 7ce43fa71c..6b160b01aa 100644
--- a/assets/js/csshover3.htc
+++ b/assets/js/csshover3.htc
@@ -1,14 +1,14 @@
-
-
\ No newline at end of file
diff --git a/assets/js/index.html b/assets/js/index.html
index fdd3791786..cfb7d0fe18 100644
--- a/assets/js/index.html
+++ b/assets/js/index.html
@@ -1,2 +1,2 @@
-Unauthorized access
+Unauthorized access
You're not allowed to access file folder
\ No newline at end of file
diff --git a/assets/modules/index.html b/assets/modules/index.html
index fdd3791786..cfb7d0fe18 100755
--- a/assets/modules/index.html
+++ b/assets/modules/index.html
@@ -1,2 +1,2 @@
-Unauthorized access
+Unauthorized access
You're not allowed to access file folder
\ No newline at end of file
diff --git a/assets/plugins/index.html b/assets/plugins/index.html
index fdd3791786..cfb7d0fe18 100755
--- a/assets/plugins/index.html
+++ b/assets/plugins/index.html
@@ -1,2 +1,2 @@
-Unauthorized access
+Unauthorized access
You're not allowed to access file folder
\ No newline at end of file
From d8611dcdaa5ab9f963cb17029ba41c0fe116ffd1 Mon Sep 17 00:00:00 2001
From: yama
Date: Sat, 20 Apr 2013 19:31:06 +0900
Subject: [PATCH 003/530] Refactor #9861 Should be core files line feed code is
"lf" (part 2) http://tracker.modx.com/issues/9861
---
assets/media/index.html | 2 +-
assets/plugins/qm/css/colorbox.css | 114 +-
assets/plugins/qm/css/ie.css | 6 +-
assets/plugins/qm/readme.html | 1748 ++++++++---------
.../plugins/fullpage/css/fullpage.css | 284 +--
.../tiny_mce/plugins/fullpage/fullpage.htm | 518 ++---
.../tiny_mce/plugins/fullpage/js/fullpage.js | 464 ++---
7 files changed, 1568 insertions(+), 1568 deletions(-)
diff --git a/assets/media/index.html b/assets/media/index.html
index fdd3791786..cfb7d0fe18 100755
--- a/assets/media/index.html
+++ b/assets/media/index.html
@@ -1,2 +1,2 @@
-Unauthorized access
+Unauthorized access
You're not allowed to access file folder
\ No newline at end of file
diff --git a/assets/plugins/qm/css/colorbox.css b/assets/plugins/qm/css/colorbox.css
index 7acb45ab52..518e8d8773 100755
--- a/assets/plugins/qm/css/colorbox.css
+++ b/assets/plugins/qm/css/colorbox.css
@@ -1,57 +1,57 @@
-/*
- ColorBox Core Style
- The following rules are the styles that are consistant between themes.
- Avoid changing this area to maintain compatability with future versions of ColorBox.
-*/
-#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
-#cboxOverlay{position:fixed; width:100%; height:100%;}
-#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
-#cboxContent{position:relative; overflow:hidden;}
-#cboxLoadedContent{overflow:auto;}
-#cboxLoadedContent iframe{display:block; width:100%; height:100%; border:0;}
-#cboxTitle{margin:0;}
-#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
-#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
-
-/*
- Example user style
- The following rules are ordered and tabbed in a way that represents the
- order/nesting of the generated HTML, so that the structure easier to understand.
-*/
-#cboxOverlay{background:#000;}
-#colorbox{}
- #cboxTopLeft{width:21px; height:21px; background:url(images/controls.png) -100px 0 no-repeat;}
- #cboxTopRight{width:21px; height:21px; background:url(images/controls.png) -129px 0 no-repeat;}
- #cboxBottomLeft{width:21px; height:21px; background:url(images/controls.png) -100px -29px no-repeat;}
- #cboxBottomRight{width:21px; height:21px; background:url(images/controls.png) -129px -29px no-repeat;}
- #cboxMiddleLeft{width:21px; background:url(images/controls.png) left top repeat-y;}
- #cboxMiddleRight{width:21px; background:url(images/controls.png) right top repeat-y;}
- #cboxTopCenter{height:21px; background:url(images/border.png) 0 0 repeat-x;}
- #cboxBottomCenter{height:21px; background:url(images/border.png) 0 -29px repeat-x;}
- #cboxContent{background:#fff;}
- #cboxLoadedContent{margin-bottom:28px;}
- #cboxTitle{position:absolute; bottom:3px; left:0; text-align:center; width:100%; color:#949494;}
- #cboxCurrent{position:absolute; bottom:3px; left:58px; color:#949494;}
- #cboxSlideshow{position:absolute; bottom:3px; right:30px; color:#0092ef;}
- #cboxPrevious{position:absolute; bottom:0; left:0px; background:url(images/controls.png) -75px 0px no-repeat; width:25px; height:25px; text-indent:-9999px;}
- #cboxPrevious.hover{background-position:-75px -25px;}
- #cboxNext{position:absolute; bottom:0; left:27px; background:url(images/controls.png) -50px 0px no-repeat; width:25px; height:25px; text-indent:-9999px;}
- #cboxNext.hover{background-position:-50px -25px;}
- #cboxLoadingOverlay{background:url(images/loading_background.png) center center no-repeat;}
- #cboxLoadingGraphic{background:url(images/ajax-loader.gif) center center no-repeat;}
- #cboxClose{position:absolute; bottom:0; right:0; background:url(images/controls.png) -25px 0px no-repeat; width:25px; height:25px; text-indent:-9999px;}
- #cboxClose.hover{background-position:-25px -25px;}
-
-/*
- The following fixes png-transparency for IE6.
- It is also necessary for png-transparency in IE7 & IE8 to avoid 'black halos' with the fade transition
-
- Since this method does not support CSS background-positioning, it is incompatible with CSS sprites.
- Colorbox preloads navigation hover classes to account for this.
-
- !! Important Note: AlphaImageLoader src paths are relative to the HTML document,
- while regular CSS background images are relative to the CSS document.
-
- => Moved to qm.inc.php for friendly url compatibility
-*/
-
+/*
+ ColorBox Core Style
+ The following rules are the styles that are consistant between themes.
+ Avoid changing this area to maintain compatability with future versions of ColorBox.
+*/
+#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
+#cboxOverlay{position:fixed; width:100%; height:100%;}
+#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
+#cboxContent{position:relative; overflow:hidden;}
+#cboxLoadedContent{overflow:auto;}
+#cboxLoadedContent iframe{display:block; width:100%; height:100%; border:0;}
+#cboxTitle{margin:0;}
+#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
+#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
+
+/*
+ Example user style
+ The following rules are ordered and tabbed in a way that represents the
+ order/nesting of the generated HTML, so that the structure easier to understand.
+*/
+#cboxOverlay{background:#000;}
+#colorbox{}
+ #cboxTopLeft{width:21px; height:21px; background:url(images/controls.png) -100px 0 no-repeat;}
+ #cboxTopRight{width:21px; height:21px; background:url(images/controls.png) -129px 0 no-repeat;}
+ #cboxBottomLeft{width:21px; height:21px; background:url(images/controls.png) -100px -29px no-repeat;}
+ #cboxBottomRight{width:21px; height:21px; background:url(images/controls.png) -129px -29px no-repeat;}
+ #cboxMiddleLeft{width:21px; background:url(images/controls.png) left top repeat-y;}
+ #cboxMiddleRight{width:21px; background:url(images/controls.png) right top repeat-y;}
+ #cboxTopCenter{height:21px; background:url(images/border.png) 0 0 repeat-x;}
+ #cboxBottomCenter{height:21px; background:url(images/border.png) 0 -29px repeat-x;}
+ #cboxContent{background:#fff;}
+ #cboxLoadedContent{margin-bottom:28px;}
+ #cboxTitle{position:absolute; bottom:3px; left:0; text-align:center; width:100%; color:#949494;}
+ #cboxCurrent{position:absolute; bottom:3px; left:58px; color:#949494;}
+ #cboxSlideshow{position:absolute; bottom:3px; right:30px; color:#0092ef;}
+ #cboxPrevious{position:absolute; bottom:0; left:0px; background:url(images/controls.png) -75px 0px no-repeat; width:25px; height:25px; text-indent:-9999px;}
+ #cboxPrevious.hover{background-position:-75px -25px;}
+ #cboxNext{position:absolute; bottom:0; left:27px; background:url(images/controls.png) -50px 0px no-repeat; width:25px; height:25px; text-indent:-9999px;}
+ #cboxNext.hover{background-position:-50px -25px;}
+ #cboxLoadingOverlay{background:url(images/loading_background.png) center center no-repeat;}
+ #cboxLoadingGraphic{background:url(images/ajax-loader.gif) center center no-repeat;}
+ #cboxClose{position:absolute; bottom:0; right:0; background:url(images/controls.png) -25px 0px no-repeat; width:25px; height:25px; text-indent:-9999px;}
+ #cboxClose.hover{background-position:-25px -25px;}
+
+/*
+ The following fixes png-transparency for IE6.
+ It is also necessary for png-transparency in IE7 & IE8 to avoid 'black halos' with the fade transition
+
+ Since this method does not support CSS background-positioning, it is incompatible with CSS sprites.
+ Colorbox preloads navigation hover classes to account for this.
+
+ !! Important Note: AlphaImageLoader src paths are relative to the HTML document,
+ while regular CSS background images are relative to the CSS document.
+
+ => Moved to qm.inc.php for friendly url compatibility
+*/
+
diff --git a/assets/plugins/qm/css/ie.css b/assets/plugins/qm/css/ie.css
index 72a11dd4d8..9a4ddf4beb 100755
--- a/assets/plugins/qm/css/ie.css
+++ b/assets/plugins/qm/css/ie.css
@@ -1,4 +1,4 @@
-#qmEditor ul
-{
- padding-top: 0;
+#qmEditor ul
+{
+ padding-top: 0;
}
\ No newline at end of file
diff --git a/assets/plugins/qm/readme.html b/assets/plugins/qm/readme.html
index 7d71ea6921..dc16e9576d 100755
--- a/assets/plugins/qm/readme.html
+++ b/assets/plugins/qm/readme.html
@@ -1,875 +1,875 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- QuickManager+
-QuickManager+
-
-@author Mikko Lammi, www.maagit.fi/quickmanager-plus
-
-@license GNU General Public
-License (GPL v3), www.gnu.org/copyleft/gpl.html
-
-@version 1.5.5 updated 12/01/2011
-
-@requirements MODx 1.0.0+
-
-
-
-Description
-
-QuickManager+ enables front-end content editing.
-Installation
-
-If this is an update from earlier version delete first your old
-QuickManager+ plugin and all files at "assets/plugins/qm/".
-
-1. Extract all files from package to site root.
-
-NOTICE: If you are using Mac OS X don't extract files to the site root or you will overwrite your whole assets folder.
-
-
-2. Create plugin with
-
-
-
- Name: QuickManager+
- Description: <strong>1.5.5</strong> Enables front-end
-content editing
-
-
-
-3. Copy paste plugin code:
-
-
-
- /**
- * QuickManager+
- *
- * @author Mikko Lammi, www.maagit.fi/quickmanager-plus
- * @license GNU General Public License (GPL), http://www.gnu.org/copyleft/gpl.html
- * @version 1.5.5 updated 12/01/2011
- */
-
-// In manager
-if (isset($_SESSION['mgrValidated'])) {
-
- $show = TRUE;
-
- if ($disabled != '') {
- $arr = explode(",", $disabled );
- if (in_array($modx->documentIdentifier, $arr)) {
- $show = FALSE;
- }
- }
-
- if ($show) {
- // Replace [*#tv*] with QM+ edit TV button placeholders
- if ($tvbuttons == 'true') {
- $e = $modx->Event;
- if ($e->name == 'OnParseDocument') {
-
-$output =
-&$modx->documentOutput;
-
-
-$output = preg_replace('~\[\*#(.*?)\*\]~', '<!-- '.$tvbclass.' $1
--->[*$1*]', $output);
-
-$modx->documentOutput = $output;
- }
- }
- // In manager
- if (isset($_SESSION['mgrValidated'])) {
-
-include_once($modx->config['base_path'].'assets/plugins/qm/qm.inc.php');
- $qm
-= new Qm($modx, $jqpath, $loadmanagerjq, $loadfrontendjq,
-$noconflictjq, $loadtb, $tbwidth, $tbheight, $hidefields, $hidetabs,
-$hidesections, $addbutton, $tpltype, $tplid, $custombutton,
-$managerbutton, $logout, $autohide, $editbuttons, $editbclass,
-$newbuttons, $newbclass, $tvbuttons, $tvbclass);
- }
- }
-}
-
-
-
-
-
-4. Check events:
-
-
-
- OnParseDocument
-
- OnWebPagePrerender
-
- OnDocFormPrerender
- OnDocFormSave
-
- OnManagerLogout
-
-
-
-
-NOTICE: Make sure QuickManager+ is the first plugin on OnParseDocument
-event: Elements > Manage Elements > Plugins > Edit Plugin
-Execution Order by Event > OnParseDocument
-5. Copy paste plugin default configuration:
-
-
-
-
- &jqpath=Path
-to jQuery;text;assets/js/jquery-1.4.4.min.js &loadmanagerjq=Load
-jQuery in manager;list;true,false;false &loadfrontendjq=Load jQuery
-in front-end;list;true,false;true &noconflictjq=jQuery noConflict
-mode in front-end;list;true,false;true &loadtb=Load modal box in
-front-end;list;true,false;true &tbwidth=Modal box window
-width;text;80% &tbheight=Modal box window height;text;90%
-&hidefields=Hide document fields from front-end editors;text;parent
-&hidetabs=Hide document tabs from front-end editors;text;
-&hidesections=Hide document sections from front-end editors;text;
-&addbutton=Show add document here button;list;true,false;true
-&tpltype=New document template type;list;parent,id,selected;parent
-&tplid=New document template id;int;3
-&custombutton=Custom buttons;textarea; &1=undefined;;
-&managerbutton=Show go to manager button;list;true,false;true
-&logout=Logout to;list;manager,front-end;manager
-&disabled=Plugin disabled on documents;text; &autohide=Autohide
-toolbar;list;true,false;true &editbuttons=Inline edit buttons;list;true,false;false &editbclass=Edit button CSS
-class;text;qm-edit &newbuttons= Inline new
-resource buttons;list;true,false;false &newbclass=New resource
-button CSS
-class;text;qm-new &tvbuttons=Inline template variable
-buttons;list;true,false;false &tvbclass=Template variable button CSS
-class;text;qm-tv
-
-
-
-6. Save plugin.
-
-+ 7. Rich text editors (optional)
-
-If you don't need inline template variable buttons you can skip this.
-
-You don't need to change anything if your rich text editor version is at least:
-- TinyMCE 3.3.6r2 for MODx
-- CKEditor 3.3 for modx alpha 3
-
- Now the hardest part. To get rich text editors to work properly
-with
-QuickManager+ inline template variable buttons you will need to edit
-the rich text editor plugin code. If you won't do this change the rich
-text editors will use web theme buttons when editing richtext template
-variables.
-
-
-
-TinyMCE 3.2.4.1 (MODx 1.0.2 and below):
-
-
-
-In MODx manager go to: Elements > Manage Elements > Plugins > TinyMCE
-
-
-
-Replace line:
-
-if(isset($forfrontend)||$modx->isFrontend()){
-
-
-
-With:
-
-if(isset($forfrontend)||($modx->isFrontend()
-&& (intval($_GET['quickmanagertv'] != 1) &&
-!(isset($_SESSION['mgrValidated']))))){
-
-
-
-TinyMCE 3.3.2 (MODx 1.0.3) and 3.3.5.1 (MODX 1.0.4):
-
-
-
-In MODx manager go to: Elements > Manage Elements > Plugins > TinyMCE
-
-
-
-Replace line:
-
-if($modx->isBackend())
-
-
-
-
-
-With:
-
-if($modx->isBackend() || (intval($_GET['quickmanagertv']) == 1 && isset($_SESSION['mgrValidated'])))
-
-
-Configuration
-
-Go to plugin configuration tab.
-
-
-
-
-
-
-
- Configuration
-option
- Default
-value
- Possible
-values
- Instructions
-
-
- Path to jQuery
- assets/js/jquery-1.4.4.min.js
- text
- Path to your jQuery script.
-
-
- Load jQuery in
-manager
- true
- true || false
- Prevent loading jQuery twice if you are already using
-some other plugin
-which loads jQuery such as ManagerManager.
-
-
- Load jQuery in
-front-end
- true
- true || false
- Prevent loading jQuery twice if you are already using
-it in your site
-template.
-
-
- jQuery noConflict mode in front-end
- true
- true || false
- Define
-if jQuery should use noConflict mode. NoConflict mode is useful if you
-use other JavaScript libraries in front-end such as Mootools.
-
-
- Load modal box in
-front-end
- true
- true || false
- Prevent loading the modal box JavaScript (ColorBox) twice if you are already
-using
-it in your site
-template.
-
-
- Modal box window width
- 80%
- number || percent
- Define modal box (ColorBox) window width, for example:
-800 or 75%.
-
-
- Modal box window height
- 90%
- number || percent
- Define modal box (ColorBox) window height, for example:
-500 or 75%.
-
-
- Hide document fields from front-end editors
- parent
- text
- Separate fields with commas, for example:
-parent,template,menuindex
-
-Parent selection doesn't work at all with QuickManager+ due
-missing menu tree
-frame, so it should be hidden from front-end editors.
-
-Possible fields to hide: content, pagetitle,
-longtitle, menuindex, parent, description, alias, link_attributes,
-introtext, template, menutitle
-
-NOTICE! Hiding document fields may not work if fields are moved to
-other tabs with ManagerManager plugin.
-
-
- Hide document tabs from front-end
-editors
-
-
- text
- Separate tabs with commas, for example: settings,access
-
-Possible tabs to hide: general, settings, access
-
-NOTICE! Hiding tabs may not work properly if tab
-order is changed with ManagerManager plugin.
-
-
- Hide document sections from front-end
-editors
-
-
- text
- Separate sections with commas, for example:
-content,tvs
-
-Possible sections to hide: docsettings, content, tvs
-
-NOTICE! Hiding sections may not work properly if you are hiding sections
-with ManagerManager plugin.
-
-
- Show add document here
-button
- true
- true || false
- Define if it's possible to add documents with
-QuickManager+.
-
-
- New document template
-type
- parent
- parent || id || selected
- How to determine a
-new document template:
-
-- parent: Use parent document template
-- id: Use template based on id number
-- selected: Define template based on parent document "inheritTpl"
-template variable used by "Inherit Selected Template" plugin http://modxcms.com/extras.html?view=package/view&package=214 .
-You don't have to install the plugin, but you still have to
-have "inheritTpl" template variable on parent document with correct
-template id number.
-
-
- New document template id
- 3
- number
- Define which template id to use with new documents.
-Used only if new
-document template type is id.
-
-
- Custom buttons
-
-
- text
- Define custom buttons, for example add document to site
-root or add news document
-
-- New document button: 'button title','new','parent
-id','template id','visible for user role ids'
-
-- Link button: 'button
-title','link','http://www.example.com','','visible for user role ids'
-
-- Modal button: 'button
-title','modal','http://www.example.com','','visible for user role ids'
- MODx link tag, e.g. [~23~], works for link and modal button links. MODx id tag [*id*] works, e.g. http://www.example.com?refererMODxPageId=[*id*]
-Every custom button has individual CSS class, e.g. qm-custom-"index"
-
-Visible for user role ids: leave empty to accept all roles, role 1 =
-Administrator
-
-Separate different buttons with ||
-
-Basic example:
-'Site statistics','link','http://www.google.com/analytics/','',''
- Advanced example:
-
-'New root document','new','0','3',''||'Add
-news','new','10','4','4,5,6'||'For admins only','link','[~45~]','','1,4'||'Site
-statistics','modal','http://www.google.com/analytics/','','1,4'
-
-
- Show go to manager
-button
- true
- true || false
- Define is go to manager button visible.
-
-
- Logout to
- manager
- manager || front-end
- Define where to logout: to manager login screen or to
-active document
-on front-end.
-
-
- Plugin disabled on documents
-
-
-
- text
- Document id numbers where the plugin is disabled.
-Separate fields with commas, for example:
-34,22,7,19
-
- Autohide toolbar
-
- true
-
- true || false
- Define if toolbar hides automatically or is always visible (manually close the toolbar by clicking MODx logo or X button)
-
-
- Inline edit buttons
-
- false
-
- true || false
- Define if special edit buttons are searched inside content.
-
-Purpose:
-Edit any page from other page, e.g. for editing ditto listings.
-
-How it works:
-- Add anywhere in to your page: <!-- "Edit button CSS class" "document id to be edited" '"Button title"' -->
-- This will create an edit button inside your page when logged in manager
-- For regular visitors it will be shown as a regular HTML comment visible only in the HTML source code
-
-Basic example:
-- Add in to your template <!-- qm-edit 1 'Edit this' -->
-- Creates button to edit page id 1
-
-Advanced example:
-- Add in to your Ditto template chunk: <!-- qm-edit [+id+] 'Edit news item' -->
-- Creates edit buttons for news listings etc. inside the container page
-
-NOTICE! Button title will fail if you use accented characters. Use HTML entities instead, for example ä
-
-
-
- Edit button CSS class
- qm-edit
-
- text
-
- Default qm-edit class can be found at: assets/plugins/qm/css/style.css
-
-You can use your own class if you want to make your own edit button or for added security measure.
-
-
-
- Inline new resource buttons
- false
-
- true || false
- Define if special new resource buttons are searched inside content.
-
-
-
-Purpose:
-
-Create any page from other page, e.g. create new news items.
-
-
-
-How it works:
-
-- Add anywhere in to your page: <!-- "New resource button CSS class" "parent id" "template id" '"Button title"' -->
-
-- This will create an new resource button inside your page when logged in manager
-
-- For regular visitors it will be shown as a regular HTML comment visible only in the HTML source code
-
-
-
-Basic example:
-
-- Add in to your template <!-- qm-new 1 3 'New news item' -->
-
-- Creates new resource button
-- Parent id: 1 (new resource will be created under document id 1)
-- Template id: 3 (uses template id 3)
-- Button title: New news item
-
-NOTICE! Button title will fail if you use accented characters. Use HTML entities instead, for example ä
-
-
-
- New resource button CSS class
- qm-new
-
- text
-
- Default qm-new class can be found at: assets/plugins/qm/css/style.css
-
-
-
-You can use your own class if you want to make your own new resource button or for added security measure.
-
-
- Inline template variable buttons
- false
-
- true || false
- Define if special template variable buttons are searched inside content.
-
-
-
-Purpose:
-
-Edit any template variable.
-
-
-Editable default MODx fields:
- pagetitle, longtitle, description, content, menutitle, introtext
-
-
-How it works:
-
-- Add anywhere in to your page: [*#tvName*], notice the "#"
- OR
-
-- Add anywhere in to your page: <!-- "Template variable button CSS class" "tvName" -->
-
-- This will create a template variable button inside your page when logged in manager
-
-- For regular visitors it will be shown as a regular HTML comment visible only in the HTML source code
-
-
-
-Basic example:
-
-- Add in to your template [*#tvName*]
-
-- Creates button to edit tvName template variable (and outputs the template variable)
-
-
-
-Advanced example:
-
-- Add in to your template : <!-- qm-tv tvName -->
-
-- Creates button to edit tvName template variable
-
-
-
- Template variable button CSS class
- qm-tv
- text
-
- Default qm-tv class can be found at: assets/plugins/qm/css/style.css
-
-
-
-You can use your own class if you want to make your own template variable button or for added security measure.
-
-
-
-
-
-
-
-
-
-How to use
-
-Just login, open frontend and enjoy!
-
-
-Known issues
-
-
-Parent selection is hidden and doesn't work at all with QuickManager+ due
-missing menu tree frame.
-
-Special thanks
-
- QuickManager+ is orginally based on QuickManager by Urique
-Dertlian
- Template variable editing ideas from QuickEdit by Adam Crownoble
-
-
-
-
- Changelog
-1.5.5 - 12/01/2011
-
-
-
-Changed: QM+ toolbar close button changed to li element for better cross-browser compatibility
-
- Fixed: Multiple little CSS fixes for better protection against global CSS definitions
-
-
-1.5.4 - 03/01/2011
-
-
-
-Changed: Updated ColorBox to 1.3.15: http://colorpowered.com/colorbox/
- Fixed: Support for jQuery 1.4.4
-
-Fixed: Inline template variable edit/save was still causing error
-if "'" mark was used (was affecting pagetitle etc default fields)
-
-1.5.3 - 12/10/2010
-
-
-
-Changed: Plugin code checks immeditally at start if user is in manager to save processing time
-
- Fixed: Inline template variable edit/save was causing error if "'" mark was used
-
-
-
-1.5.2 - 14/09/2010
-
-
-Added: CSS classes to toolbar buttons, also li elements: qmCustom, qmManager, qmLogout
- Changed: Inline buttons div => span, validates correctly
-
-Fixed: Inline template variable editing when TV type is checkbox
-
-
-1.5.1 - 02/08/2010
-
- Added: CSS classes to toolbar buttons: qmCustom, qmManager, qmLogout
-
- Fixed: Updated ColorBox to 1.3.9 that solves TinyMCE image align problems with IE6 and IE7
-
-
-1.5
-
-
- Added: Inline template variable buttons!!! Edit template variables with QuickEdit style. Off by default though.
-
-
- Added: OnParseDocument plugin event
- Added: Image TV preview
- Added: Preserve alias on save
- Added: "documentDirty=false;" to cancel button to prevent unnecessary MODx manager alert message
- Added: Custom buttons now support standard MODx [*id*] tag, e.g. http://www.example.com?refererMODxPageId=[*id*]
- Added: Individual CSS class for every custom button, e.g. qm-custom-"index"
-
-
-
-
-
-
-Changed: Plugin content
- Changed: TV access routine
-
- Fixed: TV edit form button labels
- Removed: close.php => now implemented with OnWebPagePrerender event to preserve alias
-
-
-
-
-1.4.1
-
- Added: Individual user language check, previously QM+ used global language setting for all users
-
- Changed: Edit buttons in content => Inline edit buttons, New resource buttons in content => Inline new resource buttons
- Changed: Inline edit buttons "placeholder markup" changed to: <!-- "Edit button CSS class" "document id to be edited" '"Button title"' -->
- Fixed: Inline edit/new buttons access control
-
-
-1.4
-
- Added: Edit buttons inside content. Edit any page from other page, e.g. for editing ditto listings.
- Added: New resource buttons inside content. Create any page from other page, e.g. create new news item.
- Added: Custom buttons works now with default MODx links, e.g. [~23~]
-
- Added: Show friendly alias after saving the document. Notice: This is still an experimental feature in is off by default.
-
- Changed: Multiple CSS tweaks mainly for IE
- Changed: close.php uses now sessions instead of JavaScript cookies
-
- Fixed: PHP4 support fixed (Thanks yama!)
- Fixed: Hiding tabs and sections fixed (access -tab and docsettings -section)
- Removed: .htaccess file under qm -folder that was accidentally left there is not needed at all.
-
-
-1.3.4.1
-
- Changed: CSS tweaks for IE, opacity now works fine with IE8 but unfortunately with IE7 ugly fonts remain (Thanks again uxello!)
-
-
-
-1.3.4
-
-
-
- Added: Autohide toolbar configuration option
- Changed: Updated ColorBox to 1.3.6: http://colorpowered.com/colorbox/
-
- Changed: CSS tweaks, mainly for IE (opacity removed for IE, it breaks cleartype fonts resulting very ugly looking fonts)
- Changed: Plugin code moved from text file to this file (Installation / 3. Copy paste plugin code)
-
- Fixed:
-Document lock problem solved, now document lock is released when cancel
-button is pressed (Thanks uxello for the solution!)
-
- Fixed: Toolbar is now valid XHTML 1.0 Transitional code
-
- Removed: Unnecessary $disabled variable from edit code
- Removed: Images folder, all images are now under css > images
-
-
-
-
-
-1.3.3
-
-
-
- Added: A fallback to English if the languages are missing in the
-Manager/user settings
- Added:
-Little tweaks with QuickManager action buttons: small hide/show
-animations and possibilty to close the menu by clicking the MODx logo
- Added: New option for custom buttons: modal = any link opened in
-a modal box (ColorBox)
- Changed: Custom buttons separator is now || instead of #
-(reserved for URL anchors)
- Changed: Rounded modal box is back, finally resolved bugs
-with ColorBox CSS in IE and friendly urls
- Changed: qm-colorbox.css renamed back to colorbox.css
- Fixed: Satinitized possible XSS vulnerabilities
- Removed: OnManagerPageInit plugin event removed
- Removed: IE6 support dropped, QuickManager+ is not tested with
-IE6 as MODx manager doesn't offially support IE6
-
-
-1.3.2.1
-
-
-
- Fixed: Language file loading
-
-
-1.3.2
-
-
-
- Added: New configuration option - jQuery noConflict mode in
-front-end
- Added: Check user manager access permissions to current document
-and show action buttons according to permissions
- Added: It's now possible to hide QM+ action buttons
- Added: Hide parent frame scrollbars and QM+ buttons when modal
-box is visible (ColorBox bindings)
- Added: Modal box can't be accidentally closed by clicking the
-overlay
- Changed:
-Stylish ColorBox CSS style didn't work properly with IE and crashed too
-often with Safari, had to replace it with minimalistic style for better
-cross-browser compatibility
- Changed: Updated ColorBox to version 1.3.1, includes for example
-IE ClearType fix (no more ugly fonts)
- Changed: colorbox.css renamed to qm-colorbox.css and moved to QM+
-css folder
- Fixed:
-All normal MODx manager actions including template and RTE selection
-works now just fine (thank you very much Susan O. for your ideas!)
- Fixed: Multiple small CSS fixes for IE
- Fixed: Alias friendly logout code (thanks Mar!)
- Fixed: Language selection a bit more robust and offer a level of
-fallback
- Removed: Use with ManagerManager
-plugin -option deprecated
-
-
-1.3.1
-
-
-
- Added:
-It's now possible to change template once. After that you can't change
-the template again but of course you can press cancel button and try
-again.
-Note: ToDo: Investigate if there is a way to detect parent frame in PHP
-to solve this problem
-
-
-1.3
-
-
-
- Added: Support for MODx Evolution 1.0.0 version, better
-combatibility with MODx Carbon manager theme
- Added: Support for jQuery in noConflict mode by default
- Added: ColorBox modal box support
- Added: Modal box (ColorBox) window width
- Added: Modal box (ColorBox) window height
- Added: Possibility to add custom link buttons
- Removed: Thickbox window max width
- Removed: MODx versions below 1.0.0 are not supported due
-manager interface changes
- Removed: ThickBox modal box support
-
-
-1.2
-
-
-
- Added: Plugin disabled option
- Added: Show go to manager
-button option
- Added: Custom add buttons option
- Added: Hide document sections from front-end
-editors option
- Added: Hide document tabs from front-end
-editors option
- Added: Dynamic ThickBox windows size adjustement, window size is
-calculated without refreshing the window
- Added: ThickBox window max width option
- Added: Logout to configuration option added, needs
-event OnManagerLogout
- Fixed: Documentation changed to html file
- Fixed: Clearer plugin folder structure
- Fixed: Hiding templates if only one template
- Fixed: Load jQuery in
-front-end was not working properly
- Fixed: mcc.class.php => hideTab & hideSection
- Removed: ThickBox windows width and height options removed.
-
-
-1.1.1
-
-
-
- Fixed: Logout function changed. Previous version had a problem
-with multiple users resulting document locked issues. Now plugin logs
-user nicely out to the manager login page.
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QuickManager+
+QuickManager+
+
+@author Mikko Lammi, www.maagit.fi/quickmanager-plus
+
+@license GNU General Public
+License (GPL v3), www.gnu.org/copyleft/gpl.html
+
+@version 1.5.5 updated 12/01/2011
+
+@requirements MODx 1.0.0+
+
+
+
+Description
+
+QuickManager+ enables front-end content editing.
+Installation
+
+If this is an update from earlier version delete first your old
+QuickManager+ plugin and all files at "assets/plugins/qm/".
+
+1. Extract all files from package to site root.
+
+NOTICE: If you are using Mac OS X don't extract files to the site root or you will overwrite your whole assets folder.
+
+
+2. Create plugin with
+
+
+
+ Name: QuickManager+
+ Description: <strong>1.5.5</strong> Enables front-end
+content editing
+
+
+
+3. Copy paste plugin code:
+
+
+
+ /**
+ * QuickManager+
+ *
+ * @author Mikko Lammi, www.maagit.fi/quickmanager-plus
+ * @license GNU General Public License (GPL), http://www.gnu.org/copyleft/gpl.html
+ * @version 1.5.5 updated 12/01/2011
+ */
+
+// In manager
+if (isset($_SESSION['mgrValidated'])) {
+
+ $show = TRUE;
+
+ if ($disabled != '') {
+ $arr = explode(",", $disabled );
+ if (in_array($modx->documentIdentifier, $arr)) {
+ $show = FALSE;
+ }
+ }
+
+ if ($show) {
+ // Replace [*#tv*] with QM+ edit TV button placeholders
+ if ($tvbuttons == 'true') {
+ $e = $modx->Event;
+ if ($e->name == 'OnParseDocument') {
+
+$output =
+&$modx->documentOutput;
+
+
+$output = preg_replace('~\[\*#(.*?)\*\]~', '<!-- '.$tvbclass.' $1
+-->[*$1*]', $output);
+
+$modx->documentOutput = $output;
+ }
+ }
+ // In manager
+ if (isset($_SESSION['mgrValidated'])) {
+
+include_once($modx->config['base_path'].'assets/plugins/qm/qm.inc.php');
+ $qm
+= new Qm($modx, $jqpath, $loadmanagerjq, $loadfrontendjq,
+$noconflictjq, $loadtb, $tbwidth, $tbheight, $hidefields, $hidetabs,
+$hidesections, $addbutton, $tpltype, $tplid, $custombutton,
+$managerbutton, $logout, $autohide, $editbuttons, $editbclass,
+$newbuttons, $newbclass, $tvbuttons, $tvbclass);
+ }
+ }
+}
+
+
+
+
+
+4. Check events:
+
+
+
+ OnParseDocument
+
+ OnWebPagePrerender
+
+ OnDocFormPrerender
+ OnDocFormSave
+
+ OnManagerLogout
+
+
+
+
+NOTICE: Make sure QuickManager+ is the first plugin on OnParseDocument
+event: Elements > Manage Elements > Plugins > Edit Plugin
+Execution Order by Event > OnParseDocument
+5. Copy paste plugin default configuration:
+
+
+
+
+ &jqpath=Path
+to jQuery;text;assets/js/jquery-1.4.4.min.js &loadmanagerjq=Load
+jQuery in manager;list;true,false;false &loadfrontendjq=Load jQuery
+in front-end;list;true,false;true &noconflictjq=jQuery noConflict
+mode in front-end;list;true,false;true &loadtb=Load modal box in
+front-end;list;true,false;true &tbwidth=Modal box window
+width;text;80% &tbheight=Modal box window height;text;90%
+&hidefields=Hide document fields from front-end editors;text;parent
+&hidetabs=Hide document tabs from front-end editors;text;
+&hidesections=Hide document sections from front-end editors;text;
+&addbutton=Show add document here button;list;true,false;true
+&tpltype=New document template type;list;parent,id,selected;parent
+&tplid=New document template id;int;3
+&custombutton=Custom buttons;textarea; &1=undefined;;
+&managerbutton=Show go to manager button;list;true,false;true
+&logout=Logout to;list;manager,front-end;manager
+&disabled=Plugin disabled on documents;text; &autohide=Autohide
+toolbar;list;true,false;true &editbuttons=Inline edit buttons;list;true,false;false &editbclass=Edit button CSS
+class;text;qm-edit &newbuttons= Inline new
+resource buttons;list;true,false;false &newbclass=New resource
+button CSS
+class;text;qm-new &tvbuttons=Inline template variable
+buttons;list;true,false;false &tvbclass=Template variable button CSS
+class;text;qm-tv
+
+
+
+6. Save plugin.
+
++ 7. Rich text editors (optional)
+
+If you don't need inline template variable buttons you can skip this.
+
+You don't need to change anything if your rich text editor version is at least:
+- TinyMCE 3.3.6r2 for MODx
+- CKEditor 3.3 for modx alpha 3
+
+ Now the hardest part. To get rich text editors to work properly
+with
+QuickManager+ inline template variable buttons you will need to edit
+the rich text editor plugin code. If you won't do this change the rich
+text editors will use web theme buttons when editing richtext template
+variables.
+
+
+
+TinyMCE 3.2.4.1 (MODx 1.0.2 and below):
+
+
+
+In MODx manager go to: Elements > Manage Elements > Plugins > TinyMCE
+
+
+
+Replace line:
+
+if(isset($forfrontend)||$modx->isFrontend()){
+
+
+
+With:
+
+if(isset($forfrontend)||($modx->isFrontend()
+&& (intval($_GET['quickmanagertv'] != 1) &&
+!(isset($_SESSION['mgrValidated']))))){
+
+
+
+TinyMCE 3.3.2 (MODx 1.0.3) and 3.3.5.1 (MODX 1.0.4):
+
+
+
+In MODx manager go to: Elements > Manage Elements > Plugins > TinyMCE
+
+
+
+Replace line:
+
+if($modx->isBackend())
+
+
+
+
+
+With:
+
+if($modx->isBackend() || (intval($_GET['quickmanagertv']) == 1 && isset($_SESSION['mgrValidated'])))
+
+
+Configuration
+
+Go to plugin configuration tab.
+
+
+
+
+
+
+
+ Configuration
+option
+ Default
+value
+ Possible
+values
+ Instructions
+
+
+ Path to jQuery
+ assets/js/jquery-1.4.4.min.js
+ text
+ Path to your jQuery script.
+
+
+ Load jQuery in
+manager
+ true
+ true || false
+ Prevent loading jQuery twice if you are already using
+some other plugin
+which loads jQuery such as ManagerManager.
+
+
+ Load jQuery in
+front-end
+ true
+ true || false
+ Prevent loading jQuery twice if you are already using
+it in your site
+template.
+
+
+ jQuery noConflict mode in front-end
+ true
+ true || false
+ Define
+if jQuery should use noConflict mode. NoConflict mode is useful if you
+use other JavaScript libraries in front-end such as Mootools.
+
+
+ Load modal box in
+front-end
+ true
+ true || false
+ Prevent loading the modal box JavaScript (ColorBox) twice if you are already
+using
+it in your site
+template.
+
+
+ Modal box window width
+ 80%
+ number || percent
+ Define modal box (ColorBox) window width, for example:
+800 or 75%.
+
+
+ Modal box window height
+ 90%
+ number || percent
+ Define modal box (ColorBox) window height, for example:
+500 or 75%.
+
+
+ Hide document fields from front-end editors
+ parent
+ text
+ Separate fields with commas, for example:
+parent,template,menuindex
+
+Parent selection doesn't work at all with QuickManager+ due
+missing menu tree
+frame, so it should be hidden from front-end editors.
+
+Possible fields to hide: content, pagetitle,
+longtitle, menuindex, parent, description, alias, link_attributes,
+introtext, template, menutitle
+
+NOTICE! Hiding document fields may not work if fields are moved to
+other tabs with ManagerManager plugin.
+
+
+ Hide document tabs from front-end
+editors
+
+
+ text
+ Separate tabs with commas, for example: settings,access
+
+Possible tabs to hide: general, settings, access
+
+NOTICE! Hiding tabs may not work properly if tab
+order is changed with ManagerManager plugin.
+
+
+ Hide document sections from front-end
+editors
+
+
+ text
+ Separate sections with commas, for example:
+content,tvs
+
+Possible sections to hide: docsettings, content, tvs
+
+NOTICE! Hiding sections may not work properly if you are hiding sections
+with ManagerManager plugin.
+
+
+ Show add document here
+button
+ true
+ true || false
+ Define if it's possible to add documents with
+QuickManager+.
+
+
+ New document template
+type
+ parent
+ parent || id || selected
+ How to determine a
+new document template:
+
+- parent: Use parent document template
+- id: Use template based on id number
+- selected: Define template based on parent document "inheritTpl"
+template variable used by "Inherit Selected Template" plugin http://modxcms.com/extras.html?view=package/view&package=214 .
+You don't have to install the plugin, but you still have to
+have "inheritTpl" template variable on parent document with correct
+template id number.
+
+
+ New document template id
+ 3
+ number
+ Define which template id to use with new documents.
+Used only if new
+document template type is id.
+
+
+ Custom buttons
+
+
+ text
+ Define custom buttons, for example add document to site
+root or add news document
+
+- New document button: 'button title','new','parent
+id','template id','visible for user role ids'
+
+- Link button: 'button
+title','link','http://www.example.com','','visible for user role ids'
+
+- Modal button: 'button
+title','modal','http://www.example.com','','visible for user role ids'
+ MODx link tag, e.g. [~23~], works for link and modal button links. MODx id tag [*id*] works, e.g. http://www.example.com?refererMODxPageId=[*id*]
+Every custom button has individual CSS class, e.g. qm-custom-"index"
+
+Visible for user role ids: leave empty to accept all roles, role 1 =
+Administrator
+
+Separate different buttons with ||
+
+Basic example:
+'Site statistics','link','http://www.google.com/analytics/','',''
+ Advanced example:
+
+'New root document','new','0','3',''||'Add
+news','new','10','4','4,5,6'||'For admins only','link','[~45~]','','1,4'||'Site
+statistics','modal','http://www.google.com/analytics/','','1,4'
+
+
+ Show go to manager
+button
+ true
+ true || false
+ Define is go to manager button visible.
+
+
+ Logout to
+ manager
+ manager || front-end
+ Define where to logout: to manager login screen or to
+active document
+on front-end.
+
+
+ Plugin disabled on documents
+
+
+
+ text
+ Document id numbers where the plugin is disabled.
+Separate fields with commas, for example:
+34,22,7,19
+
+ Autohide toolbar
+
+ true
+
+ true || false
+ Define if toolbar hides automatically or is always visible (manually close the toolbar by clicking MODx logo or X button)
+
+
+ Inline edit buttons
+
+ false
+
+ true || false
+ Define if special edit buttons are searched inside content.
+
+Purpose:
+Edit any page from other page, e.g. for editing ditto listings.
+
+How it works:
+- Add anywhere in to your page: <!-- "Edit button CSS class" "document id to be edited" '"Button title"' -->
+- This will create an edit button inside your page when logged in manager
+- For regular visitors it will be shown as a regular HTML comment visible only in the HTML source code
+
+Basic example:
+- Add in to your template <!-- qm-edit 1 'Edit this' -->
+- Creates button to edit page id 1
+
+Advanced example:
+- Add in to your Ditto template chunk: <!-- qm-edit [+id+] 'Edit news item' -->
+- Creates edit buttons for news listings etc. inside the container page
+
+NOTICE! Button title will fail if you use accented characters. Use HTML entities instead, for example ä
+
+
+
+ Edit button CSS class
+ qm-edit
+
+ text
+
+ Default qm-edit class can be found at: assets/plugins/qm/css/style.css
+
+You can use your own class if you want to make your own edit button or for added security measure.
+
+
+
+ Inline new resource buttons
+ false
+
+ true || false
+ Define if special new resource buttons are searched inside content.
+
+
+
+Purpose:
+
+Create any page from other page, e.g. create new news items.
+
+
+
+How it works:
+
+- Add anywhere in to your page: <!-- "New resource button CSS class" "parent id" "template id" '"Button title"' -->
+
+- This will create an new resource button inside your page when logged in manager
+
+- For regular visitors it will be shown as a regular HTML comment visible only in the HTML source code
+
+
+
+Basic example:
+
+- Add in to your template <!-- qm-new 1 3 'New news item' -->
+
+- Creates new resource button
+- Parent id: 1 (new resource will be created under document id 1)
+- Template id: 3 (uses template id 3)
+- Button title: New news item
+
+NOTICE! Button title will fail if you use accented characters. Use HTML entities instead, for example ä
+
+
+
+ New resource button CSS class
+ qm-new
+
+ text
+
+ Default qm-new class can be found at: assets/plugins/qm/css/style.css
+
+
+
+You can use your own class if you want to make your own new resource button or for added security measure.
+
+
+ Inline template variable buttons
+ false
+
+ true || false
+ Define if special template variable buttons are searched inside content.
+
+
+
+Purpose:
+
+Edit any template variable.
+
+
+Editable default MODx fields:
+ pagetitle, longtitle, description, content, menutitle, introtext
+
+
+How it works:
+
+- Add anywhere in to your page: [*#tvName*], notice the "#"
+ OR
+
+- Add anywhere in to your page: <!-- "Template variable button CSS class" "tvName" -->
+
+- This will create a template variable button inside your page when logged in manager
+
+- For regular visitors it will be shown as a regular HTML comment visible only in the HTML source code
+
+
+
+Basic example:
+
+- Add in to your template [*#tvName*]
+
+- Creates button to edit tvName template variable (and outputs the template variable)
+
+
+
+Advanced example:
+
+- Add in to your template : <!-- qm-tv tvName -->
+
+- Creates button to edit tvName template variable
+
+
+
+ Template variable button CSS class
+ qm-tv
+ text
+
+ Default qm-tv class can be found at: assets/plugins/qm/css/style.css
+
+
+
+You can use your own class if you want to make your own template variable button or for added security measure.
+
+
+
+
+
+
+
+
+
+How to use
+
+Just login, open frontend and enjoy!
+
+
+Known issues
+
+
+Parent selection is hidden and doesn't work at all with QuickManager+ due
+missing menu tree frame.
+
+Special thanks
+
+ QuickManager+ is orginally based on QuickManager by Urique
+Dertlian
+ Template variable editing ideas from QuickEdit by Adam Crownoble
+
+
+
+
+ Changelog
+1.5.5 - 12/01/2011
+
+
+
+Changed: QM+ toolbar close button changed to li element for better cross-browser compatibility
+
+ Fixed: Multiple little CSS fixes for better protection against global CSS definitions
+
+
+1.5.4 - 03/01/2011
+
+
+
+Changed: Updated ColorBox to 1.3.15: http://colorpowered.com/colorbox/
+ Fixed: Support for jQuery 1.4.4
+
+Fixed: Inline template variable edit/save was still causing error
+if "'" mark was used (was affecting pagetitle etc default fields)
+
+1.5.3 - 12/10/2010
+
+
+
+Changed: Plugin code checks immeditally at start if user is in manager to save processing time
+
+ Fixed: Inline template variable edit/save was causing error if "'" mark was used
+
+
+
+1.5.2 - 14/09/2010
+
+
+Added: CSS classes to toolbar buttons, also li elements: qmCustom, qmManager, qmLogout
+ Changed: Inline buttons div => span, validates correctly
+
+Fixed: Inline template variable editing when TV type is checkbox
+
+
+1.5.1 - 02/08/2010
+
+ Added: CSS classes to toolbar buttons: qmCustom, qmManager, qmLogout
+
+ Fixed: Updated ColorBox to 1.3.9 that solves TinyMCE image align problems with IE6 and IE7
+
+
+1.5
+
+
+ Added: Inline template variable buttons!!! Edit template variables with QuickEdit style. Off by default though.
+
+
+ Added: OnParseDocument plugin event
+ Added: Image TV preview
+ Added: Preserve alias on save
+ Added: "documentDirty=false;" to cancel button to prevent unnecessary MODx manager alert message
+ Added: Custom buttons now support standard MODx [*id*] tag, e.g. http://www.example.com?refererMODxPageId=[*id*]
+ Added: Individual CSS class for every custom button, e.g. qm-custom-"index"
+
+
+
+
+
+
+Changed: Plugin content
+ Changed: TV access routine
+
+ Fixed: TV edit form button labels
+ Removed: close.php => now implemented with OnWebPagePrerender event to preserve alias
+
+
+
+
+1.4.1
+
+ Added: Individual user language check, previously QM+ used global language setting for all users
+
+ Changed: Edit buttons in content => Inline edit buttons, New resource buttons in content => Inline new resource buttons
+ Changed: Inline edit buttons "placeholder markup" changed to: <!-- "Edit button CSS class" "document id to be edited" '"Button title"' -->
+ Fixed: Inline edit/new buttons access control
+
+
+1.4
+
+ Added: Edit buttons inside content. Edit any page from other page, e.g. for editing ditto listings.
+ Added: New resource buttons inside content. Create any page from other page, e.g. create new news item.
+ Added: Custom buttons works now with default MODx links, e.g. [~23~]
+
+ Added: Show friendly alias after saving the document. Notice: This is still an experimental feature in is off by default.
+
+ Changed: Multiple CSS tweaks mainly for IE
+ Changed: close.php uses now sessions instead of JavaScript cookies
+
+ Fixed: PHP4 support fixed (Thanks yama!)
+ Fixed: Hiding tabs and sections fixed (access -tab and docsettings -section)
+ Removed: .htaccess file under qm -folder that was accidentally left there is not needed at all.
+
+
+1.3.4.1
+
+ Changed: CSS tweaks for IE, opacity now works fine with IE8 but unfortunately with IE7 ugly fonts remain (Thanks again uxello!)
+
+
+
+1.3.4
+
+
+
+ Added: Autohide toolbar configuration option
+ Changed: Updated ColorBox to 1.3.6: http://colorpowered.com/colorbox/
+
+ Changed: CSS tweaks, mainly for IE (opacity removed for IE, it breaks cleartype fonts resulting very ugly looking fonts)
+ Changed: Plugin code moved from text file to this file (Installation / 3. Copy paste plugin code)
+
+ Fixed:
+Document lock problem solved, now document lock is released when cancel
+button is pressed (Thanks uxello for the solution!)
+
+ Fixed: Toolbar is now valid XHTML 1.0 Transitional code
+
+ Removed: Unnecessary $disabled variable from edit code
+ Removed: Images folder, all images are now under css > images
+
+
+
+
+
+1.3.3
+
+
+
+ Added: A fallback to English if the languages are missing in the
+Manager/user settings
+ Added:
+Little tweaks with QuickManager action buttons: small hide/show
+animations and possibilty to close the menu by clicking the MODx logo
+ Added: New option for custom buttons: modal = any link opened in
+a modal box (ColorBox)
+ Changed: Custom buttons separator is now || instead of #
+(reserved for URL anchors)
+ Changed: Rounded modal box is back, finally resolved bugs
+with ColorBox CSS in IE and friendly urls
+ Changed: qm-colorbox.css renamed back to colorbox.css
+ Fixed: Satinitized possible XSS vulnerabilities
+ Removed: OnManagerPageInit plugin event removed
+ Removed: IE6 support dropped, QuickManager+ is not tested with
+IE6 as MODx manager doesn't offially support IE6
+
+
+1.3.2.1
+
+
+
+ Fixed: Language file loading
+
+
+1.3.2
+
+
+
+ Added: New configuration option - jQuery noConflict mode in
+front-end
+ Added: Check user manager access permissions to current document
+and show action buttons according to permissions
+ Added: It's now possible to hide QM+ action buttons
+ Added: Hide parent frame scrollbars and QM+ buttons when modal
+box is visible (ColorBox bindings)
+ Added: Modal box can't be accidentally closed by clicking the
+overlay
+ Changed:
+Stylish ColorBox CSS style didn't work properly with IE and crashed too
+often with Safari, had to replace it with minimalistic style for better
+cross-browser compatibility
+ Changed: Updated ColorBox to version 1.3.1, includes for example
+IE ClearType fix (no more ugly fonts)
+ Changed: colorbox.css renamed to qm-colorbox.css and moved to QM+
+css folder
+ Fixed:
+All normal MODx manager actions including template and RTE selection
+works now just fine (thank you very much Susan O. for your ideas!)
+ Fixed: Multiple small CSS fixes for IE
+ Fixed: Alias friendly logout code (thanks Mar!)
+ Fixed: Language selection a bit more robust and offer a level of
+fallback
+ Removed: Use with ManagerManager
+plugin -option deprecated
+
+
+1.3.1
+
+
+
+ Added:
+It's now possible to change template once. After that you can't change
+the template again but of course you can press cancel button and try
+again.
+Note: ToDo: Investigate if there is a way to detect parent frame in PHP
+to solve this problem
+
+
+1.3
+
+
+
+ Added: Support for MODx Evolution 1.0.0 version, better
+combatibility with MODx Carbon manager theme
+ Added: Support for jQuery in noConflict mode by default
+ Added: ColorBox modal box support
+ Added: Modal box (ColorBox) window width
+ Added: Modal box (ColorBox) window height
+ Added: Possibility to add custom link buttons
+ Removed: Thickbox window max width
+ Removed: MODx versions below 1.0.0 are not supported due
+manager interface changes
+ Removed: ThickBox modal box support
+
+
+1.2
+
+
+
+ Added: Plugin disabled option
+ Added: Show go to manager
+button option
+ Added: Custom add buttons option
+ Added: Hide document sections from front-end
+editors option
+ Added: Hide document tabs from front-end
+editors option
+ Added: Dynamic ThickBox windows size adjustement, window size is
+calculated without refreshing the window
+ Added: ThickBox window max width option
+ Added: Logout to configuration option added, needs
+event OnManagerLogout
+ Fixed: Documentation changed to html file
+ Fixed: Clearer plugin folder structure
+ Fixed: Hiding templates if only one template
+ Fixed: Load jQuery in
+front-end was not working properly
+ Fixed: mcc.class.php => hideTab & hideSection
+ Removed: ThickBox windows width and height options removed.
+
+
+1.1.1
+
+
+
+ Fixed: Logout function changed. Previous version had a problem
+with multiple users resulting document locked issues. Now plugin logs
+user nicely out to the manager login page.
+
+
\ No newline at end of file
diff --git a/assets/plugins/tinymce/tiny_mce/plugins/fullpage/css/fullpage.css b/assets/plugins/tinymce/tiny_mce/plugins/fullpage/css/fullpage.css
index 2675cec155..28b721f9b3 100644
--- a/assets/plugins/tinymce/tiny_mce/plugins/fullpage/css/fullpage.css
+++ b/assets/plugins/tinymce/tiny_mce/plugins/fullpage/css/fullpage.css
@@ -1,143 +1,143 @@
-/* Hide the advanced tab */
-#advanced_tab {
- display: none;
-}
-
-#metatitle, #metakeywords, #metadescription, #metaauthor, #metacopyright {
- width: 280px;
-}
-
-#doctype, #docencoding {
- width: 200px;
-}
-
-#langcode {
- width: 30px;
-}
-
-#bgimage {
- width: 220px;
-}
-
-#fontface {
- width: 240px;
-}
-
-#leftmargin, #rightmargin, #topmargin, #bottommargin {
- width: 50px;
-}
-
-.panel_wrapper div.current {
- height: 400px;
-}
-
-#stylesheet, #style {
- width: 240px;
-}
-
-#doctypes {
- width: 200px;
-}
-
-/* Head list classes */
-
-.headlistwrapper {
- width: 100%;
-}
-
-.selected {
- border: 1px solid #0A246A;
- background-color: #B6BDD2;
-}
-
-.toolbar {
- width: 100%;
-}
-
-#headlist {
- width: 100%;
- margin-top: 3px;
- font-size: 11px;
-}
-
-#info, #title_element, #meta_element, #script_element, #style_element, #base_element, #link_element, #comment_element, #unknown_element {
- display: none;
-}
-
-#addmenu {
- position: absolute;
- border: 1px solid gray;
- display: none;
- z-index: 100;
- background-color: white;
-}
-
-#addmenu a {
- display: block;
- width: 100%;
- line-height: 20px;
- text-decoration: none;
- background-color: white;
-}
-
-#addmenu a:hover {
- background-color: #B6BDD2;
- color: black;
-}
-
-#addmenu span {
- padding-left: 10px;
- padding-right: 10px;
-}
-
-#updateElementPanel {
- display: none;
-}
-
-#script_element .panel_wrapper div.current {
- height: 108px;
-}
-
-#style_element .panel_wrapper div.current {
- height: 108px;
-}
-
-#link_element .panel_wrapper div.current {
- height: 140px;
-}
-
-#element_script_value {
- width: 100%;
- height: 100px;
-}
-
-#element_comment_value {
- width: 100%;
- height: 120px;
-}
-
-#element_style_value {
- width: 100%;
- height: 100px;
-}
-
-#element_title, #element_script_src, #element_meta_name, #element_meta_content, #element_base_href, #element_link_href, #element_link_title {
- width: 250px;
-}
-
-.updateElementButton {
- margin-top: 3px;
-}
-
-/* MSIE specific styles */
-
-* html .addbutton, * html .removebutton, * html .moveupbutton, * html .movedownbutton {
- width: 22px;
- height: 22px;
-}
-
-textarea {
- height: 55px;
-}
-
+/* Hide the advanced tab */
+#advanced_tab {
+ display: none;
+}
+
+#metatitle, #metakeywords, #metadescription, #metaauthor, #metacopyright {
+ width: 280px;
+}
+
+#doctype, #docencoding {
+ width: 200px;
+}
+
+#langcode {
+ width: 30px;
+}
+
+#bgimage {
+ width: 220px;
+}
+
+#fontface {
+ width: 240px;
+}
+
+#leftmargin, #rightmargin, #topmargin, #bottommargin {
+ width: 50px;
+}
+
+.panel_wrapper div.current {
+ height: 400px;
+}
+
+#stylesheet, #style {
+ width: 240px;
+}
+
+#doctypes {
+ width: 200px;
+}
+
+/* Head list classes */
+
+.headlistwrapper {
+ width: 100%;
+}
+
+.selected {
+ border: 1px solid #0A246A;
+ background-color: #B6BDD2;
+}
+
+.toolbar {
+ width: 100%;
+}
+
+#headlist {
+ width: 100%;
+ margin-top: 3px;
+ font-size: 11px;
+}
+
+#info, #title_element, #meta_element, #script_element, #style_element, #base_element, #link_element, #comment_element, #unknown_element {
+ display: none;
+}
+
+#addmenu {
+ position: absolute;
+ border: 1px solid gray;
+ display: none;
+ z-index: 100;
+ background-color: white;
+}
+
+#addmenu a {
+ display: block;
+ width: 100%;
+ line-height: 20px;
+ text-decoration: none;
+ background-color: white;
+}
+
+#addmenu a:hover {
+ background-color: #B6BDD2;
+ color: black;
+}
+
+#addmenu span {
+ padding-left: 10px;
+ padding-right: 10px;
+}
+
+#updateElementPanel {
+ display: none;
+}
+
+#script_element .panel_wrapper div.current {
+ height: 108px;
+}
+
+#style_element .panel_wrapper div.current {
+ height: 108px;
+}
+
+#link_element .panel_wrapper div.current {
+ height: 140px;
+}
+
+#element_script_value {
+ width: 100%;
+ height: 100px;
+}
+
+#element_comment_value {
+ width: 100%;
+ height: 120px;
+}
+
+#element_style_value {
+ width: 100%;
+ height: 100px;
+}
+
+#element_title, #element_script_src, #element_meta_name, #element_meta_content, #element_base_href, #element_link_href, #element_link_title {
+ width: 250px;
+}
+
+.updateElementButton {
+ margin-top: 3px;
+}
+
+/* MSIE specific styles */
+
+* html .addbutton, * html .removebutton, * html .moveupbutton, * html .movedownbutton {
+ width: 22px;
+ height: 22px;
+}
+
+textarea {
+ height: 55px;
+}
+
.panel_wrapper div.current {height:420px;}
\ No newline at end of file
diff --git a/assets/plugins/tinymce/tiny_mce/plugins/fullpage/fullpage.htm b/assets/plugins/tinymce/tiny_mce/plugins/fullpage/fullpage.htm
index 14ab8652ea..200f2b8e6c 100644
--- a/assets/plugins/tinymce/tiny_mce/plugins/fullpage/fullpage.htm
+++ b/assets/plugins/tinymce/tiny_mce/plugins/fullpage/fullpage.htm
@@ -1,259 +1,259 @@
-
-
-
- {#fullpage_dlg.title}
-
-
-
-
-
-
-
-
-
-
+
+
+
+ {#fullpage_dlg.title}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {#fullpage_dlg.appearance_textprops}
+
+
+
+ {#fullpage_dlg.fontface}
+
+
+ {#not_set}
+
+
+
+
+
+ {#fullpage_dlg.fontsize}
+
+
+ {#not_set}
+
+
+
+
+
+ {#fullpage_dlg.textcolor}
+
+
+
+
+
+
+
+
+ {#fullpage_dlg.appearance_bgprops}
+
+
+
+ {#fullpage_dlg.bgimage}
+
+
+
+
+
+ {#fullpage_dlg.bgcolor}
+
+
+
+
+
+
+
+
+ {#fullpage_dlg.appearance_marginprops}
+
+
+
+
+
+ {#fullpage_dlg.appearance_linkprops}
+
+
+
+ {#fullpage_dlg.link_color}
+
+
+
+
+ {#fullpage_dlg.visited_color}
+
+
+
+
+
+
+ {#fullpage_dlg.active_color}
+
+
+
+
+
+
+
+
+
+
+
+ {#fullpage_dlg.appearance_style}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/plugins/tinymce/tiny_mce/plugins/fullpage/js/fullpage.js b/assets/plugins/tinymce/tiny_mce/plugins/fullpage/js/fullpage.js
index 3f672ad3ba..66eec2d7b4 100644
--- a/assets/plugins/tinymce/tiny_mce/plugins/fullpage/js/fullpage.js
+++ b/assets/plugins/tinymce/tiny_mce/plugins/fullpage/js/fullpage.js
@@ -1,232 +1,232 @@
-/**
- * fullpage.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-(function() {
- tinyMCEPopup.requireLangPack();
-
- var defaultDocTypes =
- 'XHTML 1.0 Transitional=,' +
- 'XHTML 1.0 Frameset=,' +
- 'XHTML 1.0 Strict=,' +
- 'XHTML 1.1=,' +
- 'HTML 4.01 Transitional=,' +
- 'HTML 4.01 Strict=,' +
- 'HTML 4.01 Frameset=';
-
- var defaultEncodings =
- 'Western european (iso-8859-1)=iso-8859-1,' +
- 'Central European (iso-8859-2)=iso-8859-2,' +
- 'Unicode (UTF-8)=utf-8,' +
- 'Chinese traditional (Big5)=big5,' +
- 'Cyrillic (iso-8859-5)=iso-8859-5,' +
- 'Japanese (iso-2022-jp)=iso-2022-jp,' +
- 'Greek (iso-8859-7)=iso-8859-7,' +
- 'Korean (iso-2022-kr)=iso-2022-kr,' +
- 'ASCII (us-ascii)=us-ascii';
-
- var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings';
- var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px';
-
- function setVal(id, value) {
- var elm = document.getElementById(id);
-
- if (elm) {
- value = value || '';
-
- if (elm.nodeName == "SELECT")
- selectByValue(document.forms[0], id, value);
- else if (elm.type == "checkbox")
- elm.checked = !!value;
- else
- elm.value = value;
- }
- };
-
- function getVal(id) {
- var elm = document.getElementById(id);
-
- if (elm.nodeName == "SELECT")
- return elm.options[elm.selectedIndex].value;
-
- if (elm.type == "checkbox")
- return elm.checked;
-
- return elm.value;
- };
-
- window.FullPageDialog = {
- changedStyle : function() {
- var val, styles = tinyMCEPopup.editor.dom.parseStyle(getVal('style'));
-
- setVal('fontface', styles['font-face']);
- setVal('fontsize', styles['font-size']);
- setVal('textcolor', styles['color']);
-
- if (val = styles['background-image'])
- setVal('bgimage', val.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"));
- else
- setVal('bgimage', '');
-
- setVal('bgcolor', styles['background-color']);
-
- // Reset margin form elements
- setVal('topmargin', '');
- setVal('rightmargin', '');
- setVal('bottommargin', '');
- setVal('leftmargin', '');
-
- // Expand margin
- if (val = styles['margin']) {
- val = val.split(' ');
- styles['margin-top'] = val[0] || '';
- styles['margin-right'] = val[1] || val[0] || '';
- styles['margin-bottom'] = val[2] || val[0] || '';
- styles['margin-left'] = val[3] || val[0] || '';
- }
-
- if (val = styles['margin-top'])
- setVal('topmargin', val.replace(/px/, ''));
-
- if (val = styles['margin-right'])
- setVal('rightmargin', val.replace(/px/, ''));
-
- if (val = styles['margin-bottom'])
- setVal('bottommargin', val.replace(/px/, ''));
-
- if (val = styles['margin-left'])
- setVal('leftmargin', val.replace(/px/, ''));
-
- updateColor('bgcolor_pick', 'bgcolor');
- updateColor('textcolor_pick', 'textcolor');
- },
-
- changedStyleProp : function() {
- var val, dom = tinyMCEPopup.editor.dom, styles = dom.parseStyle(getVal('style'));
-
- styles['font-face'] = getVal('fontface');
- styles['font-size'] = getVal('fontsize');
- styles['color'] = getVal('textcolor');
- styles['background-color'] = getVal('bgcolor');
-
- if (val = getVal('bgimage'))
- styles['background-image'] = "url('" + val + "')";
- else
- styles['background-image'] = '';
-
- delete styles['margin'];
-
- if (val = getVal('topmargin'))
- styles['margin-top'] = val + "px";
- else
- styles['margin-top'] = '';
-
- if (val = getVal('rightmargin'))
- styles['margin-right'] = val + "px";
- else
- styles['margin-right'] = '';
-
- if (val = getVal('bottommargin'))
- styles['margin-bottom'] = val + "px";
- else
- styles['margin-bottom'] = '';
-
- if (val = getVal('leftmargin'))
- styles['margin-left'] = val + "px";
- else
- styles['margin-left'] = '';
-
- // Serialize, parse and reserialize this will compress redundant styles
- setVal('style', dom.serializeStyle(dom.parseStyle(dom.serializeStyle(styles))));
- this.changedStyle();
- },
-
- update : function() {
- var data = {};
-
- tinymce.each(tinyMCEPopup.dom.select('select,input,textarea'), function(node) {
- data[node.id] = getVal(node.id);
- });
-
- tinyMCEPopup.editor.plugins.fullpage._dataToHtml(data);
- tinyMCEPopup.close();
- }
- };
-
- function init() {
- var form = document.forms[0], i, item, list, editor = tinyMCEPopup.editor;
-
- // Setup doctype select box
- list = editor.getParam("fullpage_doctypes", defaultDocTypes).split(',');
- for (i = 0; i < list.length; i++) {
- item = list[i].split('=');
-
- if (item.length > 1)
- addSelectValue(form, 'doctype', item[0], item[1]);
- }
-
- // Setup fonts select box
- list = editor.getParam("fullpage_fonts", defaultFontNames).split(';');
- for (i = 0; i < list.length; i++) {
- item = list[i].split('=');
-
- if (item.length > 1)
- addSelectValue(form, 'fontface', item[0], item[1]);
- }
-
- // Setup fontsize select box
- list = editor.getParam("fullpage_fontsizes", defaultFontSizes).split(',');
- for (i = 0; i < list.length; i++)
- addSelectValue(form, 'fontsize', list[i], list[i]);
-
- // Setup encodings select box
- list = editor.getParam("fullpage_encodings", defaultEncodings).split(',');
- for (i = 0; i < list.length; i++) {
- item = list[i].split('=');
-
- if (item.length > 1)
- addSelectValue(form, 'docencoding', item[0], item[1]);
- }
-
- // Setup color pickers
- document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
- document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color');
- document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color');
- document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color');
- document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor');
- document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage');
- document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage');
-
- // Resize some elements
- if (isVisible('stylesheetbrowser'))
- document.getElementById('stylesheet').style.width = '220px';
-
- if (isVisible('link_href_browser'))
- document.getElementById('element_link_href').style.width = '230px';
-
- if (isVisible('bgimage_browser'))
- document.getElementById('bgimage').style.width = '210px';
-
- // Update form
- tinymce.each(tinyMCEPopup.getWindowArg('data'), function(value, key) {
- setVal(key, value);
- });
-
- FullPageDialog.changedStyle();
-
- // Update colors
- updateColor('textcolor_pick', 'textcolor');
- updateColor('bgcolor_pick', 'bgcolor');
- updateColor('visited_color_pick', 'visited_color');
- updateColor('active_color_pick', 'active_color');
- updateColor('link_color_pick', 'link_color');
- };
-
- tinyMCEPopup.onInit.add(init);
-})();
+/**
+ * fullpage.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinyMCEPopup.requireLangPack();
+
+ var defaultDocTypes =
+ 'XHTML 1.0 Transitional=,' +
+ 'XHTML 1.0 Frameset=,' +
+ 'XHTML 1.0 Strict=,' +
+ 'XHTML 1.1=,' +
+ 'HTML 4.01 Transitional=,' +
+ 'HTML 4.01 Strict=,' +
+ 'HTML 4.01 Frameset=';
+
+ var defaultEncodings =
+ 'Western european (iso-8859-1)=iso-8859-1,' +
+ 'Central European (iso-8859-2)=iso-8859-2,' +
+ 'Unicode (UTF-8)=utf-8,' +
+ 'Chinese traditional (Big5)=big5,' +
+ 'Cyrillic (iso-8859-5)=iso-8859-5,' +
+ 'Japanese (iso-2022-jp)=iso-2022-jp,' +
+ 'Greek (iso-8859-7)=iso-8859-7,' +
+ 'Korean (iso-2022-kr)=iso-2022-kr,' +
+ 'ASCII (us-ascii)=us-ascii';
+
+ var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings';
+ var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px';
+
+ function setVal(id, value) {
+ var elm = document.getElementById(id);
+
+ if (elm) {
+ value = value || '';
+
+ if (elm.nodeName == "SELECT")
+ selectByValue(document.forms[0], id, value);
+ else if (elm.type == "checkbox")
+ elm.checked = !!value;
+ else
+ elm.value = value;
+ }
+ };
+
+ function getVal(id) {
+ var elm = document.getElementById(id);
+
+ if (elm.nodeName == "SELECT")
+ return elm.options[elm.selectedIndex].value;
+
+ if (elm.type == "checkbox")
+ return elm.checked;
+
+ return elm.value;
+ };
+
+ window.FullPageDialog = {
+ changedStyle : function() {
+ var val, styles = tinyMCEPopup.editor.dom.parseStyle(getVal('style'));
+
+ setVal('fontface', styles['font-face']);
+ setVal('fontsize', styles['font-size']);
+ setVal('textcolor', styles['color']);
+
+ if (val = styles['background-image'])
+ setVal('bgimage', val.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"));
+ else
+ setVal('bgimage', '');
+
+ setVal('bgcolor', styles['background-color']);
+
+ // Reset margin form elements
+ setVal('topmargin', '');
+ setVal('rightmargin', '');
+ setVal('bottommargin', '');
+ setVal('leftmargin', '');
+
+ // Expand margin
+ if (val = styles['margin']) {
+ val = val.split(' ');
+ styles['margin-top'] = val[0] || '';
+ styles['margin-right'] = val[1] || val[0] || '';
+ styles['margin-bottom'] = val[2] || val[0] || '';
+ styles['margin-left'] = val[3] || val[0] || '';
+ }
+
+ if (val = styles['margin-top'])
+ setVal('topmargin', val.replace(/px/, ''));
+
+ if (val = styles['margin-right'])
+ setVal('rightmargin', val.replace(/px/, ''));
+
+ if (val = styles['margin-bottom'])
+ setVal('bottommargin', val.replace(/px/, ''));
+
+ if (val = styles['margin-left'])
+ setVal('leftmargin', val.replace(/px/, ''));
+
+ updateColor('bgcolor_pick', 'bgcolor');
+ updateColor('textcolor_pick', 'textcolor');
+ },
+
+ changedStyleProp : function() {
+ var val, dom = tinyMCEPopup.editor.dom, styles = dom.parseStyle(getVal('style'));
+
+ styles['font-face'] = getVal('fontface');
+ styles['font-size'] = getVal('fontsize');
+ styles['color'] = getVal('textcolor');
+ styles['background-color'] = getVal('bgcolor');
+
+ if (val = getVal('bgimage'))
+ styles['background-image'] = "url('" + val + "')";
+ else
+ styles['background-image'] = '';
+
+ delete styles['margin'];
+
+ if (val = getVal('topmargin'))
+ styles['margin-top'] = val + "px";
+ else
+ styles['margin-top'] = '';
+
+ if (val = getVal('rightmargin'))
+ styles['margin-right'] = val + "px";
+ else
+ styles['margin-right'] = '';
+
+ if (val = getVal('bottommargin'))
+ styles['margin-bottom'] = val + "px";
+ else
+ styles['margin-bottom'] = '';
+
+ if (val = getVal('leftmargin'))
+ styles['margin-left'] = val + "px";
+ else
+ styles['margin-left'] = '';
+
+ // Serialize, parse and reserialize this will compress redundant styles
+ setVal('style', dom.serializeStyle(dom.parseStyle(dom.serializeStyle(styles))));
+ this.changedStyle();
+ },
+
+ update : function() {
+ var data = {};
+
+ tinymce.each(tinyMCEPopup.dom.select('select,input,textarea'), function(node) {
+ data[node.id] = getVal(node.id);
+ });
+
+ tinyMCEPopup.editor.plugins.fullpage._dataToHtml(data);
+ tinyMCEPopup.close();
+ }
+ };
+
+ function init() {
+ var form = document.forms[0], i, item, list, editor = tinyMCEPopup.editor;
+
+ // Setup doctype select box
+ list = editor.getParam("fullpage_doctypes", defaultDocTypes).split(',');
+ for (i = 0; i < list.length; i++) {
+ item = list[i].split('=');
+
+ if (item.length > 1)
+ addSelectValue(form, 'doctype', item[0], item[1]);
+ }
+
+ // Setup fonts select box
+ list = editor.getParam("fullpage_fonts", defaultFontNames).split(';');
+ for (i = 0; i < list.length; i++) {
+ item = list[i].split('=');
+
+ if (item.length > 1)
+ addSelectValue(form, 'fontface', item[0], item[1]);
+ }
+
+ // Setup fontsize select box
+ list = editor.getParam("fullpage_fontsizes", defaultFontSizes).split(',');
+ for (i = 0; i < list.length; i++)
+ addSelectValue(form, 'fontsize', list[i], list[i]);
+
+ // Setup encodings select box
+ list = editor.getParam("fullpage_encodings", defaultEncodings).split(',');
+ for (i = 0; i < list.length; i++) {
+ item = list[i].split('=');
+
+ if (item.length > 1)
+ addSelectValue(form, 'docencoding', item[0], item[1]);
+ }
+
+ // Setup color pickers
+ document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
+ document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color');
+ document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color');
+ document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color');
+ document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor');
+ document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage');
+ document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage');
+
+ // Resize some elements
+ if (isVisible('stylesheetbrowser'))
+ document.getElementById('stylesheet').style.width = '220px';
+
+ if (isVisible('link_href_browser'))
+ document.getElementById('element_link_href').style.width = '230px';
+
+ if (isVisible('bgimage_browser'))
+ document.getElementById('bgimage').style.width = '210px';
+
+ // Update form
+ tinymce.each(tinyMCEPopup.getWindowArg('data'), function(value, key) {
+ setVal(key, value);
+ });
+
+ FullPageDialog.changedStyle();
+
+ // Update colors
+ updateColor('textcolor_pick', 'textcolor');
+ updateColor('bgcolor_pick', 'bgcolor');
+ updateColor('visited_color_pick', 'visited_color');
+ updateColor('active_color_pick', 'active_color');
+ updateColor('link_color_pick', 'link_color');
+ };
+
+ tinyMCEPopup.onInit.add(init);
+})();
From 28ddd43038e4699befc6d84891c93d075027789c Mon Sep 17 00:00:00 2001
From: yama
Date: Sat, 20 Apr 2013 19:31:22 +0900
Subject: [PATCH 004/530] Refactor #9861 Should be core files line feed code is
"lf" (part 3) http://tracker.modx.com/issues/9861
---
.../modules/docmanager/lang/english.inc.php | 324 +++++++++---------
.../docmanager/lang/japanese-utf8.inc.php | 322 ++++++++---------
.../docmanager/lang/russian-UTF8.inc.php | 324 +++++++++---------
3 files changed, 485 insertions(+), 485 deletions(-)
diff --git a/assets/modules/docmanager/lang/english.inc.php b/assets/modules/docmanager/lang/english.inc.php
index f5e44bc31b..199306a556 100644
--- a/assets/modules/docmanager/lang/english.inc.php
+++ b/assets/modules/docmanager/lang/english.inc.php
@@ -1,162 +1,162 @@
-Key (where n is a document ID number):
- n* - Change setting for this document and immediate children
- n** - Change setting for this document and ALL children
- n-n2 - Change setting for this range of documents
- n - Change setting for a single document
- Example: 1*,4**,2-20,25 - This will change the selected setting
- for documents 1 and its children, document 4 and all children, documents 2
- through 20 and document 25.
';
-$_lang['DM_select_tree'] ='View and select documents using the Document Tree';
-
-//-- process tree/range messages
-$_lang['DM_process_noselection'] = 'No selection was made. ';
-$_lang['DM_process_novalues'] = 'No values have been specified.';
-$_lang['DM_process_limits_error'] = 'Upper limit less than lower limit:';
-$_lang['DM_process_invalid_error'] = 'Invalid Value:';
-$_lang['DM_process_update_success'] = 'Update was completed successfully, with no errors.';
-$_lang['DM_process_update_error'] = 'Update has completed but encountered errors:';
-$_lang['DM_process_back'] = 'Back';
-
-//-- manager access logging
-$_lang['DM_log_template'] = 'Document Manager: Templates changed.';
-$_lang['DM_log_templatevariables'] = 'Document Manager: Template variables changed.';
-$_lang['DM_log_docpermissions'] ='Document Manager: Document Permissions changed.';
-$_lang['DM_log_sortmenu']='Document Manager: Menu Index operation completed.';
-$_lang['DM_log_publish']='Document Manager: Document Manager: Documents Published/Unpublished settings changed.';
-$_lang['DM_log_hidemenu']='Document Manager: Documents Hide/Show in Menu settings changed.';
-$_lang['DM_log_search']='Document Manager: Documents Searchable/Unsearchable settings changed.';
-$_lang['DM_log_cache']='Document Manager: Documents Cacheable/Uncacheable settings changed.';
-$_lang['DM_log_richtext']='Document Manager: Documents Use Richtext Editor settings changed.';
-$_lang['DM_log_delete']='Document Manager: Documents Delete/Undelete settings changed.';
-$_lang['DM_log_dates']='Document Manager: Documents Date settings changed.';
-$_lang['DM_log_authors']='Document Manager: Documents Author settings changed.';
-
-?>
+Key (where n is a document ID number):
+ n* - Change setting for this document and immediate children
+ n** - Change setting for this document and ALL children
+ n-n2 - Change setting for this range of documents
+ n - Change setting for a single document
+ Example: 1*,4**,2-20,25 - This will change the selected setting
+ for documents 1 and its children, document 4 and all children, documents 2
+ through 20 and document 25.
';
+$_lang['DM_select_tree'] ='View and select documents using the Document Tree';
+
+//-- process tree/range messages
+$_lang['DM_process_noselection'] = 'No selection was made. ';
+$_lang['DM_process_novalues'] = 'No values have been specified.';
+$_lang['DM_process_limits_error'] = 'Upper limit less than lower limit:';
+$_lang['DM_process_invalid_error'] = 'Invalid Value:';
+$_lang['DM_process_update_success'] = 'Update was completed successfully, with no errors.';
+$_lang['DM_process_update_error'] = 'Update has completed but encountered errors:';
+$_lang['DM_process_back'] = 'Back';
+
+//-- manager access logging
+$_lang['DM_log_template'] = 'Document Manager: Templates changed.';
+$_lang['DM_log_templatevariables'] = 'Document Manager: Template variables changed.';
+$_lang['DM_log_docpermissions'] ='Document Manager: Document Permissions changed.';
+$_lang['DM_log_sortmenu']='Document Manager: Menu Index operation completed.';
+$_lang['DM_log_publish']='Document Manager: Document Manager: Documents Published/Unpublished settings changed.';
+$_lang['DM_log_hidemenu']='Document Manager: Documents Hide/Show in Menu settings changed.';
+$_lang['DM_log_search']='Document Manager: Documents Searchable/Unsearchable settings changed.';
+$_lang['DM_log_cache']='Document Manager: Documents Cacheable/Uncacheable settings changed.';
+$_lang['DM_log_richtext']='Document Manager: Documents Use Richtext Editor settings changed.';
+$_lang['DM_log_delete']='Document Manager: Documents Delete/Undelete settings changed.';
+$_lang['DM_log_dates']='Document Manager: Documents Date settings changed.';
+$_lang['DM_log_authors']='Document Manager: Documents Author settings changed.';
+
+?>
diff --git a/assets/modules/docmanager/lang/japanese-utf8.inc.php b/assets/modules/docmanager/lang/japanese-utf8.inc.php
index 193f32055b..0b3f8657bd 100755
--- a/assets/modules/docmanager/lang/japanese-utf8.inc.php
+++ b/assets/modules/docmanager/lang/japanese-utf8.inc.php
@@ -1,162 +1,162 @@
-サイトルートか、並べ替えたい範囲の親リソース(コンテナ)をクリックしてください。';
-$_lang['DM_sort_updating'] = '更新中 ...';
-$_lang['DM_sort_updated'] = '更新しました。「閉じる」または「戻る」ボタンをクリックしてください。';
-$_lang['DM_sort_nochildren'] = 'このリソースにはサブリソースがありません。';
-$_lang['DM_sort_noid']='リソースが選択されていません。戻ってリソースを選択してください。';
-
-//-- other tab
-$_lang['DM_other_header'] = 'リソースの各種設定';
-$_lang['DM_misc_label'] = '変更対象の設定:';
-$_lang['DM_misc_desc'] = '変更する設定をドロップダウンメニューから選択してください。そして必要なオプションを指定します。一度にひとつの設定しか変更できません。';
-
-$_lang['DM_other_dropdown_publish'] = '公開/非公開';
-$_lang['DM_other_dropdown_show'] = 'メニューに表示/非表示';
-$_lang['DM_other_dropdown_search'] = '検索対象/非対象';
-$_lang['DM_other_dropdown_cache'] = 'キャッシュ/不可';
-$_lang['DM_other_dropdown_richtext'] = 'エディタ/なし';
-$_lang['DM_other_dropdown_delete'] = '削除/復活';
-
-//-- radio button text
-$_lang['DM_other_publish_radio1'] = '公開';
-$_lang['DM_other_publish_radio2'] = '非公開';
-$_lang['DM_other_show_radio1'] = 'メニューから隠す';
-$_lang['DM_other_show_radio2'] = 'メニューに表示';
-$_lang['DM_other_search_radio1'] = '検索対象';
-$_lang['DM_other_search_radio2'] = '検索しない';
-$_lang['DM_other_cache_radio1'] = 'キャッシュする';
-$_lang['DM_other_cache_radio2'] = 'キャッシュしない';
-$_lang['DM_other_richtext_radio1'] = 'エディタ使用';
-$_lang['DM_other_richtext_radio2'] = 'エディタ不要';
-$_lang['DM_other_delete_radio1'] = '削除';
-$_lang['DM_other_delete_radio2'] = '削除から復活';
-
-//-- adjust dates
-$_lang['DM_adjust_dates_header'] = 'リソースの各種日時設定';
-$_lang['DM_adjust_dates_desc'] = '複数のリソースの日時設定をまとめて変更できます。';
-$_lang['DM_view_calendar'] = 'カレンダーを表示';
-$_lang['DM_clear_date'] = 'リセット';
-
-//-- adjust authors
-$_lang['DM_adjust_authors_header'] = '作成者などの設定';
-$_lang['DM_adjust_authors_desc'] = 'リソースの作成者/編集者をリストから選んでください';
-$_lang['DM_adjust_authors_createdby'] = '作成者:';
-$_lang['DM_adjust_authors_editedby'] = '編集者:';
-$_lang['DM_adjust_authors_noselection'] = '変更なし';
-
- //-- labels
-$_lang['DM_date_pubdate'] = '公開日時:';
-$_lang['DM_date_unpubdate'] = '公開終了日時:';
-$_lang['DM_date_createdon'] = '作成日時:';
-$_lang['DM_date_editedon'] = '編集日時:';
-//$_lang['DM_date_deletedon'] = 'Deleted On Date';
-
-$_lang['DM_date_notset'] = ' (変更しません)';
-//deprecated
-$_lang['DM_date_dateselect_label'] = '日付を選択: ';
-
-//-- document select section
-$_lang['DM_select_submit'] = '適用';
-$_lang['DM_select_range'] = 'ID指定画面に戻ります';
-$_lang['DM_select_range_text'] = '指定方法(n、m はリソースIDを示す数字です):
- n* - その親リソース(コンテナ)と直下のサブリソースを意味する指定
- n** - その親リソース(コンテナ)と配下の子、孫など全てのリソースを意味する指定
- n-m - n から m までのIDの範囲を意味る指定。n、m を含みます
- n - IDがnの1つのリソースを意味する指定
- 例:1*,4**,2-20,25 - この指定では、1、1のサブリソース、4、4の全配下リソース、
- 2から20までの19個のリソース及び25 の各IDのリソースが指定されています。 ';
-$_lang['DM_select_tree'] ='ツリー表示からリソースを選択します';
-
-//-- process tree/range messages
-$_lang['DM_process_noselection'] = '必要な指定がされていません。';
-$_lang['DM_process_novalues'] = '値が指定されていませんでした。';
-$_lang['DM_process_limits_error'] = '上限が下限よりも小さいです:';
-$_lang['DM_process_invalid_error'] = '値がイレギュラーです ';
-$_lang['DM_process_update_success'] = '変更は無事完了しました。';
-$_lang['DM_process_update_error'] = '変更は完了しましたが、エラーがありました:';
-$_lang['DM_process_back'] = '戻る';
-
-//-- manager access logging
-$_lang['DM_log_template'] = 'Doc Manager: テンプレートを変更しました。';
-$_lang['DM_log_templatevariables'] = 'Doc Manager: テンプレート変数を変更しました。';
-$_lang['DM_log_docpermissions'] ='Doc Manager: リソースのアクセス制限を変更しました。';
-$_lang['DM_log_sortmenu']='Document Manager: メニューインデックス操作を完了しました。';
-$_lang['DM_log_publish']='Document Manager: リソースの公開/非公開を変更しました。';
-$_lang['DM_log_hidemenu']='Document Manager: リソースのメニュー表示/非表示を変更しました。';
-$_lang['DM_log_search']='Document Manager: リソースの検索対象/非対象を変更しました。';
-$_lang['DM_log_cache']='Document Manager: リソースのキャッシュ可/不可を変更しました。';
-$_lang['DM_log_richtext']='Document Manager: リソースのリッチテキストエディタの設定を変更しました。';
-$_lang['DM_log_delete']='Document Manager: リソースの削除/復活を変更しました。';
-$_lang['DM_log_dates']='Document Manager: リソースの各種日付を変更しました。';
-$_lang['DM_log_authors']='Document Manager: リソースの作成者などの情報を変更しました。';
-
+サイトルートか、並べ替えたい範囲の親リソース(コンテナ)をクリックしてください。';
+$_lang['DM_sort_updating'] = '更新中 ...';
+$_lang['DM_sort_updated'] = '更新しました。「閉じる」または「戻る」ボタンをクリックしてください。';
+$_lang['DM_sort_nochildren'] = 'このリソースにはサブリソースがありません。';
+$_lang['DM_sort_noid']='リソースが選択されていません。戻ってリソースを選択してください。';
+
+//-- other tab
+$_lang['DM_other_header'] = 'リソースの各種設定';
+$_lang['DM_misc_label'] = '変更対象の設定:';
+$_lang['DM_misc_desc'] = '変更する設定をドロップダウンメニューから選択してください。そして必要なオプションを指定します。一度にひとつの設定しか変更できません。';
+
+$_lang['DM_other_dropdown_publish'] = '公開/非公開';
+$_lang['DM_other_dropdown_show'] = 'メニューに表示/非表示';
+$_lang['DM_other_dropdown_search'] = '検索対象/非対象';
+$_lang['DM_other_dropdown_cache'] = 'キャッシュ/不可';
+$_lang['DM_other_dropdown_richtext'] = 'エディタ/なし';
+$_lang['DM_other_dropdown_delete'] = '削除/復活';
+
+//-- radio button text
+$_lang['DM_other_publish_radio1'] = '公開';
+$_lang['DM_other_publish_radio2'] = '非公開';
+$_lang['DM_other_show_radio1'] = 'メニューから隠す';
+$_lang['DM_other_show_radio2'] = 'メニューに表示';
+$_lang['DM_other_search_radio1'] = '検索対象';
+$_lang['DM_other_search_radio2'] = '検索しない';
+$_lang['DM_other_cache_radio1'] = 'キャッシュする';
+$_lang['DM_other_cache_radio2'] = 'キャッシュしない';
+$_lang['DM_other_richtext_radio1'] = 'エディタ使用';
+$_lang['DM_other_richtext_radio2'] = 'エディタ不要';
+$_lang['DM_other_delete_radio1'] = '削除';
+$_lang['DM_other_delete_radio2'] = '削除から復活';
+
+//-- adjust dates
+$_lang['DM_adjust_dates_header'] = 'リソースの各種日時設定';
+$_lang['DM_adjust_dates_desc'] = '複数のリソースの日時設定をまとめて変更できます。';
+$_lang['DM_view_calendar'] = 'カレンダーを表示';
+$_lang['DM_clear_date'] = 'リセット';
+
+//-- adjust authors
+$_lang['DM_adjust_authors_header'] = '作成者などの設定';
+$_lang['DM_adjust_authors_desc'] = 'リソースの作成者/編集者をリストから選んでください';
+$_lang['DM_adjust_authors_createdby'] = '作成者:';
+$_lang['DM_adjust_authors_editedby'] = '編集者:';
+$_lang['DM_adjust_authors_noselection'] = '変更なし';
+
+ //-- labels
+$_lang['DM_date_pubdate'] = '公開日時:';
+$_lang['DM_date_unpubdate'] = '公開終了日時:';
+$_lang['DM_date_createdon'] = '作成日時:';
+$_lang['DM_date_editedon'] = '編集日時:';
+//$_lang['DM_date_deletedon'] = 'Deleted On Date';
+
+$_lang['DM_date_notset'] = ' (変更しません)';
+//deprecated
+$_lang['DM_date_dateselect_label'] = '日付を選択: ';
+
+//-- document select section
+$_lang['DM_select_submit'] = '適用';
+$_lang['DM_select_range'] = 'ID指定画面に戻ります';
+$_lang['DM_select_range_text'] = '指定方法(n、m はリソースIDを示す数字です):
+ n* - その親リソース(コンテナ)と直下のサブリソースを意味する指定
+ n** - その親リソース(コンテナ)と配下の子、孫など全てのリソースを意味する指定
+ n-m - n から m までのIDの範囲を意味る指定。n、m を含みます
+ n - IDがnの1つのリソースを意味する指定
+ 例:1*,4**,2-20,25 - この指定では、1、1のサブリソース、4、4の全配下リソース、
+ 2から20までの19個のリソース及び25 の各IDのリソースが指定されています。 ';
+$_lang['DM_select_tree'] ='ツリー表示からリソースを選択します';
+
+//-- process tree/range messages
+$_lang['DM_process_noselection'] = '必要な指定がされていません。';
+$_lang['DM_process_novalues'] = '値が指定されていませんでした。';
+$_lang['DM_process_limits_error'] = '上限が下限よりも小さいです:';
+$_lang['DM_process_invalid_error'] = '値がイレギュラーです ';
+$_lang['DM_process_update_success'] = '変更は無事完了しました。';
+$_lang['DM_process_update_error'] = '変更は完了しましたが、エラーがありました:';
+$_lang['DM_process_back'] = '戻る';
+
+//-- manager access logging
+$_lang['DM_log_template'] = 'Doc Manager: テンプレートを変更しました。';
+$_lang['DM_log_templatevariables'] = 'Doc Manager: テンプレート変数を変更しました。';
+$_lang['DM_log_docpermissions'] ='Doc Manager: リソースのアクセス制限を変更しました。';
+$_lang['DM_log_sortmenu']='Document Manager: メニューインデックス操作を完了しました。';
+$_lang['DM_log_publish']='Document Manager: リソースの公開/非公開を変更しました。';
+$_lang['DM_log_hidemenu']='Document Manager: リソースのメニュー表示/非表示を変更しました。';
+$_lang['DM_log_search']='Document Manager: リソースの検索対象/非対象を変更しました。';
+$_lang['DM_log_cache']='Document Manager: リソースのキャッシュ可/不可を変更しました。';
+$_lang['DM_log_richtext']='Document Manager: リソースのリッチテキストエディタの設定を変更しました。';
+$_lang['DM_log_delete']='Document Manager: リソースの削除/復活を変更しました。';
+$_lang['DM_log_dates']='Document Manager: リソースの各種日付を変更しました。';
+$_lang['DM_log_authors']='Document Manager: リソースの作成者などの情報を変更しました。';
+
?>
\ No newline at end of file
diff --git a/assets/modules/docmanager/lang/russian-UTF8.inc.php b/assets/modules/docmanager/lang/russian-UTF8.inc.php
index 7200da9692..8913928d7d 100755
--- a/assets/modules/docmanager/lang/russian-UTF8.inc.php
+++ b/assets/modules/docmanager/lang/russian-UTF8.inc.php
@@ -1,163 +1,163 @@
-Можно использовать следующий синтаксис при задании диапазона (вместо "n" указывайте число ID ресурса):
-
- n* - изменить свойства ресурса с ID=n и непосредственных дочерних ресурсов;
- n** - изменить свойства ресурса с ID=n и ВСЕХ его дочерних ресурсов;
- n-n2 - изменить свойства для всех ресурсов, ID которых находятся в указанном диапазоне;
- n - изменить свойства для одного ресурса с ID=n;
- n*,n**,n-n2,n - можно сразу указать несколько диапазонов, разделяя их запятыми.
- Пример: 1*,4**,2-20,25 - будут изменены свойства для ресурса с ID=1 и его непосредственных дочерних ресурсов, ресурса с ID=4 и всех его дочерних ресурсов, ресурсов с ID в диапазоне от 2 до 20, и ресурса с ID=25.
';
-$_lang['DM_select_tree'] = 'Просмотреть и выбрать ресурсы в дереве';
-
-//-- process tree/range messages
-$_lang['DM_process_noselection'] = 'Ничего не выбрано. ';
-$_lang['DM_process_novalues'] = 'Никаких значений не задано.';
-$_lang['DM_process_limits_error'] = 'Верхняя граница диапазона меньше нижней границы:';
-$_lang['DM_process_invalid_error'] = 'Недопустимое значение:';
-$_lang['DM_process_update_success'] = 'Изменение прошло успешно.';
-$_lang['DM_process_update_error'] = 'Изменение завершено с ошибками:';
-$_lang['DM_process_back'] = 'Назад';
-
-//-- manager access logging
-$_lang['DM_log_template'] = 'Менеджер ресурсов: шаблоны изменены.';
-$_lang['DM_log_templatevariables'] = 'Менеджер ресурсов: параметры (TV) изменены.';
-$_lang['DM_log_docpermissions'] = 'Менеджер ресурсов: права на ресурсы изменены.';
-$_lang['DM_log_sortmenu'] = 'Менеджер ресурсов: изменение индексов пунктов меню завершено.';
-$_lang['DM_log_publish'] = 'Менеджер ресурсов: свойство ресурсов "Опубликовать / Отменить публикацию" изменено.';
-$_lang['DM_log_hidemenu'] = 'Менеджер ресурсов: свойство ресурсов "Показывать / Не показывать в меню" изменено.';
-$_lang['DM_log_search'] = 'Менеджер ресурсов: свойство ресурсов "Разрешить / Запретить поиск в содержимом" изменено.';
-$_lang['DM_log_cache'] = 'Менеджер ресурсов: свойство ресурсов "Кэшировать / Не кэшировать" изменено.';
-$_lang['DM_log_richtext'] = 'Менеджер ресурсов: свойство ресурсов "Использовать / Не использовать HTML-редактор" изменено.';
-$_lang['DM_log_delete'] = 'Менеджер ресурсов: удаление / отмена удаления прошла успешно.';
-$_lang['DM_log_dates'] = 'Менеджер ресурсов: даты ресурсов изменены.';
-$_lang['DM_log_authors'] = 'Менеджер ресурсов: авторы ресурсов изменены.';
-
+Можно использовать следующий синтаксис при задании диапазона (вместо "n" указывайте число ID ресурса):
+
+ n* - изменить свойства ресурса с ID=n и непосредственных дочерних ресурсов;
+ n** - изменить свойства ресурса с ID=n и ВСЕХ его дочерних ресурсов;
+ n-n2 - изменить свойства для всех ресурсов, ID которых находятся в указанном диапазоне;
+ n - изменить свойства для одного ресурса с ID=n;
+ n*,n**,n-n2,n - можно сразу указать несколько диапазонов, разделяя их запятыми.
+ Пример: 1*,4**,2-20,25 - будут изменены свойства для ресурса с ID=1 и его непосредственных дочерних ресурсов, ресурса с ID=4 и всех его дочерних ресурсов, ресурсов с ID в диапазоне от 2 до 20, и ресурса с ID=25.
';
+$_lang['DM_select_tree'] = 'Просмотреть и выбрать ресурсы в дереве';
+
+//-- process tree/range messages
+$_lang['DM_process_noselection'] = 'Ничего не выбрано. ';
+$_lang['DM_process_novalues'] = 'Никаких значений не задано.';
+$_lang['DM_process_limits_error'] = 'Верхняя граница диапазона меньше нижней границы:';
+$_lang['DM_process_invalid_error'] = 'Недопустимое значение:';
+$_lang['DM_process_update_success'] = 'Изменение прошло успешно.';
+$_lang['DM_process_update_error'] = 'Изменение завершено с ошибками:';
+$_lang['DM_process_back'] = 'Назад';
+
+//-- manager access logging
+$_lang['DM_log_template'] = 'Менеджер ресурсов: шаблоны изменены.';
+$_lang['DM_log_templatevariables'] = 'Менеджер ресурсов: параметры (TV) изменены.';
+$_lang['DM_log_docpermissions'] = 'Менеджер ресурсов: права на ресурсы изменены.';
+$_lang['DM_log_sortmenu'] = 'Менеджер ресурсов: изменение индексов пунктов меню завершено.';
+$_lang['DM_log_publish'] = 'Менеджер ресурсов: свойство ресурсов "Опубликовать / Отменить публикацию" изменено.';
+$_lang['DM_log_hidemenu'] = 'Менеджер ресурсов: свойство ресурсов "Показывать / Не показывать в меню" изменено.';
+$_lang['DM_log_search'] = 'Менеджер ресурсов: свойство ресурсов "Разрешить / Запретить поиск в содержимом" изменено.';
+$_lang['DM_log_cache'] = 'Менеджер ресурсов: свойство ресурсов "Кэшировать / Не кэшировать" изменено.';
+$_lang['DM_log_richtext'] = 'Менеджер ресурсов: свойство ресурсов "Использовать / Не использовать HTML-редактор" изменено.';
+$_lang['DM_log_delete'] = 'Менеджер ресурсов: удаление / отмена удаления прошла успешно.';
+$_lang['DM_log_dates'] = 'Менеджер ресурсов: даты ресурсов изменены.';
+$_lang['DM_log_authors'] = 'Менеджер ресурсов: авторы ресурсов изменены.';
+
?>
\ No newline at end of file
From 72f6068a71856853b8d05f29d1d28f2dab3ae3bd Mon Sep 17 00:00:00 2001
From: yama
Date: Sat, 20 Apr 2013 19:31:36 +0900
Subject: [PATCH 005/530] Refactor #9861 Should be core files line feed code is
"lf" (part 4) http://tracker.modx.com/issues/9861
---
manager/frames/1.php | 72 +-
manager/includes/session_keepalive.php | 42 +-
.../php/Commands/GetFoldersAndFiles.php | 368 +++++-----
manager/media/style/common/login.tpl | 688 +++++++++---------
4 files changed, 585 insertions(+), 585 deletions(-)
diff --git a/manager/frames/1.php b/manager/frames/1.php
index 05692303bf..b33848b85f 100755
--- a/manager/frames/1.php
+++ b/manager/frames/1.php
@@ -1,36 +1,36 @@
-INCLUDE_ORDERING_ERROR Please use the MODx Content Manager instead of accessing this file directly.");
-include_once ("browsercheck.inc.php");
-$browser = $client->property('browser');
-$_SESSION['browser'] = $browser;
-$version = $client->property('version');
-$_SESSION['browser_version'] = $version;
-$mxla = $modx_lang_attribute ? $modx_lang_attribute : 'en';
-if(!isset($modx->config['manager_menu_height'])) $modx->config['manager_menu_height'] = '70';
-if(!isset($modx->config['manager_tree_width'])) $modx->config['manager_tree_width'] = '260';
-?>
-
->
-
- - (MODX CMS Manager)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-This software requires a browser with support for frames.
-
+INCLUDE_ORDERING_ERROR Please use the MODx Content Manager instead of accessing this file directly.");
+include_once ("browsercheck.inc.php");
+$browser = $client->property('browser');
+$_SESSION['browser'] = $browser;
+$version = $client->property('version');
+$_SESSION['browser_version'] = $version;
+$mxla = $modx_lang_attribute ? $modx_lang_attribute : 'en';
+if(!isset($modx->config['manager_menu_height'])) $modx->config['manager_menu_height'] = '70';
+if(!isset($modx->config['manager_tree_width'])) $modx->config['manager_tree_width'] = '260';
+?>
+
+>
+
+ - (MODX CMS Manager)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+This software requires a browser with support for frames.
+
diff --git a/manager/includes/session_keepalive.php b/manager/includes/session_keepalive.php
index 21a4fe47fc..19d9417424 100644
--- a/manager/includes/session_keepalive.php
+++ b/manager/includes/session_keepalive.php
@@ -1,21 +1,21 @@
-fckphp_config=$fckphp_config;
- $this->type=$type;
- $this->raw_cwd=$cwd;
- $this->actual_cwd=str_replace("//","/",($fckphp_config['UserFilesPath']."/$type/".$this->raw_cwd));
- $this->real_cwd=str_replace("//","/",($this->fckphp_config['basedir']."/".$this->actual_cwd));
- }
-
- function run() {
-
- header ("Content-Type: application/xml; charset=utf-8");
- echo "\n";
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-] >
-
-
-
-
-real_cwd)) {
-
- /**
- * Initiate the array to store the foldernames
- */
- $folders_array = array();
-
- while (($filename=readdir($dh))!==false) {
-
- if (($filename!=".")&&($filename!="..")) {
- if (is_dir($this->real_cwd."/$filename")) {
- //check if$fckphp_configured not to show this folder
- $hide=false;
- for($i=0;$ifckphp_config['ResourceAreas'][$this->type]['HideFolders']);$i++)
- $hide=(preg_match("/".$this->fckphp_config['ResourceAreas'][$this->type]['HideFolders'][$i]."/",$filename)?true:$hide);
-
- /**
- * Dont echo the entry, push it in the array
- */
- //if (!$hide) echo "\t\t \n";
- if (!$hide) array_push($folders_array,$filename);
-
- } else {
- array_push($files,$filename);
- }
- }
- }
- closedir($dh);
-
- /**
- * Sort the array by the way you like and show it.
- */
- natcasesort($folders_array);
- foreach($folders_array as $k=>$v)
- {
- echo ' '."\n";
- }
-
- }
-
- echo "\t \n";
- echo "\t\n";
-
- /**
- * The filenames are in the array $files
- * SORT IT!
- */
- natcasesort($files);
- $files = array_values($files);
-
- for ($i=0;$ifckphp_config['ResourceAreas'][$this->type]['AllowedExtensions'])) {
-
- //check if$fckphp_configured not to show this file
- $editable=$hide=false;
- for($j=0;$jfckphp_config['ResourceAreas'][$this->type]['HideFiles']);$j++)
- $hide=(preg_match("/".$this->fckphp_config['ResourceAreas'][$this->type]['HideFiles'][$j]."/",$files[$i])?true:$hide);
-
- if (!$hide) {
- if ($this->fckphp_config['ResourceAreas'][$this->type]['AllowImageEditing'])
- $editable=$this->isImageEditable($this->real_cwd."/".$files[$i]);
-
- if(extension_loaded('mbstring')) {
- $name = mb_convert_encoding($files [$i] , 'UTF-8', mb_detect_encoding($files[$i] , 'UTF-8, windows-1251, ASCII, ISO-8859-1'));
- } else {
- $name = $files[$i];
- }
- // $this->fckphp_config['modx']['charset'] if needed
- echo "\t\treal_cwd."/".$files [$i] )/1024)."\" editable=\"" . ( $editable?"1":"0" ) . "\" />\n";
- }
-
- }
-
- }
-
- echo "\t \n";
- echo " \n";
- }
-
-
- function isImageEditable($file) {
- $fh=fopen($file,"r");
- if ($fh) {
- $start4=fread($fh,4);
- fclose($fh);
-
- $start3=substr($start4,0,3);
-
- if ($start4=="\x89PNG") { //PNG
- return (function_exists("imagecreatefrompng") && function_exists("imagepng"));
-
- } elseif ($start3=="GIF") { //GIF
- return (function_exists("imagecreatefromgif") && function_exists("imagegif"));
-
- } elseif ($start3=="\xFF\xD8\xFF") { //JPEG
- return (function_exists("imagecreatefromjpeg")&& function_exists("imagejpeg"));
-
- } elseif ($start4=="hsi1") { //JPEG
- return (function_exists("imagecreatefromjpeg")&& function_exists("imagejpeg"));
-
- } else {
- return false;
- }
-
- } else {
- return false;
- }
- }
-
-
-}
-
+fckphp_config=$fckphp_config;
+ $this->type=$type;
+ $this->raw_cwd=$cwd;
+ $this->actual_cwd=str_replace("//","/",($fckphp_config['UserFilesPath']."/$type/".$this->raw_cwd));
+ $this->real_cwd=str_replace("//","/",($this->fckphp_config['basedir']."/".$this->actual_cwd));
+ }
+
+ function run() {
+
+ header ("Content-Type: application/xml; charset=utf-8");
+ echo "\n";
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+] >
+
+
+
+
+real_cwd)) {
+
+ /**
+ * Initiate the array to store the foldernames
+ */
+ $folders_array = array();
+
+ while (($filename=readdir($dh))!==false) {
+
+ if (($filename!=".")&&($filename!="..")) {
+ if (is_dir($this->real_cwd."/$filename")) {
+ //check if$fckphp_configured not to show this folder
+ $hide=false;
+ for($i=0;$ifckphp_config['ResourceAreas'][$this->type]['HideFolders']);$i++)
+ $hide=(preg_match("/".$this->fckphp_config['ResourceAreas'][$this->type]['HideFolders'][$i]."/",$filename)?true:$hide);
+
+ /**
+ * Dont echo the entry, push it in the array
+ */
+ //if (!$hide) echo "\t\t \n";
+ if (!$hide) array_push($folders_array,$filename);
+
+ } else {
+ array_push($files,$filename);
+ }
+ }
+ }
+ closedir($dh);
+
+ /**
+ * Sort the array by the way you like and show it.
+ */
+ natcasesort($folders_array);
+ foreach($folders_array as $k=>$v)
+ {
+ echo ' '."\n";
+ }
+
+ }
+
+ echo "\t \n";
+ echo "\t\n";
+
+ /**
+ * The filenames are in the array $files
+ * SORT IT!
+ */
+ natcasesort($files);
+ $files = array_values($files);
+
+ for ($i=0;$ifckphp_config['ResourceAreas'][$this->type]['AllowedExtensions'])) {
+
+ //check if$fckphp_configured not to show this file
+ $editable=$hide=false;
+ for($j=0;$jfckphp_config['ResourceAreas'][$this->type]['HideFiles']);$j++)
+ $hide=(preg_match("/".$this->fckphp_config['ResourceAreas'][$this->type]['HideFiles'][$j]."/",$files[$i])?true:$hide);
+
+ if (!$hide) {
+ if ($this->fckphp_config['ResourceAreas'][$this->type]['AllowImageEditing'])
+ $editable=$this->isImageEditable($this->real_cwd."/".$files[$i]);
+
+ if(extension_loaded('mbstring')) {
+ $name = mb_convert_encoding($files [$i] , 'UTF-8', mb_detect_encoding($files[$i] , 'UTF-8, windows-1251, ASCII, ISO-8859-1'));
+ } else {
+ $name = $files[$i];
+ }
+ // $this->fckphp_config['modx']['charset'] if needed
+ echo "\t\treal_cwd."/".$files [$i] )/1024)."\" editable=\"" . ( $editable?"1":"0" ) . "\" />\n";
+ }
+
+ }
+
+ }
+
+ echo "\t \n";
+ echo " \n";
+ }
+
+
+ function isImageEditable($file) {
+ $fh=fopen($file,"r");
+ if ($fh) {
+ $start4=fread($fh,4);
+ fclose($fh);
+
+ $start3=substr($start4,0,3);
+
+ if ($start4=="\x89PNG") { //PNG
+ return (function_exists("imagecreatefrompng") && function_exists("imagepng"));
+
+ } elseif ($start3=="GIF") { //GIF
+ return (function_exists("imagecreatefromgif") && function_exists("imagegif"));
+
+ } elseif ($start3=="\xFF\xD8\xFF") { //JPEG
+ return (function_exists("imagecreatefromjpeg")&& function_exists("imagejpeg"));
+
+ } elseif ($start4=="hsi1") { //JPEG
+ return (function_exists("imagecreatefromjpeg")&& function_exists("imagejpeg"));
+
+ } else {
+ return false;
+ }
+
+ } else {
+ return false;
+ }
+ }
+
+
+}
+
?>
\ No newline at end of file
diff --git a/manager/media/style/common/login.tpl b/manager/media/style/common/login.tpl
index 21826a3554..d5d53cd5ad 100644
--- a/manager/media/style/common/login.tpl
+++ b/manager/media/style/common/login.tpl
@@ -1,345 +1,345 @@
-
-
-
- MODx CMF Manager Login
-
-
-
-
-
-
-
-
-
-
-
- [+OnManagerLoginFormPrerender+]
- [+login_message+]
-
-
-
- © 2005-2013 by
MODX® , and licensed under the
GPL .
-
-
-
-
-
-
+
+
+
+ MODx CMF Manager Login
+
+
+
+
+
+
+
+
+
+
+
+ [+OnManagerLoginFormPrerender+]
+ [+login_message+]
+
+
+
+ © 2005-2013 by
MODX® , and licensed under the
GPL .
+
+
+
+
+
+
\ No newline at end of file
From ab52e6335b3538cff4afc00a7689975d2cdef3f1 Mon Sep 17 00:00:00 2001
From: yama
Date: Mon, 22 Apr 2013 22:10:08 +0900
Subject: [PATCH 006/530] Refactor #9720 Separation deprecated core functions
http://tracker.modx.com/issues/9720
---
.../includes/document.parser.class.inc.php | 218 ++----------------
.../extenders/deprecated.functions.inc.php | 184 +++++++++++++++
2 files changed, 200 insertions(+), 202 deletions(-)
create mode 100644 manager/includes/extenders/deprecated.functions.inc.php
diff --git a/manager/includes/document.parser.class.inc.php b/manager/includes/document.parser.class.inc.php
index 97ef7d0b5a..6e2bb3d847 100755
--- a/manager/includes/document.parser.class.inc.php
+++ b/manager/includes/document.parser.class.inc.php
@@ -68,6 +68,11 @@ function DocumentParser() {
$this->error_reporting = 1;
}
+ function __call($name,$args) {
+ include_once(MODX_BASE_PATH . 'manager/includes/extenders/deprecated.functions.inc.php');
+ if(method_exists($this->old,$name)) return call_user_func_array(array($this->old,$name),$args);
+ }
+
// loads an extension from the extenders folder
function loadExtension($extname) {
global $database_type;
@@ -186,45 +191,6 @@ function sendUnauthorizedPage() {
exit();
}
- // function to connect to the database
- // - deprecated use $modx->db->connect()
- function dbConnect() {
- $this->db->connect();
- $this->rs= $this->db->conn; // for compatibility
- }
-
- // function to query the database
- // - deprecated use $modx->db->query()
- function dbQuery($sql) {
- return $this->db->query($sql);
- }
-
- // function to count the number of rows in a record set
- function recordCount($rs) {
- return $this->db->getRecordCount($rs);
- }
-
- // - deprecated, use $modx->db->getRow()
- function fetchRow($rs, $mode= 'assoc') {
- return $this->db->getRow($rs, $mode);
- }
-
- // - deprecated, use $modx->db->getAffectedRows()
- function affectedRows($rs) {
- return $this->db->getAffectedRows($rs);
- }
-
- // - deprecated, use $modx->db->getInsertId()
- function insertId($rs) {
- return $this->db->getInsertId($rs);
- }
-
- // function to close a database connection
- // - deprecated, use $modx->db->disconnect()
- function dbClose() {
- $this->db->disconnect();
- }
-
function getSettings() {
if (!is_array($this->config) || empty ($this->config)) {
if ($included= file_exists(MODX_BASE_PATH . 'assets/cache/siteCache.idx.php')) {
@@ -672,35 +638,6 @@ function postProcess() {
// end post processing
}
- function mergeDocumentMETATags($template) {
- if ($this->documentObject['haskeywords'] == 1) {
- // insert keywords
- $keywords = $this->getKeywords();
- if (is_array($keywords) && count($keywords) > 0) {
- $keywords = implode(", ", $keywords);
- $metas= "\t \n";
- }
-
- // Don't process when cached
- $this->documentObject['haskeywords'] = '0';
- }
- if ($this->documentObject['hasmetatags'] == 1) {
- // insert meta tags
- $tags= $this->getMETATags();
- foreach ($tags as $n => $col) {
- $tag= strtolower($col['tag']);
- $tagvalue= $col['tagvalue'];
- $tagstyle= $col['http_equiv'] ? 'http-equiv' : 'name';
- $metas .= "\t \n";
- }
-
- // Don't process when cached
- $this->documentObject['hasmetatags'] = '0';
- }
- if ($metas) $template = preg_replace("/()/i", "\\1\n\t" . trim($metas), $template);
- return $template;
- }
-
// mod by Raymond
function mergeDocumentContent($template) {
$replace= array ();
@@ -1037,15 +974,6 @@ private function _get_snip_properties($snip_call)
return $snippetObject;
}
- function makeFriendlyURL($pre, $suff, $alias, $isfolder=0) {
- $Alias = explode('/',$alias);
- $alias = array_pop($Alias);
- $dir = implode('/', $Alias);
- unset($Alias);
- if($this->config['make_folders']==='1' && $isfolder==1) $suff = '/';
- return ($dir != '' ? "$dir/" : '') . $pre . $alias . $suff;
- }
-
function rewriteUrls($documentSource) {
// rewrite the urls
if ($this->config['friendly_urls'] == 1) {
@@ -1181,7 +1109,9 @@ function parseDocumentSource($source) {
// replace HTMLSnippets in document
$source= $this->mergeChunkContent($source);
// insert META tags & keywords
- $source= $this->mergeDocumentMETATags($source);
+ if(isset($this->config['show_meta']) && $this->config['show_meta']==1) {
+ $source= $this->mergeDocumentMETATags($source);
+ }
// find and merge snippets
$source= $this->evalSnippets($source);
// find and replace Placeholders (must be parsed last) - Added by Raymond
@@ -1488,12 +1418,18 @@ function logEvent($evtid, $type, $msg, $source= 'Parser') {
# Returns true if parser is executed in backend (manager) mode
function isBackend() {
- return $this->insideManager() ? true : false;
+ if(defined('IN_MANAGER_MODE') && IN_MANAGER_MODE == 'true') {
+ return true;
+ }
+ else return false;
}
# Returns true if parser is executed in frontend mode
function isFrontend() {
- return !$this->insideManager() ? true : false;
+ if(defined('IN_MANAGER_MODE') && IN_MANAGER_MODE == 'true') {
+ return false;
+ }
+ else return true;
}
function getAllChildren($id= 0, $sort= 'menuindex', $dir= 'ASC', $fields= 'id, pagetitle, description, parent, alias, menutitle') {
@@ -1792,97 +1728,6 @@ function getVersionData($data=null) {
return (!is_null($data) && is_array($this->version) && isset($this->version[$data])) ? $this->version[$data] : $this->version;
}
- function makeList($array, $ulroot= 'root', $ulprefix= 'sub_', $type= '', $ordered= false, $tablevel= 0) {
- // first find out whether the value passed is an array
- if (!is_array($array)) {
- return "";
- }
- if (!empty ($type)) {
- $typestr= " style='list-style-type: $type'";
- } else {
- $typestr= "";
- }
- $tabs= "";
- for ($i= 0; $i < $tablevel; $i++) {
- $tabs .= "\t";
- }
- $listhtml= $ordered == true ? $tabs . "\n" : $tabs . "\n";
- foreach ($array as $key => $value) {
- if (is_array($value)) {
- $listhtml .= $tabs . "\t" . $key . "\n" . $this->makeList($value, $ulprefix . $ulroot, $ulprefix, $type, $ordered, $tablevel +2) . $tabs . "\t \n";
- } else {
- $listhtml .= $tabs . "\t" . $value . " \n";
- }
- }
- $listhtml .= $ordered == true ? $tabs . " \n" : $tabs . "\n";
- return $listhtml;
- }
-
- function userLoggedIn() {
- $userdetails= array ();
- if ($this->isFrontend() && isset ($_SESSION['webValidated'])) {
- // web user
- $userdetails['loggedIn']= true;
- $userdetails['id']= $_SESSION['webInternalKey'];
- $userdetails['username']= $_SESSION['webShortname'];
- $userdetails['usertype']= 'web'; // added by Raymond
- return $userdetails;
- } else
- if ($this->isBackend() && isset ($_SESSION['mgrValidated'])) {
- // manager user
- $userdetails['loggedIn']= true;
- $userdetails['id']= $_SESSION['mgrInternalKey'];
- $userdetails['username']= $_SESSION['mgrShortname'];
- $userdetails['usertype']= 'manager'; // added by Raymond
- return $userdetails;
- } else {
- return false;
- }
- }
-
- function getKeywords($id= 0) {
- if ($id == 0) {
- $id= $this->documentObject['id'];
- }
- $tblKeywords= $this->getFullTableName('site_keywords');
- $tblKeywordXref= $this->getFullTableName('keyword_xref');
- $sql= "SELECT keywords.keyword FROM " . $tblKeywords . " AS keywords INNER JOIN " . $tblKeywordXref . " AS xref ON keywords.id=xref.keyword_id WHERE xref.content_id = '$id'";
- $result= $this->db->query($sql);
- $limit= $this->db->getRecordCount($result);
- $keywords= array ();
- if ($limit > 0) {
- for ($i= 0; $i < $limit; $i++) {
- $row= $this->db->getRow($result);
- $keywords[]= $row['keyword'];
- }
- }
- return $keywords;
- }
-
- function getMETATags($id= 0) {
- if ($id == 0) {
- $id= $this->documentObject['id'];
- }
- $sql= "SELECT smt.* " .
- "FROM " . $this->getFullTableName("site_metatags") . " smt " .
- "INNER JOIN " . $this->getFullTableName("site_content_metatags") . " cmt ON cmt.metatag_id=smt.id " .
- "WHERE cmt.content_id = '$id'";
- $ds= $this->db->query($sql);
- $limit= $this->db->getRecordCount($ds);
- $metatags= array ();
- if ($limit > 0) {
- for ($i= 0; $i < $limit; $i++) {
- $row= $this->db->getRow($ds);
- $metatags[$row['name']]= array (
- "tag" => $row['tag'],
- "tagvalue" => $row['tagvalue'],
- "http_equiv" => $row['http_equiv']
- );
- }
- }
- return $metatags;
- }
-
function runSnippet($snippetName, $params= array ()) {
if (isset ($this->snippetCache[$snippetName])) {
$snippet= $this->snippetCache[$snippetName];
@@ -1911,11 +1756,6 @@ function getChunk($chunkName) {
return $t;
}
- // deprecated
- function putChunk($chunkName) { // alias name >.<
- return $this->getChunk($chunkName);
- }
-
function parseChunk($chunkName, $chunkArr, $prefix= "{", $suffix= "}") {
if (!is_array($chunkArr)) {
return false;
@@ -1927,11 +1767,6 @@ function parseChunk($chunkName, $chunkArr, $prefix= "{", $suffix= "}") {
return $chunk;
}
- function getUserData() {
- include $this->config["base_path"] . "manager/includes/extenders/getUserData.extender.php";
- return $tmpArray;
- }
-
function toDateFormat($timestamp = 0, $mode = '') {
$timestamp = trim($timestamp);
$timestamp = intval($timestamp);
@@ -2227,21 +2062,6 @@ function sendAlert($type, $to, $from, $subject, $msg, $private= 0) {
$rs= $this->db->query($sql);
}
- # Returns true, install or interact when inside manager
- // deprecated
- function insideManager() {
- $m= false;
- if (defined('IN_MANAGER_MODE') && IN_MANAGER_MODE == 'true') {
- $m= true;
- if (defined('SNIPPET_INTERACTIVE_MODE') && SNIPPET_INTERACTIVE_MODE == 'true')
- $m= "interact";
- else
- if (defined('SNIPPET_INSTALL_MODE') && SNIPPET_INSTALL_MODE == 'true')
- $m= "install";
- }
- return $m;
- }
-
# Returns current user id
function getLoginUserID($context= '') {
if ($context && isset ($_SESSION[$context . 'Validated'])) {
@@ -2351,9 +2171,6 @@ function getUserDocGroups($resolveIds= false) {
return $dgn;
}
}
- function getDocGroups() {
- return $this->getUserDocGroups();
- } // deprecated
# Change current web user's password - returns true if successful, oterhwise return error message
function changeWebUserPassword($oldPwd, $newPwd) {
@@ -2386,9 +2203,6 @@ function changeWebUserPassword($oldPwd, $newPwd) {
}
}
}
- function changePassword($o, $n) {
- return changeWebUserPassword($o, $n);
- } // deprecated
# returns true if the current web user is a member the specified groups
function isMemberOfWebGroup($groupNames= array ()) {
diff --git a/manager/includes/extenders/deprecated.functions.inc.php b/manager/includes/extenders/deprecated.functions.inc.php
new file mode 100644
index 0000000000..bffddfebaa
--- /dev/null
+++ b/manager/includes/extenders/deprecated.functions.inc.php
@@ -0,0 +1,184 @@
+old = new OldFunctions();
+class OldFunctions {
+
+ function dbConnect() {global $modx; $modx->db->connect();$modx->rs = $modx->db->conn;}
+ function dbQuery($sql) {global $modx;return $modx->db->query($sql);}
+ function recordCount($rs) {global $modx;return $modx->db->getRecordCount($rs);}
+ function fetchRow($rs,$mode='assoc') {global $modx;return $modx->db->getRow($rs, $mode);}
+ function affectedRows($rs) {global $modx;return $modx->db->getAffectedRows($rs);}
+ function insertId($rs) {global $modx;return $modx->db->getInsertId($rs);}
+ function dbClose() {global $modx; $modx->db->disconnect();}
+
+ function makeList($array, $ulroot= 'root', $ulprefix= 'sub_', $type= '', $ordered= false, $tablevel= 0) {
+ // first find out whether the value passed is an array
+ if (!is_array($array)) {
+ return "";
+ }
+ if (!empty ($type)) {
+ $typestr= " style='list-style-type: $type'";
+ } else {
+ $typestr= "";
+ }
+ $tabs= "";
+ for ($i= 0; $i < $tablevel; $i++) {
+ $tabs .= "\t";
+ }
+ $listhtml= $ordered == true ? $tabs . "\n" : $tabs . "\n";
+ foreach ($array as $key => $value) {
+ if (is_array($value)) {
+ $listhtml .= $tabs . "\t" . $key . "\n" . $this->makeList($value, $ulprefix . $ulroot, $ulprefix, $type, $ordered, $tablevel +2) . $tabs . "\t \n";
+ } else {
+ $listhtml .= $tabs . "\t" . $value . " \n";
+ }
+ }
+ $listhtml .= $ordered == true ? $tabs . " \n" : $tabs . "\n";
+ return $listhtml;
+ }
+
+
+ function getUserData() {
+ global $modx;
+ include $modx->config["base_path"] . "manager/includes/extenders/getUserData.extender.php";
+ return $tmpArray;
+ }
+
+ # Returns true, install or interact when inside manager
+ // deprecated
+ function insideManager() {
+ $m= false;
+ if (defined('IN_MANAGER_MODE') && IN_MANAGER_MODE == 'true') {
+ $m= true;
+ if (defined('SNIPPET_INTERACTIVE_MODE') && SNIPPET_INTERACTIVE_MODE == 'true')
+ $m= "interact";
+ else
+ if (defined('SNIPPET_INSTALL_MODE') && SNIPPET_INSTALL_MODE == 'true')
+ $m= "install";
+ }
+ return $m;
+ }
+
+ // deprecated
+ function putChunk($chunkName) { // alias name >.<
+ global $modx;
+ return $modx->getChunk($chunkName);
+ }
+
+ function getDocGroups() {
+ global $modx;
+ return $modx->getUserDocGroups();
+ } // deprecated
+
+ function changePassword($o, $n) {
+ return changeWebUserPassword($o, $n);
+ } // deprecated
+
+ function mergeDocumentMETATags($template) {
+ global $modx;
+ if ($modx->documentObject['haskeywords'] == 1) {
+ // insert keywords
+ $keywords = $modx->getKeywords();
+ if (is_array($keywords) && count($keywords) > 0) {
+ $keywords = implode(", ", $keywords);
+ $metas= "\t \n";
+ }
+
+ // Don't process when cached
+ $modx->documentObject['haskeywords'] = '0';
+ }
+ if ($modx->documentObject['hasmetatags'] == 1) {
+ // insert meta tags
+ $tags= $modx->getMETATags();
+ foreach ($tags as $n => $col) {
+ $tag= strtolower($col['tag']);
+ $tagvalue= $col['tagvalue'];
+ $tagstyle= $col['http_equiv'] ? 'http-equiv' : 'name';
+ $metas .= "\t \n";
+ }
+
+ // Don't process when cached
+ $modx->documentObject['hasmetatags'] = '0';
+ }
+ if ($metas) $template = preg_replace("/()/i", "\\1\n\t" . trim($metas), $template);
+ return $template;
+ }
+
+ function getMETATags($id= 0) {
+ global $modx;
+ if ($id == 0) {
+ $id= $modx->documentObject['id'];
+ }
+ $sql= "SELECT smt.* " .
+ "FROM " . $modx->getFullTableName("site_metatags") . " smt " .
+ "INNER JOIN " . $modx->getFullTableName("site_content_metatags") . " cmt ON cmt.metatag_id=smt.id " .
+ "WHERE cmt.content_id = '$id'";
+ $ds= $modx->db->query($sql);
+ $limit= $modx->db->getRecordCount($ds);
+ $metatags= array ();
+ if ($limit > 0) {
+ for ($i= 0; $i < $limit; $i++) {
+ $row= $modx->db->getRow($ds);
+ $metatags[$row['name']]= array (
+ "tag" => $row['tag'],
+ "tagvalue" => $row['tagvalue'],
+ "http_equiv" => $row['http_equiv']
+ );
+ }
+ }
+ return $metatags;
+ }
+
+ function userLoggedIn() {
+ global $modx;
+ $userdetails= array ();
+ if ($modx->isFrontend() && isset ($_SESSION['webValidated'])) {
+ // web user
+ $userdetails['loggedIn']= true;
+ $userdetails['id']= $_SESSION['webInternalKey'];
+ $userdetails['username']= $_SESSION['webShortname'];
+ $userdetails['usertype']= 'web'; // added by Raymond
+ return $userdetails;
+ } else
+ if ($modx->isBackend() && isset ($_SESSION['mgrValidated'])) {
+ // manager user
+ $userdetails['loggedIn']= true;
+ $userdetails['id']= $_SESSION['mgrInternalKey'];
+ $userdetails['username']= $_SESSION['mgrShortname'];
+ $userdetails['usertype']= 'manager'; // added by Raymond
+ return $userdetails;
+ } else {
+ return false;
+ }
+ }
+
+ function getKeywords($id= 0) {
+ global $modx;
+ if ($id == 0) {
+ $id= $modx->documentObject['id'];
+ }
+ $tblKeywords= $modx->getFullTableName('site_keywords');
+ $tblKeywordXref= $modx->getFullTableName('keyword_xref');
+ $sql= "SELECT keywords.keyword FROM " . $tblKeywords . " AS keywords INNER JOIN " . $tblKeywordXref . " AS xref ON keywords.id=xref.keyword_id WHERE xref.content_id = '$id'";
+ $result= $modx->db->query($sql);
+ $limit= $modx->db->getRecordCount($result);
+ $keywords= array ();
+ if ($limit > 0) {
+ for ($i= 0; $i < $limit; $i++) {
+ $row= $modx->db->getRow($result);
+ $keywords[]= $row['keyword'];
+ }
+ }
+ return $keywords;
+ }
+
+ function makeFriendlyURL($pre, $suff, $alias, $isfolder=0) {
+ global $modx;
+ $Alias = explode('/',$alias);
+ $alias = array_pop($Alias);
+ $dir = implode('/', $Alias);
+ unset($Alias);
+ if($modx->config['make_folders']==='1' && $isfolder==1) $suff = '/';
+ return ($dir != '' ? "$dir/" : '') . $pre . $alias . $suff;
+ }
+
+}
\ No newline at end of file
From 1163e54dc5e6e6d7e97388d0160ac03e2fbd6670 Mon Sep 17 00:00:00 2001
From: yama
Date: Mon, 22 Apr 2013 22:20:27 +0900
Subject: [PATCH 007/530] Refactor #9860 Delete Etomite database functions
http://tracker.modx.com/issues/9860
---
.../includes/document.parser.class.inc.php | 184 -----------------
.../extenders/deprecated.functions.inc.php | 191 ++++++++++++++++++
2 files changed, 191 insertions(+), 184 deletions(-)
diff --git a/manager/includes/document.parser.class.inc.php b/manager/includes/document.parser.class.inc.php
index 6e2bb3d847..8e64ee5400 100755
--- a/manager/includes/document.parser.class.inc.php
+++ b/manager/includes/document.parser.class.inc.php
@@ -2441,190 +2441,6 @@ function parseProperties($propertyString) {
return $parameter;
}
- /*############################################
- Etomite_dbFunctions.php
- New database functions for Etomite CMS
- Author: Ralph A. Dahlgren - rad14701@yahoo.com
- Etomite ID: rad14701
- See documentation for usage details
- ############################################*/
- function getIntTableRows($fields= "*", $from= "", $where= "", $sort= "", $dir= "ASC", $limit= "") {
- // function to get rows from ANY internal database table
- if ($from == "") {
- return false;
- } else {
- $where= ($where != "") ? "WHERE $where" : "";
- $sort= ($sort != "") ? "ORDER BY $sort $dir" : "";
- $limit= ($limit != "") ? "LIMIT $limit" : "";
- $tbl= $this->getFullTableName($from);
- $sql= "SELECT $fields FROM $tbl $where $sort $limit;";
- $result= $this->db->query($sql);
- $resourceArray= array ();
- for ($i= 0; $i < @ $this->db->getRecordCount($result); $i++) {
- array_push($resourceArray, @ $this->db->getRow($result));
- }
- return $resourceArray;
- }
- }
-
- function putIntTableRow($fields= "", $into= "") {
- // function to put a row into ANY internal database table
- if (($fields == "") || ($into == "")) {
- return false;
- } else {
- $tbl= $this->getFullTableName($into);
- $sql= "INSERT INTO $tbl SET ";
- foreach ($fields as $key => $value) {
- $sql .= $key . "=";
- if (is_numeric($value))
- $sql .= $value . ",";
- else
- $sql .= "'" . $value . "',";
- }
- $sql= rtrim($sql, ",");
- $sql .= ";";
- $result= $this->db->query($sql);
- return $result;
- }
- }
-
- function updIntTableRow($fields= "", $into= "", $where= "", $sort= "", $dir= "ASC", $limit= "") {
- // function to update a row into ANY internal database table
- if (($fields == "") || ($into == "")) {
- return false;
- } else {
- $where= ($where != "") ? "WHERE $where" : "";
- $sort= ($sort != "") ? "ORDER BY $sort $dir" : "";
- $limit= ($limit != "") ? "LIMIT $limit" : "";
- $tbl= $this->getFullTableName($into);
- $sql= "UPDATE $tbl SET ";
- foreach ($fields as $key => $value) {
- $sql .= $key . "=";
- if (is_numeric($value))
- $sql .= $value . ",";
- else
- $sql .= "'" . $value . "',";
- }
- $sql= rtrim($sql, ",");
- $sql .= " $where $sort $limit;";
- $result= $this->db->query($sql);
- return $result;
- }
- }
-
- function getExtTableRows($host= "", $user= "", $pass= "", $dbase= "", $fields= "*", $from= "", $where= "", $sort= "", $dir= "ASC", $limit= "") {
- // function to get table rows from an external MySQL database
- if (($host == "") || ($user == "") || ($pass == "") || ($dbase == "") || ($from == "")) {
- return false;
- } else {
- $where= ($where != "") ? "WHERE $where" : "";
- $sort= ($sort != "") ? "ORDER BY $sort $dir" : "";
- $limit= ($limit != "") ? "LIMIT $limit" : "";
- $tbl= $dbase . "." . $from;
- $this->dbExtConnect($host, $user, $pass, $dbase);
- $sql= "SELECT $fields FROM $tbl $where $sort $limit;";
- $result= $this->db->query($sql);
- $resourceArray= array ();
- for ($i= 0; $i < @ $this->db->getRecordCount($result); $i++) {
- array_push($resourceArray, @ $this->db->getRow($result));
- }
- return $resourceArray;
- }
- }
-
- function putExtTableRow($host= "", $user= "", $pass= "", $dbase= "", $fields= "", $into= "") {
- // function to put a row into an external database table
- if (($host == "") || ($user == "") || ($pass == "") || ($dbase == "") || ($fields == "") || ($into == "")) {
- return false;
- } else {
- $this->dbExtConnect($host, $user, $pass, $dbase);
- $tbl= $dbase . "." . $into;
- $sql= "INSERT INTO $tbl SET ";
- foreach ($fields as $key => $value) {
- $sql .= $key . "=";
- if (is_numeric($value))
- $sql .= $value . ",";
- else
- $sql .= "'" . $value . "',";
- }
- $sql= rtrim($sql, ",");
- $sql .= ";";
- $result= $this->db->query($sql);
- return $result;
- }
- }
-
- function updExtTableRow($host= "", $user= "", $pass= "", $dbase= "", $fields= "", $into= "", $where= "", $sort= "", $dir= "ASC", $limit= "") {
- // function to update a row into an external database table
- if (($fields == "") || ($into == "")) {
- return false;
- } else {
- $this->dbExtConnect($host, $user, $pass, $dbase);
- $tbl= $dbase . "." . $into;
- $where= ($where != "") ? "WHERE $where" : "";
- $sort= ($sort != "") ? "ORDER BY $sort $dir" : "";
- $limit= ($limit != "") ? "LIMIT $limit" : "";
- $sql= "UPDATE $tbl SET ";
- foreach ($fields as $key => $value) {
- $sql .= $key . "=";
- if (is_numeric($value))
- $sql .= $value . ",";
- else
- $sql .= "'" . $value . "',";
- }
- $sql= rtrim($sql, ",");
- $sql .= " $where $sort $limit;";
- $result= $this->db->query($sql);
- return $result;
- }
- }
-
- function dbExtConnect($host, $user, $pass, $dbase) {
- // function to connect to external database
- $tstart= $this->getMicroTime();
- if (@ !$this->rs= mysql_connect($host, $user, $pass)) {
- $this->messageQuit("Failed to create connection to the $dbase database!");
- } else {
- mysql_select_db($dbase);
- $tend= $this->getMicroTime();
- $totaltime= $tend - $tstart;
- if ($this->dumpSQL) {
- $this->queryCode .= "Database connection " . sprintf("Database connection to %s was created in %2.4f s", $dbase, $totaltime) . " ";
- }
- $this->queryTime= $this->queryTime + $totaltime;
- }
- }
-
- function getFormVars($method= "", $prefix= "", $trim= "", $REQUEST_METHOD) {
- // function to retrieve form results into an associative array
- $results= array ();
- $method= strtoupper($method);
- if ($method == "")
- $method= $REQUEST_METHOD;
- if ($method == "POST")
- $method= & $_POST;
- elseif ($method == "GET") $method= & $_GET;
- else
- return false;
- reset($method);
- foreach ($method as $key => $value) {
- if (($prefix != "") && (substr($key, 0, strlen($prefix)) == $prefix)) {
- if ($trim) {
- $pieces= explode($prefix, $key, 2);
- $key= $pieces[1];
- $results[$key]= $value;
- } else
- $results[$key]= $value;
- }
- elseif ($prefix == "") $results[$key]= $value;
- }
- return $results;
- }
-
- ########################################
- // END New database functions - rad14701
- ########################################
-
/***************************************************************************************/
/* End of API functions */
/***************************************************************************************/
diff --git a/manager/includes/extenders/deprecated.functions.inc.php b/manager/includes/extenders/deprecated.functions.inc.php
index bffddfebaa..513eaca3fd 100644
--- a/manager/includes/extenders/deprecated.functions.inc.php
+++ b/manager/includes/extenders/deprecated.functions.inc.php
@@ -181,4 +181,195 @@ function makeFriendlyURL($pre, $suff, $alias, $isfolder=0) {
return ($dir != '' ? "$dir/" : '') . $pre . $alias . $suff;
}
+ /*############################################
+ Etomite_dbFunctions.php
+ New database functions for Etomite CMS
+ Author: Ralph A. Dahlgren - rad14701@yahoo.com
+ Etomite ID: rad14701
+ See documentation for usage details
+ ############################################*/
+ function getIntTableRows($fields= "*", $from= "", $where= "", $sort= "", $dir= "ASC", $limit= "") {
+ // function to get rows from ANY internal database table
+ global $modx;
+ if ($from == "") {
+ return false;
+ } else {
+ $where= ($where != "") ? "WHERE $where" : "";
+ $sort= ($sort != "") ? "ORDER BY $sort $dir" : "";
+ $limit= ($limit != "") ? "LIMIT $limit" : "";
+ $tbl= $modx->getFullTableName($from);
+ $sql= "SELECT $fields FROM $tbl $where $sort $limit;";
+ $result= $modx->db->query($sql);
+ $resourceArray= array ();
+ for ($i= 0; $i < @ $modx->db->getRecordCount($result); $i++) {
+ array_push($resourceArray, @ $modx->db->getRow($result));
+ }
+ return $resourceArray;
+ }
+ }
+
+ function putIntTableRow($fields= "", $into= "") {
+ // function to put a row into ANY internal database table
+ global $modx;
+ if (($fields == "") || ($into == "")) {
+ return false;
+ } else {
+ $tbl= $modx->getFullTableName($into);
+ $sql= "INSERT INTO $tbl SET ";
+ foreach ($fields as $key => $value) {
+ $sql .= $key . "=";
+ if (is_numeric($value))
+ $sql .= $value . ",";
+ else
+ $sql .= "'" . $value . "',";
+ }
+ $sql= rtrim($sql, ",");
+ $sql .= ";";
+ $result= $modx->db->query($sql);
+ return $result;
+ }
+ }
+
+ function updIntTableRow($fields= "", $into= "", $where= "", $sort= "", $dir= "ASC", $limit= "") {
+ // function to update a row into ANY internal database table
+ global $modx;
+ if (($fields == "") || ($into == "")) {
+ return false;
+ } else {
+ $where= ($where != "") ? "WHERE $where" : "";
+ $sort= ($sort != "") ? "ORDER BY $sort $dir" : "";
+ $limit= ($limit != "") ? "LIMIT $limit" : "";
+ $tbl= $modx->getFullTableName($into);
+ $sql= "UPDATE $tbl SET ";
+ foreach ($fields as $key => $value) {
+ $sql .= $key . "=";
+ if (is_numeric($value))
+ $sql .= $value . ",";
+ else
+ $sql .= "'" . $value . "',";
+ }
+ $sql= rtrim($sql, ",");
+ $sql .= " $where $sort $limit;";
+ $result= $modx->db->query($sql);
+ return $result;
+ }
+ }
+
+ function getExtTableRows($host= "", $user= "", $pass= "", $dbase= "", $fields= "*", $from= "", $where= "", $sort= "", $dir= "ASC", $limit= "") {
+ // function to get table rows from an external MySQL database
+ global $modx;
+ if (($host == "") || ($user == "") || ($pass == "") || ($dbase == "") || ($from == "")) {
+ return false;
+ } else {
+ $where= ($where != "") ? "WHERE $where" : "";
+ $sort= ($sort != "") ? "ORDER BY $sort $dir" : "";
+ $limit= ($limit != "") ? "LIMIT $limit" : "";
+ $tbl= $dbase . "." . $from;
+ $this->dbExtConnect($host, $user, $pass, $dbase);
+ $sql= "SELECT $fields FROM $tbl $where $sort $limit;";
+ $result= $modx->db->query($sql);
+ $resourceArray= array ();
+ for ($i= 0; $i < @ $modx->db->getRecordCount($result); $i++) {
+ array_push($resourceArray, @ $modx->db->getRow($result));
+ }
+ return $resourceArray;
+ }
+ }
+
+ function putExtTableRow($host= "", $user= "", $pass= "", $dbase= "", $fields= "", $into= "") {
+ // function to put a row into an external database table
+ global $modx;
+ if (($host == "") || ($user == "") || ($pass == "") || ($dbase == "") || ($fields == "") || ($into == "")) {
+ return false;
+ } else {
+ $this->dbExtConnect($host, $user, $pass, $dbase);
+ $tbl= $dbase . "." . $into;
+ $sql= "INSERT INTO $tbl SET ";
+ foreach ($fields as $key => $value) {
+ $sql .= $key . "=";
+ if (is_numeric($value))
+ $sql .= $value . ",";
+ else
+ $sql .= "'" . $value . "',";
+ }
+ $sql= rtrim($sql, ",");
+ $sql .= ";";
+ $result= $modx->db->query($sql);
+ return $result;
+ }
+ }
+
+ function updExtTableRow($host= "", $user= "", $pass= "", $dbase= "", $fields= "", $into= "", $where= "", $sort= "", $dir= "ASC", $limit= "") {
+ // function to update a row into an external database table
+ global $modx;
+ if (($fields == "") || ($into == "")) {
+ return false;
+ } else {
+ $this->dbExtConnect($host, $user, $pass, $dbase);
+ $tbl= $dbase . "." . $into;
+ $where= ($where != "") ? "WHERE $where" : "";
+ $sort= ($sort != "") ? "ORDER BY $sort $dir" : "";
+ $limit= ($limit != "") ? "LIMIT $limit" : "";
+ $sql= "UPDATE $tbl SET ";
+ foreach ($fields as $key => $value) {
+ $sql .= $key . "=";
+ if (is_numeric($value))
+ $sql .= $value . ",";
+ else
+ $sql .= "'" . $value . "',";
+ }
+ $sql= rtrim($sql, ",");
+ $sql .= " $where $sort $limit;";
+ $result= $modx->db->query($sql);
+ return $result;
+ }
+ }
+
+ function dbExtConnect($host, $user, $pass, $dbase) {
+ // function to connect to external database
+ global $modx;
+ $tstart= $modx->getMicroTime();
+ if (@ !$modx->rs= mysql_connect($host, $user, $pass)) {
+ $modx->messageQuit("Failed to create connection to the $dbase database!");
+ } else {
+ mysql_select_db($dbase);
+ $tend= $modx->getMicroTime();
+ $totaltime= $tend - $tstart;
+ if ($modx->dumpSQL) {
+ $modx->queryCode .= "Database connection " . sprintf("Database connection to %s was created in %2.4f s", $dbase, $totaltime) . " ";
+ }
+ $modx->queryTime= $modx->queryTime + $totaltime;
+ }
+ }
+
+ function getFormVars($method= "", $prefix= "", $trim= "", $REQUEST_METHOD) {
+ // function to retrieve form results into an associative array
+ global $modx;
+ $results= array ();
+ $method= strtoupper($method);
+ if ($method == "")
+ $method= $REQUEST_METHOD;
+ if ($method == "POST")
+ $method= & $_POST;
+ elseif ($method == "GET") $method= & $_GET;
+ else
+ return false;
+ reset($method);
+ foreach ($method as $key => $value) {
+ if (($prefix != "") && (substr($key, 0, strlen($prefix)) == $prefix)) {
+ if ($trim) {
+ $pieces= explode($prefix, $key, 2);
+ $key= $pieces[1];
+ $results[$key]= $value;
+ } else
+ $results[$key]= $value;
+ }
+ elseif ($prefix == "") $results[$key]= $value;
+ }
+ return $results;
+ }
+
+ ########################################
+ // END New database functions - rad14701
+ ########################################
}
\ No newline at end of file
From f3d65e979c3f0b4484872348cca755503b4a468d Mon Sep 17 00:00:00 2001
From: Thomas Jakobi
Date: Mon, 22 Apr 2013 21:04:42 +0200
Subject: [PATCH 008/530] Bug #9865: Fix ManagerManager field rules The
ManagerManager field rule mm_moveFieldsToTab was modified to not depend on
$fieldtype. This is changed for all other field rules, too.
---
.../managermanager/functions/fields.inc.php | 27 +++++++++++++------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/assets/plugins/managermanager/functions/fields.inc.php b/assets/plugins/managermanager/functions/fields.inc.php
index 51f42ca31c..94a48ba2e0 100644
--- a/assets/plugins/managermanager/functions/fields.inc.php
+++ b/assets/plugins/managermanager/functions/fields.inc.php
@@ -18,24 +18,26 @@ function mm_renameField($field, $newlabel, $roles='', $templates='', $newhelp=''
$output = " // ----------- Rename field -------------- \n";
+ $output .= '$j("select[id$=_prefix]").each( function() { $j(this).parents("tr:first").addClass("urltv"); } ); ';
+
switch ($field) {
// Exceptions
case 'keywords':
- $output .= '$j("select[name*=keywords]").siblings("span.warning").empty().prepend("'.jsSafe($newlabel).'");';
+ $output .= '$j("select[name*=keywords]").siblings("span.warning").html("'.jsSafe($newlabel).'");';
break;
case 'metatags':
- $output .= '$j("select[name*=metatags]").siblings("span.warning").empty().prepend("'.jsSafe($newlabel).'");';
+ $output .= '$j("select[name*=metatags]").siblings("span.warning").html("'.jsSafe($newlabel).'");';
break;
case 'hidemenu':
case 'show_in_menu':
- $output .= '$j("input[name=hidemenucheck]").siblings("span.warning").empty().prepend("'.jsSafe($newlabel).'");';
+ $output .= '$j("input[name=hidemenucheck]").siblings("span.warning").html("'.jsSafe($newlabel).'");';
break;
case 'which_editor':
- $output .= '$j("#which_editor").prev("span.warning").empty().prepend("'.jsSafe($newlabel).'");';
+ $output .= '$j("#which_editor").prev("span.warning").html("'.jsSafe($newlabel).'");';
break;
// Ones that follow the regular pattern
@@ -44,7 +46,7 @@ function mm_renameField($field, $newlabel, $roles='', $templates='', $newhelp=''
if (isset($mm_fields[$field])) {
$fieldtype = $mm_fields[$field]['fieldtype'];
$fieldname = $mm_fields[$field]['fieldname'];
- $output .= '$j("'.$fieldtype.'[name='.$fieldname.']").parents("td").prev("td").children("span.warning").empty().prepend("'.jsSafe($newlabel).'");';
+ $output .= '$j(":input[name='.$fieldname.']").parents("tr:not(.urltv)").children("td:first").children("span.warning").html("'.jsSafe($newlabel).'");';
}
break;
@@ -86,6 +88,8 @@ function mm_hideFields($fields, $roles='', $templates='') {
$output = '';
+ $output .= '$j("select[id$=_prefix]").each( function() { $j(this).parents("tr:first").addClass("urltv"); } ); ';
+
switch ($field) {
// Exceptions
@@ -130,7 +134,7 @@ function mm_hideFields($fields, $roles='', $templates='') {
// Ones that follow the regular pattern
default:
if (isset($mm_fields[$field])) { // Check the fields exist, so we're not writing JS for elements that don't exist
- $output .= '$j("'.$mm_fields[$field]['fieldtype'].'[name='.$mm_fields[$field]['fieldname'].']").parents("tr").hide().next("tr").find("td[colspan=2]").parent("tr").hide(); ';
+ $output .= '$j(":input[name='.$mm_fields[$field]['fieldname'].']").parents("tr:not(.urltv)").hide().next("tr").find("td[colspan=2]").parent("tr").hide(); ';
}
break;
} // end switch
@@ -168,18 +172,25 @@ function mm_changeFieldHelp($field, $helptext='', $roles='', $templates='') {
// Ones that follow the regular pattern
default:
+ $output .= '$j("select[id$=_prefix]").each( function() { $j(this).parents("tr:first").addClass("urltv"); } ); ' . "\n";
+
// What type is this field?
if (isset($mm_fields[$field])) {
$fieldtype = $mm_fields[$field]['fieldtype'];
$fieldname = $mm_fields[$field]['fieldname'];
// Give the help button an ID, and modify the alt/title text
- $output .= '$j("'.$fieldtype.'[name='.$fieldname.']").siblings("img[style:contains(\'cursor:help\')]").attr("id", "'.$fieldname.'-help").attr("alt", "'.jsSafe($helptext).'").attr("title", "'.jsSafe($helptext).'"); ';
+ $output .= 'if ($j(":input[name=' . $fieldname . ']").siblings("img[style:contains(\'cursor:help\')]").length) {' . "\n";
+ $output .= '$j(":input[name=' . $fieldname . ']").siblings("img[style:contains(\'cursor:help\')]").attr("id", "' . $fieldname . '-help").attr("alt", "'.jsSafe($helptext).'").attr("title", "'.jsSafe($helptext).'"); ' . "\n";
+ $output .= '} else {' . "\n";
+ $output .= 'var help' . $fieldname . ' = $j(" ").attr("id", "' . $fieldname . '-help").addClass("tooltip").css("cursor", "help").attr("src", "media/style/' . $modx->config['manager_theme'] . '/images/icons/b02_trans.gif").attr("alt", "'.jsSafe($helptext).'").attr("title", "'.jsSafe($helptext).'");' . "\n";
+ $output .= '$j(":input[name=' . $fieldname . ']").closest("tr").children("td:last").append(help' . $fieldname . ');' . "\n";
+ $output .= '}' . "\n";
} else {
break;
}
-
+ //alt="NEW pagetitle help"
break;
} // end switch
From 54125da0ea931b9d9bf425b9943aa66408766f75 Mon Sep 17 00:00:00 2001
From: Peter Bowyer
Date: Wed, 24 Apr 2013 12:42:43 +0100
Subject: [PATCH 009/530] Refactor parser statistics into own method, so
accessible from all code
---
.../includes/document.parser.class.inc.php | 40 +++++++++++--------
1 file changed, 24 insertions(+), 16 deletions(-)
diff --git a/manager/includes/document.parser.class.inc.php b/manager/includes/document.parser.class.inc.php
index 97ef7d0b5a..68d5d590ac 100755
--- a/manager/includes/document.parser.class.inc.php
+++ b/manager/includes/document.parser.class.inc.php
@@ -540,27 +540,18 @@ function outputContent($noEvent= false) {
}
}
- $totalTime= ($this->getMicroTime() - $this->tstart);
- $queryTime= $this->queryTime;
- $phpTime= $totalTime - $queryTime;
-
- $queryTime= sprintf("%2.4f s", $queryTime);
- $totalTime= sprintf("%2.4f s", $totalTime);
- $phpTime= sprintf("%2.4f s", $phpTime);
- $source= $this->documentGenerated == 1 ? "database" : "cache";
- $queries= isset ($this->executedQueries) ? $this->executedQueries : 0;
- $phpMemory = (memory_get_peak_usage(true) / 1024 / 1024) . " mb";
+ $stats = $this->getTimerStats($this->tstart);
$out =& $this->documentOutput;
if ($this->dumpSQL) {
$out .= $this->queryCode;
}
- $out= str_replace("[^q^]", $queries, $out);
- $out= str_replace("[^qt^]", $queryTime, $out);
- $out= str_replace("[^p^]", $phpTime, $out);
- $out= str_replace("[^t^]", $totalTime, $out);
- $out= str_replace("[^s^]", $source, $out);
- $out= str_replace("[^m^]", $phpMemory, $out);
+ $out= str_replace("[^q^]", $stats['queries'] , $out);
+ $out= str_replace("[^qt^]", $stats['queryTime'] , $out);
+ $out= str_replace("[^p^]", $stats['phpTime'] , $out);
+ $out= str_replace("[^t^]", $stats['totalTime'] , $out);
+ $out= str_replace("[^s^]", $stats['source'] , $out);
+ $out= str_replace("[^m^]", $stats['phpMemory'], $out);
//$this->documentOutput= $out;
// invoke OnWebPagePrerender event
@@ -572,6 +563,23 @@ function outputContent($noEvent= false) {
ob_end_flush();
}
+ function getTimerStats($tstart) {
+ $stats = array();
+
+ $stats['totalTime'] = ($this->getMicroTime() - $tstart);
+ $stats['queryTime'] = $this->queryTime;
+ $stats['phpTime'] = $stats['totalTime'] - $stats['queryTime'];
+
+ $stats['queryTime'] = sprintf("%2.4f s", $stats['queryTime']);
+ $stats['totalTime'] = sprintf("%2.4f s", $stats['totalTime']);
+ $stats['phpTime'] = sprintf("%2.4f s", $stats['phpTime']);
+ $stats['source'] = $this->documentGenerated == 1 ? "database" : "cache";
+ $stats['queries'] = isset ($this->executedQueries) ? $this->executedQueries : 0;
+ $stats['phpMemory'] = (memory_get_peak_usage(true) / 1024 / 1024) . " mb";
+
+ return $stats;
+ }
+
function checkPublishStatus() {
$cacheRefreshTime= 0;
@include $this->config["base_path"] . "assets/cache/sitePublishing.idx.php";
From 0516013e5f01d4e7626045534c408645ca80e2d5 Mon Sep 17 00:00:00 2001
From: Roope
Date: Wed, 24 Apr 2013 17:08:26 +0300
Subject: [PATCH 010/530] Fixed 'wrong datatype' warning at install
Install options page throws warning: in_array() [function.in-array]:
Wrong datatype for second argument at some server setups.
---
install/action.options.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/install/action.options.php b/install/action.options.php
index 76481506c2..27d36e5644 100644
--- a/install/action.options.php
+++ b/install/action.options.php
@@ -158,7 +158,7 @@
if ($limit > 0) {
$pluginOutput = '';
for ($i = 0; $i < $limit; $i++) {
- $class = !in_array('sample', $modulePlugins[$i][8]) ? "toggle" : "toggle demo";
+ $class = !in_array('sample', (array) $modulePlugins[$i][8]) ? "toggle" : "toggle demo";
$chk = in_array($i, $plugins) || (!$options_selected) ? 'checked="checked"' : "";
$pluginOutput .= " " . $_lang['install_update'] . " " . $modulePlugins[$i][0] . " - " . $modulePlugins[$i][1] . " ";
}
@@ -174,7 +174,7 @@
if ($limit > 0) {
$snippetOutput = '';
for ($i = 0; $i < $limit; $i++) {
- $class = !in_array('sample', $moduleSnippets[$i][5]) ? "toggle" : "toggle demo";
+ $class = !in_array('sample', (array) $moduleSnippets[$i][5]) ? "toggle" : "toggle demo";
$chk = in_array($i, $snippets) || (!$options_selected) ? 'checked="checked"' : "";
$snippetOutput .= " " . $_lang['install_update'] . " " . $moduleSnippets[$i][0] . " - " . $moduleSnippets[$i][1] . " ";
}
From 29b19cb2a493c5d30880c44398306f14061e6f9d Mon Sep 17 00:00:00 2001
From: Dmi3yy
Date: Sun, 28 Apr 2013 23:44:44 +0300
Subject: [PATCH 011/530] add php doc and manager path constant
---
.../includes/document.parser.class.inc.php | 947 ++++++++++++++++--
1 file changed, 856 insertions(+), 91 deletions(-)
diff --git a/manager/includes/document.parser.class.inc.php b/manager/includes/document.parser.class.inc.php
index 97ef7d0b5a..e3bb64019c 100755
--- a/manager/includes/document.parser.class.inc.php
+++ b/manager/includes/document.parser.class.inc.php
@@ -50,7 +50,11 @@ class DocumentParser {
var $error_reporting;
private $version=array();
- // constructor
+ /**
+ * Document constructor
+ *
+ * @return DocumentParser
+ */
function DocumentParser() {
global $database_server;
if(substr(PHP_OS,0,3) === 'WIN' && $database_server==='localhost') $database_server = '127.0.0.1';
@@ -68,14 +72,21 @@ function DocumentParser() {
$this->error_reporting = 1;
}
- // loads an extension from the extenders folder
+ /**
+ * Loads an extension from the extenders folder.
+ * Currently of limited use - can only load the DBAPI and ManagerAPI.
+ *
+ * @global string $database_type
+ * @param string $extnamegetAllChildren
+ * @return boolean
+ */
function loadExtension($extname) {
global $database_type;
switch ($extname) {
// Database API
case 'DBAPI' :
- if (!include_once MODX_BASE_PATH . 'manager/includes/extenders/dbapi.' . $database_type . '.class.inc.php')
+ if (!include_once MODX_MANAGER_PATH . 'includes/extenders/dbapi.' . $database_type . '.class.inc.php')
return false;
$this->db= new DBAPI;
return true;
@@ -83,7 +94,7 @@ function loadExtension($extname) {
// Manager API
case 'ManagerAPI' :
- if (!include_once MODX_BASE_PATH . 'manager/includes/extenders/manager.api.class.inc.php')
+ if (!include_once MODX_MANAGER_PATH . 'includes/extenders/manager.api.class.inc.php')
return false;
$this->manager= new ManagerAPI;
return true;
@@ -94,11 +105,27 @@ function loadExtension($extname) {
}
}
+ /**
+ * Returns the current micro time
+ *
+ * @return float
+ */
function getMicroTime() {
list ($usec, $sec)= explode(' ', microtime());
return ((float) $usec + (float) $sec);
}
+ /**
+ * Redirect
+ *
+ * @global string $base_url
+ * @global string $site_url
+ * @param string $url
+ * @param int $count_attempts
+ * @param type $type
+ * @param type $responseCode
+ * @return boolean
+ */
function sendRedirect($url, $count_attempts= 0, $type= '', $responseCode= '') {
if (empty ($url)) {
return false;
@@ -146,6 +173,12 @@ function sendRedirect($url, $count_attempts= 0, $type= '', $responseCode= '') {
}
}
+ /**
+ * Forward to another page
+ *
+ * @param int $id
+ * @param string $responseCode
+ */
function sendForward($id, $responseCode= '') {
if ($this->forwards > 0) {
$this->forwards= $this->forwards - 1;
@@ -163,6 +196,9 @@ function sendForward($id, $responseCode= '') {
}
}
+ /**
+ * Redirect to the error page, by calling sendForward(). This is called for example when the page was not found.
+ */
function sendErrorPage() {
// invoke OnPageNotFound event
$this->invokeEvent('OnPageNotFound');
@@ -186,54 +222,93 @@ function sendUnauthorizedPage() {
exit();
}
- // function to connect to the database
- // - deprecated use $modx->db->connect()
+ /**
+ * Connect to the database
+ *
+ * @deprecated use $modx->db->connect()
+ */
function dbConnect() {
$this->db->connect();
$this->rs= $this->db->conn; // for compatibility
}
- // function to query the database
- // - deprecated use $modx->db->query()
+ /**
+ * Query the database
+ *
+ * @deprecated use $modx->db->query()
+ * @param string $sql The SQL statement to execute
+ * @return resource|bool
+ */
function dbQuery($sql) {
return $this->db->query($sql);
}
- // function to count the number of rows in a record set
+ /**
+ * Count the number of rows in a record set
+ *
+ * @deprecated use $modx->db->getRecordCount($rs)
+ * @param resource
+ * @return int
+ */
function recordCount($rs) {
return $this->db->getRecordCount($rs);
}
- // - deprecated, use $modx->db->getRow()
+ /**
+ * Get a result row
+ *
+ * @deprecated use $modx->db->getRow()
+ * @param array $rs
+ * @param string $mode
+ * @return array
+ */
function fetchRow($rs, $mode= 'assoc') {
return $this->db->getRow($rs, $mode);
}
- // - deprecated, use $modx->db->getAffectedRows()
+ /**
+ * Get the number of rows affected in the last db operation
+ *
+ * @deprecated use $modx->db->getAffectedRows()
+ * @param array $rs
+ * @return int
+ */
function affectedRows($rs) {
return $this->db->getAffectedRows($rs);
}
- // - deprecated, use $modx->db->getInsertId()
+ /**
+ * Get the ID generated in the last query
+ *
+ * @deprecated use $modx->db->getInsertId()
+ * @param array $rs
+ * @return int
+ */
function insertId($rs) {
return $this->db->getInsertId($rs);
}
- // function to close a database connection
- // - deprecated, use $modx->db->disconnect()
+ /**
+ * Close a database connection
+ *
+ * @deprecated use $modx->db->disconnect()
+ */
function dbClose() {
$this->db->disconnect();
}
+ /**
+ * Get MODx settings including, but not limited to, the system_settings table
+ */
function getSettings() {
if (!is_array($this->config) || empty ($this->config)) {
if ($included= file_exists(MODX_BASE_PATH . 'assets/cache/siteCache.idx.php')) {
$included= include_once (MODX_BASE_PATH . 'assets/cache/siteCache.idx.php');
}
if (!$included || !is_array($this->config) || empty ($this->config)) {
- include_once MODX_BASE_PATH . "/manager/processors/cache_sync.class.processor.php";
+ include_once MODX_MANAGER_PATH . "processors/cache_sync.class.processor.php";
$cache = new synccache();
- $cache->setCachepath(MODX_BASE_PATH . "/assets/cache/");
+ $cache->setCachepath(MODX_BASE_PATH . "assets/cache/");
$cache->setReport(false);
$rebuilt = $cache->buildCache($this);
$included = false;
@@ -255,6 +330,8 @@ function getSettings() {
$this->config['base_url']= MODX_BASE_URL;
$this->config['base_path']= MODX_BASE_PATH;
$this->config['site_url']= MODX_SITE_URL;
+ $this->config['site_manager_url']=MODX_MANAGER_URL;
+ $this->config['site_manager_path']=MODX_MANAGER_PATH;
// load user setting if user is logged in
$usrSettings= array ();
@@ -304,6 +381,11 @@ function getSettings() {
}
}
+ /**
+ * Get the method by which the current document/resource was requested
+ *
+ * @return string 'alias' (friendly url alias) or 'id'
+ */
function getDocumentMethod() {
// function to test the query and find the retrieval method
if (isset ($_REQUEST['q'])) {
@@ -316,6 +398,12 @@ function getDocumentMethod() {
}
}
+ /**
+ * Returns the document identifier of the current request
+ *
+ * @param string $method id and alias are allowed
+ * @return int
+ */
function getDocumentIdentifier($method) {
// function to test the query and find the retrieval method
$docIdentifier= $this->config['site_start'];
@@ -334,7 +422,11 @@ function getDocumentIdentifier($method) {
return $docIdentifier;
}
- // check for manager login session
+ /**
+ * Check for manager login session
+ *
+ * @return boolean
+ */
function checkSession() {
if (isset ($_SESSION['mgrValidated'])) {
return true;
@@ -343,6 +435,11 @@ function checkSession() {
}
}
+ /**
+ * Checks, if a the result is a preview
+ *
+ * @return boolean
+ */
function checkPreview() {
if ($this->checkSession() == true) {
if (isset ($_REQUEST['z']) && $_REQUEST['z'] == 'manprev') {
@@ -355,7 +452,11 @@ function checkPreview() {
}
}
- // check if site is offline
+ /**
+ * check if site is offline
+ *
+ * @return boolean
+ */
function checkSiteStatus() {
$siteStatus= $this->config['site_status'];
if ($siteStatus == 1) {
@@ -371,6 +472,12 @@ function checkSiteStatus() {
}
}
+ /**
+ * Create a 'clean' document identifier with path information, friendly URL suffix and prefix.
+ *
+ * @param string $qOrig
+ * @return string
+ */
function cleanDocumentIdentifier($qOrig) {
(!empty($qOrig)) or $qOrig = $this->config['site_start'];
$q= $qOrig;
@@ -413,6 +520,12 @@ function cleanDocumentIdentifier($qOrig) {
}
}
+ /**
+ * Check the cache for a specific document/resource
+ *
+ * @param int $id
+ * @return string
+ */
function checkCache($id) {
$cacheFile= "assets/cache/docid_" . $id . ".pageCache.php";
if (file_exists($cacheFile)) {
@@ -473,6 +586,16 @@ function checkCache($id) {
}
}
+ /**
+ * Final processing and output of the document/resource.
+ *
+ * - runs uncached snippets
+ * - add javascript to
+ * - removes unused placeholders
+ * - converts URL tags [~...~] to URLs
+ *
+ * @param boolean $noEvent Default: false
+ */
function outputContent($noEvent= false) {
$this->documentOutput= $this->documentContent;
@@ -572,6 +695,9 @@ function outputContent($noEvent= false) {
ob_end_flush();
}
+ /**
+ * Checks the publish state of page
+ */
function checkPublishStatus() {
$cacheRefreshTime= 0;
@include $this->config["base_path"] . "assets/cache/sitePublishing.idx.php";
@@ -645,6 +771,11 @@ function checkPublishStatus() {
}
}
+ /**
+ * Final jobs.
+ *
+ * - cache page
+ */
function postProcess() {
// if the current document was generated, cache it!
if ($this->documentGenerated == 1 && $this->documentObject['cacheable'] == 1 && $this->documentObject['type'] == 'document' && $this->documentObject['published'] == 1) {
@@ -672,6 +803,12 @@ function postProcess() {
// end post processing
}
+ /**
+ * Merge meta tags
+ *
+ * @param string $template
+ * @return string
+ */
function mergeDocumentMETATags($template) {
if ($this->documentObject['haskeywords'] == 1) {
// insert keywords
@@ -701,12 +838,17 @@ function mergeDocumentMETATags($template) {
return $template;
}
- // mod by Raymond
+ /**
+ * Merge content fields and TVs
+ *
+ * @param string $template
+ * @return string
+ */
function mergeDocumentContent($template) {
$replace= array ();
preg_match_all('~\[\*(.*?)\*\]~', $template, $matches);
$variableCount= count($matches[1]);
- $basepath= $this->config["base_path"] . "manager/includes";
+ $basepath= MODX_MANAGER_PATH . "includes";
for ($i= 0; $i < $variableCount; $i++) {
$key= $matches[1][$i];
$key= substr($key, 0, 1) == '#' ? substr($key, 1) : $key; // remove # for QuickEdit format
@@ -725,6 +867,12 @@ function mergeDocumentContent($template) {
return $template;
}
+ /**
+ * Merge system settings
+ *
+ * @param string $template
+ * @return string
+ */
function mergeSettingsContent($template) {
$replace= array ();
$matches= array ();
@@ -740,6 +888,12 @@ function mergeSettingsContent($template) {
return $template;
}
+ /**
+ * Merge chunks
+ *
+ * @param string $content
+ * @return string
+ */
function mergeChunkContent($content) {
$replace= array ();
$matches= array ();
@@ -767,7 +921,12 @@ function mergeChunkContent($content) {
return $content;
}
- // Added by Raymond
+ /**
+ * Merge placeholder values
+ *
+ * @param string $content
+ * @return string
+ */
function mergePlaceholderContent($content) {
$replace= array ();
$matches= array ();
@@ -788,7 +947,12 @@ function mergePlaceholderContent($content) {
return $content;
}
- // evalPlugin
+ /**
+ * Run a plugin
+ *
+ * @param string $pluginCode Code to run
+ * @param array $params
+ */
function evalPlugin($pluginCode, $params) {
$etomite= $modx= & $this;
$modx->event->params= & $params; // store params inside event object
@@ -817,6 +981,13 @@ function evalPlugin($pluginCode, $params) {
unset ($modx->event->params);
}
+ /**
+ * Run a snippet
+ *
+ * @param string $snippet Code to run
+ * @param array $params
+ * @return string
+ */
function evalSnippet($snippet, $params) {
$etomite= $modx= & $this;
@@ -849,6 +1020,12 @@ function evalSnippet($snippet, $params) {
return $msg . $snip;
}
+ /**
+ * Run snippets as per the tags in $documentSource and replace the tags with the returned values.
+ *
+ * @param string $documentSource
+ * @return string
+ */
function evalSnippets($documentSource) {
$etomite= & $this;
@@ -1036,7 +1213,15 @@ private function _get_snip_properties($snip_call)
}
return $snippetObject;
}
-
+
+ /**
+ * Create a friendly URL
+ *
+ * @param string $pre
+ * @param string $suff
+ * @param string $alias
+ * @return string
+ */
function makeFriendlyURL($pre, $suff, $alias, $isfolder=0) {
$Alias = explode('/',$alias);
$alias = array_pop($Alias);
@@ -1046,6 +1231,12 @@ function makeFriendlyURL($pre, $suff, $alias, $isfolder=0) {
return ($dir != '' ? "$dir/" : '') . $pre . $alias . $suff;
}
+ /**
+ * Convert URL tags [~...~] to URLs
+ *
+ * @param string $documentSource
+ * @return string
+ */
function rewriteUrls($documentSource) {
// rewrite the urls
if ($this->config['friendly_urls'] == 1) {
@@ -1073,8 +1264,11 @@ function rewriteUrls($documentSource) {
}
/**
- * name: getDocumentObject - used by parser
- * desc: returns a document object - $method: alias, id
+ * Get all db fields and TVs for a document/resource
+ *
+ * @param type $method
+ * @param type $identifier
+ * @return array
*/
function getDocumentObject($method, $identifier) {
$tblsc= $this->getFullTableName("site_content");
@@ -1153,8 +1347,14 @@ function getDocumentObject($method, $identifier) {
}
/**
- * name: parseDocumentSource - used by parser
- * desc: return document source aftering parsing tvs, snippets, chunks, etc.
+ * Parse a source string.
+ *
+ * Handles most MODx tags. Exceptions include:
+ * - uncached snippet tags [!...!]
+ * - URL tags [~...~]
+ *
+ * @param string $source
+ * @return string
*/
function parseDocumentSource($source) {
// set the number of times we are to parse the document source
@@ -1199,6 +1399,14 @@ function parseDocumentSource($source) {
return $source;
}
+ /**
+ * Starts the parsing operations.
+ *
+ * - connects to the db
+ * - gets the settings (including system_settings)
+ * - gets the document/resource identifier as in the query string
+ * - finally calls prepareResponse()
+ */
function executeParser() {
//error_reporting(0);
if (version_compare(phpversion(), "5.0.0", ">="))
@@ -1294,6 +1502,15 @@ function executeParser() {
$this->prepareResponse();
}
+ /**
+ * The next step called at the end of executeParser()
+ *
+ * - checks cache
+ * - checks if document/resource is deleted/unpublished
+ * - checks if resource is a weblink and redirects if so
+ * - gets template and parses it
+ * - ensures that postProcess is called when PHP is finished
+ */
function prepareResponse() {
// we now know the method and identifier, let's check the cache
$this->documentContent= $this->checkCache($this->documentIdentifier);
@@ -1319,7 +1536,7 @@ function prepareResponse() {
$this->sendErrorPage();
} else {
// Inculde the necessary files to check document permissions
- include_once ($this->config['base_path'] . '/manager/processors/user_documents_permissions.class.php');
+ include_once ($this->config['site_manager_path'] . 'processors/user_documents_permissions.class.php');
$udperms= new udperms();
$udperms->user= $this->getLoginUserID();
$udperms->document= $this->documentIdentifier;
@@ -1386,10 +1603,13 @@ function prepareResponse() {
//$this->postProcess();
}
- /***************************************************************************************/
- /* API functions /
- /***************************************************************************************/
-
+ /**
+ * Returns an array of all parent record IDs for the id passed.
+ *
+ * @param int $id Docid to get parents for.
+ * @param int $height The maximum number of levels to go up, default 10.
+ * @return array
+ */
function getParentIds($id, $height= 10) {
$parents= array ();
while ( $id && $height-- ) {
@@ -1403,6 +1623,14 @@ function getParentIds($id, $height= 10) {
return $parents;
}
+ /**
+ * Returns an array of child IDs belonging to the specified parent.
+ *
+ * @param int $id The parent resource/document to start from
+ * @param int $depth How many levels deep to search for children, default: 10
+ * @param array $children Optional array of docids to merge with the result.
+ * @return array Contains the document Listing (tree) like the sitemap
+ */
function getChildIds($id, $depth= 10, $children= array ()) {
// Initialise a static array to index parents->children
@@ -1432,7 +1660,12 @@ function getChildIds($id, $depth= 10, $children= array ()) {
return $children;
}
- # Displays a javascript alert message in the web browser
+ /**
+ * Displays a javascript alert message in the web browser
+ *
+ * @param string $msg Message to show
+ * @param string $url URL to redirect to
+ */
function webAlert($msg, $url= "") {
$msg= addslashes($this->db->escape($msg));
if (substr(strtolower($url), 0, 11) == "javascript:") {
@@ -1449,7 +1682,12 @@ function webAlert($msg, $url= "") {
}
}
- # Returns true if user has the currect permission
+ /**
+ * Returns true if user has the currect permission
+ *
+ * @param string $pm Permission name
+ * @return int
+ */
function hasPermission($pm) {
$state= false;
$pms= $_SESSION['mgrPermissions'];
@@ -1458,7 +1696,15 @@ function hasPermission($pm) {
return $state;
}
- # Add an a alert message to the system event log
+ /**
+ * Add an a alert message to the system event log
+ *
+ * @param int $evtid Event ID
+ * @param int $type Types: 1 = information, 2 = warning, 3 = error
+ * @param string $msg Message to be logged
+ * @param string $source source of the event (module, snippet name, etc.)
+ * Default: Parser
+ */
function logEvent($evtid, $type, $msg, $source= 'Parser') {
$msg= $this->db->escape($msg);
$source= $this->db->escape($source);
@@ -1486,16 +1732,35 @@ function logEvent($evtid, $type, $msg, $source= 'Parser') {
}
}
- # Returns true if parser is executed in backend (manager) mode
+ /**
+ * Returns true if we are currently in the manager/backend
+ *
+ * @return boolean
+ */
function isBackend() {
return $this->insideManager() ? true : false;
}
- # Returns true if parser is executed in frontend mode
+ /**
+ * Returns true if we are currently in the frontend
+ *
+ * @return boolean
+ */
function isFrontend() {
return !$this->insideManager() ? true : false;
}
+ /**
+ * Gets all child documents of the specified document, including those which are unpublished or deleted.
+ *
+ * @param int $id The Document identifier to start with
+ * @param string $sort Sort field
+ * Default: menuindex
+ * @param string $dir Sort direction, ASC and DESC is possible
+ * Default: ASC
+ * @param string $fields Default: id, pagetitle, description, parent, alias, menutitle
+ * @return array
+ */
function getAllChildren($id= 0, $sort= 'menuindex', $dir= 'ASC', $fields= 'id, pagetitle, description, parent, alias, menutitle') {
$tblsc= $this->getFullTableName("site_content");
$tbldg= $this->getFullTableName("document_groups");
@@ -1522,6 +1787,17 @@ function getAllChildren($id= 0, $sort= 'menuindex', $dir= 'ASC', $fields= 'id, p
return $resourceArray;
}
+ /**
+ * Gets all active child documents of the specified document, i.e. those which published and not deleted.
+ *
+ * @param int $id The Document identifier to start with
+ * @param string $sort Sort field
+ * Default: menuindex
+ * @param string $dir Sort direction, ASC and DESC is possible
+ * Default: ASC
+ * @param string $fields Default: id, pagetitle, description, parent, alias, menutitle
+ * @return array
+ */
function getActiveChildren($id= 0, $sort= 'menuindex', $dir= 'ASC', $fields= 'id, pagetitle, description, parent, alias, menutitle') {
$tblsc= $this->getFullTableName("site_content");
$tbldg= $this->getFullTableName("document_groups");
@@ -1549,6 +1825,27 @@ function getActiveChildren($id= 0, $sort= 'menuindex', $dir= 'ASC', $fields= 'id
return $resourceArray;
}
+ /**
+ * Returns the children of the selected document/folder.
+ *
+ * @param int $parentid The parent document identifier
+ * Default: 0 (site root)
+ * @param int $published Whether published or unpublished documents are in the result
+ * Default: 1
+ * @param int $deleted Whether deleted or undeleted documents are in the result
+ * Default: 0 (undeleted)
+ * @param string $fields List of fields
+ * Default: * (all fields)
+ * @param string $where Where condition in SQL style. Should include a leading 'AND '
+ * Default: Empty string
+ * @param type $sort Should be a comma-separated list of field names on which to sort
+ * Default: menuindex
+ * @param string $dir Sort direction, ASC and DESC is possible
+ * Default: ASC
+ * @param string|int $limit Should be a valid SQL LIMIT clause without the 'LIMIT' i.e. just include the numbers as a string.
+ * Default: Empty string (no limit)
+ * @return array
+ */
function getDocumentChildren($parentid= 0, $published= 1, $deleted= 0, $fields= "*", $where= '', $sort= "menuindex", $dir= "ASC", $limit= "") {
$limit= ($limit != "") ? "LIMIT $limit" : "";
$tblsc= $this->getFullTableName("site_content");
@@ -1579,6 +1876,28 @@ function getDocumentChildren($parentid= 0, $published= 1, $deleted= 0, $fields=
return $resourceArray;
}
+ /**
+ * Returns multiple documents/resources
+ *
+ * @category API-Function
+ * @param array $ids Documents to fetch by docid
+ * Default: Empty array
+ * @param int $published Whether published or unpublished documents are in the result
+ * Default: 1
+ * @param int $deleted Whether deleted or undeleted documents are in the result
+ * Default: 0 (undeleted)
+ * @param string $fields List of fields
+ * Default: * (all fields)
+ * @param string $where Where condition in SQL style. Should include a leading 'AND '.
+ * Default: Empty string
+ * @param type $sort Should be a comma-separated list of field names on which to sort
+ * Default: menuindex
+ * @param string $dir Sort direction, ASC and DESC is possible
+ * Default: ASC
+ * @param string|int $limit Should be a valid SQL LIMIT clause without the 'LIMIT' i.e. just include the numbers as a string.
+ * Default: Empty string (no limit)
+ * @return array|boolean Result array with documents, or false
+ */
function getDocuments($ids= array (), $published= 1, $deleted= 0, $fields= "*", $where= '', $sort= "menuindex", $dir= "ASC", $limit= "") {
if (count($ids) == 0) {
return false;
@@ -1611,6 +1930,20 @@ function getDocuments($ids= array (), $published= 1, $deleted= 0, $fields= "*",
}
}
+ /**
+ * Returns one document/resource
+ *
+ * @category API-Function
+ * @param int $id docid
+ * Default: 0 (no documents)
+ * @param string $fields List of fields
+ * Default: * (all fields)
+ * @param int $published Whether published or unpublished documents are in the result
+ * Default: 1
+ * @param int $deleted Whether deleted or undeleted documents are in the result
+ * Default: 0 (undeleted)
+ * @return boolean|string
+ */
function getDocument($id= 0, $fields= "*", $published= 1, $deleted= 0) {
if ($id == 0) {
return false;
@@ -1625,6 +1958,19 @@ function getDocument($id= 0, $fields= "*", $published= 1, $deleted= 0) {
}
}
+ /**
+ * Returns the page information as database row, the type of result is
+ * defined with the parameter $rowMode
+ *
+ * @param int $pageid The parent document identifier
+ * Default: -1 (no result)
+ * @param int $active Should we fetch only published and undeleted documents/resources?
+ * 1 = yes, 0 = no
+ * Default: 1
+ * @param string $fields List of fields
+ * Default: id, pagetitle, description, alias
+ * @return boolean|array
+ */
function getPageInfo($pageid= -1, $active= 1, $fields= 'id, pagetitle, description, alias') {
if ($pageid == 0) {
return false;
@@ -1651,6 +1997,18 @@ function getPageInfo($pageid= -1, $active= 1, $fields= 'id, pagetitle, descripti
}
}
+ /**
+ * Returns the parent document/resource of the given docid
+ *
+ * @param int $pid The parent docid. If -1, then fetch the current document/resource's parent
+ * Default: -1
+ * @param int $active Should we fetch only published and undeleted documents/resources?
+ * 1 = yes, 0 = no
+ * Default: 1
+ * @param string $fields List of fields
+ * Default: id, pagetitle, description, alias
+ * @return boolean|array
+ */
function getParent($pid= -1, $active= 1, $fields= 'id, pagetitle, description, alias, parent') {
if ($pid == -1) {
$pid= $this->documentObject['parent'];
@@ -1667,6 +2025,11 @@ function getParent($pid= -1, $active= 1, $fields= 'id, pagetitle, description, a
}
}
+ /**
+ * Returns the id of the current snippet.
+ *
+ * @return int
+ */
function getSnippetId() {
if ($this->currentSnippet) {
$tbl= $this->getFullTableName("site_snippets");
@@ -1678,10 +2041,20 @@ function getSnippetId() {
return 0;
}
+ /**
+ * Returns the name of the current snippet.
+ *
+ * @return string
+ */
function getSnippetName() {
return $this->currentSnippet;
}
+ /**
+ * Clear the cache of MODX.
+ *
+ * @return boolean
+ */
function clearCache() {
$basepath= $this->config["base_path"] . "assets/cache";
if (@ $handle= opendir($basepath)) {
@@ -1703,6 +2076,20 @@ function clearCache() {
}
}
+ /**
+ * Create an URL for the given document identifier. The url prefix and
+ * postfix are used, when friendly_url is active.
+ *
+ * @param int $id The document identifier
+ * @param string $alias The alias name for the document
+ * Default: Empty string
+ * @param string $args The paramaters to add to the URL
+ * Default: Empty string
+ * @param string $scheme With full as valus, the site url configuration is
+ * used
+ * Default: Empty string
+ * @return string
+ */
function makeUrl($id, $alias= '', $args= '', $scheme= '') {
$url= '';
$virtualDir= '';
@@ -1769,6 +2156,13 @@ function makeUrl($id, $alias= '', $args= '', $scheme= '') {
}
}
+ /**
+ * Returns an entry from the config
+ *
+ * Note: most code accesses the config array directly and we will continue to support this.
+ *
+ * @return boolean|string
+ */
function getConfig($name= '') {
if (!empty ($this->config[$name])) {
return $this->config[$name];
@@ -1777,11 +2171,17 @@ function getConfig($name= '') {
}
}
+ /**
+ * Returns the ClipperCMS version information as version, branch, release date and full application name.
+ *
+ * @return array
+ */
+
function getVersionData($data=null) {
$out=array();
if(empty($this->version) || !is_array($this->version)){
//include for compatibility modx version < 1.0.10
- include $this->config["base_path"] . "manager/includes/version.inc.php";
+ include MODX_MANAGER_PATH . "includes/version.inc.php";
$this->version=array();
$this->version['version']= isset($modx_version) ? $modx_version : '';
$this->version['branch']= isset($modx_branch) ? $modx_branch : '';
@@ -1792,6 +2192,17 @@ function getVersionData($data=null) {
return (!is_null($data) && is_array($this->version) && isset($this->version[$data])) ? $this->version[$data] : $this->version;
}
+ /**
+ * Returns an ordered or unordered HTML list.
+ *
+ * @param array $array
+ * @param string $ulroot Default: root
+ * @param string $ulprefix Default: sub_
+ * @param string $type Default: Empty string
+ * @param boolean $ordered Default: false
+ * @param int $tablevel Default: 0
+ * @return string
+ */
function makeList($array, $ulroot= 'root', $ulprefix= 'sub_', $type= '', $ordered= false, $tablevel= 0) {
// first find out whether the value passed is an array
if (!is_array($array)) {
@@ -1818,6 +2229,11 @@ function makeList($array, $ulroot= 'root', $ulprefix= 'sub_', $type= '', $ordere
return $listhtml;
}
+ /**
+ * Returns user login information, as loggedIn (true or false), internal key, username and usertype (web or manager).
+ *
+ * @return boolean|array
+ */
function userLoggedIn() {
$userdetails= array ();
if ($this->isFrontend() && isset ($_SESSION['webValidated'])) {
@@ -1840,6 +2256,13 @@ function userLoggedIn() {
}
}
+ /**
+ * Returns an array with keywords for the current document, or a document with a given docid
+ *
+ * @param int $id The docid, 0 means the current document
+ * Default: 0
+ * @return array
+ */
function getKeywords($id= 0) {
if ($id == 0) {
$id= $this->documentObject['id'];
@@ -1859,6 +2282,13 @@ function getKeywords($id= 0) {
return $keywords;
}
+ /**
+ * Returns an array with meta tags for the current document, or a document with a given docid.
+ *
+ * @param int $id The document identifier, 0 means the current document
+ * Default: 0
+ * @return array
+ */
function getMETATags($id= 0) {
if ($id == 0) {
$id= $this->documentObject['id'];
@@ -1883,6 +2313,13 @@ function getMETATags($id= 0) {
return $metatags;
}
+ /**
+ * Executes a snippet.
+ *
+ * @param string $snippetName
+ * @param array $params Default: Empty array
+ * @return string
+ */
function runSnippet($snippetName, $params= array ()) {
if (isset ($this->snippetCache[$snippetName])) {
$snippet= $this->snippetCache[$snippetName];
@@ -1906,12 +2343,24 @@ function runSnippet($snippetName, $params= array ()) {
return $this->evalSnippet($snippet, $parameters);
}
+ /**
+ * Returns the chunk content for the given chunk name
+ *
+ * @param string $chunkName
+ * @return boolean|string
+ */
function getChunk($chunkName) {
$t= $this->chunkCache[$chunkName];
return $t;
}
- // deprecated
+ /**
+ * Old method that just calls getChunk()
+ *
+ * @deprecated Use getChunk
+ * @param string $chunkName
+ * @return boolean|string
+ */
function putChunk($chunkName) { // alias name >.<
return $this->getChunk($chunkName);
}
@@ -1927,11 +2376,24 @@ function parseChunk($chunkName, $chunkArr, $prefix= "{", $suffix= "}") {
return $chunk;
}
+ /**
+ * Get data from phpSniff
+ *
+ * @category API-Function
+ * @return array
+ */
function getUserData() {
- include $this->config["base_path"] . "manager/includes/extenders/getUserData.extender.php";
+ include MODX_MANAGER_PATH . "includes/extenders/getUserData.extender.php";
return $tmpArray;
}
+ /**
+ * Returns the timestamp in the date format defined in $this->config['datetime_format']
+ *
+ * @param int $timestamp Default: 0
+ * @param string $mode Default: Empty string (adds the time as below). Can also be 'dateOnly' for no time or 'formatOnly' to get the datetime_format string.
+ * @return string
+ */
function toDateFormat($timestamp = 0, $mode = '') {
$timestamp = trim($timestamp);
$timestamp = intval($timestamp);
@@ -1963,6 +2425,12 @@ function toDateFormat($timestamp = 0, $mode = '') {
return $strTime;
}
+ /**
+ * Make a timestamp from a string corresponding to the format in $this->config['datetime_format']
+ *
+ * @param string $str
+ * @return string
+ */
function toTimeStamp($str) {
$str = trim($str);
if (empty($str)) {return '';}
@@ -1993,10 +2461,30 @@ function toTimeStamp($str) {
return $timeStamp;
}
- #::::::::::::::::::::::::::::::::::::::::
- # Added By: Raymond Irving - MODx
- #
-
+ /**
+ * Get the TVs of a document's children. Returns an array where each element represents one child doc.
+ *
+ * Ignores deleted children. Gets all children - there is no where clause available.
+ *
+ * @param int $parentid The parent docid
+ * Default: 0 (site root)
+ * @param array $tvidnames. Which TVs to fetch - Can relate to the TV ids in the db (array elements should be numeric only)
+ * or the TV names (array elements should be names only)
+ * Default: Empty array
+ * @param int $published Whether published or unpublished documents are in the result
+ * Default: 1
+ * @param string $docsort How to sort the result array (field)
+ * Default: menuindex
+ * @param ASC $docsortdir How to sort the result array (direction)
+ * Default: ASC
+ * @param string $tvfields Fields to fetch from site_tmplvars, default '*'
+ * Default: *
+ * @param string $tvsort How to sort each element of the result array i.e. how to sort the TVs (field)
+ * Default: rank
+ * @param string $tvsortdir How to sort each element of the result array i.e. how to sort the TVs (direction)
+ * Default: ASC
+ * @return boolean|array
+ */
function getDocumentChildrenTVars($parentid= 0, $tvidnames= array (), $published= 1, $docsort= "menuindex", $docsortdir= "ASC", $tvfields= "*", $tvsort= "rank", $tvsortdir= "ASC") {
$docs= $this->getDocumentChildren($parentid, $published, 0, '*', '', $docsort, $docsortdir);
if (!$docs)
@@ -2050,6 +2538,25 @@ function getDocumentChildrenTVars($parentid= 0, $tvidnames= array (), $published
}
}
+ /**
+ * Get the TV outputs of a document's children.
+ *
+ * Returns an array where each element represents one child doc and contains the result from getTemplateVarOutput()
+ *
+ * Ignores deleted children. Gets all children - there is no where clause available.
+ *
+ * @param int $parentid The parent docid
+ * Default: 0 (site root)
+ * @param array $tvidnames. Which TVs to fetch. In the form expected by getTemplateVarOutput().
+ * Default: Empty array
+ * @param int $published Whether published or unpublished documents are in the result
+ * Default: 1
+ * @param string $docsort How to sort the result array (field)
+ * Default: menuindex
+ * @param ASC $docsortdir How to sort the result array (direction)
+ * Default: ASC
+ * @return boolean|array
+ */
function getDocumentChildrenTVarOutput($parentid= 0, $tvidnames= array (), $published= 1, $docsort= "menuindex", $docsortdir= "ASC") {
$docs= $this->getDocumentChildren($parentid, $published, 0, '*', '', $docsort, $docsortdir);
if (!$docs)
@@ -2065,8 +2572,21 @@ function getDocumentChildrenTVarOutput($parentid= 0, $tvidnames= array (), $publ
}
}
- // Modified by Raymond for TV - Orig Modified by Apodigm - DocVars
- # returns a single TV record. $idnames - can be an id or name that belongs the template that the current document is using
+ /**
+ * Modified by Raymond for TV - Orig Modified by Apodigm - DocVars
+ * Returns a single site_content field or TV record from the db.
+ *
+ * If a site content field the result is an associative array of 'name' and 'value'.
+ *
+ * If a TV the result is an array representing a db row including the fields specified in $fields.
+ *
+ * @param string $idname Can be a TV id or name
+ * @param string $fields Fields to fetch from site_tmplvars. Default: *
+ * @param type $docid Docid. Defaults to empty string which indicates the current document.
+ * @param int $published Whether published or unpublished documents are in the result
+ * Default: 1
+ * @return boolean
+ */
function getTemplateVar($idname= "", $fields= "*", $docid= "", $published= 1) {
if ($idname == "") {
return false;
@@ -2076,7 +2596,27 @@ function getTemplateVar($idname= "", $fields= "*", $docid= "", $published= 1) {
}
}
- # returns an array of TV records. $idnames - can be an id or name that belongs the template that the current document is using
+ /**
+ * Returns an array of site_content field fields and/or TV records from the db
+ *
+ * Elements representing a site content field consist of an associative array of 'name' and 'value'.
+ *
+ * Elements representing a TV consist of an array representing a db row including the fields specified in $fields.
+ *
+ * @param array $idnames Which TVs to fetch - Can relate to the TV ids in the db (array elements should be numeric only)
+ * or the TV names (array elements should be names only)
+ * Default: Empty array
+ * @param string $fields Fields to fetch from site_tmplvars.
+ * Default: *
+ * @param string $docid Docid. Defaults to empty string which indicates the current document.
+ * @param int $published Whether published or unpublished documents are in the result
+ * Default: 1
+ * @param string $sort How to sort the result array (field)
+ * Default: rank
+ * @param string $dir How to sort the result array (direction)
+ * Default: ASC
+ * @return boolean|array
+ */
function getTemplateVars($idnames= array (), $fields= "*", $docid= "", $published= 1, $sort= "rank", $dir= "ASC") {
if (($idnames != '*' && !is_array($idnames)) || count($idnames) == 0) {
return false;
@@ -2126,7 +2666,18 @@ function getTemplateVars($idnames= array (), $fields= "*", $docid= "", $publishe
}
}
- # returns an associative array containing TV rendered output values. $idnames - can be an id or name that belongs the template that the current document is using
+ /**
+ * Returns an associative array containing TV rendered output values.
+ *
+ * @param type $idnames Which TVs to fetch - Can relate to the TV ids in the db (array elements should be numeric only)
+ * or the TV names (array elements should be names only)
+ * Default: Empty array
+ * @param string $docid Docid. Defaults to empty string which indicates the current document.
+ * @param int $published Whether published or unpublished documents are in the result
+ * Default: 1
+ * @param string $sep
+ * @return boolean|array
+ */
function getTemplateVarOutput($idnames= array (), $docid= "", $published= 1, $sep='') {
if (count($idnames) == 0) {
return false;
@@ -2138,7 +2689,7 @@ function getTemplateVarOutput($idnames= array (), $docid= "", $published= 1, $se
if ($result == false)
return false;
else {
- $baspath= $this->config["base_path"] . "manager/includes";
+ $baspath= MODX_MANAGER_PATH . "includes";
include_once $baspath . "/tmplvars.format.inc.php";
include_once $baspath . "/tmplvars.commands.inc.php";
for ($i= 0; $i < count($result); $i++) {
@@ -2152,22 +2703,42 @@ function getTemplateVarOutput($idnames= array (), $docid= "", $published= 1, $se
}
}
- # returns the full table name based on db settings
+ /**
+ * Returns the full table name based on db settings
+ *
+ * @param string $tbl Table name
+ * @return string Table name with prefix
+ */
function getFullTableName($tbl) {
return $this->db->config['dbase'] . ".`" . $this->db->config['table_prefix'] . $tbl . "`";
}
- # return placeholder value
+ /**
+ * Returns the placeholder value
+ *
+ * @param string $name Placeholder name
+ * @return string Placeholder value
+ */
function getPlaceholder($name) {
return $this->placeholders[$name];
}
- # sets a value for a placeholder
+ /**
+ * Sets a value for a placeholder
+ *
+ * @param string $name The name of the placeholder
+ * @param string $value The value of the placeholder
+ */
function setPlaceholder($name, $value) {
$this->placeholders[$name]= $value;
}
- # set arrays or object vars as placeholders
+ /**
+ * Set placeholders en masse via an array or object.
+ *
+ * @param object|array $subject
+ * @param string $prefix
+ */
function toPlaceholders($subject, $prefix= '') {
if (is_object($subject)) {
$subject= get_object_vars($subject);
@@ -2179,6 +2750,13 @@ function toPlaceholders($subject, $prefix= '') {
}
}
+ /**
+ * For use by toPlaceholders(); For setting an array or object element as placeholder.
+ *
+ * @param string $key
+ * @param object|array $value
+ * @param string $prefix
+ */
function toPlaceholder($key, $value, $prefix= '') {
if (is_array($value) || is_object($value)) {
$this->toPlaceholders($value, "{$prefix}{$key}.");
@@ -2187,21 +2765,39 @@ function toPlaceholder($key, $value, $prefix= '') {
}
}
- # returns the virtual relative path to the manager folder
+ /**
+ * Returns the manager relative URL/path with respect to the site root.
+ *
+ * @global string $base_url
+ * @return string The complete URL to the manager folder
+ */
function getManagerPath() {
- global $base_url;
- $pth= $base_url . 'manager/';
- return $pth;
+ return MODX_MANAGER_URL;
}
- # returns the virtual relative path to the cache folder
+ /**
+ * Returns the cache relative URL/path with respect to the site root.
+ *
+ * @global string $base_url
+ * @return string The complete URL to the cache folder
+ */
function getCachePath() {
global $base_url;
$pth= $base_url . 'assets/cache/';
return $pth;
}
- # sends a message to a user's message box
+ /**
+ * Sends a message to a user's message box.
+ *
+ * @param string $type Type of the message
+ * @param string $to The recipient of the message
+ * @param string $from The sender of the message
+ * @param string $subject The subject of the message
+ * @param string $msg The message body
+ * @param int $private Whether it is a private message, or not
+ * Default : 0
+ */
function sendAlert($type, $to, $from, $subject, $msg, $private= 0) {
$private= ($private) ? 1 : 0;
if (!is_numeric($to)) {
@@ -2227,8 +2823,12 @@ function sendAlert($type, $to, $from, $subject, $msg, $private= 0) {
$rs= $this->db->query($sql);
}
- # Returns true, install or interact when inside manager
- // deprecated
+ /**
+ * Returns true, install or interact when inside manager.
+ *
+ * @deprecated
+ * @return string
+ */
function insideManager() {
$m= false;
if (defined('IN_MANAGER_MODE') && IN_MANAGER_MODE == 'true') {
@@ -2242,7 +2842,12 @@ function insideManager() {
return $m;
}
- # Returns current user id
+ /**
+ * Returns current user id.
+ *
+ * @param string $context. Default is an empty string which indicates the method should automatically pick 'web (frontend) or 'mgr' (backend)
+ * @return string
+ */
function getLoginUserID($context= '') {
if ($context && isset ($_SESSION[$context . 'Validated'])) {
return $_SESSION[$context . 'InternalKey'];
@@ -2255,7 +2860,12 @@ function getLoginUserID($context= '') {
}
}
- # Returns current user name
+ /**
+ * Returns current user name
+ *
+ * @param string $context. Default is an empty string which indicates the method should automatically pick 'web (frontend) or 'mgr' (backend)
+ * @return string
+ */
function getLoginUserName($context= '') {
if (!empty($context) && isset ($_SESSION[$context . 'Validated'])) {
return $_SESSION[$context . 'Shortname'];
@@ -2268,7 +2878,11 @@ function getLoginUserName($context= '') {
}
}
- # Returns current login user type - web or manager
+ /**
+ * Returns current login user type - web or manager
+ *
+ * @return string
+ */
function getLoginUserType() {
if ($this->isFrontend() && isset ($_SESSION['webValidated'])) {
return 'web';
@@ -2280,7 +2894,12 @@ function getLoginUserType() {
}
}
- # Returns a record for the manager user
+ /**
+ * Returns a user info record for the given manager user
+ *
+ * @param int $uid
+ * @return boolean|string
+ */
function getUserInfo($uid) {
$sql= "
SELECT mu.username, mu.password, mua.*
@@ -2298,7 +2917,12 @@ function getUserInfo($uid) {
}
}
- # Returns a record for the web user
+ /**
+ * Returns a record for the web user
+ *
+ * @param int $uid
+ * @return boolean|string
+ */
function getWebUserInfo($uid) {
$sql= "
SELECT wu.username, wu.password, wua.*
@@ -2316,9 +2940,15 @@ function getWebUserInfo($uid) {
}
}
- # Returns an array of document groups that current user is assigned to.
- # This function will first return the web user doc groups when running from frontend otherwise it will return manager user's docgroup
- # Set $resolveIds to true to return the document group names
+ /**
+ * Returns an array of document groups that current user is assigned to.
+ * This function will first return the web user doc groups when running from
+ * frontend otherwise it will return manager user's docgroup.
+ *
+ * @param boolean $resolveIds Set to true to return the document group names
+ * Default: false
+ * @return string|array
+ */
function getUserDocGroups($resolveIds= false) {
if ($this->isFrontend() && isset ($_SESSION['webDocgroups']) && isset ($_SESSION['webValidated'])) {
$dg= $_SESSION['webDocgroups'];
@@ -2351,11 +2981,28 @@ function getUserDocGroups($resolveIds= false) {
return $dgn;
}
}
+
+ /**
+ * Returns an array of document groups that current user is assigned to.
+ * This function will first return the web user doc groups when running from
+ * frontend otherwise it will return manager user's docgroup.
+ *
+ * @deprecated
+ * @return string|array
+ */
function getDocGroups() {
return $this->getUserDocGroups();
} // deprecated
- # Change current web user's password - returns true if successful, oterhwise return error message
+ /**
+ * Change current web user's password
+ *
+ * @todo Make password length configurable, allow rules for passwords and translation of messages
+ * @param string $oldPwd
+ * @param string $newPwd
+ * @return string|boolean Returns true if successful, oterhwise return error
+ * message
+ */
function changeWebUserPassword($oldPwd, $newPwd) {
$rt= false;
if ($_SESSION["webValidated"] == 1) {
@@ -2386,11 +3033,25 @@ function changeWebUserPassword($oldPwd, $newPwd) {
}
}
}
+
+ /**
+ * Change current web user's password
+ *
+ * @deprecated
+ * @param string $o
+ * @param string $n
+ * @return string|boolean
+ */
function changePassword($o, $n) {
return changeWebUserPassword($o, $n);
} // deprecated
- # returns true if the current web user is a member the specified groups
+ /**
+ * Returns true if the current web user is a member the specified groups
+ *
+ * @param array $groupNames
+ * @return boolean
+ */
function isMemberOfWebGroup($groupNames= array ()) {
if (!is_array($groupNames))
return false;
@@ -2412,7 +3073,13 @@ function isMemberOfWebGroup($groupNames= array ()) {
return false;
}
- # Registers Client-side CSS scripts - these scripts are loaded at inside the tag
+ /**
+ * Registers Client-side CSS scripts - these scripts are loaded at inside
+ * the tag
+ *
+ * @param string $src
+ * @param string $media Default: Empty string
+ */
function regClientCSS($src, $media='') {
if (empty($src) || isset ($this->loadedjscripts[$src]))
return '';
@@ -2427,12 +3094,24 @@ function regClientCSS($src, $media='') {
}
}
- # Registers Startup Client-side JavaScript - these scripts are loaded at inside the tag
+ /**
+ * Registers Startup Client-side JavaScript - these scripts are loaded at inside the tag
+ *
+ * @param string $src
+ * @param array $options Default: 'name'=>'', 'version'=>'0', 'plaintext'=>false
+ */
function regClientStartupScript($src, $options= array('name'=>'', 'version'=>'0', 'plaintext'=>false)) {
$this->regClientScript($src, $options, true);
}
- # Registers Client-side JavaScript - these scripts are loaded at the end of the page unless $startup is true
+ /**
+ * Registers Client-side JavaScript these scripts are loaded at the end of the page unless $startup is true
+ *
+ * @param string $src
+ * @param array $options Default: 'name'=>'', 'version'=>'0', 'plaintext'=>false
+ * @param boolean $startup Default: false
+ * @return string
+ */
function regClientScript($src, $options= array('name'=>'', 'version'=>'0', 'plaintext'=>false), $startup= false) {
if (empty($src))
return ''; // nothing to register
@@ -2496,17 +3175,31 @@ function regClientScript($src, $options= array('name'=>'', 'version'=>'0', 'plai
$this->loadedjscripts[$key]['pos']= $pos;
}
- # Registers Client-side Startup HTML block
+ /**
+ * Returns all registered JavaScripts
+ *
+ * @return string
+ */
function regClientStartupHTMLBlock($html) {
$this->regClientScript($html, true, true);
}
- # Registers Client-side HTML block
+ /**
+ * Returns all registered startup scripts
+ *
+ * @return string
+ */
function regClientHTMLBlock($html) {
$this->regClientScript($html, true);
}
- # Remove unwanted html tags and snippet, settings and tags
+ /**
+ * Remove unwanted html tags and snippet, settings and tags
+ *
+ * @param string $html
+ * @param string $allowed Default: Empty string
+ * @return string
+ */
function stripTags($html, $allowed= "") {
$t= strip_tags($html, $allowed);
$t= preg_replace('~\[\*(.*?)\*\]~', "", $t); //tv
@@ -2532,8 +3225,13 @@ function jsonDecode($json, $assoc = false) {
$json = str_replace($masked, $unmasked, $json);
return json_decode($json, $assoc);
}
-
- # add an event listner to a plugin - only for use within the current execution cycle
+ /**
+ * Add an event listner to a plugin - only for use within the current execution cycle
+ *
+ * @param string $evtName
+ * @param string $pluginName
+ * @return boolean|int
+ */
function addEventListener($evtName, $pluginName) {
if (!$evtName || !$pluginName)
return false;
@@ -2542,20 +3240,33 @@ function addEventListener($evtName, $pluginName) {
return array_push($this->pluginEvent[$evtName], $pluginName); // return array count
}
- # remove event listner - only for use within the current execution cycle
+ /**
+ * Remove event listner - only for use within the current execution cycle
+ *
+ * @param string $evtName
+ * @return boolean
+ */
function removeEventListener($evtName) {
if (!$evtName)
return false;
unset ($this->pluginEvent[$evtName]);
}
- # remove all event listners - only for use within the current execution cycle
+ /**
+ * Remove all event listners - only for use within the current execution cycle
+ */
function removeAllEventListener() {
unset ($this->pluginEvent);
$this->pluginEvent= array ();
}
- # invoke an event. $extParams - hash array: name=>value
+ /**
+ * Invoke an event.
+ *
+ * @param string $evtName
+ * @param array $extParams Parameters available to plugins. Each array key will be the PHP variable name, and the array value will be the variable value.
+ * @return boolean|array
+ */
function invokeEvent($evtName, $extParams= array ()) {
if (!$evtName)
return false;
@@ -2607,7 +3318,12 @@ function invokeEvent($evtName, $extParams= array ()) {
return $results;
}
- # parses a resource property string and returns the result as an array
+ /**
+ * Parses a resource property string and returns the result as an array
+ *
+ * @param string $propertyString
+ * @return array Associative array in the form property name => property value
+ */
function parseProperties($propertyString) {
$parameter= array ();
if (!empty ($propertyString)) {
@@ -2634,6 +3350,10 @@ function parseProperties($propertyString) {
Etomite ID: rad14701
See documentation for usage details
############################################*/
+
+ /**
+ * @depracted Etomite db method
+ */
function getIntTableRows($fields= "*", $from= "", $where= "", $sort= "", $dir= "ASC", $limit= "") {
// function to get rows from ANY internal database table
if ($from == "") {
@@ -2653,6 +3373,9 @@ function getIntTableRows($fields= "*", $from= "", $where= "", $sort= "", $dir= "
}
}
+ /**
+ * @depracted Etomite db method
+ */
function putIntTableRow($fields= "", $into= "") {
// function to put a row into ANY internal database table
if (($fields == "") || ($into == "")) {
@@ -2674,6 +3397,9 @@ function putIntTableRow($fields= "", $into= "") {
}
}
+ /**
+ * @depracted Etomite db method
+ */
function updIntTableRow($fields= "", $into= "", $where= "", $sort= "", $dir= "ASC", $limit= "") {
// function to update a row into ANY internal database table
if (($fields == "") || ($into == "")) {
@@ -2698,6 +3424,9 @@ function updIntTableRow($fields= "", $into= "", $where= "", $sort= "", $dir= "AS
}
}
+ /**
+ * @depracted Etomite db method
+ */
function getExtTableRows($host= "", $user= "", $pass= "", $dbase= "", $fields= "*", $from= "", $where= "", $sort= "", $dir= "ASC", $limit= "") {
// function to get table rows from an external MySQL database
if (($host == "") || ($user == "") || ($pass == "") || ($dbase == "") || ($from == "")) {
@@ -2718,6 +3447,9 @@ function getExtTableRows($host= "", $user= "", $pass= "", $dbase= "", $fields= "
}
}
+ /**
+ * @depracted Etomite db method
+ */
function putExtTableRow($host= "", $user= "", $pass= "", $dbase= "", $fields= "", $into= "") {
// function to put a row into an external database table
if (($host == "") || ($user == "") || ($pass == "") || ($dbase == "") || ($fields == "") || ($into == "")) {
@@ -2740,6 +3472,9 @@ function putExtTableRow($host= "", $user= "", $pass= "", $dbase= "", $fields= ""
}
}
+ /**
+ * @depracted Etomite db method
+ */
function updExtTableRow($host= "", $user= "", $pass= "", $dbase= "", $fields= "", $into= "", $where= "", $sort= "", $dir= "ASC", $limit= "") {
// function to update a row into an external database table
if (($fields == "") || ($into == "")) {
@@ -2765,6 +3500,9 @@ function updExtTableRow($host= "", $user= "", $pass= "", $dbase= "", $fields= ""
}
}
+ /**
+ * @depracted Etomite db method
+ */
function dbExtConnect($host, $user, $pass, $dbase) {
// function to connect to external database
$tstart= $this->getMicroTime();
@@ -2781,6 +3519,9 @@ function dbExtConnect($host, $user, $pass, $dbase) {
}
}
+ /**
+ * @depracted Etomite db method
+ */
function getFormVars($method= "", $prefix= "", $trim= "", $REQUEST_METHOD) {
// function to retrieve form results into an associative array
$results= array ();
@@ -2811,10 +3552,20 @@ function getFormVars($method= "", $prefix= "", $trim= "", $REQUEST_METHOD) {
// END New database functions - rad14701
########################################
- /***************************************************************************************/
- /* End of API functions */
- /***************************************************************************************/
-
+ /**
+ * PHP error handler set by http://www.php.net/manual/en/function.set-error-handler.php
+ *
+ * Checks the PHP error and calls messageQuit() unless:
+ * - error_reporting() returns 0, or
+ * - the PHP error level is 0, or
+ * - the PHP error level is 8 (E_NOTICE) and stopOnNotice is false
+ *
+ * @param int $nr The PHP error level as per http://www.php.net/manual/en/errorfunc.constants.php
+ * @param string $text Error message
+ * @param string $file File where the error was detected
+ * @param string $line Line number within $file
+ * @return boolean
+ */
function phpError($nr, $text, $file, $line) {
if (error_reporting() == 0 || $nr == 0) {
return true;
@@ -3030,7 +3781,7 @@ function messageQuit($msg= 'unspecified error', $query= '', $is_error= true, $nr
{
echo 'MODX Content Manager ' . $version . ' » ' . $release_date . '
-
+
' . $str . '';
@@ -3114,7 +3865,9 @@ function nicesize($size) {
}
-// SystemEvent Class
+/**
+ * System Event Class
+ */
class SystemEvent {
var $name;
var $_propagate;
@@ -3127,7 +3880,12 @@ function SystemEvent($name= "") {
$this->name= $name;
}
- // used for displaying a message to the user
+ /**
+ * Display a message to the user
+ *
+ * @global array $SystemAlertMsgQueque
+ * @param string $msg The message
+ */
function alert($msg) {
global $SystemAlertMsgQueque;
if ($msg == "")
@@ -3139,11 +3897,18 @@ function alert($msg) {
}
}
- // used for rendering an out on the screen
+ /**
+ * Output
+ *
+ * @param string $msg
+ */
function output($msg) {
$this->_output .= $msg;
}
+ /**
+ * Stop event propogation
+ */
function stopPropagation() {
$this->_propagate= false;
}
From 0116b5a17c6c6387df33e291561b03dccd45a51b Mon Sep 17 00:00:00 2001
From: Dmi3yy
Date: Sun, 28 Apr 2013 23:46:26 +0300
Subject: [PATCH 012/530] Revert "add php doc and manager path constant"
This reverts commit 29b19cb2a493c5d30880c44398306f14061e6f9d.
---
.../includes/document.parser.class.inc.php | 947 ++----------------
1 file changed, 91 insertions(+), 856 deletions(-)
diff --git a/manager/includes/document.parser.class.inc.php b/manager/includes/document.parser.class.inc.php
index e3bb64019c..97ef7d0b5a 100755
--- a/manager/includes/document.parser.class.inc.php
+++ b/manager/includes/document.parser.class.inc.php
@@ -50,11 +50,7 @@ class DocumentParser {
var $error_reporting;
private $version=array();
- /**
- * Document constructor
- *
- * @return DocumentParser
- */
+ // constructor
function DocumentParser() {
global $database_server;
if(substr(PHP_OS,0,3) === 'WIN' && $database_server==='localhost') $database_server = '127.0.0.1';
@@ -72,21 +68,14 @@ function DocumentParser() {
$this->error_reporting = 1;
}
- /**
- * Loads an extension from the extenders folder.
- * Currently of limited use - can only load the DBAPI and ManagerAPI.
- *
- * @global string $database_type
- * @param string $extnamegetAllChildren
- * @return boolean
- */
+ // loads an extension from the extenders folder
function loadExtension($extname) {
global $database_type;
switch ($extname) {
// Database API
case 'DBAPI' :
- if (!include_once MODX_MANAGER_PATH . 'includes/extenders/dbapi.' . $database_type . '.class.inc.php')
+ if (!include_once MODX_BASE_PATH . 'manager/includes/extenders/dbapi.' . $database_type . '.class.inc.php')
return false;
$this->db= new DBAPI;
return true;
@@ -94,7 +83,7 @@ function loadExtension($extname) {
// Manager API
case 'ManagerAPI' :
- if (!include_once MODX_MANAGER_PATH . 'includes/extenders/manager.api.class.inc.php')
+ if (!include_once MODX_BASE_PATH . 'manager/includes/extenders/manager.api.class.inc.php')
return false;
$this->manager= new ManagerAPI;
return true;
@@ -105,27 +94,11 @@ function loadExtension($extname) {
}
}
- /**
- * Returns the current micro time
- *
- * @return float
- */
function getMicroTime() {
list ($usec, $sec)= explode(' ', microtime());
return ((float) $usec + (float) $sec);
}
- /**
- * Redirect
- *
- * @global string $base_url
- * @global string $site_url
- * @param string $url
- * @param int $count_attempts
- * @param type $type
- * @param type $responseCode
- * @return boolean
- */
function sendRedirect($url, $count_attempts= 0, $type= '', $responseCode= '') {
if (empty ($url)) {
return false;
@@ -173,12 +146,6 @@ function sendRedirect($url, $count_attempts= 0, $type= '', $responseCode= '') {
}
}
- /**
- * Forward to another page
- *
- * @param int $id
- * @param string $responseCode
- */
function sendForward($id, $responseCode= '') {
if ($this->forwards > 0) {
$this->forwards= $this->forwards - 1;
@@ -196,9 +163,6 @@ function sendForward($id, $responseCode= '') {
}
}
- /**
- * Redirect to the error page, by calling sendForward(). This is called for example when the page was not found.
- */
function sendErrorPage() {
// invoke OnPageNotFound event
$this->invokeEvent('OnPageNotFound');
@@ -222,93 +186,54 @@ function sendUnauthorizedPage() {
exit();
}
- /**
- * Connect to the database
- *
- * @deprecated use $modx->db->connect()
- */
+ // function to connect to the database
+ // - deprecated use $modx->db->connect()
function dbConnect() {
$this->db->connect();
$this->rs= $this->db->conn; // for compatibility
}
- /**
- * Query the database
- *
- * @deprecated use $modx->db->query()
- * @param string $sql The SQL statement to execute
- * @return resource|bool
- */
+ // function to query the database
+ // - deprecated use $modx->db->query()
function dbQuery($sql) {
return $this->db->query($sql);
}
- /**
- * Count the number of rows in a record set
- *
- * @deprecated use $modx->db->getRecordCount($rs)
- * @param resource
- * @return int
- */
+ // function to count the number of rows in a record set
function recordCount($rs) {
return $this->db->getRecordCount($rs);
}
- /**
- * Get a result row
- *
- * @deprecated use $modx->db->getRow()
- * @param array $rs
- * @param string $mode
- * @return array
- */
+ // - deprecated, use $modx->db->getRow()
function fetchRow($rs, $mode= 'assoc') {
return $this->db->getRow($rs, $mode);
}
- /**
- * Get the number of rows affected in the last db operation
- *
- * @deprecated use $modx->db->getAffectedRows()
- * @param array $rs
- * @return int
- */
+ // - deprecated, use $modx->db->getAffectedRows()
function affectedRows($rs) {
return $this->db->getAffectedRows($rs);
}
- /**
- * Get the ID generated in the last query
- *
- * @deprecated use $modx->db->getInsertId()
- * @param array $rs
- * @return int
- */
+ // - deprecated, use $modx->db->getInsertId()
function insertId($rs) {
return $this->db->getInsertId($rs);
}
- /**
- * Close a database connection
- *
- * @deprecated use $modx->db->disconnect()
- */
+ // function to close a database connection
+ // - deprecated, use $modx->db->disconnect()
function dbClose() {
$this->db->disconnect();
}
- /**
- * Get MODx settings including, but not limited to, the system_settings table
- */
function getSettings() {
if (!is_array($this->config) || empty ($this->config)) {
if ($included= file_exists(MODX_BASE_PATH . 'assets/cache/siteCache.idx.php')) {
$included= include_once (MODX_BASE_PATH . 'assets/cache/siteCache.idx.php');
}
if (!$included || !is_array($this->config) || empty ($this->config)) {
- include_once MODX_MANAGER_PATH . "processors/cache_sync.class.processor.php";
+ include_once MODX_BASE_PATH . "/manager/processors/cache_sync.class.processor.php";
$cache = new synccache();
- $cache->setCachepath(MODX_BASE_PATH . "assets/cache/");
+ $cache->setCachepath(MODX_BASE_PATH . "/assets/cache/");
$cache->setReport(false);
$rebuilt = $cache->buildCache($this);
$included = false;
@@ -330,8 +255,6 @@ function getSettings() {
$this->config['base_url']= MODX_BASE_URL;
$this->config['base_path']= MODX_BASE_PATH;
$this->config['site_url']= MODX_SITE_URL;
- $this->config['site_manager_url']=MODX_MANAGER_URL;
- $this->config['site_manager_path']=MODX_MANAGER_PATH;
// load user setting if user is logged in
$usrSettings= array ();
@@ -381,11 +304,6 @@ function getSettings() {
}
}
- /**
- * Get the method by which the current document/resource was requested
- *
- * @return string 'alias' (friendly url alias) or 'id'
- */
function getDocumentMethod() {
// function to test the query and find the retrieval method
if (isset ($_REQUEST['q'])) {
@@ -398,12 +316,6 @@ function getDocumentMethod() {
}
}
- /**
- * Returns the document identifier of the current request
- *
- * @param string $method id and alias are allowed
- * @return int
- */
function getDocumentIdentifier($method) {
// function to test the query and find the retrieval method
$docIdentifier= $this->config['site_start'];
@@ -422,11 +334,7 @@ function getDocumentIdentifier($method) {
return $docIdentifier;
}
- /**
- * Check for manager login session
- *
- * @return boolean
- */
+ // check for manager login session
function checkSession() {
if (isset ($_SESSION['mgrValidated'])) {
return true;
@@ -435,11 +343,6 @@ function checkSession() {
}
}
- /**
- * Checks, if a the result is a preview
- *
- * @return boolean
- */
function checkPreview() {
if ($this->checkSession() == true) {
if (isset ($_REQUEST['z']) && $_REQUEST['z'] == 'manprev') {
@@ -452,11 +355,7 @@ function checkPreview() {
}
}
- /**
- * check if site is offline
- *
- * @return boolean
- */
+ // check if site is offline
function checkSiteStatus() {
$siteStatus= $this->config['site_status'];
if ($siteStatus == 1) {
@@ -472,12 +371,6 @@ function checkSiteStatus() {
}
}
- /**
- * Create a 'clean' document identifier with path information, friendly URL suffix and prefix.
- *
- * @param string $qOrig
- * @return string
- */
function cleanDocumentIdentifier($qOrig) {
(!empty($qOrig)) or $qOrig = $this->config['site_start'];
$q= $qOrig;
@@ -520,12 +413,6 @@ function cleanDocumentIdentifier($qOrig) {
}
}
- /**
- * Check the cache for a specific document/resource
- *
- * @param int $id
- * @return string
- */
function checkCache($id) {
$cacheFile= "assets/cache/docid_" . $id . ".pageCache.php";
if (file_exists($cacheFile)) {
@@ -586,16 +473,6 @@ function checkCache($id) {
}
}
- /**
- * Final processing and output of the document/resource.
- *
- * - runs uncached snippets
- * - add javascript to
- * - removes unused placeholders
- * - converts URL tags [~...~] to URLs
- *
- * @param boolean $noEvent Default: false
- */
function outputContent($noEvent= false) {
$this->documentOutput= $this->documentContent;
@@ -695,9 +572,6 @@ function outputContent($noEvent= false) {
ob_end_flush();
}
- /**
- * Checks the publish state of page
- */
function checkPublishStatus() {
$cacheRefreshTime= 0;
@include $this->config["base_path"] . "assets/cache/sitePublishing.idx.php";
@@ -771,11 +645,6 @@ function checkPublishStatus() {
}
}
- /**
- * Final jobs.
- *
- * - cache page
- */
function postProcess() {
// if the current document was generated, cache it!
if ($this->documentGenerated == 1 && $this->documentObject['cacheable'] == 1 && $this->documentObject['type'] == 'document' && $this->documentObject['published'] == 1) {
@@ -803,12 +672,6 @@ function postProcess() {
// end post processing
}
- /**
- * Merge meta tags
- *
- * @param string $template
- * @return string
- */
function mergeDocumentMETATags($template) {
if ($this->documentObject['haskeywords'] == 1) {
// insert keywords
@@ -838,17 +701,12 @@ function mergeDocumentMETATags($template) {
return $template;
}
- /**
- * Merge content fields and TVs
- *
- * @param string $template
- * @return string
- */
+ // mod by Raymond
function mergeDocumentContent($template) {
$replace= array ();
preg_match_all('~\[\*(.*?)\*\]~', $template, $matches);
$variableCount= count($matches[1]);
- $basepath= MODX_MANAGER_PATH . "includes";
+ $basepath= $this->config["base_path"] . "manager/includes";
for ($i= 0; $i < $variableCount; $i++) {
$key= $matches[1][$i];
$key= substr($key, 0, 1) == '#' ? substr($key, 1) : $key; // remove # for QuickEdit format
@@ -867,12 +725,6 @@ function mergeDocumentContent($template) {
return $template;
}
- /**
- * Merge system settings
- *
- * @param string $template
- * @return string
- */
function mergeSettingsContent($template) {
$replace= array ();
$matches= array ();
@@ -888,12 +740,6 @@ function mergeSettingsContent($template) {
return $template;
}
- /**
- * Merge chunks
- *
- * @param string $content
- * @return string
- */
function mergeChunkContent($content) {
$replace= array ();
$matches= array ();
@@ -921,12 +767,7 @@ function mergeChunkContent($content) {
return $content;
}
- /**
- * Merge placeholder values
- *
- * @param string $content
- * @return string
- */
+ // Added by Raymond
function mergePlaceholderContent($content) {
$replace= array ();
$matches= array ();
@@ -947,12 +788,7 @@ function mergePlaceholderContent($content) {
return $content;
}
- /**
- * Run a plugin
- *
- * @param string $pluginCode Code to run
- * @param array $params
- */
+ // evalPlugin
function evalPlugin($pluginCode, $params) {
$etomite= $modx= & $this;
$modx->event->params= & $params; // store params inside event object
@@ -981,13 +817,6 @@ function evalPlugin($pluginCode, $params) {
unset ($modx->event->params);
}
- /**
- * Run a snippet
- *
- * @param string $snippet Code to run
- * @param array $params
- * @return string
- */
function evalSnippet($snippet, $params) {
$etomite= $modx= & $this;
@@ -1020,12 +849,6 @@ function evalSnippet($snippet, $params) {
return $msg . $snip;
}
- /**
- * Run snippets as per the tags in $documentSource and replace the tags with the returned values.
- *
- * @param string $documentSource
- * @return string
- */
function evalSnippets($documentSource) {
$etomite= & $this;
@@ -1213,15 +1036,7 @@ private function _get_snip_properties($snip_call)
}
return $snippetObject;
}
-
- /**
- * Create a friendly URL
- *
- * @param string $pre
- * @param string $suff
- * @param string $alias
- * @return string
- */
+
function makeFriendlyURL($pre, $suff, $alias, $isfolder=0) {
$Alias = explode('/',$alias);
$alias = array_pop($Alias);
@@ -1231,12 +1046,6 @@ function makeFriendlyURL($pre, $suff, $alias, $isfolder=0) {
return ($dir != '' ? "$dir/" : '') . $pre . $alias . $suff;
}
- /**
- * Convert URL tags [~...~] to URLs
- *
- * @param string $documentSource
- * @return string
- */
function rewriteUrls($documentSource) {
// rewrite the urls
if ($this->config['friendly_urls'] == 1) {
@@ -1264,11 +1073,8 @@ function rewriteUrls($documentSource) {
}
/**
- * Get all db fields and TVs for a document/resource
- *
- * @param type $method
- * @param type $identifier
- * @return array
+ * name: getDocumentObject - used by parser
+ * desc: returns a document object - $method: alias, id
*/
function getDocumentObject($method, $identifier) {
$tblsc= $this->getFullTableName("site_content");
@@ -1347,14 +1153,8 @@ function getDocumentObject($method, $identifier) {
}
/**
- * Parse a source string.
- *
- * Handles most MODx tags. Exceptions include:
- * - uncached snippet tags [!...!]
- * - URL tags [~...~]
- *
- * @param string $source
- * @return string
+ * name: parseDocumentSource - used by parser
+ * desc: return document source aftering parsing tvs, snippets, chunks, etc.
*/
function parseDocumentSource($source) {
// set the number of times we are to parse the document source
@@ -1399,14 +1199,6 @@ function parseDocumentSource($source) {
return $source;
}
- /**
- * Starts the parsing operations.
- *
- * - connects to the db
- * - gets the settings (including system_settings)
- * - gets the document/resource identifier as in the query string
- * - finally calls prepareResponse()
- */
function executeParser() {
//error_reporting(0);
if (version_compare(phpversion(), "5.0.0", ">="))
@@ -1502,15 +1294,6 @@ function executeParser() {
$this->prepareResponse();
}
- /**
- * The next step called at the end of executeParser()
- *
- * - checks cache
- * - checks if document/resource is deleted/unpublished
- * - checks if resource is a weblink and redirects if so
- * - gets template and parses it
- * - ensures that postProcess is called when PHP is finished
- */
function prepareResponse() {
// we now know the method and identifier, let's check the cache
$this->documentContent= $this->checkCache($this->documentIdentifier);
@@ -1536,7 +1319,7 @@ function prepareResponse() {
$this->sendErrorPage();
} else {
// Inculde the necessary files to check document permissions
- include_once ($this->config['site_manager_path'] . 'processors/user_documents_permissions.class.php');
+ include_once ($this->config['base_path'] . '/manager/processors/user_documents_permissions.class.php');
$udperms= new udperms();
$udperms->user= $this->getLoginUserID();
$udperms->document= $this->documentIdentifier;
@@ -1603,13 +1386,10 @@ function prepareResponse() {
//$this->postProcess();
}
- /**
- * Returns an array of all parent record IDs for the id passed.
- *
- * @param int $id Docid to get parents for.
- * @param int $height The maximum number of levels to go up, default 10.
- * @return array
- */
+ /***************************************************************************************/
+ /* API functions /
+ /***************************************************************************************/
+
function getParentIds($id, $height= 10) {
$parents= array ();
while ( $id && $height-- ) {
@@ -1623,14 +1403,6 @@ function getParentIds($id, $height= 10) {
return $parents;
}
- /**
- * Returns an array of child IDs belonging to the specified parent.
- *
- * @param int $id The parent resource/document to start from
- * @param int $depth How many levels deep to search for children, default: 10
- * @param array $children Optional array of docids to merge with the result.
- * @return array Contains the document Listing (tree) like the sitemap
- */
function getChildIds($id, $depth= 10, $children= array ()) {
// Initialise a static array to index parents->children
@@ -1660,12 +1432,7 @@ function getChildIds($id, $depth= 10, $children= array ()) {
return $children;
}
- /**
- * Displays a javascript alert message in the web browser
- *
- * @param string $msg Message to show
- * @param string $url URL to redirect to
- */
+ # Displays a javascript alert message in the web browser
function webAlert($msg, $url= "") {
$msg= addslashes($this->db->escape($msg));
if (substr(strtolower($url), 0, 11) == "javascript:") {
@@ -1682,12 +1449,7 @@ function webAlert($msg, $url= "") {
}
}
- /**
- * Returns true if user has the currect permission
- *
- * @param string $pm Permission name
- * @return int
- */
+ # Returns true if user has the currect permission
function hasPermission($pm) {
$state= false;
$pms= $_SESSION['mgrPermissions'];
@@ -1696,15 +1458,7 @@ function hasPermission($pm) {
return $state;
}
- /**
- * Add an a alert message to the system event log
- *
- * @param int $evtid Event ID
- * @param int $type Types: 1 = information, 2 = warning, 3 = error
- * @param string $msg Message to be logged
- * @param string $source source of the event (module, snippet name, etc.)
- * Default: Parser
- */
+ # Add an a alert message to the system event log
function logEvent($evtid, $type, $msg, $source= 'Parser') {
$msg= $this->db->escape($msg);
$source= $this->db->escape($source);
@@ -1732,35 +1486,16 @@ function logEvent($evtid, $type, $msg, $source= 'Parser') {
}
}
- /**
- * Returns true if we are currently in the manager/backend
- *
- * @return boolean
- */
+ # Returns true if parser is executed in backend (manager) mode
function isBackend() {
return $this->insideManager() ? true : false;
}
- /**
- * Returns true if we are currently in the frontend
- *
- * @return boolean
- */
+ # Returns true if parser is executed in frontend mode
function isFrontend() {
return !$this->insideManager() ? true : false;
}
- /**
- * Gets all child documents of the specified document, including those which are unpublished or deleted.
- *
- * @param int $id The Document identifier to start with
- * @param string $sort Sort field
- * Default: menuindex
- * @param string $dir Sort direction, ASC and DESC is possible
- * Default: ASC
- * @param string $fields Default: id, pagetitle, description, parent, alias, menutitle
- * @return array
- */
function getAllChildren($id= 0, $sort= 'menuindex', $dir= 'ASC', $fields= 'id, pagetitle, description, parent, alias, menutitle') {
$tblsc= $this->getFullTableName("site_content");
$tbldg= $this->getFullTableName("document_groups");
@@ -1787,17 +1522,6 @@ function getAllChildren($id= 0, $sort= 'menuindex', $dir= 'ASC', $fields= 'id, p
return $resourceArray;
}
- /**
- * Gets all active child documents of the specified document, i.e. those which published and not deleted.
- *
- * @param int $id The Document identifier to start with
- * @param string $sort Sort field
- * Default: menuindex
- * @param string $dir Sort direction, ASC and DESC is possible
- * Default: ASC
- * @param string $fields Default: id, pagetitle, description, parent, alias, menutitle
- * @return array
- */
function getActiveChildren($id= 0, $sort= 'menuindex', $dir= 'ASC', $fields= 'id, pagetitle, description, parent, alias, menutitle') {
$tblsc= $this->getFullTableName("site_content");
$tbldg= $this->getFullTableName("document_groups");
@@ -1825,27 +1549,6 @@ function getActiveChildren($id= 0, $sort= 'menuindex', $dir= 'ASC', $fields= 'id
return $resourceArray;
}
- /**
- * Returns the children of the selected document/folder.
- *
- * @param int $parentid The parent document identifier
- * Default: 0 (site root)
- * @param int $published Whether published or unpublished documents are in the result
- * Default: 1
- * @param int $deleted Whether deleted or undeleted documents are in the result
- * Default: 0 (undeleted)
- * @param string $fields List of fields
- * Default: * (all fields)
- * @param string $where Where condition in SQL style. Should include a leading 'AND '
- * Default: Empty string
- * @param type $sort Should be a comma-separated list of field names on which to sort
- * Default: menuindex
- * @param string $dir Sort direction, ASC and DESC is possible
- * Default: ASC
- * @param string|int $limit Should be a valid SQL LIMIT clause without the 'LIMIT' i.e. just include the numbers as a string.
- * Default: Empty string (no limit)
- * @return array
- */
function getDocumentChildren($parentid= 0, $published= 1, $deleted= 0, $fields= "*", $where= '', $sort= "menuindex", $dir= "ASC", $limit= "") {
$limit= ($limit != "") ? "LIMIT $limit" : "";
$tblsc= $this->getFullTableName("site_content");
@@ -1876,28 +1579,6 @@ function getDocumentChildren($parentid= 0, $published= 1, $deleted= 0, $fields=
return $resourceArray;
}
- /**
- * Returns multiple documents/resources
- *
- * @category API-Function
- * @param array $ids Documents to fetch by docid
- * Default: Empty array
- * @param int $published Whether published or unpublished documents are in the result
- * Default: 1
- * @param int $deleted Whether deleted or undeleted documents are in the result
- * Default: 0 (undeleted)
- * @param string $fields List of fields
- * Default: * (all fields)
- * @param string $where Where condition in SQL style. Should include a leading 'AND '.
- * Default: Empty string
- * @param type $sort Should be a comma-separated list of field names on which to sort
- * Default: menuindex
- * @param string $dir Sort direction, ASC and DESC is possible
- * Default: ASC
- * @param string|int $limit Should be a valid SQL LIMIT clause without the 'LIMIT' i.e. just include the numbers as a string.
- * Default: Empty string (no limit)
- * @return array|boolean Result array with documents, or false
- */
function getDocuments($ids= array (), $published= 1, $deleted= 0, $fields= "*", $where= '', $sort= "menuindex", $dir= "ASC", $limit= "") {
if (count($ids) == 0) {
return false;
@@ -1930,20 +1611,6 @@ function getDocuments($ids= array (), $published= 1, $deleted= 0, $fields= "*",
}
}
- /**
- * Returns one document/resource
- *
- * @category API-Function
- * @param int $id docid
- * Default: 0 (no documents)
- * @param string $fields List of fields
- * Default: * (all fields)
- * @param int $published Whether published or unpublished documents are in the result
- * Default: 1
- * @param int $deleted Whether deleted or undeleted documents are in the result
- * Default: 0 (undeleted)
- * @return boolean|string
- */
function getDocument($id= 0, $fields= "*", $published= 1, $deleted= 0) {
if ($id == 0) {
return false;
@@ -1958,19 +1625,6 @@ function getDocument($id= 0, $fields= "*", $published= 1, $deleted= 0) {
}
}
- /**
- * Returns the page information as database row, the type of result is
- * defined with the parameter $rowMode
- *
- * @param int $pageid The parent document identifier
- * Default: -1 (no result)
- * @param int $active Should we fetch only published and undeleted documents/resources?
- * 1 = yes, 0 = no
- * Default: 1
- * @param string $fields List of fields
- * Default: id, pagetitle, description, alias
- * @return boolean|array
- */
function getPageInfo($pageid= -1, $active= 1, $fields= 'id, pagetitle, description, alias') {
if ($pageid == 0) {
return false;
@@ -1997,18 +1651,6 @@ function getPageInfo($pageid= -1, $active= 1, $fields= 'id, pagetitle, descripti
}
}
- /**
- * Returns the parent document/resource of the given docid
- *
- * @param int $pid The parent docid. If -1, then fetch the current document/resource's parent
- * Default: -1
- * @param int $active Should we fetch only published and undeleted documents/resources?
- * 1 = yes, 0 = no
- * Default: 1
- * @param string $fields List of fields
- * Default: id, pagetitle, description, alias
- * @return boolean|array
- */
function getParent($pid= -1, $active= 1, $fields= 'id, pagetitle, description, alias, parent') {
if ($pid == -1) {
$pid= $this->documentObject['parent'];
@@ -2025,11 +1667,6 @@ function getParent($pid= -1, $active= 1, $fields= 'id, pagetitle, description, a
}
}
- /**
- * Returns the id of the current snippet.
- *
- * @return int
- */
function getSnippetId() {
if ($this->currentSnippet) {
$tbl= $this->getFullTableName("site_snippets");
@@ -2041,20 +1678,10 @@ function getSnippetId() {
return 0;
}
- /**
- * Returns the name of the current snippet.
- *
- * @return string
- */
function getSnippetName() {
return $this->currentSnippet;
}
- /**
- * Clear the cache of MODX.
- *
- * @return boolean
- */
function clearCache() {
$basepath= $this->config["base_path"] . "assets/cache";
if (@ $handle= opendir($basepath)) {
@@ -2076,20 +1703,6 @@ function clearCache() {
}
}
- /**
- * Create an URL for the given document identifier. The url prefix and
- * postfix are used, when friendly_url is active.
- *
- * @param int $id The document identifier
- * @param string $alias The alias name for the document
- * Default: Empty string
- * @param string $args The paramaters to add to the URL
- * Default: Empty string
- * @param string $scheme With full as valus, the site url configuration is
- * used
- * Default: Empty string
- * @return string
- */
function makeUrl($id, $alias= '', $args= '', $scheme= '') {
$url= '';
$virtualDir= '';
@@ -2156,13 +1769,6 @@ function makeUrl($id, $alias= '', $args= '', $scheme= '') {
}
}
- /**
- * Returns an entry from the config
- *
- * Note: most code accesses the config array directly and we will continue to support this.
- *
- * @return boolean|string
- */
function getConfig($name= '') {
if (!empty ($this->config[$name])) {
return $this->config[$name];
@@ -2171,17 +1777,11 @@ function getConfig($name= '') {
}
}
- /**
- * Returns the ClipperCMS version information as version, branch, release date and full application name.
- *
- * @return array
- */
-
function getVersionData($data=null) {
$out=array();
if(empty($this->version) || !is_array($this->version)){
//include for compatibility modx version < 1.0.10
- include MODX_MANAGER_PATH . "includes/version.inc.php";
+ include $this->config["base_path"] . "manager/includes/version.inc.php";
$this->version=array();
$this->version['version']= isset($modx_version) ? $modx_version : '';
$this->version['branch']= isset($modx_branch) ? $modx_branch : '';
@@ -2192,17 +1792,6 @@ function getVersionData($data=null) {
return (!is_null($data) && is_array($this->version) && isset($this->version[$data])) ? $this->version[$data] : $this->version;
}
- /**
- * Returns an ordered or unordered HTML list.
- *
- * @param array $array
- * @param string $ulroot Default: root
- * @param string $ulprefix Default: sub_
- * @param string $type Default: Empty string
- * @param boolean $ordered Default: false
- * @param int $tablevel Default: 0
- * @return string
- */
function makeList($array, $ulroot= 'root', $ulprefix= 'sub_', $type= '', $ordered= false, $tablevel= 0) {
// first find out whether the value passed is an array
if (!is_array($array)) {
@@ -2229,11 +1818,6 @@ function makeList($array, $ulroot= 'root', $ulprefix= 'sub_', $type= '', $ordere
return $listhtml;
}
- /**
- * Returns user login information, as loggedIn (true or false), internal key, username and usertype (web or manager).
- *
- * @return boolean|array
- */
function userLoggedIn() {
$userdetails= array ();
if ($this->isFrontend() && isset ($_SESSION['webValidated'])) {
@@ -2256,13 +1840,6 @@ function userLoggedIn() {
}
}
- /**
- * Returns an array with keywords for the current document, or a document with a given docid
- *
- * @param int $id The docid, 0 means the current document
- * Default: 0
- * @return array
- */
function getKeywords($id= 0) {
if ($id == 0) {
$id= $this->documentObject['id'];
@@ -2282,13 +1859,6 @@ function getKeywords($id= 0) {
return $keywords;
}
- /**
- * Returns an array with meta tags for the current document, or a document with a given docid.
- *
- * @param int $id The document identifier, 0 means the current document
- * Default: 0
- * @return array
- */
function getMETATags($id= 0) {
if ($id == 0) {
$id= $this->documentObject['id'];
@@ -2313,13 +1883,6 @@ function getMETATags($id= 0) {
return $metatags;
}
- /**
- * Executes a snippet.
- *
- * @param string $snippetName
- * @param array $params Default: Empty array
- * @return string
- */
function runSnippet($snippetName, $params= array ()) {
if (isset ($this->snippetCache[$snippetName])) {
$snippet= $this->snippetCache[$snippetName];
@@ -2343,24 +1906,12 @@ function runSnippet($snippetName, $params= array ()) {
return $this->evalSnippet($snippet, $parameters);
}
- /**
- * Returns the chunk content for the given chunk name
- *
- * @param string $chunkName
- * @return boolean|string
- */
function getChunk($chunkName) {
$t= $this->chunkCache[$chunkName];
return $t;
}
- /**
- * Old method that just calls getChunk()
- *
- * @deprecated Use getChunk
- * @param string $chunkName
- * @return boolean|string
- */
+ // deprecated
function putChunk($chunkName) { // alias name >.<
return $this->getChunk($chunkName);
}
@@ -2376,24 +1927,11 @@ function parseChunk($chunkName, $chunkArr, $prefix= "{", $suffix= "}") {
return $chunk;
}
- /**
- * Get data from phpSniff
- *
- * @category API-Function
- * @return array
- */
function getUserData() {
- include MODX_MANAGER_PATH . "includes/extenders/getUserData.extender.php";
+ include $this->config["base_path"] . "manager/includes/extenders/getUserData.extender.php";
return $tmpArray;
}
- /**
- * Returns the timestamp in the date format defined in $this->config['datetime_format']
- *
- * @param int $timestamp Default: 0
- * @param string $mode Default: Empty string (adds the time as below). Can also be 'dateOnly' for no time or 'formatOnly' to get the datetime_format string.
- * @return string
- */
function toDateFormat($timestamp = 0, $mode = '') {
$timestamp = trim($timestamp);
$timestamp = intval($timestamp);
@@ -2425,12 +1963,6 @@ function toDateFormat($timestamp = 0, $mode = '') {
return $strTime;
}
- /**
- * Make a timestamp from a string corresponding to the format in $this->config['datetime_format']
- *
- * @param string $str
- * @return string
- */
function toTimeStamp($str) {
$str = trim($str);
if (empty($str)) {return '';}
@@ -2461,30 +1993,10 @@ function toTimeStamp($str) {
return $timeStamp;
}
- /**
- * Get the TVs of a document's children. Returns an array where each element represents one child doc.
- *
- * Ignores deleted children. Gets all children - there is no where clause available.
- *
- * @param int $parentid The parent docid
- * Default: 0 (site root)
- * @param array $tvidnames. Which TVs to fetch - Can relate to the TV ids in the db (array elements should be numeric only)
- * or the TV names (array elements should be names only)
- * Default: Empty array
- * @param int $published Whether published or unpublished documents are in the result
- * Default: 1
- * @param string $docsort How to sort the result array (field)
- * Default: menuindex
- * @param ASC $docsortdir How to sort the result array (direction)
- * Default: ASC
- * @param string $tvfields Fields to fetch from site_tmplvars, default '*'
- * Default: *
- * @param string $tvsort How to sort each element of the result array i.e. how to sort the TVs (field)
- * Default: rank
- * @param string $tvsortdir How to sort each element of the result array i.e. how to sort the TVs (direction)
- * Default: ASC
- * @return boolean|array
- */
+ #::::::::::::::::::::::::::::::::::::::::
+ # Added By: Raymond Irving - MODx
+ #
+
function getDocumentChildrenTVars($parentid= 0, $tvidnames= array (), $published= 1, $docsort= "menuindex", $docsortdir= "ASC", $tvfields= "*", $tvsort= "rank", $tvsortdir= "ASC") {
$docs= $this->getDocumentChildren($parentid, $published, 0, '*', '', $docsort, $docsortdir);
if (!$docs)
@@ -2538,25 +2050,6 @@ function getDocumentChildrenTVars($parentid= 0, $tvidnames= array (), $published
}
}
- /**
- * Get the TV outputs of a document's children.
- *
- * Returns an array where each element represents one child doc and contains the result from getTemplateVarOutput()
- *
- * Ignores deleted children. Gets all children - there is no where clause available.
- *
- * @param int $parentid The parent docid
- * Default: 0 (site root)
- * @param array $tvidnames. Which TVs to fetch. In the form expected by getTemplateVarOutput().
- * Default: Empty array
- * @param int $published Whether published or unpublished documents are in the result
- * Default: 1
- * @param string $docsort How to sort the result array (field)
- * Default: menuindex
- * @param ASC $docsortdir How to sort the result array (direction)
- * Default: ASC
- * @return boolean|array
- */
function getDocumentChildrenTVarOutput($parentid= 0, $tvidnames= array (), $published= 1, $docsort= "menuindex", $docsortdir= "ASC") {
$docs= $this->getDocumentChildren($parentid, $published, 0, '*', '', $docsort, $docsortdir);
if (!$docs)
@@ -2572,21 +2065,8 @@ function getDocumentChildrenTVarOutput($parentid= 0, $tvidnames= array (), $publ
}
}
- /**
- * Modified by Raymond for TV - Orig Modified by Apodigm - DocVars
- * Returns a single site_content field or TV record from the db.
- *
- * If a site content field the result is an associative array of 'name' and 'value'.
- *
- * If a TV the result is an array representing a db row including the fields specified in $fields.
- *
- * @param string $idname Can be a TV id or name
- * @param string $fields Fields to fetch from site_tmplvars. Default: *
- * @param type $docid Docid. Defaults to empty string which indicates the current document.
- * @param int $published Whether published or unpublished documents are in the result
- * Default: 1
- * @return boolean
- */
+ // Modified by Raymond for TV - Orig Modified by Apodigm - DocVars
+ # returns a single TV record. $idnames - can be an id or name that belongs the template that the current document is using
function getTemplateVar($idname= "", $fields= "*", $docid= "", $published= 1) {
if ($idname == "") {
return false;
@@ -2596,27 +2076,7 @@ function getTemplateVar($idname= "", $fields= "*", $docid= "", $published= 1) {
}
}
- /**
- * Returns an array of site_content field fields and/or TV records from the db
- *
- * Elements representing a site content field consist of an associative array of 'name' and 'value'.
- *
- * Elements representing a TV consist of an array representing a db row including the fields specified in $fields.
- *
- * @param array $idnames Which TVs to fetch - Can relate to the TV ids in the db (array elements should be numeric only)
- * or the TV names (array elements should be names only)
- * Default: Empty array
- * @param string $fields Fields to fetch from site_tmplvars.
- * Default: *
- * @param string $docid Docid. Defaults to empty string which indicates the current document.
- * @param int $published Whether published or unpublished documents are in the result
- * Default: 1
- * @param string $sort How to sort the result array (field)
- * Default: rank
- * @param string $dir How to sort the result array (direction)
- * Default: ASC
- * @return boolean|array
- */
+ # returns an array of TV records. $idnames - can be an id or name that belongs the template that the current document is using
function getTemplateVars($idnames= array (), $fields= "*", $docid= "", $published= 1, $sort= "rank", $dir= "ASC") {
if (($idnames != '*' && !is_array($idnames)) || count($idnames) == 0) {
return false;
@@ -2666,18 +2126,7 @@ function getTemplateVars($idnames= array (), $fields= "*", $docid= "", $publishe
}
}
- /**
- * Returns an associative array containing TV rendered output values.
- *
- * @param type $idnames Which TVs to fetch - Can relate to the TV ids in the db (array elements should be numeric only)
- * or the TV names (array elements should be names only)
- * Default: Empty array
- * @param string $docid Docid. Defaults to empty string which indicates the current document.
- * @param int $published Whether published or unpublished documents are in the result
- * Default: 1
- * @param string $sep
- * @return boolean|array
- */
+ # returns an associative array containing TV rendered output values. $idnames - can be an id or name that belongs the template that the current document is using
function getTemplateVarOutput($idnames= array (), $docid= "", $published= 1, $sep='') {
if (count($idnames) == 0) {
return false;
@@ -2689,7 +2138,7 @@ function getTemplateVarOutput($idnames= array (), $docid= "", $published= 1, $se
if ($result == false)
return false;
else {
- $baspath= MODX_MANAGER_PATH . "includes";
+ $baspath= $this->config["base_path"] . "manager/includes";
include_once $baspath . "/tmplvars.format.inc.php";
include_once $baspath . "/tmplvars.commands.inc.php";
for ($i= 0; $i < count($result); $i++) {
@@ -2703,42 +2152,22 @@ function getTemplateVarOutput($idnames= array (), $docid= "", $published= 1, $se
}
}
- /**
- * Returns the full table name based on db settings
- *
- * @param string $tbl Table name
- * @return string Table name with prefix
- */
+ # returns the full table name based on db settings
function getFullTableName($tbl) {
return $this->db->config['dbase'] . ".`" . $this->db->config['table_prefix'] . $tbl . "`";
}
- /**
- * Returns the placeholder value
- *
- * @param string $name Placeholder name
- * @return string Placeholder value
- */
+ # return placeholder value
function getPlaceholder($name) {
return $this->placeholders[$name];
}
- /**
- * Sets a value for a placeholder
- *
- * @param string $name The name of the placeholder
- * @param string $value The value of the placeholder
- */
+ # sets a value for a placeholder
function setPlaceholder($name, $value) {
$this->placeholders[$name]= $value;
}
- /**
- * Set placeholders en masse via an array or object.
- *
- * @param object|array $subject
- * @param string $prefix
- */
+ # set arrays or object vars as placeholders
function toPlaceholders($subject, $prefix= '') {
if (is_object($subject)) {
$subject= get_object_vars($subject);
@@ -2750,13 +2179,6 @@ function toPlaceholders($subject, $prefix= '') {
}
}
- /**
- * For use by toPlaceholders(); For setting an array or object element as placeholder.
- *
- * @param string $key
- * @param object|array $value
- * @param string $prefix
- */
function toPlaceholder($key, $value, $prefix= '') {
if (is_array($value) || is_object($value)) {
$this->toPlaceholders($value, "{$prefix}{$key}.");
@@ -2765,39 +2187,21 @@ function toPlaceholder($key, $value, $prefix= '') {
}
}
- /**
- * Returns the manager relative URL/path with respect to the site root.
- *
- * @global string $base_url
- * @return string The complete URL to the manager folder
- */
+ # returns the virtual relative path to the manager folder
function getManagerPath() {
- return MODX_MANAGER_URL;
+ global $base_url;
+ $pth= $base_url . 'manager/';
+ return $pth;
}
- /**
- * Returns the cache relative URL/path with respect to the site root.
- *
- * @global string $base_url
- * @return string The complete URL to the cache folder
- */
+ # returns the virtual relative path to the cache folder
function getCachePath() {
global $base_url;
$pth= $base_url . 'assets/cache/';
return $pth;
}
- /**
- * Sends a message to a user's message box.
- *
- * @param string $type Type of the message
- * @param string $to The recipient of the message
- * @param string $from The sender of the message
- * @param string $subject The subject of the message
- * @param string $msg The message body
- * @param int $private Whether it is a private message, or not
- * Default : 0
- */
+ # sends a message to a user's message box
function sendAlert($type, $to, $from, $subject, $msg, $private= 0) {
$private= ($private) ? 1 : 0;
if (!is_numeric($to)) {
@@ -2823,12 +2227,8 @@ function sendAlert($type, $to, $from, $subject, $msg, $private= 0) {
$rs= $this->db->query($sql);
}
- /**
- * Returns true, install or interact when inside manager.
- *
- * @deprecated
- * @return string
- */
+ # Returns true, install or interact when inside manager
+ // deprecated
function insideManager() {
$m= false;
if (defined('IN_MANAGER_MODE') && IN_MANAGER_MODE == 'true') {
@@ -2842,12 +2242,7 @@ function insideManager() {
return $m;
}
- /**
- * Returns current user id.
- *
- * @param string $context. Default is an empty string which indicates the method should automatically pick 'web (frontend) or 'mgr' (backend)
- * @return string
- */
+ # Returns current user id
function getLoginUserID($context= '') {
if ($context && isset ($_SESSION[$context . 'Validated'])) {
return $_SESSION[$context . 'InternalKey'];
@@ -2860,12 +2255,7 @@ function getLoginUserID($context= '') {
}
}
- /**
- * Returns current user name
- *
- * @param string $context. Default is an empty string which indicates the method should automatically pick 'web (frontend) or 'mgr' (backend)
- * @return string
- */
+ # Returns current user name
function getLoginUserName($context= '') {
if (!empty($context) && isset ($_SESSION[$context . 'Validated'])) {
return $_SESSION[$context . 'Shortname'];
@@ -2878,11 +2268,7 @@ function getLoginUserName($context= '') {
}
}
- /**
- * Returns current login user type - web or manager
- *
- * @return string
- */
+ # Returns current login user type - web or manager
function getLoginUserType() {
if ($this->isFrontend() && isset ($_SESSION['webValidated'])) {
return 'web';
@@ -2894,12 +2280,7 @@ function getLoginUserType() {
}
}
- /**
- * Returns a user info record for the given manager user
- *
- * @param int $uid
- * @return boolean|string
- */
+ # Returns a record for the manager user
function getUserInfo($uid) {
$sql= "
SELECT mu.username, mu.password, mua.*
@@ -2917,12 +2298,7 @@ function getUserInfo($uid) {
}
}
- /**
- * Returns a record for the web user
- *
- * @param int $uid
- * @return boolean|string
- */
+ # Returns a record for the web user
function getWebUserInfo($uid) {
$sql= "
SELECT wu.username, wu.password, wua.*
@@ -2940,15 +2316,9 @@ function getWebUserInfo($uid) {
}
}
- /**
- * Returns an array of document groups that current user is assigned to.
- * This function will first return the web user doc groups when running from
- * frontend otherwise it will return manager user's docgroup.
- *
- * @param boolean $resolveIds Set to true to return the document group names
- * Default: false
- * @return string|array
- */
+ # Returns an array of document groups that current user is assigned to.
+ # This function will first return the web user doc groups when running from frontend otherwise it will return manager user's docgroup
+ # Set $resolveIds to true to return the document group names
function getUserDocGroups($resolveIds= false) {
if ($this->isFrontend() && isset ($_SESSION['webDocgroups']) && isset ($_SESSION['webValidated'])) {
$dg= $_SESSION['webDocgroups'];
@@ -2981,28 +2351,11 @@ function getUserDocGroups($resolveIds= false) {
return $dgn;
}
}
-
- /**
- * Returns an array of document groups that current user is assigned to.
- * This function will first return the web user doc groups when running from
- * frontend otherwise it will return manager user's docgroup.
- *
- * @deprecated
- * @return string|array
- */
function getDocGroups() {
return $this->getUserDocGroups();
} // deprecated
- /**
- * Change current web user's password
- *
- * @todo Make password length configurable, allow rules for passwords and translation of messages
- * @param string $oldPwd
- * @param string $newPwd
- * @return string|boolean Returns true if successful, oterhwise return error
- * message
- */
+ # Change current web user's password - returns true if successful, oterhwise return error message
function changeWebUserPassword($oldPwd, $newPwd) {
$rt= false;
if ($_SESSION["webValidated"] == 1) {
@@ -3033,25 +2386,11 @@ function changeWebUserPassword($oldPwd, $newPwd) {
}
}
}
-
- /**
- * Change current web user's password
- *
- * @deprecated
- * @param string $o
- * @param string $n
- * @return string|boolean
- */
function changePassword($o, $n) {
return changeWebUserPassword($o, $n);
} // deprecated
- /**
- * Returns true if the current web user is a member the specified groups
- *
- * @param array $groupNames
- * @return boolean
- */
+ # returns true if the current web user is a member the specified groups
function isMemberOfWebGroup($groupNames= array ()) {
if (!is_array($groupNames))
return false;
@@ -3073,13 +2412,7 @@ function isMemberOfWebGroup($groupNames= array ()) {
return false;
}
- /**
- * Registers Client-side CSS scripts - these scripts are loaded at inside
- * the tag
- *
- * @param string $src
- * @param string $media Default: Empty string
- */
+ # Registers Client-side CSS scripts - these scripts are loaded at inside the tag
function regClientCSS($src, $media='') {
if (empty($src) || isset ($this->loadedjscripts[$src]))
return '';
@@ -3094,24 +2427,12 @@ function regClientCSS($src, $media='') {
}
}
- /**
- * Registers Startup Client-side JavaScript - these scripts are loaded at inside the tag
- *
- * @param string $src
- * @param array $options Default: 'name'=>'', 'version'=>'0', 'plaintext'=>false
- */
+ # Registers Startup Client-side JavaScript - these scripts are loaded at inside the tag
function regClientStartupScript($src, $options= array('name'=>'', 'version'=>'0', 'plaintext'=>false)) {
$this->regClientScript($src, $options, true);
}
- /**
- * Registers Client-side JavaScript these scripts are loaded at the end of the page unless $startup is true
- *
- * @param string $src
- * @param array $options Default: 'name'=>'', 'version'=>'0', 'plaintext'=>false
- * @param boolean $startup Default: false
- * @return string
- */
+ # Registers Client-side JavaScript - these scripts are loaded at the end of the page unless $startup is true
function regClientScript($src, $options= array('name'=>'', 'version'=>'0', 'plaintext'=>false), $startup= false) {
if (empty($src))
return ''; // nothing to register
@@ -3175,31 +2496,17 @@ function regClientScript($src, $options= array('name'=>'', 'version'=>'0', 'plai
$this->loadedjscripts[$key]['pos']= $pos;
}
- /**
- * Returns all registered JavaScripts
- *
- * @return string
- */
+ # Registers Client-side Startup HTML block
function regClientStartupHTMLBlock($html) {
$this->regClientScript($html, true, true);
}
- /**
- * Returns all registered startup scripts
- *
- * @return string
- */
+ # Registers Client-side HTML block
function regClientHTMLBlock($html) {
$this->regClientScript($html, true);
}
- /**
- * Remove unwanted html tags and snippet, settings and tags
- *
- * @param string $html
- * @param string $allowed Default: Empty string
- * @return string
- */
+ # Remove unwanted html tags and snippet, settings and tags
function stripTags($html, $allowed= "") {
$t= strip_tags($html, $allowed);
$t= preg_replace('~\[\*(.*?)\*\]~', "", $t); //tv
@@ -3225,13 +2532,8 @@ function jsonDecode($json, $assoc = false) {
$json = str_replace($masked, $unmasked, $json);
return json_decode($json, $assoc);
}
- /**
- * Add an event listner to a plugin - only for use within the current execution cycle
- *
- * @param string $evtName
- * @param string $pluginName
- * @return boolean|int
- */
+
+ # add an event listner to a plugin - only for use within the current execution cycle
function addEventListener($evtName, $pluginName) {
if (!$evtName || !$pluginName)
return false;
@@ -3240,33 +2542,20 @@ function addEventListener($evtName, $pluginName) {
return array_push($this->pluginEvent[$evtName], $pluginName); // return array count
}
- /**
- * Remove event listner - only for use within the current execution cycle
- *
- * @param string $evtName
- * @return boolean
- */
+ # remove event listner - only for use within the current execution cycle
function removeEventListener($evtName) {
if (!$evtName)
return false;
unset ($this->pluginEvent[$evtName]);
}
- /**
- * Remove all event listners - only for use within the current execution cycle
- */
+ # remove all event listners - only for use within the current execution cycle
function removeAllEventListener() {
unset ($this->pluginEvent);
$this->pluginEvent= array ();
}
- /**
- * Invoke an event.
- *
- * @param string $evtName
- * @param array $extParams Parameters available to plugins. Each array key will be the PHP variable name, and the array value will be the variable value.
- * @return boolean|array
- */
+ # invoke an event. $extParams - hash array: name=>value
function invokeEvent($evtName, $extParams= array ()) {
if (!$evtName)
return false;
@@ -3318,12 +2607,7 @@ function invokeEvent($evtName, $extParams= array ()) {
return $results;
}
- /**
- * Parses a resource property string and returns the result as an array
- *
- * @param string $propertyString
- * @return array Associative array in the form property name => property value
- */
+ # parses a resource property string and returns the result as an array
function parseProperties($propertyString) {
$parameter= array ();
if (!empty ($propertyString)) {
@@ -3350,10 +2634,6 @@ function parseProperties($propertyString) {
Etomite ID: rad14701
See documentation for usage details
############################################*/
-
- /**
- * @depracted Etomite db method
- */
function getIntTableRows($fields= "*", $from= "", $where= "", $sort= "", $dir= "ASC", $limit= "") {
// function to get rows from ANY internal database table
if ($from == "") {
@@ -3373,9 +2653,6 @@ function getIntTableRows($fields= "*", $from= "", $where= "", $sort= "", $dir= "
}
}
- /**
- * @depracted Etomite db method
- */
function putIntTableRow($fields= "", $into= "") {
// function to put a row into ANY internal database table
if (($fields == "") || ($into == "")) {
@@ -3397,9 +2674,6 @@ function putIntTableRow($fields= "", $into= "") {
}
}
- /**
- * @depracted Etomite db method
- */
function updIntTableRow($fields= "", $into= "", $where= "", $sort= "", $dir= "ASC", $limit= "") {
// function to update a row into ANY internal database table
if (($fields == "") || ($into == "")) {
@@ -3424,9 +2698,6 @@ function updIntTableRow($fields= "", $into= "", $where= "", $sort= "", $dir= "AS
}
}
- /**
- * @depracted Etomite db method
- */
function getExtTableRows($host= "", $user= "", $pass= "", $dbase= "", $fields= "*", $from= "", $where= "", $sort= "", $dir= "ASC", $limit= "") {
// function to get table rows from an external MySQL database
if (($host == "") || ($user == "") || ($pass == "") || ($dbase == "") || ($from == "")) {
@@ -3447,9 +2718,6 @@ function getExtTableRows($host= "", $user= "", $pass= "", $dbase= "", $fields= "
}
}
- /**
- * @depracted Etomite db method
- */
function putExtTableRow($host= "", $user= "", $pass= "", $dbase= "", $fields= "", $into= "") {
// function to put a row into an external database table
if (($host == "") || ($user == "") || ($pass == "") || ($dbase == "") || ($fields == "") || ($into == "")) {
@@ -3472,9 +2740,6 @@ function putExtTableRow($host= "", $user= "", $pass= "", $dbase= "", $fields= ""
}
}
- /**
- * @depracted Etomite db method
- */
function updExtTableRow($host= "", $user= "", $pass= "", $dbase= "", $fields= "", $into= "", $where= "", $sort= "", $dir= "ASC", $limit= "") {
// function to update a row into an external database table
if (($fields == "") || ($into == "")) {
@@ -3500,9 +2765,6 @@ function updExtTableRow($host= "", $user= "", $pass= "", $dbase= "", $fields= ""
}
}
- /**
- * @depracted Etomite db method
- */
function dbExtConnect($host, $user, $pass, $dbase) {
// function to connect to external database
$tstart= $this->getMicroTime();
@@ -3519,9 +2781,6 @@ function dbExtConnect($host, $user, $pass, $dbase) {
}
}
- /**
- * @depracted Etomite db method
- */
function getFormVars($method= "", $prefix= "", $trim= "", $REQUEST_METHOD) {
// function to retrieve form results into an associative array
$results= array ();
@@ -3552,20 +2811,10 @@ function getFormVars($method= "", $prefix= "", $trim= "", $REQUEST_METHOD) {
// END New database functions - rad14701
########################################
- /**
- * PHP error handler set by http://www.php.net/manual/en/function.set-error-handler.php
- *
- * Checks the PHP error and calls messageQuit() unless:
- * - error_reporting() returns 0, or
- * - the PHP error level is 0, or
- * - the PHP error level is 8 (E_NOTICE) and stopOnNotice is false
- *
- * @param int $nr The PHP error level as per http://www.php.net/manual/en/errorfunc.constants.php
- * @param string $text Error message
- * @param string $file File where the error was detected
- * @param string $line Line number within $file
- * @return boolean
- */
+ /***************************************************************************************/
+ /* End of API functions */
+ /***************************************************************************************/
+
function phpError($nr, $text, $file, $line) {
if (error_reporting() == 0 || $nr == 0) {
return true;
@@ -3781,7 +3030,7 @@ function messageQuit($msg= 'unspecified error', $query= '', $is_error= true, $nr
{
echo 'MODX Content Manager ' . $version . ' » ' . $release_date . '
-
+
' . $str . '';
@@ -3865,9 +3114,7 @@ function nicesize($size) {
}
-/**
- * System Event Class
- */
+// SystemEvent Class
class SystemEvent {
var $name;
var $_propagate;
@@ -3880,12 +3127,7 @@ function SystemEvent($name= "") {
$this->name= $name;
}
- /**
- * Display a message to the user
- *
- * @global array $SystemAlertMsgQueque
- * @param string $msg The message
- */
+ // used for displaying a message to the user
function alert($msg) {
global $SystemAlertMsgQueque;
if ($msg == "")
@@ -3897,18 +3139,11 @@ function alert($msg) {
}
}
- /**
- * Output
- *
- * @param string $msg
- */
+ // used for rendering an out on the screen
function output($msg) {
$this->_output .= $msg;
}
- /**
- * Stop event propogation
- */
function stopPropagation() {
$this->_propagate= false;
}
From 603d0355a5936c7fa7abb690c02cfda9779cea5b Mon Sep 17 00:00:00 2001
From: Dmi3yy
Date: Thu, 2 May 2013 20:50:44 +0300
Subject: [PATCH 013/530] fill guid
---
install/assets/modules/docmanager.tpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/install/assets/modules/docmanager.tpl b/install/assets/modules/docmanager.tpl
index 70026951d4..7f860b8f5d 100644
--- a/install/assets/modules/docmanager.tpl
+++ b/install/assets/modules/docmanager.tpl
@@ -8,7 +8,7 @@
* @version 1.1
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License (GPL)
* @internal @properties
- * @internal @guid
+ * @internal @guid docman435243542tf542t5t
* @internal @shareparams 1
* @internal @dependencies requires files located at /assets/modules/docmanager/
* @internal @modx_category Manager and Admin
From 2e72869eaf98801b047cd04329b5cc5c9e433dce Mon Sep 17 00:00:00 2001
From: Thomas Jakobi
Date: Tue, 7 May 2013 15:34:57 +0200
Subject: [PATCH 014/530] Refactor #9911: Update AjaxSearch to 1.9.3b
---
.../snippets/ajaxSearch/ajaxSearchPopup.php | 11 +-
.../snippets/ajaxSearch/ajaxSearch_readme.txt | 17 +-
...on_192.txt => ajaxSearch_version_193b.txt} | 990 +++++++++---------
.../classes/ajaxSearch.class.inc.php | 8 +-
.../classes/ajaxSearchConfig.class.inc.php | 10 +-
.../classes/ajaxSearchCtrl.class.inc.php | 6 +-
.../classes/ajaxSearchInput.class.inc.php | 7 +-
.../classes/ajaxSearchLog.class.inc.php | 6 +-
.../classes/ajaxSearchOutput.class.inc.php | 8 +-
.../classes/ajaxSearchRequest.class.inc.php | 71 +-
.../classes/ajaxSearchResults.class.inc.php | 6 +-
.../classes/ajaxSearchUtil.class.inc.php | 6 +-
.../classes/asPhxParser.class.inc.php | 38 +-
.../ajaxSearch/configs/default.config.php | 4 +-
.../documentation/AjaxSearch192_v2.pdf | Bin 123617 -> 0 bytes
.../documentation/AjaxSearch193_v1.pdf | Bin 0 -> 122853 bytes
.../documentation/migrationFrom185To190.txt | 0
.../ajaxSearch/documentation/readme.txt | 0
.../someConfigsExamples/custom1.config.php | 0
.../someConfigsExamples/custom2.config.php | 0
.../documentation/someCssExamples/search.css | 0
.../imgAjaxResult.tpl.html | 0
.../someTemplatesExamples/imgResult.tpl.html | 0
.../someTemplatesExamples/rankResult.tpl.html | 0
assets/snippets/ajaxSearch/images/asnext.png | Bin
assets/snippets/ajaxSearch/images/asprev.png | Bin
assets/snippets/ajaxSearch/images/close.png | Bin
assets/snippets/ajaxSearch/images/cross.png | Bin
.../ajaxSearch/images/indicator.black.gif | Bin
.../ajaxSearch/images/indicator.white.gif | Bin
assets/snippets/ajaxSearch/images/readme.txt | 0
.../js/ajaxSearch1/ajaxSearch-jquery.js | 6 +-
.../js/ajaxSearch1/ajaxSearch-mootools2.js | 6 +-
.../ajaxSearch/js/ajaxSearch1/ajaxSearch.js | 6 +-
.../js/clearDefault/clearDefault.js | 4 +-
.../ajaxSearch/js/comment/ajaxSearchCmt.js | 4 +-
.../js/mootools2/mootools-1.2.4-core.js.txt | 0
.../js/mootools2/mootools-1.2.4.4-more.js.txt | 0
.../ajaxSearch/js/mootools2/mootools-1.2.4.js | 0
.../ajaxSearch/js/mootools2/readme.txt | 0
.../ajaxSearch/lang/arabic-utf8.inc.php | 0
.../snippets/ajaxSearch/lang/chinese.inc.php | 0
.../lang/chinese_simplified-utf8.inc.php | 0
.../lang/chinese_simplified.inc.php | 0
.../lang/chinese_traditional-utf8.inc.php | 0
.../lang/chinese_traditional.inc.php | 0
assets/snippets/ajaxSearch/lang/czech.inc.php | 0
.../snippets/ajaxSearch/lang/danish.inc.php | 0
.../ajaxSearch/lang/english-utf8.inc.php | 0
.../snippets/ajaxSearch/lang/english.inc.php | 0
.../ajaxSearch/lang/estonian-utf8.inc.php | 0
.../snippets/ajaxSearch/lang/estonian.inc.php | 0
.../snippets/ajaxSearch/lang/finnish.inc.php | 0
.../ajaxSearch/lang/francais-utf8.inc.php | 0
.../snippets/ajaxSearch/lang/francais.inc.php | 0
.../snippets/ajaxSearch/lang/german.inc.php | 0
.../snippets/ajaxSearch/lang/hebrew.inc.php | 0
.../ajaxSearch/lang/icelandic-utf8.inc.php | 0
.../ajaxSearch/lang/indonesia.inc.php | 0
.../snippets/ajaxSearch/lang/italian.inc.php | 0
.../ajaxSearch/lang/japanese-utf8.inc.php | 0
.../ajaxSearch/lang/nederlands.inc.php | 0
.../ajaxSearch/lang/norsk-utf8.inc.php | 0
assets/snippets/ajaxSearch/lang/norsk.inc.php | 0
.../snippets/ajaxSearch/lang/persian.inc.php | 0
.../ajaxSearch/lang/polish-utf8.inc.php | 0
.../ajaxSearch/lang/portuguese-br.inc.php | 0
.../ajaxSearch/lang/portuguese.inc.php | 0
.../ajaxSearch/lang/russian-UTF8.inc.php | 0
.../snippets/ajaxSearch/lang/russian.inc.php | 0
.../ajaxSearch/lang/slovak-utf8.inc.php | 0
.../snippets/ajaxSearch/lang/slovak.inc.php | 0
.../ajaxSearch/lang/spanish-utf8.inc.php | 0
.../snippets/ajaxSearch/lang/spanish.inc.php | 0
.../ajaxSearch/lang/svenska-utf8.inc.php | 0
.../snippets/ajaxSearch/lang/svenska.inc.php | 0
.../module.ajaxSearchLogManager.txt | 6 +-
.../ajaxSearch/plugin.advSearchHighlight.tpl | 2 +-
.../ajaxSearch/plugin.searchHighlight.tpl | 2 +-
.../ajaxSearch/snippet.ajaxSearch.txt | 14 +-
install/assets/plugins/searchhighlight.tpl | 2 +-
install/assets/snippets/ajaxSearch.tpl | 13 +-
82 files changed, 645 insertions(+), 608 deletions(-)
mode change 100644 => 100755 assets/snippets/ajaxSearch/ajaxSearchPopup.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/ajaxSearch_readme.txt
rename assets/snippets/ajaxSearch/{ajaxSearch_version_192.txt => ajaxSearch_version_193b.txt} (92%)
mode change 100644 => 100755
mode change 100644 => 100755 assets/snippets/ajaxSearch/classes/ajaxSearch.class.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/classes/ajaxSearchConfig.class.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/classes/ajaxSearchCtrl.class.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/classes/ajaxSearchInput.class.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/classes/ajaxSearchLog.class.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/classes/ajaxSearchOutput.class.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/classes/ajaxSearchRequest.class.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/classes/ajaxSearchUtil.class.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/classes/asPhxParser.class.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/configs/default.config.php
delete mode 100644 assets/snippets/ajaxSearch/documentation/AjaxSearch192_v2.pdf
create mode 100755 assets/snippets/ajaxSearch/documentation/AjaxSearch193_v1.pdf
mode change 100644 => 100755 assets/snippets/ajaxSearch/documentation/migrationFrom185To190.txt
mode change 100644 => 100755 assets/snippets/ajaxSearch/documentation/readme.txt
mode change 100644 => 100755 assets/snippets/ajaxSearch/documentation/someConfigsExamples/custom1.config.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/documentation/someConfigsExamples/custom2.config.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/documentation/someCssExamples/search.css
mode change 100644 => 100755 assets/snippets/ajaxSearch/documentation/someTemplatesExamples/imgAjaxResult.tpl.html
mode change 100644 => 100755 assets/snippets/ajaxSearch/documentation/someTemplatesExamples/imgResult.tpl.html
mode change 100644 => 100755 assets/snippets/ajaxSearch/documentation/someTemplatesExamples/rankResult.tpl.html
mode change 100644 => 100755 assets/snippets/ajaxSearch/images/asnext.png
mode change 100644 => 100755 assets/snippets/ajaxSearch/images/asprev.png
mode change 100644 => 100755 assets/snippets/ajaxSearch/images/close.png
mode change 100644 => 100755 assets/snippets/ajaxSearch/images/cross.png
mode change 100644 => 100755 assets/snippets/ajaxSearch/images/indicator.black.gif
mode change 100644 => 100755 assets/snippets/ajaxSearch/images/indicator.white.gif
mode change 100644 => 100755 assets/snippets/ajaxSearch/images/readme.txt
mode change 100644 => 100755 assets/snippets/ajaxSearch/js/ajaxSearch1/ajaxSearch-jquery.js
mode change 100644 => 100755 assets/snippets/ajaxSearch/js/ajaxSearch1/ajaxSearch-mootools2.js
mode change 100644 => 100755 assets/snippets/ajaxSearch/js/ajaxSearch1/ajaxSearch.js
mode change 100644 => 100755 assets/snippets/ajaxSearch/js/clearDefault/clearDefault.js
mode change 100644 => 100755 assets/snippets/ajaxSearch/js/comment/ajaxSearchCmt.js
mode change 100644 => 100755 assets/snippets/ajaxSearch/js/mootools2/mootools-1.2.4-core.js.txt
mode change 100644 => 100755 assets/snippets/ajaxSearch/js/mootools2/mootools-1.2.4.4-more.js.txt
mode change 100644 => 100755 assets/snippets/ajaxSearch/js/mootools2/mootools-1.2.4.js
mode change 100644 => 100755 assets/snippets/ajaxSearch/js/mootools2/readme.txt
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/arabic-utf8.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/chinese.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/chinese_simplified-utf8.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/chinese_simplified.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/chinese_traditional-utf8.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/chinese_traditional.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/czech.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/danish.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/english-utf8.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/english.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/estonian-utf8.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/estonian.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/finnish.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/francais-utf8.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/francais.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/german.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/hebrew.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/icelandic-utf8.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/indonesia.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/italian.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/japanese-utf8.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/nederlands.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/norsk-utf8.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/norsk.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/persian.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/polish-utf8.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/portuguese-br.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/portuguese.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/russian-UTF8.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/russian.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/slovak-utf8.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/slovak.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/spanish-utf8.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/spanish.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/svenska-utf8.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/lang/svenska.inc.php
mode change 100644 => 100755 assets/snippets/ajaxSearch/module.ajaxSearchLogManager.txt
mode change 100644 => 100755 assets/snippets/ajaxSearch/plugin.advSearchHighlight.tpl
mode change 100644 => 100755 assets/snippets/ajaxSearch/plugin.searchHighlight.tpl
mode change 100644 => 100755 assets/snippets/ajaxSearch/snippet.ajaxSearch.txt
diff --git a/assets/snippets/ajaxSearch/ajaxSearchPopup.php b/assets/snippets/ajaxSearch/ajaxSearchPopup.php
old mode 100644
new mode 100755
index ac05ecd2a8..6a485f8b48
--- a/assets/snippets/ajaxSearch/ajaxSearchPopup.php
+++ b/assets/snippets/ajaxSearch/ajaxSearchPopup.php
@@ -4,9 +4,9 @@
* -----------------------------------------------------------------------------
* ajaxSearchPopup.php
*
-* @author Coroico - www.modx.wangba.fr
-* @version 1.9.2
-* @date 05/12/2010
+* @author Coroico - www.evo.wangba.fr
+* @version 1.9.3b
+* @date 20/11/2012
*
*/
@@ -22,7 +22,7 @@ function parseUserConfig($ucfg) {
if (isset($_POST['search'])) {
- define('AS_VERSION', '1.9.2');
+ define('AS_VERSION', '1.9.3');
define('AS_SPATH', 'assets/snippets/ajaxSearch/');
define('AS_PATH', MODX_BASE_PATH . AS_SPATH);
@@ -48,7 +48,8 @@ function parseUserConfig($ucfg) {
$config = parseUserConfig((strip_tags($_POST['ucfg'])));
// Load the custom functions of the custom configuration file if needed
if ($config) {
- $lconfig = (substr($config, 0, 6) != "@FILE:") ? AS_PATH . "configs/$config.config.php" : $modx->config['base_path'] . trim(substr($config, 6, strlen($config)-6));
+ if (substr($config, 0, 6) != "@FILE:") $lconfig = AS_PATH . "configs/{$config}.config.php";
+ else return "AjaxSearch error: @FILE: prefix not allowed ! Check your config parameter or your config file name! ";
if (file_exists($lconfig)) include $lconfig;
else return "AjaxSearch error: " . $lconfig . " not found ! Check your config parameter or your config file name! ";
}
diff --git a/assets/snippets/ajaxSearch/ajaxSearch_readme.txt b/assets/snippets/ajaxSearch/ajaxSearch_readme.txt
old mode 100644
new mode 100755
index 4800e60e4d..227ff5e2e1
--- a/assets/snippets/ajaxSearch/ajaxSearch_readme.txt
+++ b/assets/snippets/ajaxSearch/ajaxSearch_readme.txt
@@ -1,5 +1,5 @@
-AjaxSearch Readme version 1.9.2
+AjaxSearch Readme version 1.9.3b
---------------------------------------------------------------
:: Snippet: AjaxSearch
@@ -8,7 +8,7 @@ AjaxSearch Readme version 1.9.2
Ajax-driven & Flexible Search form
Version:
- 1.9.2 - 05/12/2010
+ 1.9.3b - 20/11/2012
Created by: Coroico - (coroico@wangba.fr)
@@ -43,10 +43,16 @@ Many fixes/additions were contributed by mikkelwe/identity/Perrine
Originally based on the FlexSearchForm snippet created by jaredc (jaredc@honeydewdesign.com)
----------------------------------------------------------------
-:: Changelog: for more details see www.modx.wangba.fr
+:: Changelog: for more details see www.evo.wangba.fr
----------------------------------------------------------------
+ 26-september-12 (1.9.3)
+ -- Bug fixing
+ -- Removed ajaxsearch's own striptags functions and substituted the use of $modx->stripTags
+ -- minimum chars allowed to 2
+
05-december-10 (1.9.2)
-- Bug fixing
+
30-august-10 (1.9.2)
-- Bug fixing
@@ -457,10 +463,11 @@ The simplest snippet call is [!Ajaxsearch!] without any parameters.
Maximum number of words for searching - Default: 5
----- &minChars [ 2 < int < 100 ] (optional)
+---- &minChars [ 1 < int < 100 ] (optional)
Minimum number of characters to require for a word to be valid for searching.
Length of each word with $advSearch = 'allwords', 'oneword' or 'nowords'
Length of the search string with possible spaces with $advSearch = 'exactphrase'
+ Default is 3.
---- &showInputForm [1 | 0] (optional)
@@ -1681,7 +1688,7 @@ Install it as the search highlight plugin.
2. Documentation : http://wiki.modxcms.com/index.php/AjaxSearch
-3. Demo site : http://www.modx.wangba.fr
+3. Demo site : http://www.evo.wangba.fr
4. Bugs & features : http://svn.modxcms.com/jira/browse/AJAXSEARCH
Don't hesitate to signup for an account to post an issue or a new feature
diff --git a/assets/snippets/ajaxSearch/ajaxSearch_version_192.txt b/assets/snippets/ajaxSearch/ajaxSearch_version_193b.txt
old mode 100644
new mode 100755
similarity index 92%
rename from assets/snippets/ajaxSearch/ajaxSearch_version_192.txt
rename to assets/snippets/ajaxSearch/ajaxSearch_version_193b.txt
index 75d1d43a2e..1ad9345f89
--- a/assets/snippets/ajaxSearch/ajaxSearch_version_192.txt
+++ b/assets/snippets/ajaxSearch/ajaxSearch_version_193b.txt
@@ -1,502 +1,488 @@
-
- AjaxSearch - version 1.9.2
-
- Coroico - http://www.modx.wangba.fr
-
- 05th of December 2010
-
-The release 1.9.2 provide the correction of the following issues:
-
-==== AJAXSEARCH-75 : exactphrase doesn't work when the value is passed thru snippet call
-See http://modxcms.com/forums/index.php/topic,55236.0.html
-
-
-==== AJAXSEARCH-76 : TV names not protected in sql request
-See http://modxcms.com/forums/index.php/topic,56696.msg330844.html#msg330844l
-
-
-==== AJAXSEARCH-77 : where clause for search terms restriction when the searchstring is empty
-
-
-==== AJAXSEARCH-78 : failed searched never logged
-See http://modxcms.com/forums/index.php/topic,53897.msg331714.html#msg331714
-
-
-==== AJAXSEARCH-79 : tag list now interpreted as tv input list
-
-
-==== AJAXSEARCH-80 : Incorrect strip function for MODx tags
-See http://modxcms.com/forums/index.php/topic,57332.msg331855.html#msg331855
-
-
-==== AJAXSEARCH-81 : orderBy issue when orderBy field not in sc.content table
-
-
-==== AJAXSEARCH-82 : can't define configuration file name with "@FILE:" prefix
-
-
-==== AJAXSEARCH-83 : Searchstring not escaped when logging search request and results
-See http://modxcms.com/forums/index.php/topic,57916.0.html
-
-
-No new features are provided with this release.
-
-=====================================================================================
-
-Previous versions :
- - 1.9.1 delivered the 30th of August 2010
- - 1.9.0 delivered the 18th of May 2010 (provided with MODx 1.0.4)
- - 1.8.5 delivered the 20th of March 2010 (provided with MODx 1.0.3)
- - 1.8.4 delivered the 20th of October 2009 (provided with MODx1.0.1)
- - 1.8.3a delivered the 12th of July 2009 (provided with MODx1.0.0)
- - 1.8.3 delivered the 08th June 2009
- - 1.8.2 delivered the 21th April 2009
- - 1.8.1 delivered the 13th October 2008 (provided with MODx0.9.6.3)
-
-
-======================= CHANGES (since 1.8.5) ==================================
-
-
-==== Renaming of some parameters
-
- For a better and a simpler undertstanding some parameters have been renamed
-
- AS_showForm => showInputForm
- AS_landing => landingPage
- AS_showResults => showResults
-
-
-==== Renaming of some $_POST and $_GET variables
-
- AS_search => search
-
-
-==== Some $_GET variables are now deprecated
-
- FSF_search is now non interpreted
-
-
-==== &searchWordList deprecated
-
- The option is now set un the input template
-
-
-==== &resultsPage deprecated
-
- use landingPage rather this deprecated parameter
-
-
-==== &showMoreResults deprecated
-
- use moreResultsPage rather this deprecated parameter
-
-
-==== Firebug mode for the debug is deprecated
-
- Usage of the firebug mode for the debug is deprecated
- Negatives values : -1, -2, -3 are now unterstood as 1, 2, 3
-
-
-
-====================== NEW FEATURES (since 1.8.5) ==============================
-
-
-==== Accented characters - search html entities too
-
- The html entity version of the search terms are also searched.
- e.g: "ph&eactute;nomène" and "phnomne" are searched when "phnomne" is searched.
-
-
-==== advSearch - exactphrase
-
- The search with the advSearch parameter set to "exactphrase" returns only results which
- exactly match to the searched terms.
- e.g: search "and" doesn't return "band" or "land" just "and" terms.
- As this search option use REGEXP, the search could be longer than for the other options.
-
-
-==== Use Google Analytics to track AjaxSearch
-
- AjaxSearch forms could now use $_POST or $_GET
- with $_GET, the query parameter in the URL after you search allow you to track the site
- search with Google Analytics.
- To do this, simply replace method="post" by method="get" in the input template used
- by your ajaxSearch calls.
-
-
-==== timeLimit - increase the allowed execution time of your script
-
- &timeLimit = [ int | 60 ]
- Max execution time in seconds for the AjaxSearch script
- 0 - If set to zero, no time limit is imposed
- Default: 60 - 1 minute.
-
-
-==== withTvs Define which Template Variables will be used for the search and display of results.
-
- &withTvs [ [ + | - ] [ : tvlist] ] - by default ''
-
- The parameter withTvs define which Tv will be added as field result for displaying
- and in which tv the search will occur. Only text type TV are enabled
-
- e.g:
-
- &withTvs=`tv1,tv2,tv3` - tv1, tv2, Tv3 are added
- &withTvs=`+:tv1,tv2,tv3` - tv1, tv2, Tv3 are added
- &withTvs=`+` - all tvs of the site are added
-
- &withTvs=`-` - all tvs of the site are added
- &withTvs=`-:tv1,tv2,tv3` - all tvs of the site except tv1, tv2, Tv3 are added
-
- &withTvs=`` - no tv added
-
- If &whereSearch contains 'tv' then a tv_value field which contain the concatened
- values of all tv of the document is added
-
- So the tv added could be used for filtering with the filter parameter (see &filter)
-
- Like the default site content parameters (pagetitle, longtitle, ...) the
- Tvs added are available with the following placeholders:
-
- [+as.tvname+], [+as.tvnameShow+], [+as.tvnameClass+]
-
- Where tvname is the MODx name of a TV
-
- [+as.tvname+] is the HTML output of your TV
- [+as.tvnameShow+] = 1 if the TV is not NULL
- [+as.tvnameClass+] :
- - ajaxSearch_resultTvname for the non ajax results (&tplResult)
- - AS_ajax_resultTvname for the ajax window (&tplAjaxResult)
-
-
-==== Append the content of some Tvs to your search results with the "tvPhx" parameter
-
- &tvPhx [ [ + | - ] [ : tvlist] ] - by default ''
-
- The parameter tvPhx define which additional tv will be added as placeholder.
-
- e.g:
-
- &tvPhx=`tv1,tv2,tv3` - tv1, tv2, Tv3 are added as placeholders
- &tvPhx=`+:tv1,tv2,tv3` - tv1, tv2, Tv3 are added as placeholders
- &tvPhx=`+` - all tvs of the site are added as placeholders
-
- &tvPhx=`-` - all tvs of the site are added as placeholders
- &tvPhx=`-:tv1,tv2,tv3` - all tvs of the site except tv1, tv2, Tv3 are added as placeholders
-
- &tvPhx=`` - no tv defined as placeholders.
-
- The following placeholders are anabled with the tv:
-
- [+as.tvname+], [+as.tvnameShow+], [+as.tvnameClass+]
-
- Where tvname is the MODx name of a TV
-
- [+as.tvname+] is the HTML output of your TV
- [+as.tvnameShow+] = 1 if the TV is not NULL
- [+as.tvnameClass+] :
- - ajaxSearch_resultTvname for the non ajax results (&tplResult)
- - AS_ajax_resultTvname for the ajax window (&tplAjaxResult)
-
- The tv value could be used with the filter parameter (see &filter)
-
- As withTvs includes the TV as a new field in the select clause of the mysql query,
- tvPhx append the content of the selected tv after the search and before filer.
-
-
-==== filter - to exclude unwanted documents of the search
-
- filtering by tv name is now possible
-
- e.g: &filter=`articleTags,volcano,7` display only documents related to volcanoes.
- Documents are filtered by the TV 'articleTags'.
-
- IMPORTANT : here the tv should be allowed as result with the withTvs or tvPhx
- parameters
-
-
-==== Show introduction message under the input form
-
- &showIntro [ 0 | 1 ]
-
- To show or hide the introduction message displayed with the input form
- Default: 1 (show)
-
-
-==== 2 new paging type added
-
- &pagingType [ 0 | 1 | 2 | 3 ] : type of pagination
-
- Default: 1
-
- 0: Results Pages 1 | 2 | 3
- 1: Previous - X-Y /Z - Next
- 2: X-Y /Z - Show more 10 results
-
- Type 0 for non-ajax mode only
- Type 1 for non-ajax and ajax mode
- Type 2 for ajax mode (Jquery only)
-
- &tplPaging0 - Chunk to style the paging links - type 0
-
- &tplPaging1 - Chunk to style the paging links - type 1
-
- &tplPaging2 - Chunk to style the paging links - type 2
-
- IMPORTANT:
- arrow button images are provided with the images folder.
- use asprev.png, asnext.png or your own images to define your previous and next buttons.
-
- e.g:
- .paging1Prev{ width:16px; margin:0 3px 0 0;display:block; float:left; text-indent:-3000px; background:url(images/asprev.png) 0 center no-repeat; }
- .paging1Next{ width:16px;display:inline-block;text-indent:-3000px; background:url(images/asnext.png) 0 center no-repeat; }
-
- .paging2More{ margin:10px 10px; padding:8px;background:url(images/asnext.png) 0 center no-repeat;}
-
-
-==== Custom output
-
- &output [ 0 | 1 ]
-
- 0 - by default the results are listed below the input form
- 1 - custom layout:
-
- To place the different AjaxSearch elements where you want, use the following placeholders
-
- [+as.inputForm+] : the input form with the intro message
- [+as.results+] : the search results
-
- The parameter &tplLayout is now deprecated
-
- The parameter &tplInput is now used to style the ajaxSearch input form
-
-
-==== New modifiers for the ajaxSearch Phx parser
-
- to include images in your templates, uses the possible following phx modifiers:
-
- imgwidth : image width - e.g:
- provide the image width
-
- imgheigth : image heigth - e.g:
- provide the image height
-
- imgattr : image attributs - e.g:
- provide the image attributes as height="xxx" width="yyy"
-
- imgmaxwidth=`length` : image max width - e.g:
- limit the width of the image to a maximum. Under this limit, keep the true width
-
- imgmaxheight=`length` : image max height - e.g:
- limit the height of the image to a maximum. Under this limit, keep the true height
-
- These modifiers are particularly usefull with the ajax mode to help html to determine the height of the AjaxSearch pop-up window
-
-
-==== Unique id for AjaxSearch instance
-
- &asId [ string | '']
- Any combination of characters a-z, underscores, and numbers 0-9
- This is case sensitive. Default = empty string
-
- This parameter allow distinguish several Ajaxsearch instances on the same page
- The id is used to link the snippet calls between them
- Choose a short name. eg: "as2"
-
-
-==== Define categories
-
- &category [ tv_name | '']
- Any combination of characters a-z, underscores, and numbers 0-9
- This is case sensitive. Default = empty string
- Name of a TV. The category of a MODx document is provided by this TV content
-
- e.g: &category=`category`
- And the "category" tv value of a document could contain for instance Music, Arts, ...
- Then the categConfig function should be defined like that:
-
- /*
- * categConfig : To define the display of categories (output)
- * Add a category as a switch item. 'uncategorized' item describe the results outside of any category
- * Add a switch for a new site. The default site is named 'defsite'.
- * Allowed config parameters : grpLabel, tplResult, tplAjaxResult, display, extract, rank ...
- */
- if(!function_exists('categConfig')) {
- function categConfig($site='defsite',$category){
- $config = array();
- $site = strtolower($site);
- $category = strtolower($category);
- switch($site) {
- case 'defsite':
- switch($category){
- case 'arts':
- $config['grpLabel'] = 'Arts';
- $config['tplAjaxResult'] = 'imgResult'; // allow the display of an image
- break;
- case 'music':
- $config['grpLabel'] = 'Music';
- $config['tplAjaxResult'] = 'imgAjaxResult'; // allow the display of an image
- break;
- case 'geography':
- $config['grpLabel'] = 'Geography';
- $config['tplAjaxResult'] = 'imgAjaxResult';
- break;
- case '':
- $config['grpLabel'] = 'Site wide';
- break;
- }
- }
- return $config;
- }
- }
-
-
-==== Display the results
-
- &display [ 'mixed' | 'unmixed' ]
-
- When results comes from differents subsites (categories), you could choose to display the results mixed or unmixed.
- Default: unmixed
- Unmixed mode display the results grouped by site or subsite. Each group of results could be paginated.
- Mixed mode mixes all the results coming from the differents sites or subsites.
- With unmixed mode, results are ordered by the field provided by the first field of the order parameter
- e.g: if the subsite "products" has been defined with "product_name, supplier" as order parameter and
- the site "employees" has been defined with "job" as order parameter, then the results will be ordered by
- "using product_name" value for products and "job" value for "employees".
-
-
-==== GrpResult & AjaxGrpResult templates
-
- &tplGrpResult - Chunk to style the non-ajax output group result outer
- &tplAjaxGrpResult - Chunk to style each output group result outer
-
-
-==== Label for a group of results
-
- in the configuration file a label could be defined to be be linked with the group of results.
- This isn't a snippet parameter. Only a variable of configuration file.
- This variable shouldn't contain a comma (",")
-
- $config['grpLabel'] = 'Arts (Painting)';
-
-
-==== parents ( in / not in)
-
- &parents [ [ in | not in ] : comma separated list of Ids | '' ]
-
- e.g:
- &parents=`in:24,25` - do the search in the children documents of documents 24 and 25
-
- &parents=`not in:24,10` - do the search in all documents except in the children documents of documents 24 and 10 documents
-
- &parents=`24,25` means &parents=`in:24,25` (compatible with the 1.8.4 release)
- &depth [ 0 < int ] Number of levels deep to retrieve documents
-
-
-==== documents ( in / not in)
-
- &documents [ [ in | not in ] : comma separated list of Ids | '' ]
-
- e.g:
- &documents=`in:28,29,30,31` - do the search in the documents 28,29,30,31
-
- &documents=`not in:28,29,30,31` - do the search in all documents except in documents 28,29,30,31
-
- &documents=`28,29,30,31` means &documents=`in:28,29,30,31` (compatible with the 1.8.4 release)
-
-
-==== extracts
-
- Optimization of the extract algorithm.
-
-
-==== Introduction of the document
-
- The first characters of the document are displayed when the search occurs with the "nowords" advSearch parameters
- or when a filter is applied without any search term.
-
- The length of the indroduction is provided by extractLength parameter (200 characters by default).
- The text displayed is the text defined by the extract parameter (content,description,introtext,tv_value by default)
- Obviously without any search term highligthed.
-
-
-==== JQuery & mootools libraries updated with the last versions
-
- Jquery 1.4.2 & mootools 1.2.4 released with ajaxSearch 1.9.0
-
-
-==== Javscript disabled
-
- define the css class "init" to mask the ajaxSearch_output div when javascript is disabled
-
- e.g:
-
- #ajaxSearch_output.init {
- border: none;
- background-color: #FFF;
- }
-
- #ajaxSearch_output {
- font-size:90%;
- background-color:#EFEFEF;
- border:1px solid #6F9303;
- color:black;
- width:550px;
- z-index:1;
- padding:5px;
- margin:10px 0 15px 0;
- }
-
-
-==== pcre_backtrack limit
-
- The backtrack_limit setting sets the maximum number of bytes preg is allowed
- to search over before it gives up. This limit is automatically set to 1600000
- at the beginning of the script and then restored to the initial value at the
- end of the script.
-
-
-==== Language files updated
-
- Six labels have been added for english & french language files.
- Thanks to post the missing labels on the ajaxSearch forum board
-
- Used to display the number of results found:
- $_lang['as_resultsTextSingle'] = '%d result found.';
- $_lang['as_resultsTextMultiple'] = '%d results found.';
-
- Used to display the total number of results displayed:
- $_lang['as_resultsDisplayed'] = 'Displayed: %d';
-
- Used to display the number of results displayed by group:
- $_lang['as_grpResultsDisplayedText'] = '(Displaying %d - %d of %d)';
-
- Used by pagingType 1:
- $_lang['as_paging1Text'] = '%d - %d / %d';
-
- Used by pagingType 2:
- $_lang['as_paging2Text'] = 'Show more %d results';
-
-
-==== AjaxSearch Logs manager - Follow up the searches of your users !
-
- A simple module is provided to display in the manager the last searches run by your
- users. This requires to use the asLog parameter.
- Use the file module.ajaxSearchLogManager.txt to set a new module.
-
-
-==== Documentation folder
-
- in the documentation folder, the cheatSheet ajaxSearch192.pdf give a quick
- overview of AjaxSearch parameters. Thanks to Goldsky for this contribution.
-
- The someCssExamples folder give the search.css file used on the demo site to
- style ajaxSearch.
-
- The someConfigsExamples folder provide the configs folder used on the demo
- site.
-
- The someTemplatesExamples folder provide some templates used on the demo site.
-
-
-
+
+ AjaxSearch - version 1.9.3b
+
+ Coroico - http://www.evo.wangba.fr
+
+ 20th of november 2012
+
+The release 1.9.3 provide the correction of the following issues:
+
+==== AJAXSEARCH-82 : can't define configuration file name with "@FILE:" prefix
+See http://bugs.modx.com/issues/3533
+
+
+==== AJAXSEARCH-84 : Unquoted field name in orderby clause
+See http://bugs.modx.com/issues/3697
+
+
+==== AJAXSEARCH-85 : Wrong URL construction when using an array of values (checkboxes)
+See http://bugs.modx.com/issues/3698
+
+
+==== AJAXSEARCH-86 : number of characters not checked when a form with filters is submitted
+
+
+&minChars=2 (less than the default) is now allowed for the search.
+
+
+=====================================================================================
+
+Previous versions :
+ - 1.9.3 delivered the 26th of september 2012
+ - 1.9.2 delivered the 5th of December 2010 (provided with MODx 1.0.4)
+ - 1.9.1 delivered the 30th of August 2010
+ - 1.9.0 delivered the 18th of May 2010 (provided with MODx 1.0.4)
+ - 1.8.5 delivered the 20th of March 2010 (provided with MODx 1.0.3)
+ - 1.8.4 delivered the 20th of October 2009 (provided with MODx1.0.1)
+ - 1.8.3a delivered the 12th of July 2009 (provided with MODx1.0.0)
+ - 1.8.3 delivered the 08th June 2009
+ - 1.8.2 delivered the 21th April 2009
+ - 1.8.1 delivered the 13th October 2008 (provided with MODx0.9.6.3)
+
+
+======================= CHANGES (since 1.8.5) ==================================
+
+
+==== Renaming of some parameters
+
+ For a better and a simpler undertstanding some parameters have been renamed
+
+ AS_showForm => showInputForm
+ AS_landing => landingPage
+ AS_showResults => showResults
+
+
+==== Renaming of some $_POST and $_GET variables
+
+ AS_search => search
+
+
+==== Some $_GET variables are now deprecated
+
+ FSF_search is now non interpreted
+
+
+==== &searchWordList deprecated
+
+ The option is now set un the input template
+
+
+==== &resultsPage deprecated
+
+ use landingPage rather this deprecated parameter
+
+
+==== &showMoreResults deprecated
+
+ use moreResultsPage rather this deprecated parameter
+
+
+==== Firebug mode for the debug is deprecated
+
+ Usage of the firebug mode for the debug is deprecated
+ Negatives values : -1, -2, -3 are now unterstood as 1, 2, 3
+
+
+
+====================== NEW FEATURES (since 1.8.5) ==============================
+
+
+==== Accented characters - search html entities too
+
+ The html entity version of the search terms are also searched.
+ e.g: "ph&eactute;nomène" and "phnomne" are searched when "phnomne" is searched.
+
+
+==== advSearch - exactphrase
+
+ The search with the advSearch parameter set to "exactphrase" returns only results which
+ exactly match to the searched terms.
+ e.g: search "and" doesn't return "band" or "land" just "and" terms.
+ As this search option use REGEXP, the search could be longer than for the other options.
+
+
+==== Use Google Analytics to track AjaxSearch
+
+ AjaxSearch forms could now use $_POST or $_GET
+ with $_GET, the query parameter in the URL after you search allow you to track the site
+ search with Google Analytics.
+ To do this, simply replace method="post" by method="get" in the input template used
+ by your ajaxSearch calls.
+
+
+==== timeLimit - increase the allowed execution time of your script
+
+ &timeLimit = [ int | 60 ]
+ Max execution time in seconds for the AjaxSearch script
+ 0 - If set to zero, no time limit is imposed
+ Default: 60 - 1 minute.
+
+
+==== withTvs Define which Template Variables will be used for the search and display of results.
+
+ &withTvs [ [ + | - ] [ : tvlist] ] - by default ''
+
+ The parameter withTvs define which Tv will be added as field result for displaying
+ and in which tv the search will occur. Only text type TV are enabled
+
+ e.g:
+
+ &withTvs=`tv1,tv2,tv3` - tv1, tv2, Tv3 are added
+ &withTvs=`+:tv1,tv2,tv3` - tv1, tv2, Tv3 are added
+ &withTvs=`+` - all tvs of the site are added
+
+ &withTvs=`-` - all tvs of the site are added
+ &withTvs=`-:tv1,tv2,tv3` - all tvs of the site except tv1, tv2, Tv3 are added
+
+ &withTvs=`` - no tv added
+
+ If &whereSearch contains 'tv' then a tv_value field which contain the concatened
+ values of all tv of the document is added
+
+ So the tv added could be used for filtering with the filter parameter (see &filter)
+
+ Like the default site content parameters (pagetitle, longtitle, ...) the
+ Tvs added are available with the following placeholders:
+
+ [+as.tvname+], [+as.tvnameShow+], [+as.tvnameClass+]
+
+ Where tvname is the MODx name of a TV
+
+ [+as.tvname+] is the HTML output of your TV
+ [+as.tvnameShow+] = 1 if the TV is not NULL
+ [+as.tvnameClass+] :
+ - ajaxSearch_resultTvname for the non ajax results (&tplResult)
+ - AS_ajax_resultTvname for the ajax window (&tplAjaxResult)
+
+
+==== Append the content of some Tvs to your search results with the "tvPhx" parameter
+
+ &tvPhx [ [ + | - ] [ : tvlist] ] - by default ''
+
+ The parameter tvPhx define which additional tv will be added as placeholder.
+
+ e.g:
+
+ &tvPhx=`tv1,tv2,tv3` - tv1, tv2, Tv3 are added as placeholders
+ &tvPhx=`+:tv1,tv2,tv3` - tv1, tv2, Tv3 are added as placeholders
+ &tvPhx=`+` - all tvs of the site are added as placeholders
+
+ &tvPhx=`-` - all tvs of the site are added as placeholders
+ &tvPhx=`-:tv1,tv2,tv3` - all tvs of the site except tv1, tv2, Tv3 are added as placeholders
+
+ &tvPhx=`` - no tv defined as placeholders.
+
+ The following placeholders are anabled with the tv:
+
+ [+as.tvname+], [+as.tvnameShow+], [+as.tvnameClass+]
+
+ Where tvname is the MODx name of a TV
+
+ [+as.tvname+] is the HTML output of your TV
+ [+as.tvnameShow+] = 1 if the TV is not NULL
+ [+as.tvnameClass+] :
+ - ajaxSearch_resultTvname for the non ajax results (&tplResult)
+ - AS_ajax_resultTvname for the ajax window (&tplAjaxResult)
+
+ The tv value could be used with the filter parameter (see &filter)
+
+ As withTvs includes the TV as a new field in the select clause of the mysql query,
+ tvPhx append the content of the selected tv after the search and before filer.
+
+
+==== filter - to exclude unwanted documents of the search
+
+ filtering by tv name is now possible
+
+ e.g: &filter=`articleTags,volcano,7` display only documents related to volcanoes.
+ Documents are filtered by the TV 'articleTags'.
+
+ IMPORTANT : here the tv should be allowed as result with the withTvs or tvPhx
+ parameters
+
+
+==== Show introduction message under the input form
+
+ &showIntro [ 0 | 1 ]
+
+ To show or hide the introduction message displayed with the input form
+ Default: 1 (show)
+
+
+==== 2 new paging type added
+
+ &pagingType [ 0 | 1 | 2 | 3 ] : type of pagination
+
+ Default: 1
+
+ 0: Results Pages 1 | 2 | 3
+ 1: Previous - X-Y /Z - Next
+ 2: X-Y /Z - Show more 10 results
+
+ Type 0 for non-ajax mode only
+ Type 1 for non-ajax and ajax mode
+ Type 2 for ajax mode (Jquery only)
+
+ &tplPaging0 - Chunk to style the paging links - type 0
+
+ &tplPaging1 - Chunk to style the paging links - type 1
+
+ &tplPaging2 - Chunk to style the paging links - type 2
+
+ IMPORTANT:
+ arrow button images are provided with the images folder.
+ use asprev.png, asnext.png or your own images to define your previous and next buttons.
+
+ e.g:
+ .paging1Prev{ width:16px; margin:0 3px 0 0;display:block; float:left; text-indent:-3000px; background:url(images/asprev.png) 0 center no-repeat; }
+ .paging1Next{ width:16px;display:inline-block;text-indent:-3000px; background:url(images/asnext.png) 0 center no-repeat; }
+
+ .paging2More{ margin:10px 10px; padding:8px;background:url(images/asnext.png) 0 center no-repeat;}
+
+
+==== Custom output
+
+ &output [ 0 | 1 ]
+
+ 0 - by default the results are listed below the input form
+ 1 - custom layout:
+
+ To place the different AjaxSearch elements where you want, use the following placeholders
+
+ [+as.inputForm+] : the input form with the intro message
+ [+as.results+] : the search results
+
+ The parameter &tplLayout is now deprecated
+
+ The parameter &tplInput is now used to style the ajaxSearch input form
+
+
+==== New modifiers for the ajaxSearch Phx parser
+
+ to include images in your templates, uses the possible following phx modifiers:
+
+ imgwidth : image width - e.g:
+ provide the image width
+
+ imgheigth : image heigth - e.g:
+ provide the image height
+
+ imgattr : image attributs - e.g:
+ provide the image attributes as height="xxx" width="yyy"
+
+ imgmaxwidth=`length` : image max width - e.g:
+ limit the width of the image to a maximum. Under this limit, keep the true width
+
+ imgmaxheight=`length` : image max height - e.g:
+ limit the height of the image to a maximum. Under this limit, keep the true height
+
+ These modifiers are particularly usefull with the ajax mode to help html to determine the height of the AjaxSearch pop-up window
+
+
+==== Unique id for AjaxSearch instance
+
+ &asId [ string | '']
+ Any combination of characters a-z, underscores, and numbers 0-9
+ This is case sensitive. Default = empty string
+
+ This parameter allow distinguish several Ajaxsearch instances on the same page
+ The id is used to link the snippet calls between them
+ Choose a short name. eg: "as2"
+
+
+==== Define categories
+
+ &category [ tv_name | '']
+ Any combination of characters a-z, underscores, and numbers 0-9
+ This is case sensitive. Default = empty string
+ Name of a TV. The category of a MODx document is provided by this TV content
+
+ e.g: &category=`category`
+ And the "category" tv value of a document could contain for instance Music, Arts, ...
+ Then the categConfig function should be defined like that:
+
+ /*
+ * categConfig : To define the display of categories (output)
+ * Add a category as a switch item. 'uncategorized' item describe the results outside of any category
+ * Add a switch for a new site. The default site is named 'defsite'.
+ * Allowed config parameters : grpLabel, tplResult, tplAjaxResult, display, extract, rank ...
+ */
+ if(!function_exists('categConfig')) {
+ function categConfig($site='defsite',$category){
+ $config = array();
+ $site = strtolower($site);
+ $category = strtolower($category);
+ switch($site) {
+ case 'defsite':
+ switch($category){
+ case 'arts':
+ $config['grpLabel'] = 'Arts';
+ $config['tplAjaxResult'] = 'imgResult'; // allow the display of an image
+ break;
+ case 'music':
+ $config['grpLabel'] = 'Music';
+ $config['tplAjaxResult'] = 'imgAjaxResult'; // allow the display of an image
+ break;
+ case 'geography':
+ $config['grpLabel'] = 'Geography';
+ $config['tplAjaxResult'] = 'imgAjaxResult';
+ break;
+ case '':
+ $config['grpLabel'] = 'Site wide';
+ break;
+ }
+ }
+ return $config;
+ }
+ }
+
+
+==== Display the results
+
+ &display [ 'mixed' | 'unmixed' ]
+
+ When results comes from differents subsites (categories), you could choose to display the results mixed or unmixed.
+ Default: unmixed
+ Unmixed mode display the results grouped by site or subsite. Each group of results could be paginated.
+ Mixed mode mixes all the results coming from the differents sites or subsites.
+ With unmixed mode, results are ordered by the field provided by the first field of the order parameter
+ e.g: if the subsite "products" has been defined with "product_name, supplier" as order parameter and
+ the site "employees" has been defined with "job" as order parameter, then the results will be ordered by
+ "using product_name" value for products and "job" value for "employees".
+
+
+==== GrpResult & AjaxGrpResult templates
+
+ &tplGrpResult - Chunk to style the non-ajax output group result outer
+ &tplAjaxGrpResult - Chunk to style each output group result outer
+
+
+==== Label for a group of results
+
+ in the configuration file a label could be defined to be be linked with the group of results.
+ This isn't a snippet parameter. Only a variable of configuration file.
+ This variable shouldn't contain a comma (",")
+
+ $config['grpLabel'] = 'Arts (Painting)';
+
+
+==== parents ( in / not in)
+
+ &parents [ [ in | not in ] : comma separated list of Ids | '' ]
+
+ e.g:
+ &parents=`in:24,25` - do the search in the children documents of documents 24 and 25
+
+ &parents=`not in:24,10` - do the search in all documents except in the children documents of documents 24 and 10 documents
+
+ &parents=`24,25` means &parents=`in:24,25` (compatible with the 1.8.4 release)
+ &depth [ 0 < int ] Number of levels deep to retrieve documents
+
+
+==== documents ( in / not in)
+
+ &documents [ [ in | not in ] : comma separated list of Ids | '' ]
+
+ e.g:
+ &documents=`in:28,29,30,31` - do the search in the documents 28,29,30,31
+
+ &documents=`not in:28,29,30,31` - do the search in all documents except in documents 28,29,30,31
+
+ &documents=`28,29,30,31` means &documents=`in:28,29,30,31` (compatible with the 1.8.4 release)
+
+
+==== extracts
+
+ Optimization of the extract algorithm.
+
+
+==== Introduction of the document
+
+ The first characters of the document are displayed when the search occurs with the "nowords" advSearch parameters
+ or when a filter is applied without any search term.
+
+ The length of the indroduction is provided by extractLength parameter (200 characters by default).
+ The text displayed is the text defined by the extract parameter (content,description,introtext,tv_value by default)
+ Obviously without any search term highligthed.
+
+
+==== JQuery & mootools libraries updated with the last versions
+
+ Jquery 1.4.2 & mootools 1.2.4 released with ajaxSearch 1.9.0
+
+
+==== Javscript disabled
+
+ define the css class "init" to mask the ajaxSearch_output div when javascript is disabled
+
+ e.g:
+
+ #ajaxSearch_output.init {
+ border: none;
+ background-color: #FFF;
+ }
+
+ #ajaxSearch_output {
+ font-size:90%;
+ background-color:#EFEFEF;
+ border:1px solid #6F9303;
+ color:black;
+ width:550px;
+ z-index:1;
+ padding:5px;
+ margin:10px 0 15px 0;
+ }
+
+
+==== pcre_backtrack limit
+
+ The backtrack_limit setting sets the maximum number of bytes preg is allowed
+ to search over before it gives up. This limit is automatically set to 1600000
+ at the beginning of the script and then restored to the initial value at the
+ end of the script.
+
+
+==== Language files updated
+
+ Six labels have been added for english & french language files.
+ Thanks to post the missing labels on the ajaxSearch forum board
+
+ Used to display the number of results found:
+ $_lang['as_resultsTextSingle'] = '%d result found.';
+ $_lang['as_resultsTextMultiple'] = '%d results found.';
+
+ Used to display the total number of results displayed:
+ $_lang['as_resultsDisplayed'] = 'Displayed: %d';
+
+ Used to display the number of results displayed by group:
+ $_lang['as_grpResultsDisplayedText'] = '(Displaying %d - %d of %d)';
+
+ Used by pagingType 1:
+ $_lang['as_paging1Text'] = '%d - %d / %d';
+
+ Used by pagingType 2:
+ $_lang['as_paging2Text'] = 'Show more %d results';
+
+
+==== AjaxSearch Logs manager - Follow up the searches of your users !
+
+ A simple module is provided to display in the manager the last searches run by your
+ users. This requires to use the asLog parameter.
+ Use the file module.ajaxSearchLogManager.txt to set a new module.
+
+
+==== Documentation folder
+
+ in the documentation folder, the cheatSheet ajaxSearch192.pdf give a quick
+ overview of AjaxSearch parameters. Thanks to Goldsky for this contribution.
+
+ The someCssExamples folder give the search.css file used on the demo site to
+ style ajaxSearch.
+
+ The someConfigsExamples folder provide the configs folder used on the demo
+ site.
+
+ The someTemplatesExamples folder provide some templates used on the demo site.
+
+
+
diff --git a/assets/snippets/ajaxSearch/classes/ajaxSearch.class.inc.php b/assets/snippets/ajaxSearch/classes/ajaxSearch.class.inc.php
old mode 100644
new mode 100755
index 6f834adcd6..4aba5da270
--- a/assets/snippets/ajaxSearch/classes/ajaxSearch.class.inc.php
+++ b/assets/snippets/ajaxSearch/classes/ajaxSearch.class.inc.php
@@ -4,16 +4,16 @@
* -----------------------------------------------------------------------------
* @package AjaxSearch
*
-* @author Coroico - www.modx.wangba.fr
-* @version 1.9.2
-* @date 05/12/2010
+* @author Coroico - www.evo.wangba.fr
+* @version 1.9.3
+* @date 26/09/2012
*
* Purpose:
* The AjaxSearch class contains all functions and data used to manage AjaxSearch
*
*/
-define('MIN_CHARS', 3); // minimum number of characters
+define('MIN_CHARS', 2); // minimum number of characters
define('MAX_CHARS', 30); // maximum number of characters
define('MIN_WORDS', 1); // minimum number of words
define('MAX_WORDS', 10); // maximum number of words
diff --git a/assets/snippets/ajaxSearch/classes/ajaxSearchConfig.class.inc.php b/assets/snippets/ajaxSearch/classes/ajaxSearchConfig.class.inc.php
old mode 100644
new mode 100755
index 4551f21109..b0836be275
--- a/assets/snippets/ajaxSearch/classes/ajaxSearchConfig.class.inc.php
+++ b/assets/snippets/ajaxSearch/classes/ajaxSearchConfig.class.inc.php
@@ -4,9 +4,9 @@
* -----------------------------------------------------------------------------
* @package AjaxSearchConfig
*
-* @author Coroico - www.modx.wangba.fr
-* @version 1.9.2
-* @date 05/12/2010
+* @author Coroico - www.evo.wangba.fr
+* @version 1.9.3
+* @date 26/09/2012
*
* Purpose:
* The AjaxSearchConfig class contains all functions and data used to manage configuration context
@@ -191,11 +191,11 @@ function setAsCall($ucfg) {
*/
function readConfigFile($config) {
global $modx;
- $configFile = (substr($config, 0, 5) != "@FILE") ? AS_PATH . "configs/$config.config.php" : $modx->config['base_path'] . trim(trim(substr($config, 5), ':'));
+ $configFile = (substr($config, 0, 6) != "@FILE:") ? AS_PATH . "configs/$config.config.php" : $modx->config['base_path'] . trim(substr($config, 6, strlen($config)-6));
$fh = fopen($configFile, 'r');
$output = fread($fh, filesize($configFile));
fclose($fh);
return "\n" . $output;
}
}
-?>
+?>
\ No newline at end of file
diff --git a/assets/snippets/ajaxSearch/classes/ajaxSearchCtrl.class.inc.php b/assets/snippets/ajaxSearch/classes/ajaxSearchCtrl.class.inc.php
old mode 100644
new mode 100755
index 0f97ffc081..fd49251453
--- a/assets/snippets/ajaxSearch/classes/ajaxSearchCtrl.class.inc.php
+++ b/assets/snippets/ajaxSearch/classes/ajaxSearchCtrl.class.inc.php
@@ -4,9 +4,9 @@
* -----------------------------------------------------------------------------
* @package AjaxSearchCtrl
*
-* @author Coroico - www.modx.wangba.fr
-* @version 1.9.2
-* @date 05/12/2010
+* @author Coroico - www.evo.wangba.fr
+* @version 1.9.3
+* @date 26/09/2012
*
* Purpose:
* The AjaxSearchCtrl class contains the logic and synchronisation between model and views
diff --git a/assets/snippets/ajaxSearch/classes/ajaxSearchInput.class.inc.php b/assets/snippets/ajaxSearch/classes/ajaxSearchInput.class.inc.php
old mode 100644
new mode 100755
index 41048141ce..805b69c2c7
--- a/assets/snippets/ajaxSearch/classes/ajaxSearchInput.class.inc.php
+++ b/assets/snippets/ajaxSearch/classes/ajaxSearchInput.class.inc.php
@@ -4,9 +4,9 @@
* -----------------------------------------------------------------------------
* @package AjaxSearchInput
*
-* @author Coroico - www.modx.wangba.fr
-* @version 1.9.2
-* @date 05/12/2010
+* @author Coroico - www.evo.wangba.fr
+* @version 1.9.3
+* @date 26/09/2012
*
* Purpose:
* The AjaxSearchInput class contains all functions and data used to manage Input form
@@ -129,6 +129,7 @@ function _checkSearchString(&$searchString, $advSearch, &$msgErr) {
}
else { // check the empty input field => error message (At least 3 characters)
$searchString = '';
+ if ($asfSubmitted) $checkString = false; // no check if a filter is submitted
}
}
else if (($searchString == '') && ($this->asCfg->cfg['init'] == 'all')) {
diff --git a/assets/snippets/ajaxSearch/classes/ajaxSearchLog.class.inc.php b/assets/snippets/ajaxSearch/classes/ajaxSearchLog.class.inc.php
old mode 100644
new mode 100755
index edf6e7b461..5aa6527ca6
--- a/assets/snippets/ajaxSearch/classes/ajaxSearchLog.class.inc.php
+++ b/assets/snippets/ajaxSearch/classes/ajaxSearchLog.class.inc.php
@@ -4,9 +4,9 @@
* -----------------------------------------------------------------------------
* @package AjaxSearchLog
*
-* @author Coroico - www.modx.wangba.fr
-* @version 1.9.2
-* @date 05/12/2010
+* @author Coroico - www.evo.wangba.fr
+* @version 1.9.3
+* @date 26/09/2012
*
* Purpose:
* The AjaxSearchLog class contains all functions used to Log AjaxSearch requests
diff --git a/assets/snippets/ajaxSearch/classes/ajaxSearchOutput.class.inc.php b/assets/snippets/ajaxSearch/classes/ajaxSearchOutput.class.inc.php
old mode 100644
new mode 100755
index 5366a8f22f..e6bec0b1b3
--- a/assets/snippets/ajaxSearch/classes/ajaxSearchOutput.class.inc.php
+++ b/assets/snippets/ajaxSearch/classes/ajaxSearchOutput.class.inc.php
@@ -4,9 +4,9 @@
* -----------------------------------------------------------------------------
* @package AjaxSearchOutput
*
-* @author Coroico - www.modx.wangba.fr
-* @version 1.9.2
-* @date 05/12/2010
+* @author Coroico - www.evo.wangba.fr
+* @version 1.9.3
+* @date 26/09/2012
*
* Purpose:
* The AjaxSearchOutput class contains all functions and data used to display output
@@ -1087,4 +1087,4 @@ function _getJson($pairs) {
return $json;
}
}
-?>
+?>
\ No newline at end of file
diff --git a/assets/snippets/ajaxSearch/classes/ajaxSearchRequest.class.inc.php b/assets/snippets/ajaxSearch/classes/ajaxSearchRequest.class.inc.php
old mode 100644
new mode 100755
index a6fdf47ca7..2516000a66
--- a/assets/snippets/ajaxSearch/classes/ajaxSearchRequest.class.inc.php
+++ b/assets/snippets/ajaxSearch/classes/ajaxSearchRequest.class.inc.php
@@ -4,9 +4,9 @@
* ------------------------------------------------------------------------------
* @package AjaxSearchRequest
*
-* @author Coroico - www.modx.wangba.fr
-* @version 1.9.2
-* @date 05/12/2010
+* @author Coroico - www.evo.wangba.fr
+* @version 1.9.3
+* @date 26/09/2012
*
* Purpose:
* The AjaxSearchRequest class contains all functions and data used to manage the search SQL Request
@@ -403,7 +403,7 @@ function _getHaving($searchString, $advSearch, $fClause) {
if ($advSearch != NOWORDS) {
if (isset($this->scJoined)) foreach ($this->scJoined as $joined) {
$jpref = $joined['tb_alias'];
- foreach ($joined['searchable'] as $searchable) $hvg[] = '(' . $jpref . '_' . $searchable . $like . ')';
+ if (isset($joined['searchable'])) foreach ($joined['searchable'] as $searchable) $hvg[] = '(' . $jpref . '_' . $searchable . $like . ')';
}
if (isset($this->scTvs['tvs'])) foreach ($this->scTvs['tvs'] as $scTv) {
$jpref = $scTv['tb_alias'];
@@ -413,7 +413,7 @@ function _getHaving($searchString, $advSearch, $fClause) {
if (isset($this->scJoined)) foreach ($this->scJoined as $joined) {
$jpref = $joined['tb_alias'];
- foreach ($joined['searchable'] as $searchable) {
+ if (isset($joined['searchable'])) foreach ($joined['searchable'] as $searchable) {
$hvg[] = '((' . $jpref . '_' . $searchable . $like . ') OR (' . $jpref . '_' . $searchable . ' IS NULL))';
}
}
@@ -455,8 +455,13 @@ function _getOrderBy() {
if (isset($this->scCateg)) $orderFields[] = 'category ASC';
if ($this->cfg['order']) {
$order = array_map('trim',explode(',', $this->cfg['order']));
- foreach ($order as $ord) $orderBy[] = $ord;
- $orderFields[] = implode(',', $orderBy);
+ foreach ($order as $ord) {
+ $ordElt = explode(' ',$ord);
+ $ordby = '`' . $ordElt[0] . '`';
+ if (isset($ordElt[1]) && ($ordElt[1] == 'ASC' || $ordElt[1] == 'DESC')) $ordby .= ' ' . $ordElt[1];
+ $orderBy[] = $ordby;
+ }
+ $orderFields[] = implode(',', $orderBy);
}
if (count($orderFields) > 0) $orderByClause = implode(', ', $orderFields);
else $orderByClause = '1';
@@ -498,10 +503,16 @@ function _getSubSelect($joined, $searchString, $advSearch) {
$whl[] = implode(' AND ', $where);
}
- if (($joined['tb_alias'] != 'tv') && ($searchString)) {
- $whl[] = '(' . $this->_getSearchTermsWhere($joined,$searchString,$advSearch). ')';
- $whereClause = '(' . implode(' AND ',$whl). ')';
- $subSelect = 'SELECT DISTINCT ' . $fieldsClause . ' FROM ' . $fromClause . ' WHERE ' . $whereClause;
+ if (($joined['tb_alias'] != 'tv')) {
+ if ($searchString) {
+ $stw = $this->_getSearchTermsWhere($joined,$searchString,$advSearch);
+ if (!empty($stw)) $whl[] = '(' . $stw . ')';
+ }
+ if (count($whl)) {
+ $whereClause = '(' . implode(' AND ',$whl). ')';
+ $subSelect = 'SELECT DISTINCT ' . $fieldsClause . ' FROM ' . $fromClause . ' WHERE ' . $whereClause;
+ }
+ else $subSelect = 'SELECT DISTINCT ' . $fieldsClause . ' FROM ' . $fromClause;
}
else {
$subSelect = 'SELECT DISTINCT ' . $fieldsClause . ' FROM ' . $fromClause;
@@ -544,24 +555,26 @@ function _getSubFilter($alias, $filter) {
return $where;
}
function _getSearchTermsWhere($joined,$searchString,$advSearch){
-
- $like = $this->_getWhereForm($advSearch);
- $whereOper = $this->_getWhereOper($advSearch);
- $type = ($advSearch == 'allwords') ? 'oneword' : $advSearch;
- $whereStringOper = $this->_getWhereStringOper($type);
-
- if (isset($joined['searchable']))
- foreach($joined['searchable'] as $searchable) $whsc[] = '(' . $joined['tb_alias'] . '.' . $searchable . $like .')';
- if (count($whsc)) $whereSubClause = implode($whereOper,$whsc);
- else $whereSubClause = '';
-
- $search = array();
- if ($advSearch == 'exactphrase') $search[] = $searchString;
- else $search = explode(' ',$searchString);
-
- foreach($search as $searchTerm) $where[]= preg_replace('/word/', preg_quote($searchTerm), $whereSubClause);
-
- $whereClause = implode($whereStringOper,$where);
+ $whereClause = '';
+ if (!empty($joined['searchable'])) {
+ $like = $this->_getWhereForm($advSearch);
+ $whereOper = $this->_getWhereOper($advSearch);
+ $type = ($advSearch == 'allwords') ? 'oneword' : $advSearch;
+ $whereStringOper = $this->_getWhereStringOper($type);
+
+ foreach($joined['searchable'] as $searchable) $whsc[] = '(' . $joined['tb_alias'] . '.' . $searchable . $like .')';
+ if (count($whsc)) {
+ $whereSubClause = implode($whereOper,$whsc);
+
+ $search = array();
+ if ($advSearch == 'exactphrase') $search[] = $searchString;
+ else $search = explode(' ',$searchString);
+
+ foreach($search as $searchTerm) $where[]= preg_replace('/word/', preg_quote($searchTerm), $whereSubClause);
+
+ $whereClause = implode($whereStringOper,$where);
+ }
+ }
return $whereClause;
}
function _getWhereForm($advSearch) {
diff --git a/assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php b/assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php
old mode 100644
new mode 100755
index bba8304d31..9e5e3f87a5
--- a/assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php
+++ b/assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php
@@ -4,9 +4,9 @@
* -----------------------------------------------------------------------------
* @package AjaxSearchResults
*
-* @author Coroico - www.modx.wangba.fr
-* @version 1.9.2
-* @date 05/10/2010
+* @author Coroico - www.evo.wangba.fr
+* @version 1.9.3
+* @date 26/09/2012
*
* Purpose:
* The AjaxSearchResults class contains all functions and data used to manage Results
diff --git a/assets/snippets/ajaxSearch/classes/ajaxSearchUtil.class.inc.php b/assets/snippets/ajaxSearch/classes/ajaxSearchUtil.class.inc.php
old mode 100644
new mode 100755
index 58133dd104..9ead73799b
--- a/assets/snippets/ajaxSearch/classes/ajaxSearchUtil.class.inc.php
+++ b/assets/snippets/ajaxSearch/classes/ajaxSearchUtil.class.inc.php
@@ -4,9 +4,9 @@
* -----------------------------------------------------------------------------
* @package AjaxSearchUtil
*
-* @author Coroico - www.modx.wangba.fr
-* @version 1.9.2
-* @date 05/12/2010
+* @author Coroico - www.evo.wangba.fr
+* @version 1.9.3
+* @date 26/09/2012
*
* Purpose:
* The AjaxSearchUtil class contains some util methods
diff --git a/assets/snippets/ajaxSearch/classes/asPhxParser.class.inc.php b/assets/snippets/ajaxSearch/classes/asPhxParser.class.inc.php
old mode 100644
new mode 100755
index e0ddba660e..e01f3497c2
--- a/assets/snippets/ajaxSearch/classes/asPhxParser.class.inc.php
+++ b/assets/snippets/ajaxSearch/classes/asPhxParser.class.inc.php
@@ -242,16 +242,40 @@ function Filter($input, $modifiers) {
##### Special functions
// img modifiers added by coroico
- case "imgwidth": list($width, $height, $type, $attr) = getimagesize($output); $output = $width; break;
- case "imgheight": list($width, $height, $type, $attr) = getimagesize($output); $output = $height; break;
- case "imgattr": list($width, $height, $type, $attr) = getimagesize($output); $output = $attr; break;
+ case "imgwidth":
+ if (@file_exists($output)) {
+ list($width, $height, $type, $attr) = getimagesize($output);
+ $output = $width;
+ }
+ else $output = 0;
+ break;
+ case "imgheight":
+ if (@file_exists($output)) {
+ list($width, $height, $type, $attr) = getimagesize($output);
+ $output = $height;
+ }
+ else $output = 0;
+ break;
+ case "imgattr":
+ if (@file_exists($output)) {
+ list($width, $height, $type, $attr) = getimagesize($output);
+ $output = $attr;
+ }
+ else $output = '';
+ break;
case "imgmaxwidth":
- list($width, $height, $type, $attr) = getimagesize($output);
- $output = ($width < intval($modifier_value[$i])) ? $width : intval($modifier_value[$i]);
+ if (@file_exists($output)) {
+ list($width, $height, $type, $attr) = getimagesize($output);
+ $output = ($width < intval($modifier_value[$i])) ? $width : intval($modifier_value[$i]);
+ }
+ else $output = intval($modifier_value[$i]);
break;
case "imgmaxheight":
- list($width, $height, $type, $attr) = getimagesize($output);
- $output = ($height < intval($modifier_value[$i])) ? $height : intval($modifier_value[$i]);
+ if (@file_exists($output)) {
+ list($width, $height, $type, $attr) = getimagesize($output);
+ $output = ($height < intval($modifier_value[$i])) ? $height : intval($modifier_value[$i]);
+ }
+ else $output = intval($modifier_value[$i]);
break;
case "math":
$filter = preg_replace("~([a-zA-Z\n\r\t\s])~","",$modifier_value[$i]);
diff --git a/assets/snippets/ajaxSearch/configs/default.config.php b/assets/snippets/ajaxSearch/configs/default.config.php
old mode 100644
new mode 100755
index 6aa88b15c5..062bd2a22c
--- a/assets/snippets/ajaxSearch/configs/default.config.php
+++ b/assets/snippets/ajaxSearch/configs/default.config.php
@@ -1,9 +1,9 @@
V{a}Dv~An&+O}=mwr$(CZQJ(K?%LS3ZQHhc-;;a3-7hy8$(otT`U5kAOi@&v
zj)|TXnr!qcp%|Ktkde^A*czIbmqFId-on+Ako~_#nL*sj*450JkU`wm$kj~L%*4Ue
zjGrIc#nsu&$PU^w_gZgr5l_O2!ALOP5otXcDH-mgf8-}#Xq1PgtBFO|nTUu~5TDRL
z<}o!?Rf$OLE?I!?SHJU>dAsRzbDi(>>YX&?s?m+Lizg$$*F#~Jz`nYqfdlQA=jZKp
zSD@0~U;g)dHAH|HQeyPi72)YN;P-o4LBQwk+(FwKaFH|X|5?aAf@y=&IeJp=zC6F4
zLylike>H8<7vSh~d$)dz|8>;_(O2%V86L4G&>D-JA<-aV(v5#&V3mt;gBfeHeVqZ%
zV5w)PqIUlh7a|a@DHiZ)W)Ik$;0pLm6On^)uUHxpif8M&uow6xvH$&8yNbOzX6RT)
z2D%Uz4^r`2`;O$_>Gi9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