diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9626ecf --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "/var/www/html/conlite213/conlite/plugins/cl-mod-rewrite"] + path = /var/www/html/conlite213/conlite/plugins/cl-mod-rewrite + url = https://gitport.de/ConLite/cl-mod-rewrite.git diff --git a/conlite/plugins/cl-content-allocation/.gitignore b/conlite/plugins/cl-content-allocation/.gitignore deleted file mode 100644 index d8fe4fa..0000000 --- a/conlite/plugins/cl-content-allocation/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/.project diff --git a/conlite/plugins/cl-content-allocation/LICENSE b/conlite/plugins/cl-content-allocation/LICENSE deleted file mode 100644 index f288702..0000000 --- a/conlite/plugins/cl-content-allocation/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. 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 -them 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 prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. 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. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey 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; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If 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 convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU 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 that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - 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. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -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. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/conlite/plugins/cl-content-allocation/README.md b/conlite/plugins/cl-content-allocation/README.md deleted file mode 100644 index fc6722e..0000000 --- a/conlite/plugins/cl-content-allocation/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# cl-content-allocation -Content Allocation Plugin for ConLite - -This plugin is f used to ad tags to your articles. - -History - -V 1.0.0 -- initial recode to use with CL pluginmanager diff --git a/conlite/plugins/cl-content-allocation/cl_plugin.xml b/conlite/plugins/cl-content-allocation/cl_plugin.xml deleted file mode 100644 index b1eacfa..0000000 --- a/conlite/plugins/cl-content-allocation/cl_plugin.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - ConLite Conten-Allocation - cl-content-allocation - D02CBEF1-45A5-5144-821F-015F6F81EEE0 - ConLite Content Allocation - ConLite Team - ConLite Team - cl-content-allocation@conlite.org - https://conlite.org - 1.0.0 - - - - - - - content_allocation - con_contentallocation - - - storeallocation - - - - - - - - - - - - - \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/classes/class.content_allocation.php b/conlite/plugins/cl-content-allocation/classes/class.content_allocation.php deleted file mode 100644 index 07a0736..0000000 --- a/conlite/plugins/cl-content-allocation/classes/class.content_allocation.php +++ /dev/null @@ -1,400 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * @since file available since contenido release <= 4.6 - * - * {@internal - * created 2005 - * modified 2005-10-27, Willi Man, debug option - * modified 2005-11-16, Willi Man, new method findMatchingContentByContentAllocationByCategories - * modified 2005-11-21, Willi Man, new method findMarchingCOntentByContentAllocation_OR_Categories - * modified 2008-04-06, Holger Librenz, direct mysql_* calls remoced, using DB_ConLite:: methods instead - * modified 2008-07-02, Frederic Schneider, add security fix - * - * $Id: class.content_allocation.php 131 2019-07-07 18:14:22Z oldperl $: - * }} - * - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -plugin_include('repository', 'custom/FrontendNavigation.php'); - -class pApiContentAllocation { - - /** - * References database object - * - * @var DB_ConLite - */ - var $db = null; - var $table = null; - var $lang = null; - var $client = null; - var $treeObj = null; - - /** - * - * @modified 27.10.2005 new class variable $this->bDebug (if true print debug information) - */ - public function __construct() { - global $db, $cfg, $lang, $client; - - $this->db = new DB_ConLite; - $this->table = $cfg['tab']; - $this->lang = $lang; - $this->client = $client; - - # use this option carefully and only temporary. - # the hidden debug output as html-comments can cause display problems. - $this->bDebug = false; - - $this->treeObj = new pApiTree('f31a4384-e5c1-4ede-b1bb-f43657ec73a5'); - } - - function storeAllocations($idartlang, $allocations) { - // empty before insert - $this->deleteAllocationsByIdartlang($idartlang); - - if (is_array($allocations)) { - foreach ($allocations as $value) { - $sql = "INSERT INTO " . $this->table['pica_alloc_con'] . " (idpica_alloc, idartlang) VALUES (" . Contenido_Security::toInteger($value) . ", " . Contenido_Security::toInteger($idartlang) . ")"; - $this->db->query($sql); - } - } - } - - function deleteAllocations($idpica_alloc) { - $sql = "DELETE FROM " . $this->table['pica_alloc_con'] . " WHERE idpica_alloc = " . Contenido_Security::toInteger($idpica_alloc); - $this->db->query($sql); - } - - function deleteAllocationsByIdartlang($idartlang) { - $sql = "DELETE FROM " . $this->table['pica_alloc_con'] . " WHERE idartlang = " . Contenido_Security::toInteger($idartlang); - $this->db->query($sql); - } - - function loadAllocations($idartlang) { - //$sql = "SELECT idpica_alloc FROM " . $this->table['pica_alloc_con'] . " WHERE idartlang = " . Contenido_Security::toInteger($idartlang); - $this->db->query("-- pApiContentAllocation->loadAllocations() - SELECT - a.idpica_alloc - FROM - `{$this->table['pica_alloc']}` AS a - , `{$this->table['pica_alloc_con']}` AS b - WHERE - idartlang = $idartlang - AND a.idpica_alloc=b.idpica_alloc - ;"); - - $items = array(); - - while ($this->db->next_record()) { - $items[] = $this->db->f('idpica_alloc'); - } - return $items; - } - - function loadAllocationsWithNames($idartlang, $parent, $firstonly = false) { - - global $cfg; - - $sql = "SELECT " . $cfg['tab']['pica_alloc'] . ".idpica_alloc FROM " . $cfg['tab']['pica_alloc'] . " - INNER JOIN " . $cfg['tab']['pica_alloc_con'] . " ON - " . $cfg['tab']['pica_alloc'] . ".idpica_alloc = " . $cfg['tab']['pica_alloc_con'] . ".idpica_alloc - WHERE (" . $cfg['tab']['pica_alloc'] . ".parentid = " . Contenido_Security::toInteger($parent) . ") AND (" . $cfg['tab']['pica_alloc_con'] . ".idartlang=" . Contenido_Security::toInteger($idartlang) . ") - ORDER BY " . $cfg['tab']['pica_alloc'] . ".sortorder"; - - $this->db->query($sql); - - while ($this->db->next_record()) { - $tmp[$this->db->f("idpica_alloc")] = $this->treeObj->_fetchItemNameLang($this->db->f("idpica_alloc")); - - if ($firstonly) { - break; - } - } - - return $tmp; - } - - /** - * Build query to find matching content by content allocation - * @param array $restrictions - * @return string SQL - * @modified 17.11.2005 by Willi Man - */ - function findMatchingContent($restrictions = null, $max = 0) { - if (!is_array($restrictions)) { - return false; - } - - global $aCategoriesToExclude; # @see config.local.php! - $sql = $this->_buildQuery($restrictions, $aCategoriesToExclude, $max); - - return $sql; - } - - /** - * Build query to find matching content by content allocation - * @param array $restrictions - * @return string SQL - */ - function _buildQuery($restrictions, $aCategoriesToExclude, $max) { - - global $cfg; - - $size = sizeof($restrictions); - - if ($size == 0) { - return ''; - } - - $sql_concat = unserialize('a:78:{i:0;s:2:"aa";i:1;s:2:"ab";i:2;s:2:"ac";i:3;s:2:"ad";i:4;s:2:"ae";i:5;s:2:"af";i:6;s:2:"ag";i:7;s:2:"ah";i:8;s:2:"ai";i:9;s:2:"aj";i:10;s:2:"ak";i:11;s:2:"al";i:12;s:2:"am";i:13;s:2:"an";i:14;s:2:"ao";i:15;s:2:"ap";i:16;s:2:"aq";i:17;s:2:"ar";i:18;s:2:"as";i:19;s:2:"at";i:20;s:2:"au";i:21;s:2:"av";i:22;s:2:"aw";i:23;s:2:"ax";i:24;s:2:"ay";i:25;s:2:"az";i:26;s:2:"ca";i:27;s:2:"cb";i:28;s:2:"cc";i:29;s:2:"cd";i:30;s:2:"ce";i:31;s:2:"cf";i:32;s:2:"cg";i:33;s:2:"ch";i:34;s:2:"ci";i:35;s:2:"cj";i:36;s:2:"ck";i:37;s:2:"cl";i:38;s:2:"cm";i:39;s:2:"cn";i:40;s:2:"co";i:41;s:2:"cp";i:42;s:2:"cq";i:43;s:2:"cr";i:44;s:2:"cs";i:45;s:2:"ct";i:46;s:2:"cu";i:47;s:2:"cv";i:48;s:2:"cw";i:49;s:2:"cx";i:50;s:2:"cy";i:51;s:2:"cz";i:52;s:1:"a";i:53;s:1:"b";i:54;s:1:"c";i:55;s:1:"d";i:56;s:1:"e";i:57;s:1:"f";i:58;s:1:"g";i:59;s:1:"h";i:60;s:1:"i";i:61;s:1:"j";i:62;s:1:"k";i:63;s:1:"l";i:64;s:1:"m";i:65;s:1:"n";i:66;s:1:"o";i:67;s:1:"p";i:68;s:1:"q";i:69;s:1:"r";i:70;s:1:"s";i:71;s:1:"t";i:72;s:1:"u";i:73;s:1:"v";i:74;s:1:"w";i:75;s:1:"x";i:76;s:1:"y";i:77;s:1:"z";}'); - - $sqlTemplate = "SELECT cal.idart, cal.online, aa.idartlang, cat.idcat FROM {TABLES} WHERE {WHERE} "; - - $tables = array(); - $where = array(); - - for ($i = 0; $i < $size; $i++) { - if ($i == 0) { // first - $tables[] = " " . $cfg['tab']['pica_alloc_con'] . " AS " . $sql_concat[$i]; - } else { - $tables[] = " LEFT JOIN " . $cfg['tab']['pica_alloc_con'] . " AS " . $sql_concat[$i] . " USING (idartlang)"; - } - if (is_int((int) $restrictions[$i]) AND $restrictions[$i] > 0) { - $where[] = $sql_concat[$i] . ".idpica_alloc = " . $restrictions[$i]; - } - } - - # fetch only articles which are online - $where[] = 'cal.online = 1'; - - # fetch only articles which are not in following categories - if (count($aCategoriesToExclude) > 0) { - $where[] = "cat.idcat NOT IN (" . implode(',', $aCategoriesToExclude) . ")"; - } - - // join art_lang for idart - $tables[] = " LEFT JOIN " . $this->table['art_lang'] . " AS cal USING (idartlang)"; - $tables[] = " LEFT JOIN " . $this->table['cat_art'] . " AS cart USING (idart)"; - $tables[] = " LEFT JOIN " . $this->table['cat'] . " as cat USING (idcat)"; - - $tables = implode('', $tables); - $where = implode(' AND ', $where); - - $sql = str_replace('{TABLES}', $tables, $sqlTemplate); - $sql = str_replace('{WHERE}', $where, $sql); - - $sql .= " ORDER BY cal.published DESC"; - - if ($max != 0 && is_integer($max)) { - $sql .= " LIMIT " . $max; - } - - if ($this->bDebug) { - print ""; - } # @modified 27.10.2005 - - return $sql; - } - - /** - * Search articles by content allocation and catgories - * @param array $aContentAllocation - * @param array $aCategories - * - * @return array of articles - */ - function findMatchingContentByContentAllocationByCategories($aContentAllocation, $aCategories = array(), $iOffset = 0, $iNumOfRows = 0) { - if (!is_array($aContentAllocation)) { - return array(); - } - - for ($i = 0; $i < count($aContentAllocation); $i++) { - if (!is_int((int) $aContentAllocation[$i]) OR ! $aContentAllocation[$i] > 0) { - return array(); - } - } - - for ($i = 0; $i < count($aCategories); $i++) { - if (!is_int((int) $aCategories[$i]) OR ! $aCategories[$i] > 0) { - return array(); - } - } - - $sql = $this->_buildQuery_MatchingContentByContentAllocationByCategories($aContentAllocation, $aCategories, $iOffset, $iNumOfRows); - - $this->db->query($sql); - - $aResult = array(); - while ($oRow = $this->db->getResultObject()) { - $aResult[] = $oRow; - } - return $aResult; - } - - /** - * build SQL query to find articles by content allocation and catgories - * - */ - function _buildQuery_MatchingContentByContentAllocationByCategories($aContentAllocation, $aCategories, $iOffset, $iNumOfRows) { - - global $cfg; - - $size = sizeof($aContentAllocation); - - $sql_concat = unserialize('a:78:{i:0;s:2:"aa";i:1;s:2:"ab";i:2;s:2:"ac";i:3;s:2:"ad";i:4;s:2:"ae";i:5;s:2:"af";i:6;s:2:"ag";i:7;s:2:"ah";i:8;s:2:"ai";i:9;s:2:"aj";i:10;s:2:"ak";i:11;s:2:"al";i:12;s:2:"am";i:13;s:2:"an";i:14;s:2:"ao";i:15;s:2:"ap";i:16;s:2:"aq";i:17;s:2:"ar";i:18;s:2:"as";i:19;s:2:"at";i:20;s:2:"au";i:21;s:2:"av";i:22;s:2:"aw";i:23;s:2:"ax";i:24;s:2:"ay";i:25;s:2:"az";i:26;s:2:"ca";i:27;s:2:"cb";i:28;s:2:"cc";i:29;s:2:"cd";i:30;s:2:"ce";i:31;s:2:"cf";i:32;s:2:"cg";i:33;s:2:"ch";i:34;s:2:"ci";i:35;s:2:"cj";i:36;s:2:"ck";i:37;s:2:"cl";i:38;s:2:"cm";i:39;s:2:"cn";i:40;s:2:"co";i:41;s:2:"cp";i:42;s:2:"cq";i:43;s:2:"cr";i:44;s:2:"cs";i:45;s:2:"ct";i:46;s:2:"cu";i:47;s:2:"cv";i:48;s:2:"cw";i:49;s:2:"cx";i:50;s:2:"cy";i:51;s:2:"cz";i:52;s:1:"a";i:53;s:1:"b";i:54;s:1:"c";i:55;s:1:"d";i:56;s:1:"e";i:57;s:1:"f";i:58;s:1:"g";i:59;s:1:"h";i:60;s:1:"i";i:61;s:1:"j";i:62;s:1:"k";i:63;s:1:"l";i:64;s:1:"m";i:65;s:1:"n";i:66;s:1:"o";i:67;s:1:"p";i:68;s:1:"q";i:69;s:1:"r";i:70;s:1:"s";i:71;s:1:"t";i:72;s:1:"u";i:73;s:1:"v";i:74;s:1:"w";i:75;s:1:"x";i:76;s:1:"y";i:77;s:1:"z";}'); - - $sqlTemplate = "SELECT cal.idart, cal.online, aa.idartlang, cat.idcat, aa.idpica_alloc FROM {TABLES} WHERE {WHERE} "; - - $tables = array(); - $where = array(); - - for ($i = 0; $i < $size; $i++) { - if ($i == 0) { // first - $tables[] = " " . $cfg['tab']['pica_alloc_con'] . " AS " . $sql_concat[$i]; - } else { - $tables[] = " LEFT JOIN " . $cfg['tab']['pica_alloc_con'] . " AS " . $sql_concat[$i] . " USING (idartlang)"; - } - if (is_int((int) $aContentAllocation[$i]) AND $aContentAllocation[$i] > 0) { - $where[] = $sql_concat[$i] . ".idpica_alloc = " . $aContentAllocation[$i]; - } - } - - # fetch only articles which are online - $where[] = 'cal.online = 1'; - - # fetch only articles in following categories - if (count($aCategories) > 0) { - $where[] = "cat.idcat IN (" . implode(',', $aCategories) . ")"; - } - - // join art_lang for idart - $tables[] = " LEFT JOIN " . $this->table['art_lang'] . " AS cal USING (idartlang)"; - $tables[] = " LEFT JOIN " . $this->table['cat_art'] . " AS cart USING (idart)"; - $tables[] = " LEFT JOIN " . $this->table['cat'] . " as cat USING (idcat)"; - - $tables = implode('', $tables); - $where = implode(' AND ', $where); - - $sql = str_replace('{TABLES}', $tables, $sqlTemplate); - $sql = str_replace('{WHERE}', $where, $sql); - - $sql .= " ORDER BY cal.published DESC"; - - if (is_integer($iNumOfRows) AND $iNumOfRows > 0) { - $sql .= " LIMIT " . $iOffset . ", " . $iNumOfRows; - } - - if ($this->bDebug) { - print ""; - } # @modified 27.10.2005 - - return $sql; - } - - /** - * Search articles by catgories without start articles - * @param array $aCategories - * @param int $iOffset - * @param int $iNumOfRows - * @param string $sResultType element of {article_id, object} - * - * @return array of articles - */ - function findMatchingContentByCategories($aCategories = array(), $iOffset = 0, $iNumOfRows = 0, $sResultType = '') { - - for ($i = 0; $i < count($aCategories); $i++) { - if (!is_int((int) $aCategories[$i]) OR ! $aCategories[$i] > 0) { - return array(); - } - } - - $sql = $this->_buildQuery_MatchingContentByCategories($aCategories, $iOffset, $iNumOfRows); - - $this->db->query($sql); - - $aResult = array(); - - while ($oRow = $this->db->getResultObject()) { - if ($sResultType == 'article_language_id') { - $aResult[] = $oRow->idartlang; - } else { - $aResult[] = $oRow; - } - } - return $aResult; - } - - /** - * build SQL query to find articles by catgories - * - */ - function _buildQuery_MatchingContentByCategories($aCategories, $iOffset, $iNumOfRows) { - - if (count($aCategories) > 0) { - $sWHERE_Category_IN = " c.idcat IN (" . implode(',', $aCategories) . ") AND "; - } else { - $sWHERE_Category_IN = ''; - } - if (is_integer($iNumOfRows) AND $iNumOfRows > 0) { - $sLimit = " LIMIT " . Contenido_Security::toInteger($iOffset) . ", " . Contenido_Security::toInteger($iNumOfRows); - } else { - $sLimit = ''; - } - - $sql = ' - SELECT - a.idart, a.online, a.idartlang, c.idcat - FROM - ' . $this->table['art_lang'] . ' AS a, - ' . $this->table['art'] . ' AS b, - ' . $this->table['cat_art'] . ' AS c, - ' . $this->table['cat_lang'] . ' AS d - WHERE - ' . $sWHERE_Category_IN . ' - b.idclient = ' . Contenido_Security::toInteger($this->client) . ' AND - a.idlang = ' . Contenido_Security::toInteger($this->lang) . ' AND - a.idartlang != d.startidartlang AND - a.online = 1 AND - c.idcat = d.idcat AND - b.idart = c.idart AND - a.idart = b.idart - ' . $sLimit . ' '; - - if ($this->bDebug) { - print ""; - } - - return $sql; - } - -} - -?> \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/classes/class.content_allocation_article.php b/conlite/plugins/cl-content-allocation/classes/class.content_allocation_article.php deleted file mode 100644 index a027f8f..0000000 --- a/conlite/plugins/cl-content-allocation/classes/class.content_allocation_article.php +++ /dev/null @@ -1,117 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * @since file available since contenido release <= 4.6 - * - * {@internal - * created unknown - * modified 2008-07-02, Frederic Schneider, add security fix - * - * $Id: class.content_allocation_article.php 128 2019-07-03 11:58:28Z oldperl $: - * }} - * - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -class pApiContentAllocationArticle extends pApiTree { - - var $tpl = null; - var $template = ''; - var $load = array(); - - public function __construct($uuid) { - global $cfg; - - parent::pApiTree($uuid); - $this->tpl = new Template; - $this->template = $cfg['pica']['treetemplate_article']; - } - - function _buildRenderTree($tree) { - global $action, $frame, $area, $sess, $idart; - - $result = array(); - foreach ($tree as $item_tmp) { - $item = array(); - - $expandCollapseImg = 'images/spacer.gif'; - $expandCollapse = ''; - - $item['ITEMNAME'] = $expandCollapse . ' ' . $item_tmp['name']; - - $item['ITEMINDENT'] = $item_tmp['level'] * 15 + 3; - - // set checked! - $checked = ''; - if (in_array($item_tmp['idpica_alloc'], $this->load)) { - $checked = ' checked="checked"'; - } - $item['CHECKBOX'] = ''; - - array_push($result, $item); - - if ($item_tmp['children']) { - $children = $this->_buildRenderTree($item_tmp['children']); - $result = array_merge($result, $children); - } - } - - return $result; - } - - function setChecked($load) { - $this->load = $load; - } - - function renderTree($return = true) { - $this->tpl->reset(); - - $tree = $this->fetchTree(); - if ($tree === false) { - return false; - } - - $tree = $this->_buildRenderTree($tree); - - $even = true; - foreach ($tree as $item) { - $even = !$even; - $bgcolor = ($even) ? '#FFFFFF' : '#F1F1F1'; - $this->tpl->set('d', 'BACKGROUND_COLOR', $bgcolor); - foreach ($item as $key => $value) { - $this->tpl->set('d', $key, $value); - } - $this->tpl->next(); - } - - $this->tpl->set('s', "CATEGORY", i18n("Category", "cl-content-allocation")); - - if ($return === true) { - return $this->tpl->generate($this->template, true); - } else { - $this->tpl->generate($this->template); - } - } - -} - -?> \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/classes/class.content_allocation_complexlist.php b/conlite/plugins/cl-content-allocation/classes/class.content_allocation_complexlist.php deleted file mode 100644 index 8879174..0000000 --- a/conlite/plugins/cl-content-allocation/classes/class.content_allocation_complexlist.php +++ /dev/null @@ -1,114 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * @since file available since contenido release <= 4.6 - * - * {@internal - * created unknown - * modified 2008-07-02, Frederic Schneider, add security fix - * - * $Id: class.content_allocation_complexlist.php 128 2019-07-03 11:58:28Z oldperl $: - * }} - * - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -class pApiContentAllocationComplexList extends pApiTree { - - var $idSetter = true; - var $load = array(); - - public function __construct($uuid) { - global $cfg; - parent::__construct($uuid); - } - - public function _buildRenderTree($tree) { - global $action, $frame, $area, $sess, $idart; - - $oldIdSetter = $this->idSetter; - $this->idSetter = false; - - $result = ''; - - $even = true; - - $levelElms = sizeof($tree); - $cnt = 1; - foreach ($tree as $item_tmp) { - $item = ''; - $checked = ''; - if (in_array($item_tmp['idpica_alloc'], $this->load)) { - $checked = ' checked="checked"'; - } - - $li_closeElm = ''; - if ($cnt == $levelElms) { - $li_closeElm = 'style="border-bottom: 0;"'; - } - $cnt++; - - $even = !$even; - $bgcolor = ($even) ? 'bright' : 'dark'; - - // for wrapping purposes - $item_tmp['name'] = str_replace('-', '- ', $item_tmp['name']); - - $checkbox = ''; - $item = "\n
  • " . $checkbox . " " . $item_tmp['name']; - - $result .= $item; - - if ($item_tmp['children']) { - $children = $this->_buildRenderTree($item_tmp['children']); - $result .= "\n
      " . $children . ""; - } else { - $result .= "\n"; - } - } - - if ($oldIdSetter === true) { - return "\n
        " . $result . "\n
      "; - } else { - return $result . "\n
    "; - } - } - - public function setChecked($load) { - $this->load = $load; - } - - public function renderTree($return = true) { - $tree = $this->fetchTree(); - if ($tree === false) { - return false; - } - - $tree = $this->_buildRenderTree($tree); - if ($return === true) { - return $tree; - } - } - -} - -?> \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/classes/class.content_allocation_selectbox.php b/conlite/plugins/cl-content-allocation/classes/class.content_allocation_selectbox.php deleted file mode 100644 index 9db8baa..0000000 --- a/conlite/plugins/cl-content-allocation/classes/class.content_allocation_selectbox.php +++ /dev/null @@ -1,87 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * @since file available since contenido release <= 4.6 - * - * $Id: class.content_allocation_selectbox.php 128 2019-07-03 11:58:28Z oldperl $: - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -class pApiContentAllocationSelectBox extends pApiTree { - - var $idSetter = true; - var $load = array(); - - public function __construct($uuid) { - global $cfg; - - parent::__construct($uuid); - } - - public function _buildRenderTree($tree) { - global $action, $frame, $area, $sess, $idart; - - $oldIdSetter = $this->idSetter; - $this->idSetter = false; - - $result = ''; - - $levelElms = sizeof($tree); - $cnt = 1; - foreach ($tree as $item_tmp) { - $item = ''; - - $spacer = '|-'; - $spacer = str_pad($spacer, (($item_tmp['level'] + 1) * 2), "--", STR_PAD_RIGHT); - - $result .= ''; - - if ($item_tmp['children']) { - $children = $this->_buildRenderTree($item_tmp['children']); - $result .= $children; - } - } - - return $result; - } - - public function setChecked($load) { - return false; - } - - /** - * - * @modified 27.10.2005 $bUseTreeStatus = false (content allocation tree in selectbox is always expanded) - */ - public function renderTree($return = true, $parentId = false, $bUseTreeStatus = false) { - - $tree = $this->fetchTree($parentId, 0, $bUseTreeStatus); - - if ($tree === false) { - return false; - } - - $tree = $this->_buildRenderTree($tree); - - if ($return === true) { - return $tree; - } else { - echo $tree; - } - } - -} - -?> \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/classes/class.content_allocation_tree.php b/conlite/plugins/cl-content-allocation/classes/class.content_allocation_tree.php deleted file mode 100644 index 9a02ae2..0000000 --- a/conlite/plugins/cl-content-allocation/classes/class.content_allocation_tree.php +++ /dev/null @@ -1,558 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * @since file available since contenido release <= 4.6 - * - * {@internal - * created unknown - * modified 2008-07-02, Frederic Schneider, add security fix - * - * $Id: class.content_allocation_tree.php 128 2019-07-03 11:58:28Z oldperl $: - * }} - * - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -/** - * Todo - * addslashes to all string db inserts - * check if default language exists if new entry is added (otherwise) - */ -class pApiTree { - - /** - * - */ - var $db = null; - - /** - * - */ - var $table = null; - - /** - * - */ - var $lang = 1; - - /** - * - */ - var $client = 1; - - /** - * - */ - var $defaultLang = 1; - - /** - * - */ - var $logger = null; - - /** - * - */ - var $user = null; - - /** - * - */ - var $treeStatus = array(); - - /** - * - */ - var $uuid = null; - - /** - * - */ - var $_arrInFilters = array('urlencode', 'clHtmlSpecialChars', 'addslashes'); - - /** - * - */ - var $_arrOutFilters = array('stripslashes', 'htmldecode', 'urldecode'); - - public function __construct($uuid) { - global $db, $cfg, $lang, $client, $auth; - - $this->db = new DB_ConLite; - $this->table = $cfg['tab']; - $this->lang = $lang; - $this->client = $client; - $this->bDebug = false; - - $this->uuid = $uuid; - - $this->user = new cApiUser($auth->auth["uid"]); - $this->loadTreeStatus(); - } - - /** - * - * @param mixed $parentId - * @param int $level - * @param boolean $bUseTreeStatus (if true use expand/collapsed status of the tree, otherwise not) - * @modified 27.10.2005 Willi Man - */ - function fetchTree($parentId = false, $level = 0, $bUseTreeStatus = true) { - - // fetch current lang category - $sql = "SELECT - tree.idpica_alloc, tree.parentid, tree.sortorder - FROM - " . $this->table['pica_alloc'] . " as tree"; - - if ($parentId === false) { // fetch from root node - $sql .= " WHERE tree.parentid = '0'"; - } else { // fetch by given id - $sql .= " WHERE tree.parentid = " . Contenido_Security::toInteger($parentId); - } - - $sql .= " ORDER BY sortorder ASC"; - - $this->db->query($sql); - - $result_tmp = array(); // tmp result array - while ($this->db->next_record()) { // walk resultset - $item = $this->_fetchItemNameLang($this->db->f('idpica_alloc')); - - $itemStatus = 'expanded'; - - if ($bUseTreeStatus) { # modified 27.10.2005 - if (is_array($this->treeStatus) && array_key_exists($this->db->f('idpica_alloc'), $this->treeStatus)) { - $itemStatus = 'collapsed'; - } - } - - $rs = array( - 'idpica_alloc' => $this->db->f('idpica_alloc'), - 'parentid' => ($this->db->f('parentid') == NULL) ? false : $this->db->f('parentid'), - 'sortorder' => $this->db->f('sortorder'), - 'name' => $this->_outFilter($item['name']), - 'idlang' => $item['idlang'], - 'level' => $level, - 'status' => $itemStatus, - 'online' => $item['online'] - ); - - array_push($result_tmp, $rs); // append recordset - } - - if (count($result_tmp) > 0) { - $result = array(); // result array - foreach ($result_tmp as $rs) { // run results - $children = $this->fetchTree($rs['idpica_alloc'], $level + 1, $bUseTreeStatus); - if ($children !== false && $rs['status'] == 'expanded') { - $rs['children'] = $children; - } - array_push($result, $rs); - } - return $result; - } else { - return false; - } - } - - /** - * Fetch content allocation tree - * Consider offline/online status - * - * @created 21.11.2005 Willi Man - * - * @param mixed $parentId - * @param int $level - * @return array with content allocation id's - */ - function fetchTreeIds($parentId = false, $level = 0, $showOffline = false) { - - // fetch current lang category - $sql = "SELECT - tree.idpica_alloc, tree.parentid, tree.sortorder - FROM - " . $this->table['pica_alloc'] . " as tree"; - - if ($parentId === false) { // fetch from root node - $sql .= " WHERE tree.parentid IS NULL"; - } else { // fetch by given id - $sql .= " WHERE tree.parentid = " . Contenido_Security::toInteger($parentId); - } - - $sql .= " ORDER BY sortorder ASC"; - - if ($this->bDebug) { - print ""; - } - - $this->db->query($sql); - - $result_tmp = array(); // tmp result array - while ($this->db->next_record()) { // walk resultset - $item = $this->_fetchItemNameLang($this->db->f('idpica_alloc')); - - if ($this->bDebug) { - print ""; - } - - if ($showOffline OR $item['online'] == 1) { - $rs = array( - 'idpica_alloc' => $this->db->f('idpica_alloc') - ); - - array_push($result_tmp, $rs); // append recordset - } - } - - if (count($result_tmp) > 0) { - $result = array(); // result array - foreach ($result_tmp as $rs) { // run results - $children = $this->fetchTreeIds($rs['idpica_alloc'], $level + 1, $bUseTreeStatus); - if ($children !== false) { - $rs['children'] = $children; - } - array_push($result, $rs); - } - return $result; - } else { - return false; - } - } - - function setTreeStatus($idpica_alloc) { - if (is_array($this->treeStatus) && array_key_exists($idpica_alloc, $this->treeStatus)) { // expand - unset($this->treeStatus[$idpica_alloc]); - } else { // collapse - $this->treeStatus[$idpica_alloc] = true; - } - $this->user->setProperty("expandstate", $this->_uuid, serialize($this->treeStatus)); - } - - function loadTreeStatus() { - $status = $this->user->getProperty("expandstate", $this->_uuid); - if ($status !== false) { - $this->treeStatus = unserialize($status); - } - } - - function fetchParent($idpica_alloc) { - $sql = "SELECT idpica_alloc FROM " . $this->table['pica_alloc'] . " WHERE parentId = " . Contenido_Security::toInteger($idpica_alloc); - $this->db->query($sql); - - if ($this->db->next_record()) { - return $this->fetchItem($this->db->f('idpica_alloc')); - } else { - return false; - } - } - - function fetchParents() { - - } - - function fetchLevel($parentId = false, $showOffline = false) { - // fetch current lang category - $sql = "SELECT - tree.idpica_alloc, tree.parentid, tree.sortorder - FROM - " . $this->table['pica_alloc'] . " as tree - LEFT JOIN " . $this->table['pica_lang'] . " as treelang USING (idpica_alloc)"; - - if ($parentId === false) { // fetch from root node - $sql .= " WHERE tree.parentid IS NULL"; - } else { // fetch by given id - $sql .= " WHERE tree.parentid = " . Contenido_Security::toInteger($parentId); - } - - if ($showOffline === false) { - $sql .= " AND treelang.online = 1"; - } - - $sql .= " ORDER BY sortorder ASC"; - - $this->db->query($sql); - - $result_tmp = array(); // tmp result array - while ($this->db->next_record()) { // walk resultset - $item = $this->_fetchItemNameLang($this->db->f('idpica_alloc')); - - $itemStatus = 'expanded'; - if (is_array($this->treeStatus) && array_key_exists($this->db->f('idpica_alloc'), $this->treeStatus)) { - $itemStatus = 'collapsed'; - } - - $rs = array( - 'idpica_alloc' => $this->db->f('idpica_alloc'), - 'parentid' => ($this->db->f('parentid') == NULL) ? false : $this->db->f('parentid'), - 'sortorder' => $this->db->f('sortorder'), - 'name' => $this->_outFilter($item['name']), - 'idlang' => $item['idlang'], - 'level' => 0, - 'status' => $itemStatus, - 'online' => $item['online'] - ); - - array_push($result_tmp, $rs); // append recordset - } - - return $result_tmp; - } - - function storeItem($treeItem) { - - if (!$treeItem['idpica_alloc']) { // insert - $treeItem['idpica_alloc'] = $this->db->nextid($this->table['pica_alloc']); - $treeItem['sortorder'] = $this->_fetchMaxOrder($treeItem['parentid']) + 1; - - if ($treeItem['parentid'] == 'root') { - $treeItem['parentid'] = 'NULL'; - } - - $treeItem['name'] = $this->_inFilter($treeItem['name']); - - $sql = "INSERT INTO " . $this->table['pica_alloc'] . " - (idpica_alloc, parentid, sortorder) - VALUES - (" . Contenido_Security::toInteger($treeItem['idpica_alloc']) . ", " . Contenido_Security::toInteger($treeItem['parentid']) . ", " . Contenido_Security::toInteger($treeItem['sortorder']) . ")"; - $this->db->query($sql); - - $sql = "INSERT INTO " . $this->table['pica_lang'] . " - (idpica_alloc, idlang, name) - VALUES - (" . Contenido_Security::toInteger($treeItem['idpica_alloc']) . ", " . Contenido_Security::toInteger($this->lang) . ", '" . Contenido_Security::escapeDB($treeItem['name'], $this->db) . "')"; - $this->db->query($sql); - } else { // update - $treeItem['name'] = $this->_inFilter($treeItem['name']); - - $sql = "SELECT * FROM " . $this->table['pica_lang'] . " WHERE idpica_alloc = " . Contenido_Security::toInteger($treeItem['idpica_alloc']) . " AND idlang = " . Contenido_Security::toInteger($this->lang); - $this->db->query($sql); - - if ($this->db->num_rows() > 0) { - #Update existing translation - $sql = "UPDATE " . $this->table['pica_lang'] . " SET name = '" . Contenido_Security::escapeDB($treeItem['name'], $this->db) . "' WHERE idpica_alloc = " . Contenido_Security::toInteger($treeItem['idpica_alloc']) . " - AND idlang = " . Contenido_Security::toInteger($this->lang); - } else { - #Get current online status for item - $sql = "SELECT * FROM " . $this->table['pica_lang'] . " WHERE idpica_alloc = " . $treeItem['idpica_alloc'] . " ORDER BY idlang"; - $this->db->query($sql); - - if ($this->db->next_record()) { - $online_status = $this->db->f('online'); - } else { - $online_status = 0; - } - - #Insert new translation - $sql = "INSERT INTO " . $this->table['pica_lang'] . "(idpica_alloc, idlang, name, online) VALUES ( " . Contenido_Security::toInteger($treeItem['idpica_alloc']) . ", " . Contenido_Security::toInteger($this->lang) . ", - '" . Contenido_Security::escapeDB($treeItem['name'], $this->db) . "', " . Contenido_Security::toInteger($online_status) . ")"; - } - - $this->db->query($sql); - } - - return $treeItem; - } - - function setOnline($idpica_alloc) { - $this->_switchOnOffline($idpica_alloc, 1); - } - - function setOffline($idpica_alloc) { - $this->_switchOnOffline($idpica_alloc, 0); - } - - function _switchOnOffline($idpica_alloc, $status) { - $sql = "UPDATE " . $this->table['pica_lang'] . " SET online = " . Contenido_Security::toInteger($status) . " WHERE idpica_alloc = " . Contenido_Security::toInteger($idpica_alloc) . " - AND idlang = " . Contenido_Security::toInteger($this->lang); - $this->db->query($sql); - } - - function itemMoveUp($idpica_alloc) { - $treeItem = $this->fetchItem($idpica_alloc); - $treeItem_old = $treeItem; - $treeItem['sortorder'] --; - - if ($treeItem['sortorder'] < $treeItem_old['sortorder']) { - if ($treeItem['sortorder'] >= 1) { - $this->_decreaseOrder($treeItem['parentid'], $treeItem_old['sortorder']); - $this->_increaseOrder($treeItem['parentid'], $treeItem['sortorder']); - } else { - $treeItem['sortorder'] = $treeItem_old['sortorder']; - } - } - - $sql = "UPDATE " . $this->table['pica_alloc'] . " SET sortorder = " . $treeItem['sortorder'] . " WHERE idpica_alloc = " . Contenido_Security::toInteger($idpica_alloc); - $this->db->query($sql); - } - - function itemMoveDown() { - - } - - function deleteItem($idpica_alloc) { - $sql = "DELETE FROM " . $this->table['pica_alloc'] . " WHERE idpica_alloc = " . Contenido_Security::toInteger($idpica_alloc); - $this->db->query($sql); - - $sql = "DELETE FROM " . $this->table['pica_lang'] . " WHERE idpica_alloc = " . Contenido_Security::toInteger($idpica_alloc); - $this->db->query($sql); - - $sql = "DELETE FROM " . $this->table['pica_alloc_con'] . " WHERE idpica_alloc = " . Contenido_Security::toInteger($idpica_alloc); - $this->db->query($sql); - } - - function fetchItem($idpica_alloc) { - $sql = "SELECT parentid, sortorder FROM " . $this->table['pica_alloc'] . " WHERE idpica_alloc = " . $idpica_alloc; - $this->db->query($sql); - - $item = $this->_fetchItemNameLang($idpica_alloc); - - if ($this->db->next_record()) { - $row = array( - 'idpica_alloc' => $idpica_alloc, - 'parentid' => ($this->db->f('parentid') == NULL) ? false : $this->db->f('parentid'), - 'sortorder' => $this->db->f('sortorder'), - 'name' => $item['name'], - 'idlang' => $item['idlang'], - 'online' => $item['online'] - ); - return $row; - } else { - return false; - } - } - - function _fetchItemNameLang($idpica_alloc) { - $oDB = new DB_ConLite; // temp instance - - $sSQL = "SELECT name, idlang, online FROM " . $this->table['pica_lang'] . " WHERE idpica_alloc = " . Contenido_Security::toInteger($idpica_alloc) . " AND idlang = " . Contenido_Security::toInteger($this->lang); - $oDB->query($sSQL); - - $aResult = array(); - if ($oDB->next_record()) { // item found for this language - $aResult['name'] = $this->_outFilter($oDB->f('name')); - $aResult['idlang'] = $oDB->f('idlang'); - $aResult['online'] = $oDB->f('online'); - } else { // no item in this language found - // fetch alternative language name - // HerrB, 2008-04-21: Get all translations, try to use defaultLang translation, use - // first available, otherwise. Only using defaultLang results in "ghost" elements, if - // created in a non-default language. See CON-110 for details. - $sSQL = "SELECT name, idlang, online FROM " . $this->table['pica_lang'] . " WHERE idpica_alloc = " . Contenido_Security::toInteger($idpica_alloc) . " ORDER BY idlang"; - $oDB->query($sSQL); - - $aNames = array(); - while ($oDB->next_record()) { - $sKey = "k" . $oDB->f('idlang'); - - $aNames[$sKey] = array(); - $aNames[$sKey]['name'] = $this->_outFilter($oDB->f('name')); - $aNames[$sKey]['idlang'] = $oDB->f('idlang'); - $aNames[$sKey]['online'] = $oDB->f('online'); - } - - if ($aNames["k" . $this->defaultLang]) { - // defaultLang translation available - $aResult = $aNames["k" . $this->defaultLang]; - } else { - // no defaultLang translation available, use first in line (reset returns first element) - $aResult = reset($aNames); - } - } - unset($oDB); - unset($aNames); - - return $aResult; - } - - function _fetchMaxOrder($parentId = false) { - - if ($parentId == 'root') { - $parentId = false; - } - - $sql = "SELECT MAX(sortorder) as max FROM " . $this->table['pica_alloc']; - if ($parentId === false) { - $sql .= " WHERE parentid = 0"; - } else { - $sql .= " WHERE parentid = " . Contenido_Security::toInteger($parentId); - } - $this->db->query($sql); - if ($this->db->next_record()) { - return $this->db->f('max'); - } else { - return 0; - } - } - - function _decreaseOrder($parentId = false, $fromOrder) { - $sql = "UPDATE " . $this->table['pica_alloc'] . " SET sortorder = sortorder - 1 WHERE sortorder >= " . Contenido_Security::toInteger($fromOrder); - if ($parentId === false) { - $sql .= " AND parentid IS NULL"; - } else { - $sql .= " AND parentid = " . Contenido_Security::toInteger($parentId); - } - $this->db->query($sql); - } - - function _increaseOrder($parentId = false, $fromOrder) { - $sql = "UPDATE " . $this->table['pica_alloc'] . " SET sortorder = sortorder + 1 WHERE sortorder >= " . Contenido_Security::toInteger($fromOrder); - if ($parentId === false) { - $sql .= " AND parentid IS NULL"; - } else { - $sql .= " AND parentid = " . Contenido_Security::toInteger($parentId); - } - $this->db->query($sql); - } - - function setFilters($arrInFilters = array(), $arrOutFilters = array()) { - $this->_arrInFilters = $arrInFilters; - $this->_arrOutFilters = $arrOutFilters; - } - - function _inFilter($data) { - foreach ($this->_arrInFilters as $_function) { - if (function_exists($_function)) { - $data = $_function($data); - } - } - - return $data; - } - - function _outFilter($data) { - foreach ($this->_arrOutFilters as $_function) { - if (function_exists($_function)) { - $data = $_function($data); - } - } - - return $data; - } - -} - -?> \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/classes/class.content_allocation_treeview.php b/conlite/plugins/cl-content-allocation/classes/class.content_allocation_treeview.php deleted file mode 100644 index 9962a06..0000000 --- a/conlite/plugins/cl-content-allocation/classes/class.content_allocation_treeview.php +++ /dev/null @@ -1,234 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * @since file available since contenido release <= 4.6 - * - * {@internal - * created unknown - * modified 2008-06-26, Timo Trautmann, changed post var from treeItem to treeItemPost (security issue) - * modified 2008-07-02, Frederic Schneider, add security fix - * - * $Id: class.content_allocation_treeview.php 128 2019-07-03 11:58:28Z oldperl $: - * }} - * - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -/** - * Todo - * - generalize this and papitree !!!! - * - Comments! - */ -class pApiContentAllocationTreeView extends pApiTree { - - /** - * - */ - var $tpl = null; - - /** - * - */ - var $template = ''; - - /** - * - */ - public function __construct($uuid) { - global $cfg; - - parent::__construct($uuid); - $this->tpl = new Template; - $this->template = $cfg['pica']['treetemplate']; - } - - /** - * - */ - function _buildRenderTree($tree) { - global $action, $frame, $area, $sess; - $result = array(); - foreach ($tree as $item_tmp) { - $item = array(); - - // update item - if ($_GET['step'] == 'rename' && $item_tmp['idpica_alloc'] == $_GET['idpica_alloc']) { - $item = array(); - - $item['ITEMNAME'] = ' - - - - - - - - - - - - -
      - - -
    - '; - } else { - if ($item_tmp['children'] || $item_tmp['status'] == 'collapsed') { - $expandCollapseImg = 'images/close_all.gif'; - if ($item_tmp['status'] == 'collapsed') { - $expandCollapseImg = 'images/open_all.gif'; - } - - $expandCollapse = ''; - } else { - $expandCollapseImg = 'images/spacer.gif'; - $expandCollapse = ''; - } - - $item['ITEMNAME'] = $expandCollapse . ' ' . $item_tmp['name']; - } - - $item['ITEMINDENT'] = $item_tmp['level'] * 15 + 3; - $item['ACTION_CREATE'] = '' . i18n('; - - $item['ACTION_RENAME'] = '' . i18n('; - $item['ACTION_MOVE_UP'] = (count($result) >= 1) ? '' . i18n(' : ''; - $item['ACTION_MOVE_DOWN'] = (count($result) >= 1) ? '' . i18n(' : ''; - $item['ACTION_MOVE_DOWN'] = ''; - - if ($item_tmp['online'] == 1) { // set offline - $item['ACTION_ONOFFLINE'] = '' . i18n('; - } else { - $item['ACTION_ONOFFLINE'] = '' . i18n('; - } - - if ($item_tmp['children']) { - $item['ACTION_DELETE'] = '' . i18n('; - } else { - $item['ACTION_DELETE'] = '
    ' . str_replace("'", "\'", $item_tmp['name']) . '","deleteCategory(' . $item_tmp['idpica_alloc'] . ')");">' . i18n(
    '; - } - - array_push($result, $item); - - if ($item_tmp['children']) { - $children = $this->_buildRenderTree($item_tmp['children']); - $result = array_merge($result, $children); - } - - // add new item -> show formular - if ($_GET['step'] == 'add' && $item_tmp['idpica_alloc'] == $_GET['parentid']) { - $item = array(); - - $item['ITEMNAME'] = ' - - - - - - - - - - - - -
      - - -
    - '; - $item['ITEMINDENT'] = ($item_tmp['level'] + 1) * 15; - $item['ACTION_CREATE'] = ''; - $item['ACTION_RENAME'] = ''; - $item['ACTION_MOVE_UP'] = ''; - $item['ACTION_MOVE_DOWN'] = ''; - $item['ACTION_MOVE_DOWN'] = ''; - $item['ACTION_DELETE'] = ''; - $item['ACTION_ONOFFLINE'] = ''; - - array_push($result, $item); - } - } - return $result; - } - - /** - * - */ - function renderTree($return = true) { - $this->tpl->reset(); - - $tree = $this->fetchTree(false, 0, true); # modified 27.10.2005 - - if ($tree === false) { - return false; - } - - $tree = $this->_buildRenderTree($tree); - - $even = true; - foreach ($tree as $item) { - $even = !$even; - $bgcolor = ($even) ? '#FFFFFF' : '#F1F1F1'; - $this->tpl->set('d', 'BACKGROUND_COLOR', $bgcolor); - foreach ($item as $key => $value) { - $this->tpl->set('d', $key, $value); - } - $this->tpl->next(); - } - - $this->tpl->set('s', 'CATEGORY', i18n("Category", "cl-content-allocation")); - $this->tpl->set('s', 'ACTIONS', i18n("Actions", "cl-content-allocation")); - - if ($return === true) { - return $this->tpl->generate($this->template, true); - } else { - $this->tpl->generate($this->template); - } - } - -} - -?> \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/images/arrow.gif b/conlite/plugins/cl-content-allocation/images/arrow.gif deleted file mode 100644 index 5424e1d..0000000 Binary files a/conlite/plugins/cl-content-allocation/images/arrow.gif and /dev/null differ diff --git a/conlite/plugins/cl-content-allocation/images/call_contentallocation.gif b/conlite/plugins/cl-content-allocation/images/call_contentallocation.gif deleted file mode 100644 index 8f5165a..0000000 Binary files a/conlite/plugins/cl-content-allocation/images/call_contentallocation.gif and /dev/null differ diff --git a/conlite/plugins/cl-content-allocation/images/normal.gif b/conlite/plugins/cl-content-allocation/images/normal.gif deleted file mode 100644 index 035c42c..0000000 Binary files a/conlite/plugins/cl-content-allocation/images/normal.gif and /dev/null differ diff --git a/conlite/plugins/cl-content-allocation/includes/config.autoloader.php b/conlite/plugins/cl-content-allocation/includes/config.autoloader.php deleted file mode 100644 index 35e2e67..0000000 --- a/conlite/plugins/cl-content-allocation/includes/config.autoloader.php +++ /dev/null @@ -1,30 +0,0 @@ - - * @copyright 2015 CL-Team - * @link http://www.conlite.org - * - * $Id: config.autoloader.php 128 2019-07-03 11:58:28Z oldperl $ - */ - -if(!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -$sAutoloadClassPath = 'conlite/plugins/cl-content-allocation/classes/'; -return array( - 'pApiContentAllocation' => $sAutoloadClassPath.'class.content_allocation.php', - 'pApiContentAllocationArticle' => $sAutoloadClassPath.'class.content_allocation_article.php', - 'pApiContentAllocationComplexList' => $sAutoloadClassPath.'class.content_allocation_complexlist.php', - 'pApiContentAllocationSelectBox' => $sAutoloadClassPath.'class.content_allocation_selectbox.php', - 'pApiTree' => $sAutoloadClassPath.'class.content_allocation_tree.php', - 'pApiContentAllocationTreeView' => $sAutoloadClassPath.'class.content_allocation_treeview.php' -); -?> \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/includes/config.plugin.php b/conlite/plugins/cl-content-allocation/includes/config.plugin.php deleted file mode 100644 index 5eed995..0000000 --- a/conlite/plugins/cl-content-allocation/includes/config.plugin.php +++ /dev/null @@ -1,57 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * @since file available since contenido release <= 4.6 - * - * {@internal - * created unknown - * modified 2008-07-02, Frederic Schneider, add security fix - * - * $Id: config.plugin.php 128 2019-07-03 11:58:28Z oldperl $: - * }} - * - */ - -if(!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -// plugin_variables -$cfg['tab']['pica_alloc'] = $cfg['sql']['sqlprefix'].'_pica_alloc'; -$cfg['tab']['pica_alloc_con'] = $cfg['sql']['sqlprefix'].'_pica_alloc_con'; -$cfg['tab']['pica_lang'] = $cfg['sql']['sqlprefix'].'_pica_lang'; - -$cfg['pica']['logpath'] = $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'repository/log/data/'; -$cfg['pica']['loglevel'] = 'warn'; -$cfg['pica']['treetemplate'] = $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-content-allocation/templates/template.tree_structure.html'; -$cfg['pica']['treetemplate_article'] = $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-content-allocation/templates/template.tree_article.html'; -$cfg['pica']['treetemplate_complexlist'] = $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-content-allocation/templates/template.tree_complexlist.html'; - -$cfg['pica']['style_complexlist'] = $cfg['path']['contenido_fullhtml'] . $cfg['path']['plugins'] . 'cl-content-allocation/style/complexlist.css'; -$cfg['pica']['script_complexlist'] = $cfg['path']['contenido_fullhtml'] . $cfg['path']['plugins'] . 'cl-content-allocation/scripts/complexlist.js'; - -// administration > users > area translations -global $lngAct, $_cecRegistry; -$lngAct['con_contentallocation']['storeallocation'] = i18n("Store content allocations", "cl-content-allocation"); - -plugin_include('cl-content-allocation', 'includes/functions.chains.php'); - -$_cecRegistry->addChainFunction("Contenido.Article.RegisterCustomTab", "pica_RegisterCustomTab"); -$_cecRegistry->addChainFunction("Contenido.Article.GetCustomTabProperties", "pica_GetCustomTabProperties"); -?> \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/includes/functions.chains.php b/conlite/plugins/cl-content-allocation/includes/functions.chains.php deleted file mode 100644 index 93bbd11..0000000 --- a/conlite/plugins/cl-content-allocation/includes/functions.chains.php +++ /dev/null @@ -1,67 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * @since file available since contenido release <= 4.6 - * - * {@internal - * created unknown - * modified 2008-07-02, Frederic Schneider, add security fix - * - * $Id: functions.chains.php 128 2019-07-03 11:58:28Z oldperl $: - * }} - * - */ - -if(!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -function pica_RegisterCustomTab () -{ - return array("con_contentallocation"); -} - -function pica_GetCustomTabProperties ($sIntName) -{ - if ($sIntName == "con_contentallocation") - { - return array("con_contentallocation", "con_edit", ""); - } -} - -function pica_ArticleListActions ($aActions) -{ - $aTmpActions["con_contentallocation"] = "con_contentallocation"; - - return $aTmpActions + $aActions; -} - -function pica_RenderArticleAction ($idcat, $idart, $idartlang, $actionkey) -{ - global $sess; - - if ($actionkey == "con_contentallocation") - { - return ''; - - } else { - return ""; - } -} -?> \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/includes/include.contentallocation_article.php b/conlite/plugins/cl-content-allocation/includes/include.contentallocation_article.php deleted file mode 100644 index 4b478b5..0000000 --- a/conlite/plugins/cl-content-allocation/includes/include.contentallocation_article.php +++ /dev/null @@ -1,132 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * @since file available since contenido release <= 4.6 - * - * {@internal - * created unknown - * modified 2008-07-02, Frederic Schneider, add security fix - * - * $Id: include.contentallocation_article.php 128 2019-07-03 11:58:28Z oldperl $: - * }} - * - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -// check requests -Contenido_Security::checkRequests(); - -if (!($perm->have_perm_area_action($area, "storeallocation") || $perm->have_perm_area_action_item($area, "storeallocation", $idcat))) { - $notification->displayNotification("error", i18n("Permission denied", "cl-content-allocation")); - return; -} - -cInclude("includes", "functions.pathresolver.php"); - -function str_replace_recursive($array) { - if (!is_array($array)) - return false; - - $result = array(); - - foreach ($array as $value) { - $result[] = str_replace("e", "", $value); - } - - return $result; -} - -// fetch idartlang for idart -$sql = "SELECT idartlang FROM " . $cfg['tab']['art_lang'] . " WHERE idart=" . Contenido_Security::toInteger($idart) . " AND idlang=" . Contenido_Security::toInteger($lang); -$db->query($sql); -$db->next_record(); -$this_idartlang = $db->f('idartlang'); - -$oPage = new cPage; -$oPage->setMargin(10); - -$oTree = new pApiContentAllocationComplexList('06bd456d-fe76-40cb-b041-b9ba90dc400a'); -$oAlloc = new pApiContentAllocation; - -if ($_POST['action'] == 'storeallocation') { - $oAlloc->storeAllocations($this_idartlang, $_POST['allocation']); -} -if ($_GET['step'] == 'collapse') { - $oTree->setTreeStatus($_GET['idpica_alloc']); -} - -#build category path -$catString = ''; -prCreateURLNameLocationString($idcat, '/', $catString); -$oArticle = new Article($idart, $client, $lang); -$sArticleTitle = $oArticle->getField('title'); - -$sLocationString = "
    " . $catString . '/' . clHtmlSpecialChars($sArticleTitle) . "
    "; - -// load allocations -$loadedAllocations = $oAlloc->loadAllocations($this_idartlang); - -$oTree->setChecked($loadedAllocations); -$result = $oTree->renderTree(true); - -if ($result == false) { - $result = $notification->returnNotification("warning", i18n('There is no Content Allocation tree.', "cl-content-allocation")); -} else { - if (!is_object($tpl)) { - $tpl = new Template; - } - $hiddenfields = ' - - - - - '; - $tpl->set('s', 'HIDDENFIELDS', $hiddenfields); - - - if (sizeof($loadedAllocations) > 0) { - $tpl->set('s', 'ARRAY_CHECKED_BOXES', 'var checkedBoxes = [' . implode(',', $loadedAllocations) . '];'); - } else { - $tpl->set('s', 'ARRAY_CHECKED_BOXES', 'var checkedBoxes = [];'); - } - - $oDiv = new cHTMLDiv; - $oDiv->updateAttributes(array('style' => 'text-align: right; padding: 5px; width: 730px; border: 1px #B3B3B3 solid; background-color: #FFFFFF;')); - $oDiv->setContent(''); - $tpl->set('s', 'DIV', '
    ' . $oDiv->render()); - - $tpl->set('s', 'TREE', $result); - - $tpl->set('s', 'REMOVE_ALL', i18n("Remove all", "cl-content-allocation")); - $tpl->set('s', 'REMOVE', i18n("Remove", "cl-content-allocation")); - - $result = $tpl->generate($cfg['pica']['treetemplate_complexlist'], true); - - $script = ' - '; - $oPage->addScript('style', $script); -} - - -$oPage->setContent($sLocationString . $result . markSubMenuItem(5, true)); -$oPage->render(); -?> \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/includes/include.left_bottom.php b/conlite/plugins/cl-content-allocation/includes/include.left_bottom.php deleted file mode 100644 index 6b52801..0000000 --- a/conlite/plugins/cl-content-allocation/includes/include.left_bottom.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright 2017 CL-Team - * @link http://www.conlite.org - * - * $Id: include.left_bottom.php 128 2019-07-03 11:58:28Z oldperl $ - */ - -if(!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -$oPage = new cPage(); -$oPage->setHtml5(); - -$oPage->render(); \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/includes/include.left_top.php b/conlite/plugins/cl-content-allocation/includes/include.left_top.php deleted file mode 100644 index c1b7e79..0000000 --- a/conlite/plugins/cl-content-allocation/includes/include.left_top.php +++ /dev/null @@ -1,39 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * @since file available since contenido release <= 4.6 - * - * {@internal - * created unknown - * modified 2008-07-02, Frederic Schneider, add security fix - * - * $Id: include.left_top.php 128 2019-07-03 11:58:28Z oldperl $: - * }} - * - */ - -if(!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -$oPage = new UI_Left_Top; - -$oPage->render(); - -?> \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/includes/include.right_bottom.php b/conlite/plugins/cl-content-allocation/includes/include.right_bottom.php deleted file mode 100644 index 78fe39c..0000000 --- a/conlite/plugins/cl-content-allocation/includes/include.right_bottom.php +++ /dev/null @@ -1,164 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * @since file available since contenido release <= 4.6 - * - * {@internal - * created unknown - * modified 2008-07-02, Frederic Schneider, add security fix - * - * $Id: include.right_bottom.php 128 2019-07-03 11:58:28Z oldperl $: - * }} - * - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -if (isset($_REQUEST['treeItem'])) { - die('Illegal call!'); -} - -#added 24.06.08 timo.trautmann security fix filter submitted treeItemPost array before insertion, name also changed according to security fix -$aPostTreeItem = array(); -if (!is_object($db)) { - $db = new DB_ConLite(); -} - -if (isset($_REQUEST['treeItemPost']['idpica_alloc'])) { - $aPostTreeItem['idpica_alloc'] = (int) $_REQUEST['treeItemPost']['idpica_alloc']; -} - -if (isset($_REQUEST['treeItemPost']['parentid'])) { - $aPostTreeItem['parentid'] = (int) $_REQUEST['treeItemPost']['parentid']; -} - -if (isset($_REQUEST['treeItemPost']['name'])) { - $sName = stripslashes($_REQUEST['treeItemPost']['name']); - $sName = $db->escape($sName); - $aPostTreeItem['name'] = $sName; -} - -$_GET['idpica_alloc'] = (int) $_GET['idpica_alloc']; -#end added 24.06.08 timo.trautmann - -$oPage = new cPage(); -$oPage->setMargin(10); -$oPage->setMessageBox(); -$oTree = new pApiContentAllocationTreeView('f7771624-4874-4745-8b7e-21a49a71a447'); - -// store item -if ($_POST['step'] == 'store') { - $pNotify = '
    '; - $sMessage = sprintf(i18n("New Category %s successfully stored!", "cl-content-allocation"), $treeItem['name']); - $notification->displayNotification("info", $sMessage); - $pNotify .= '
    '; - $oTree->storeItem($aPostTreeItem); -} -// rename item -if ($_POST['step'] == 'storeRename') { - $pNotify = '
    '; - $sMessage = sprintf(i18n("Category %s successfully renamed!", "cl-content-allocation"), $treeItem['name']); - $notification->displayNotification("info", $sMessage); - $pNotify .= '
    '; - $oTree->storeItem($aPostTreeItem); -} -// rename item -if ($_GET['step'] == 'moveup') { - $oTree->itemMoveUp($_GET['idpica_alloc']); -} - -if ($_GET['step'] == 'deleteItem') { // delete item - $pNotify = '
    '; - $sMessage = i18n("Category successfully deleted!", "cl-content-allocation"); - $notification->displayNotification("info", $sMessage); - $pNotify .= '
    '; - $oTree->deleteItem($_GET['idpica_alloc']); -} -if ($_GET['step'] == 'collapse') { - $oTree->setTreeStatus($_GET['idpica_alloc']); -} -if ($_GET['step'] == 'online') { - $oTree->setOnline($_GET['idpica_alloc']); -} -if ($_GET['step'] == 'offline') { - $oTree->setOffline($_GET['idpica_alloc']); -} - -$oDiv = new cHTMLDiv; -$oDiv->updateAttributes(array('style' => 'padding: 5px; width: 400px; border: 1px #B3B3B3 solid; background-color: #FFFFFF;')); -$sTemp = ''; - -if ($_GET['step'] == 'createRoot') { // create new root item - $form = ' - - - - - - - - - - - - - - -
    ' . i18n("Create new tree", "cl-content-allocation") . '
      -
    - '; - $oDiv->setContent($form); - $sTemp = $oDiv->render(); -} else { - $newTree = '' . i18n("Create new tree", "cl-content-allocation") . '
    '; -} - -$result = $oTree->renderTree(true); - -if ($result === false) { - $result = ' '; -} - -$js = ' -'; - -$oPage->addScript('deleteCategory', $js); - -$oPage->setContent($pNotify . $newTree . $sTemp . '
    ' . $result); -$oPage->render(); -?> \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/locale/cl-content-allocation.pot b/conlite/plugins/cl-content-allocation/locale/cl-content-allocation.pot deleted file mode 100644 index d7ac312..0000000 --- a/conlite/plugins/cl-content-allocation/locale/cl-content-allocation.pot +++ /dev/null @@ -1,109 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-18 10:55+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: includes/config.plugin.php:59 -msgid "Store content allocations" -msgstr "" - -#: includes/include.contentallocation_article.php:86 -msgid "There is no Content Allocation tree." -msgstr "" - -#: includes/include.contentallocation_article.php:111 -msgid "Remove all" -msgstr "" - -#: includes/include.contentallocation_article.php:112 -msgid "Remove" -msgstr "" - -#: includes/include.right_bottom.php:70 -#, php-format -msgid "New Category %s successfully stored!" -msgstr "" - -#: includes/include.right_bottom.php:78 -#, php-format -msgid "Category %s successfully renamed!" -msgstr "" - -#: includes/include.right_bottom.php:90 -msgid "Category successfully deleted!" -msgstr "" - -#: includes/include.right_bottom.php:119 includes/include.right_bottom.php:142 -msgid "Create new tree" -msgstr "" - -#: includes/include.right_bottom.php:132 -msgid "Please enter a category name." -msgstr "" - -#: includes/functions.chains.php:61 -msgid "Content Allocation" -msgstr "" - -#: classes/class.content_allocation_treeview.php:100 -#: classes/class.content_allocation_treeview.php:176 -msgid "Please enter a category name" -msgstr "" - -#: classes/class.content_allocation_treeview.php:124 -msgid "New category" -msgstr "" - -#: classes/class.content_allocation_treeview.php:126 -msgid "Rename category" -msgstr "" - -#: classes/class.content_allocation_treeview.php:127 -msgid "Move category up" -msgstr "" - -#: classes/class.content_allocation_treeview.php:128 -msgid "Move category down" -msgstr "" - -#: classes/class.content_allocation_treeview.php:132 -msgid "Set category offline" -msgstr "" - -#: classes/class.content_allocation_treeview.php:134 -msgid "Set category online" -msgstr "" - -#: classes/class.content_allocation_treeview.php:138 -msgid "One or more subcategories exist, unable to delete" -msgstr "" - -#: classes/class.content_allocation_treeview.php:140 -msgid "Delete category" -msgstr "" - -#: classes/class.content_allocation_treeview.php:140 -msgid "Are you sure to delete the following category" -msgstr "" - -#: classes/class.content_allocation_treeview.php:223 -#: classes/class.content_allocation_article.php:107 -msgid "Category" -msgstr "" - -#: classes/class.content_allocation_treeview.php:224 -msgid "Actions" -msgstr "" diff --git a/conlite/plugins/cl-content-allocation/locale/de_DE/LC_MESSAGES/cl-content-allocation.mo b/conlite/plugins/cl-content-allocation/locale/de_DE/LC_MESSAGES/cl-content-allocation.mo deleted file mode 100644 index d6dd69c..0000000 Binary files a/conlite/plugins/cl-content-allocation/locale/de_DE/LC_MESSAGES/cl-content-allocation.mo and /dev/null differ diff --git a/conlite/plugins/cl-content-allocation/locale/de_DE/LC_MESSAGES/cl-content-allocation.po b/conlite/plugins/cl-content-allocation/locale/de_DE/LC_MESSAGES/cl-content-allocation.po deleted file mode 100644 index 943d23e..0000000 --- a/conlite/plugins/cl-content-allocation/locale/de_DE/LC_MESSAGES/cl-content-allocation.po +++ /dev/null @@ -1,112 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: Contenido ContentAllocation\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-18 10:55+0200\n" -"PO-Revision-Date: 2013-09-11 14:31+0100\n" -"Last-Translator: Ortwin Pinke \n" -"Language-Team: Ortwin Pinke \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-KeywordsList: i18n\n" -"Language: de_DE\n" -"X-Generator: Poedit 1.5.7\n" - -#: includes/config.plugin.php:59 -msgid "Store content allocations" -msgstr "Content Allocation speichern" - -#: includes/include.contentallocation_article.php:86 -msgid "There is no Content Allocation tree." -msgstr "Es existiert kein Content Allocation Baum" - -#: includes/include.contentallocation_article.php:111 -msgid "Remove all" -msgstr "Alle entfernen" - -#: includes/include.contentallocation_article.php:112 -msgid "Remove" -msgstr "Entfernen" - -#: includes/include.right_bottom.php:70 -#, php-format -msgid "New Category %s successfully stored!" -msgstr "Neue Kategorie %s gespeichert!" - -#: includes/include.right_bottom.php:78 -#, php-format -msgid "Category %s successfully renamed!" -msgstr "Kategorie %s umbenannt!" - -#: includes/include.right_bottom.php:90 -msgid "Category successfully deleted!" -msgstr "Kategorie gelöscht!" - -#: includes/include.right_bottom.php:119 includes/include.right_bottom.php:142 -msgid "Create new tree" -msgstr "Neuen Baum erstellen" - -#: includes/include.right_bottom.php:132 -msgid "Please enter a category name." -msgstr "Bitte geben Sie einen Kategorienamen ein." - -#: includes/functions.chains.php:61 -msgid "Content Allocation" -msgstr "Content Allocation" - -#: classes/class.content_allocation_treeview.php:100 -#: classes/class.content_allocation_treeview.php:176 -msgid "Please enter a category name" -msgstr "Bitte geben Sie einen Kategorienamen ein" - -#: classes/class.content_allocation_treeview.php:124 -msgid "New category" -msgstr "Neue Kategorie" - -#: classes/class.content_allocation_treeview.php:126 -msgid "Rename category" -msgstr "Kategorie umbenennen" - -#: classes/class.content_allocation_treeview.php:127 -msgid "Move category up" -msgstr "Kategorie aufwärts bewegen" - -#: classes/class.content_allocation_treeview.php:128 -msgid "Move category down" -msgstr "Kategorie abwärts bewegen" - -#: classes/class.content_allocation_treeview.php:132 -msgid "Set category offline" -msgstr "Kategorie offline schalten" - -#: classes/class.content_allocation_treeview.php:134 -msgid "Set category online" -msgstr "Kategorie online schalten" - -#: classes/class.content_allocation_treeview.php:138 -msgid "One or more subcategories exist, unable to delete" -msgstr "" -"Es gibt eine oder mehrer Unterkategorien, Löschen nicht möglich" - -#: classes/class.content_allocation_treeview.php:140 -msgid "Delete category" -msgstr "Lösche Kategorie" - -#: classes/class.content_allocation_treeview.php:140 -msgid "Are you sure to delete the following category" -msgstr "Wollen Sie folgende Kategorien wirklich l&oeschen?" - -#: classes/class.content_allocation_treeview.php:223 -#: classes/class.content_allocation_article.php:107 -msgid "Category" -msgstr "Kategorie" - -#: classes/class.content_allocation_treeview.php:224 -msgid "Actions" -msgstr "Aktionen" diff --git a/conlite/plugins/cl-content-allocation/locale/potfiles.txt b/conlite/plugins/cl-content-allocation/locale/potfiles.txt deleted file mode 100644 index f28d5fa..0000000 --- a/conlite/plugins/cl-content-allocation/locale/potfiles.txt +++ /dev/null @@ -1,15 +0,0 @@ -./includes/config.plugin.php -./includes/include.left_bottom.php -./includes/include.left_top.php -./includes/include.contentallocation_article.php -./includes/include.right_bottom.php -./includes/functions.chains.php -./templates/template.tree_structure.html -./templates/template.tree_complexlist.html -./templates/template.tree_article.html -./classes/class.content_allocation_tree.php -./classes/class.content_allocation_treeview.php -./classes/class.content_allocation.php -./classes/class.content_allocation_article.php -./classes/class.content_allocation_complexlist.php -./classes/class.content_allocation_selectbox.php diff --git a/conlite/plugins/cl-content-allocation/plugin_install.sql b/conlite/plugins/cl-content-allocation/plugin_install.sql deleted file mode 100644 index 2a38c3e..0000000 --- a/conlite/plugins/cl-content-allocation/plugin_install.sql +++ /dev/null @@ -1,30 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -/** - * Author: oldperl - * Created: 06.05.2021 - */ - -CREATE TABLE `!PREFIX!ca_alloc` ( - `idpica_alloc` int(10) NOT NULL DEFAULT 0, - `parentid` int(10) DEFAULT NULL, - `sortorder` int(10) NOT NULL DEFAULT 0, -PRIMARY KEY (`idpica_alloc`) -); - -CREATE TABLE `!PREFIX!ca_alloc_con` ( - `idpica_alloc` int(10) NOT NULL DEFAULT 0, - `idartlang` int(10) NOT NULL DEFAULT 0, -PRIMARY KEY (`idpica_alloc`) -); - -CREATE TABLE `!PREFIX!ca_lang` ( - `idpica_alloc` int(10) NOT NULL DEFAULT 0, - `idlang` int(10) NOT NULL DEFAULT 0, - `name` varchar(255) DEFAULT NULL, - `online` tinyint(1) NOT NULL DEFAULT 0, -PRIMARY KEY (`idpica_alloc`) -); \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/plugin_uninstall.sql b/conlite/plugins/cl-content-allocation/plugin_uninstall.sql deleted file mode 100644 index 321da65..0000000 --- a/conlite/plugins/cl-content-allocation/plugin_uninstall.sql +++ /dev/null @@ -1,13 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -/** - * Author: oldperl - * Created: 06.05.2021 - */ - -DROP TABLE IF EXISTS !PREFIX!ca_alloc; -DROP TABLE IF EXISTS !PREFIX!ca_alloc_con; -DROP TABLE IF EXISTS !PREFIX!ca_lang; \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/scripts/complexlist.js b/conlite/plugins/cl-content-allocation/scripts/complexlist.js deleted file mode 100644 index 21bfa4c..0000000 --- a/conlite/plugins/cl-content-allocation/scripts/complexlist.js +++ /dev/null @@ -1,133 +0,0 @@ -/* - * ul2finder - * written by Christian Heilmann (http://icant.co.uk) - * turns the nested list with the ID "finder" into a dynamic list - * uses the CSS classes defined in the variables - */ -function ul2finder() -{ - // Define variables used and classes to be applied/removed - var i,uls,als,finder; - var parentClass='parent'; - var showClass='shown'; - var hideClass='hidden'; - var openClass='open'; - - // check if our finder list exists, if not, stop all activities - finder=document.getElementById('finder'); - if(!finder){return;} - - // add the class domenabled to the body - cssjs('add',document.body,'domenabled') - - // loop through all lists inside finder, position and hide them - // by applying the class hidden - uls=document.getElementById('finder').getElementsByTagName('ul'); - for(i=0;i -{HIDDENFIELDS} - - - - - - - - - - - - -
    {CATEGORY} 
    {ITEMNAME}{CHECKBOX}
    -{DIV} - \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/templates/template.tree_complexlist.html b/conlite/plugins/cl-content-allocation/templates/template.tree_complexlist.html deleted file mode 100644 index 27df466..0000000 --- a/conlite/plugins/cl-content-allocation/templates/template.tree_complexlist.html +++ /dev/null @@ -1,76 +0,0 @@ -
    -{HIDDENFIELDS} -
    - {TREE} -
    -
    -
      -
    -
    {REMOVE_ALL} -
    -{DIV} -
    - - diff --git a/conlite/plugins/cl-content-allocation/templates/template.tree_structure.html b/conlite/plugins/cl-content-allocation/templates/template.tree_structure.html deleted file mode 100644 index 900142c..0000000 --- a/conlite/plugins/cl-content-allocation/templates/template.tree_structure.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - -
    {CATEGORY}{ACTIONS}
    {ITEMNAME}{ACTION_CREATE} {ACTION_RENAME} {ACTION_ONOFFLINE} {ACTION_MOVE_UP} {ACTION_MOVE_DOWN} {ACTION_DELETE}
    \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/xml/lang_de_DE.xml b/conlite/plugins/cl-content-allocation/xml/lang_de_DE.xml deleted file mode 100644 index 960aba4..0000000 --- a/conlite/plugins/cl-content-allocation/xml/lang_de_DE.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - -
    Tagging
    -
    -
    - -
    - Tagging -
    -
    -
    \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/xml/lang_en_EN.xml b/conlite/plugins/cl-content-allocation/xml/lang_en_EN.xml deleted file mode 100644 index 92e89e4..0000000 --- a/conlite/plugins/cl-content-allocation/xml/lang_en_EN.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - -
    Tagging
    -
    -
    - -
    - Tagging -
    -
    -
    -
    \ No newline at end of file diff --git a/conlite/plugins/cl-content-allocation/xml/lang_en_US.xml b/conlite/plugins/cl-content-allocation/xml/lang_en_US.xml deleted file mode 100644 index 92e89e4..0000000 --- a/conlite/plugins/cl-content-allocation/xml/lang_en_US.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - -
    Tagging
    -
    -
    - -
    - Tagging -
    -
    -
    -
    \ No newline at end of file diff --git a/conlite/plugins/cl-mod-rewrite/.gitignore b/conlite/plugins/cl-mod-rewrite/.gitignore deleted file mode 100644 index d8fe4fa..0000000 --- a/conlite/plugins/cl-mod-rewrite/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/.project diff --git a/conlite/plugins/cl-mod-rewrite/LICENSE b/conlite/plugins/cl-mod-rewrite/LICENSE deleted file mode 100644 index f288702..0000000 --- a/conlite/plugins/cl-mod-rewrite/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. 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 -them 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 prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. 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. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey 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; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If 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 convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU 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 that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - 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. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -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. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/conlite/plugins/cl-mod-rewrite/README.md b/conlite/plugins/cl-mod-rewrite/README.md deleted file mode 100644 index c9db2ed..0000000 --- a/conlite/plugins/cl-mod-rewrite/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# cl-mod-rewrite -Mod Rewrite Plugin for ConLite diff --git a/conlite/plugins/cl-mod-rewrite/cl_plugin.xml b/conlite/plugins/cl-mod-rewrite/cl_plugin.xml deleted file mode 100644 index 242cd1d..0000000 --- a/conlite/plugins/cl-mod-rewrite/cl_plugin.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - ConLite ModRewrite - cl-mod-rewrite - B54918AD-A6DB-5FFB-B8DB-37BFF779D97C - ConLite ModRewrite - ConLite Team - ConLite Team - plugins@conlite.org - https://conlite.org - 1.0.1 - - - - - - - mod_rewrite - mod_rewrite_expert - mod_rewrite_test - - - mod_rewrite - mod_rewrite_expert - mod_rewrite_test - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/conlite/plugins/cl-mod-rewrite/classes/class.modrewrite.php b/conlite/plugins/cl-mod-rewrite/classes/class.modrewrite.php deleted file mode 100644 index 971bc16..0000000 --- a/conlite/plugins/cl-mod-rewrite/classes/class.modrewrite.php +++ /dev/null @@ -1,1072 +0,0 @@ - - * @copyright www.polycoder.de - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ - -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -/** - * Class to create websafe names, it also provides several helper functions - * - * @author Stefan Seifarth / stese - * @author Murat Purc - * @package plugin - * @subpackage Mod Rewrite - */ -class ModRewrite extends ModRewriteBase { - - /** - * Database instance - * - * @var DB_Contenido - */ - private static $_db; - - /** - * Lookup table to cache some internal data such as db query results - * - * @var array - */ - protected static $_lookupTable; - - /** - * Initialization, is to call at least once, also possible to call multible - * times, if different client configuration is to load. - * - * Loads configuration of passed client and sets some properties. - * - * @param int $clientId Client id - */ - public static function initialize($clientId) { - mr_loadConfiguration($clientId, true); - parent::initialize($clientId); - self::$_db = new DB_Contenido(); - self::$_lookupTable = array(); - } - - /** - * Check categories on websafe name - * - * Check all categories in the main parent category on existing same websafe name - * - * @param string $sName Websafe name to check - * @param int $iCatId Current category id - * @param int $iLangId Current language id - * @return bool True if websafename already exists, false if not - */ - public static function isInCategories($sName = '', $iCatId = 0, $iLangId = 0) { - global $cfg; - - $sName = self::$_db->escape($sName); - $iCatId = (int) $iCatId; - $iLangId = (int) $iLangId; - - // get parentid - $iParentId = 0; - $sql = "SELECT parentid FROM " . $cfg['tab']['cat'] . " WHERE idcat = " . $iCatId; - if ($aData = mr_queryAndNextRecord($sql)) { - $iParentId = ($aData['parentid'] > 0 ) ? (int) $aData['parentid'] : 0; - } - - // check if websafe name is in this category - $sql = "SELECT count(cl.idcat) as numcats FROM " . $cfg['tab']['cat_lang'] . " cl " - . "LEFT JOIN " . $cfg['tab']['cat'] . " c ON cl.idcat = c.idcat WHERE " - . "c.parentid = '$iParentId' AND cl.idlang = " . $iLangId . " AND " - . "LOWER(cl.urlname) = LOWER('" . $sName . "') AND cl.idcat <> " . $iCatId; - ModRewriteDebugger::log($sql, 'ModRewrite::isInCategories $sql'); - - if ($aData = mr_queryAndNextRecord($sql)) { - return ($aData['numcats'] > 0) ? true : false; - } - - return false; - } - - /** - * Check articles on websafe name. - * - * Check all articles in the current category on existing same websafe name. - * - * @param string $sName Websafe name to check - * @param int $iArtId Current article id - * @param int $iLangId Current language id - * @param int $iCatId Category id - * @return bool True if websafename already exists, false if not - */ - public static function isInCatArticles($sName = '', $iArtId = 0, $iLangId = 0, $iCatId = 0) { - global $cfg; - - $sName = self::$_db->escape($sName); - $iArtId = (int) $iArtId; - $iLangId = (int) $iLangId; - $iCatId = (int) $iCatId; - - // handle multipages - if ($iCatId == 0) { - // get category id if not set - $sql = "SELECT idcat FROM " . $cfg['tab']['cat_art'] . " WHERE idart = " . $iArtId; - if ($aData = mr_queryAndNextRecord($sql)) { - $iCatId = ($aData['idcat'] > 0) ? (int) $aData['idcat'] : 0; - } - } - - // check if websafe name is in this category - $sql = "SELECT count(al.idart) as numcats FROM " . $cfg['tab']['art_lang'] . " al " - . "LEFT JOIN " . $cfg['tab']['cat_art'] . " ca ON al.idart = ca.idart WHERE " - . " ca.idcat='$iCatId' AND al.idlang=" . $iLangId . " AND " - . "LOWER(al.urlname) = LOWER('" . $sName . "') AND al.idart <> " . $iArtId; - if ($aData = mr_queryAndNextRecord($sql)) { - return ($aData['numcats'] > 0) ? true : false; - } - - return false; - } - - /** - * Set websafe name in article list. - * - * Insert new websafe name in article list - * - * @param string $sName Original name (will be converted) - * @param int $iArtId Current article id - * @param int $iLangId Current language id - * @param int $iCatId Category id - * @return bool True if insert was successfully - */ - public static function setArtWebsafeName($sName = '', $iArtId = 0, $iLangId = 0, $iCatId = 0) { - global $cfg; - - $iArtId = (int) $iArtId; - $iLangId = (int) $iLangId; - $iCatId = (int) $iCatId; - - // get websafe name - $sNewName = cApiStrCleanURLCharacters(conHtmlEntityDecode($sName)); - - // remove double or more separators - $sNewName = mr_removeMultipleChars('-', $sNewName); - - $sNewName = self::$_db->escape($sNewName); - - // check if websafe name already exists - if (self::isInCatArticles($sNewName, $iArtId, $iLangId, $iCatId)) { - // create new websafe name if exists - $sNewName = $sNewName . $iArtId; - } - - // check again - and set name - if (!self::isInCatArticles($sNewName, $iArtId, $iLangId, $iCatId)) { - // insert websafe name in article list - $sql = "UPDATE " . $cfg['tab']['art_lang'] . " SET urlname = '$sNewName' " - . "WHERE idart = " . $iArtId . " AND idlang = " . $iLangId; - return self::$_db->query($sql); - } else { - return false; - } - } - - /** - * Set websafe name in category list. - * - * Insert new websafe name in category list. - * - * @param string $sName Original name (will be converted) or alias - * @param int $iCatId Category id - * @param int $iLangId Language id - * @return bool True if insert was successfully - */ - public static function setCatWebsafeName($sName = '', $iCatId = 0, $iLangId = 0) { - global $cfg; - - $iCatId = (int) $iCatId; - $iLangId = (int) $iLangId; - - // create websafe name - $sNewName = cApiStrCleanURLCharacters(conHtmlEntityDecode($sName)); - - // remove double or more separators - $sNewName = mr_removeMultipleChars('-', $sNewName); - - $sNewName = self::$_db->escape($sNewName); - - // check if websafe name already exists - if (self::isInCategories($sNewName, $iCatId, $iLangId)) { - // create new websafe name if exists - $sNewName = $sNewName . $iCatId; - } - - // check again - and set name - if (!self::isInCategories($sNewName, $iCatId, $iLangId)) { - // insert websafe name in article list - $sql = "UPDATE " . $cfg['tab']['cat_lang'] . " SET urlname = '$sNewName' " - . "WHERE idcat = " . $iCatId . " AND idlang = " . $iLangId; - - ModRewriteDebugger::log(array( - 'sName' => $sName, - 'iCatId' => $iCatId, - 'iLangId' => $iLangId, - 'sNewName' => $sNewName - ), 'ModRewrite::setCatWebsafeName $data'); - - return self::$_db->query($sql); - } else { - return false; - } - } - - /** - * Set urlpath of category - * - * @param int $iCatId Category id - * @param int $iLangId Language id - * @return bool True if insert was successfully - */ - public static function setCatUrlPath($iCatId = 0, $iLangId = 0) { - global $cfg; - - $sPath = self::buildRecursivPath($iCatId, $iLangId); - - $iCatId = (int) $iCatId; - $iLangId = (int) $iLangId; - - // insert websafe name in article list - $sql = "UPDATE " . $cfg['tab']['cat_lang'] . " SET urlpath = '$sPath' " - . "WHERE idcat = " . $iCatId . " AND idlang = " . $iLangId; - - ModRewriteDebugger::log(array( - 'iCatId' => $iCatId, - 'iLangId' => $iLangId, - 'sPath' => $sPath - ), 'ModRewrite::setCatUrlPath $data'); - - return self::$_db->query($sql); - } - - /** - * Get article id and language id from article language id - * - * @param int $iArtlangId Current article id - * @return array Array with idart and idlang of current article - */ - public static function getArtIdByArtlangId($iArtlangId = 0) { - global $cfg; - - $iArtlangId = (int) $iArtlangId; - $sql = "SELECT idart, idlang FROM " . $cfg['tab']['art_lang'] . " WHERE idartlang = " . $iArtlangId; - if ($aData = mr_queryAndNextRecord($sql)) { - return $aData; - } - return array(); - } - - /** - * Get article id by article websafe name - * - * @param string $sArtName Websafe name - * @param int $iCatId Category id - * @param int $iLangId Language id - * @return int|null Recent article id or null - */ - public static function getArtIdByWebsafeName($sArtName = '', $iCatId = 0, $iLangId = 0) { - global $cfg, $lang; - - $sArtName = self::$_db->escape($sArtName); - $iCatId = (int) $iCatId; - $iLangId = (int) $iLangId; - if (0 === $iLangId && is_int($lang)) { - $iLangId = $lang; - } - - $sWhere = ''; - if ($iLangId !== 0) { - $sWhere = ' AND al.idlang = ' . $iLangId; - } - // only article name were given - if ($iCatId == 0) { - // get all basic category ids with parentid=0 - $aCatIds = array(); - $sql = "SELECT idcat FROM " . $cfg['tab']['cat'] . " WHERE parentid = 0"; - self::$_db->query($sql); - while (self::$_db->next_record()) { - $aCatIds[] = "idcat = " . (int) self::$_db->f('idcat'); - } - $sWhere .= " AND ( " . join(" OR ", $aCatIds) . ")"; - } else { - $sWhere .= " AND ca.idcat = " . $iCatId; - } - - $sql = "SELECT al.idart FROM " . $cfg['tab']['art_lang'] . " al " - . "LEFT JOIN " . $cfg['tab']['cat_art'] . " ca ON al.idart = ca.idart " - . "WHERE LOWER(al.urlname) = LOWER('$sArtName')" . $sWhere; - - if ($aData = mr_queryAndNextRecord($sql)) { - return $aData['idart']; - } else { - return null; - } - } - - /** - * Get category name from category id and language id. - * - * @param int $iCatId Category id - * @param int $iLangId Language id - * @return string Category name - */ - public static function getCatName($iCatId = 0, $iLangId = 0) { - global $cfg; - - $iCatId = (int) $iCatId; - $iLangId = (int) $iLangId; - $key = 'catname_by_catid_idlang_' . $iCatId . '_' . $iLangId; - - if (isset(self::$_lookupTable[$key])) { - return self::$_lookupTable[$key]; - } - - $sql = "SELECT name FROM " . $cfg['tab']['cat_lang'] . " WHERE idcat = " . $iCatId . " AND idlang = " . $iLangId; - if ($aData = mr_queryAndNextRecord($sql)) { - $catName = $aData['name']; - } else { - $catName = ''; - } - - self::$_lookupTable[$key] = $catName; - return $catName; - } - - /** - * Funcion to return cat id by path. - * - * Caches the paths at first call to provode faster processing at further calls. - * - * @param string $path Category path - * @return int Category id - */ - public static function getCatIdByUrlPath($path) { - global $cfg, $client, $lang; - - if (strpos($path, '/') === 0) { - $path = substr($path, 1); - } - if (strrpos($path, '/') === strlen($path) - 1) { - $path = substr($path, 0, -1); - } - - $catSeperator = '/'; - $startFromRoot = parent::getConfig('startfromroot'); - $urls2lowercase = parent::getConfig('use_lowercase_uri'); - - $path = str_replace('/', parent::getConfig('category_seperator'), $path); - - $key = 'cat_ids_and_urlpath_' . $client . '_' . $lang; - - if (isset(self::$_lookupTable[$key])) { - $aPathsCache = self::$_lookupTable[$key]; - } else { - $aPathsCache = array(); - } - - if (count($aPathsCache) == 0) { - $sql = "SELECT cl.idcat, cl.urlpath FROM " . $cfg['tab']['cat_lang'] - . " AS cl, " . $cfg['tab']['cat'] . " AS c WHERE c.idclient = " . $client - . " AND c.idcat = cl.idcat AND cl.idlang = " . $lang; - - self::$_db->query($sql); - while (self::$_db->next_record()) { - $urlPath = self::$_db->f('urlpath'); - if ($startFromRoot == 0 && strpos($urlPath, $catSeperator) > 0) { - // paths are stored with prefixed main category, but created - // urls doesn't contain the main cat, remove it... - $urlPath = substr($urlPath, strpos($urlPath, $catSeperator) + 1); - } - if ($urls2lowercase) { - $urlPath = strtolower($urlPath); - } - - // store path - $aPathsCache[self::$_db->f('idcat')] = $urlPath; - } - } - self::$_lookupTable[$key] = $aPathsCache; - - // compare paths using the similar_text algorithm - $fPercent = 0; - $aResults = array(); - foreach ($aPathsCache as $id => $pathItem) { - similar_text($path, $pathItem, $fPercent); - $aResults[$id] = $fPercent; - } - - arsort($aResults, SORT_NUMERIC); - reset($aResults); - - ModRewriteDebugger::add($path, 'ModRewrite::getCatIdByUrlPath() $path'); - ModRewriteDebugger::add($aPathsCache, 'ModRewrite::getCatIdByUrlPath() $aPathsCache'); - ModRewriteDebugger::add($aResults, 'ModRewrite::getCatIdByUrlPath() $aResults'); - - $iMinPercentage = (int) parent::getConfig('category_resolve_min_percentage', 0); - $catId = key($aResults); - if ($iMinPercentage > 0 && $aResults[$catId] < $iMinPercentage) { - return 0; - } else { - return $catId; - } - } - - /** - * Get article name from article id and language id - * - * @NOTE: seems to be not used??? - * - * @param int $iArtId Article id - * @param int $iLangId Language id - * @return string Article name - */ - public static function getArtTitle($iArtId = 0, $iLangId = 0) { - global $cfg; - - $iArtId = (int) $iArtId; - $iLangId = (int) $iLangId; - - $sql = "SELECT title FROM " . $cfg['tab']['art_lang'] . " WHERE " - . "idart = " . $iArtId . " AND idlang = " . $iLangId; - if ($aData = mr_queryAndNextRecord($sql)) { - return $aData['title']; - } - return ''; - } - - /** - * Get language ids from category id - * - * @param int $iCatId Category id - * @return array Used language ids - */ - public static function getCatLanguages($iCatId = 0) { - global $cfg; - - $iCatId = (int) $iCatId; - $key = 'cat_idlang_by_catid_' . $iCatId; - - if (isset(self::$_lookupTable[$key])) { - return self::$_lookupTable[$key]; - } - - $aLanguages = array(); - - $sql = "SELECT idlang FROM " . $cfg['tab']['cat_lang'] . " WHERE idcat = " . $iCatId; - self::$_db->query($sql); - while (self::$_db->next_record()) { - $aLanguages[] = self::$_db->f('idlang'); - } - - self::$_lookupTable[$key] = $aLanguages; - return $aLanguages; - } - - /** - * Get article urlname and language id - * - * @param int $iArtlangId idartlang - * @return array Urlname, idlang of empty array - */ - public static function getArtIds($iArtlangId = 0) { - global $cfg; - - $iArtlangId = (int) $iArtlangId; - $sql = "SELECT urlname, idlang FROM " . $cfg['tab']['art_lang'] . " WHERE idartlang = " . $iArtlangId; - if ($aData = mr_queryAndNextRecord($sql)) { - return $aData; - } - return array(); - } - - /** - * Build a recursiv path for cl-mod-rewrite rule like server directories - * (dir1/dir2/dir3) - * - * @param int $iCatId Latest category id - * @param int $iLangId Language id - * @param int $iLastId Last category id - * @return string linkpath with correct uri - */ - public static function buildRecursivPath($iCatId = 0, $iLangId = 0, $iLastId = 0) { - global $cfg; - - $aDirectories = array(); - $bFinish = false; - $iTmpCatId = (int) $iCatId; - $iLangId = (int) $iLangId; - $iLastId = (int) $iLastId; - - while ($bFinish == false) { - $sql = "SELECT cl.urlname, c.parentid FROM " . $cfg['tab']['cat_lang'] . " cl " - . "LEFT JOIN " . $cfg['tab']['cat'] . " c ON cl.idcat = c.idcat " - . "WHERE cl.idcat = " . $iTmpCatId . " AND cl.idlang = " . $iLangId; - if ($aData = mr_queryAndNextRecord($sql)) { - $aDirectories[] = $aData['urlname']; - $iTmpCatId = (int) $aData['parentid']; - - if ($aData['parentid'] == 0 || $aData['parentid'] == $iLastId) { - $bFinish = true; - } - } else { - $bFinish = true; - } - } - - // reverse array entries and create directory string - $sPath = join('/', array_reverse($aDirectories)); -# echo "
    " . print_r($sPath, true) . "
    "; - - return $sPath; - } - - /** - * Return full CONTENIDO url from single anchor - * - * @param array $aMatches [0] = complete anchor, [1] = pre arguments, [2] = anchor name, [3] = post arguments - * @return string New anchor - */ - public static function rewriteHtmlAnchor(array $aMatches = array()) { - global $artname, $sess, $idart, $idcat, $client, $lang; - - // set article name - $sArtParam = ''; - if (isset($artname) && strlen($artname) > 0) { - $sArtParam = '&idart=' . (int) $idart; - } - - // check for additional parameter in url - $aParamsToIgnore = array('idcat', 'idart', 'lang', 'client', 'idcatart', 'changelang', 'changeclient', 'idartlang', 'parts', 'artname'); - $sOtherParams = ''; - - if (isset($_GET) && count($_GET) > 0) { - foreach ($_GET as $key => $value) { - if (!in_array($key, $aParamsToIgnore) && strlen(trim($value)) > 0) { - $aNoAnchor = explode('#', $value); - $sOtherParams .= '&' . urlencode(urldecode($key)) . '=' . urlencode(urldecode($value)); - } - } - } - - $url = $sess->url( - 'front_content.php?' . 'idcat=' . (int) $idcat . '&client=' . (int) $client . - '&changelang=' . (int) $lang . $sArtParam . $sOtherParams . '#' . $aMatches[2] - ); - - $sNewUrl = ''; - - return $sNewUrl; - } - - /** - * Return full CONTENIDO url from single anchor - * - * @param array $aMatches [0] = complete anchor, [1] = pre arguments, [2] = anchor name, [3] = post arguments - * @param bool $bXHTML Flag to return XHTML valid url - * @return string New anchor - */ - public static function contenidoHtmlAnchor(array $aMatches = array(), $bXHTML = true) { - global $sess; - - $aParams = array(); - $sAmpersand = $bXHTML ? '&' : '&'; - - foreach ($_GET as $key => $value) { - $aNoAnchor = explode('#', $value); - $aParams[] = urlencode(urldecode($key)) . '=' . urlencode(urldecode($aNoAnchor[0])); - } - - $url = $sess->url('front_content.php?' . implode($sAmpersand, $aParams) . '#' . $aMatches[2]); - $sNewUrl = ''; - - return $sNewUrl; - } - - /** - * Get article websafe name from article id and language id. - * - * @param int $iArtId Article id - * @param int $iLangId Language id - * @return string Article websafe name - */ - public static function getArtWebsafeName($iArtId = 0, $iLangId = 0) { - global $cfg; - - $iArtId = (int) $iArtId; - $iLangId = (int) $iLangId; - $sql = "SELECT urlname FROM " . $cfg['tab']['art_lang'] . " WHERE " - . "idart = " . $iArtId . " AND idlang = " . $iLangId; - if ($aData = mr_queryAndNextRecord($sql)) { - return $aData['urlname']; - } - return null; - } - - /** - * Get article websafe name from idartlang. - * - * @param int $iArtLangId idartlang - * @return string Article websafe name - */ - public static function getArtLangWebsafeName($iArtLangId = 0) { - global $cfg; - - $iArtLangId = (int) $iArtLangId; - $sql = "SELECT urlname FROM " . $cfg['tab']['art_lang'] . " WHERE idartlang = " . $iArtLangId; - if ($aData = mr_queryAndNextRecord($sql)) { - return $aData['urlname']; - } - return null; - } - - /** - * Get name of client by id. - * - * @param int $clientId Client id - * @return string Client name - */ - public static function getClientName($clientId = 0) { - global $cfg; - - $clientId = (int) $clientId; - $key = 'clientname_by_clientid_' . $clientId; - - if (isset(self::$_lookupTable[$key])) { - return self::$_lookupTable[$key]; - } - - $sql = "SELECT name FROM " . $cfg['tab']['clients'] . " WHERE idclient = " . $clientId; - if ($aData = mr_queryAndNextRecord($sql)) { - $clientName = $aData['name']; - } else { - $clientName = ''; - } - - self::$_lookupTable[$key] = $clientName; - return $clientName; - } - - /** - * Get client id from client name - * - * @param string $sClientName Client name - * @return int Client id - */ - public static function getClientId($sClientName = '') { - global $cfg; - - $sClientName = strtolower(self::$_db->escape($sClientName)); - $key = 'clientid_by_name_' . $sClientName; - - if (isset(self::$_lookupTable[$key])) { - return self::$_lookupTable[$key]; - } - - $sql = "SELECT idclient FROM " . $cfg['tab']['clients'] . " WHERE LOWER(name) = '" . $sClientName . "' OR LOWER(name) = '" . urldecode($sClientName) . "'"; - - if ($aData = mr_queryAndNextRecord($sql)) { - $clientId = $aData['idclient']; - } else { - $clientId = false; - } - - self::$_lookupTable[$key] = $clientId; - return $clientId; - } - - /** - * Checks if client id exists - * - * @param int $clientId - * @return bool - */ - public static function clientIdExists($clientId) { - global $cfg; - - $clientId = (int) $clientId; - $key = 'clientid_exists_' . $clientId; - - if (isset(self::$_lookupTable[$key])) { - return self::$_lookupTable[$key]; - } - - $sql = "SELECT idclient FROM " . $cfg['tab']['clients'] . " WHERE idclient = " . $clientId; - if ($aData = mr_queryAndNextRecord($sql)) { - $exists = true; - } else { - $exists = false; - } - - self::$_lookupTable[$key] = $exists; - return $exists; - } - - /** - * Returns name of language by id. - * - * @param int $languageId Language id - * @return string Lanuage name - */ - public static function getLanguageName($languageId = 0) { - global $cfg; - - $languageId = (int) $languageId; - $key = 'languagename_by_id_' . $languageId; - - if (isset(self::$_lookupTable[$key])) { - return self::$_lookupTable[$key]; - } - - $sql = "SELECT name FROM " . $cfg['tab']['lang'] . " WHERE idlang = " . $languageId; - if ($aData = mr_queryAndNextRecord($sql)) { - $languageName = $aData['name']; - } else { - $languageName = ''; - } - - self::$_lookupTable[$key] = $languageName; - return $languageName; - } - - /** - * Checks if language id exists - * - * @param int $languageId Language id - * @return bool - */ - public static function languageIdExists($languageId) { - global $cfg; - - $languageId = (int) $languageId; - $key = 'languageid_exists_' . $languageId; - - if (isset(self::$_lookupTable[$key])) { - return self::$_lookupTable[$key]; - } - - $sql = "SELECT idlang FROM " . $cfg['tab']['lang'] . " WHERE idlang = " . $languageId; - if ($aData = mr_queryAndNextRecord($sql)) { - $exists = true; - } else { - $exists = false; - } - - self::$_lookupTable[$key] = $exists; - return $exists; - } - - /** - * Get language id from language name thanks to Nicolas Dickinson for multi - * Client/Language BugFix - * - * @param string $sLanguageName Language name - * @param int $iClientId Client id - * @return int Language id - */ - public static function getLanguageId($sLanguageName = '', $iClientId = 1) { - global $cfg; - - $sLanguageName = strtolower(self::$_db->escape($sLanguageName)); - $iClientId = (int) $iClientId; - $key = 'langid_by_langname_clientid_' . $sLanguageName . '_' . $iClientId; - - if (isset(self::$_lookupTable[$key])) { - return self::$_lookupTable[$key]; - } - - $sql = "SELECT l.idlang FROM " . $cfg['tab']['lang'] . " as l " - . "LEFT JOIN " . $cfg['tab']['clients_lang'] . " AS cl ON l.idlang = cl.idlang " - . "WHERE cl.idclient = " . $iClientId . " AND (LOWER(l.name) = '" . $sLanguageName . "' " - . "OR LOWER(l.name) = '" . urldecode($sLanguageName) . "')"; - if ($aData = mr_queryAndNextRecord($sql)) { - $languageId = $aData['idlang']; - } else { - $languageId = 0; - } - - self::$_lookupTable[$key] = $languageId; - return $languageId; - } - - /** - * Splits passed argument into scheme://host and path/query. - * - * Example: - * input = http://host/front_content.php?idcat=123 - * return = array('htmlpath' => 'http://host', 'url' => 'front_content.php?idcat=123') - * - * @param string $url URL to split - * @return array Assoziative array including the two parts: - * - array('htmlpath' => $path, 'url' => $url) - */ - public static function getClientFullUrlParts($url) { - global $cfgClient, $client; - - $clientPath = $cfgClient[$client]['path']['htmlpath']; - - if (stristr($url, $clientPath) !== false) { - // url includes full html path (scheme host path, etc.) - $url = str_replace($clientPath, '', $url); - $htmlPath = $clientPath; - $aComp = parse_url($htmlPath); - - // check if path matches to defined rootdir from cl-mod-rewrite conf - if (isset($aComp['path']) && $aComp['path'] !== parent::getConfig('rootdir')) { - // replace not matching path agaings configured one - // this will replace e. g. "http://host/cms/" against "http://host/" - $htmlPath = str_replace($aComp['path'], parent::getConfig('rootdir'), $htmlPath); - if (substr($htmlPath, strlen($htmlPath) - 1) == '/') { - // remove last slash - $htmlPath = substr($htmlPath, 0, strlen($htmlPath) - 1); - } - } - } else { - $htmlPath = ''; - } - return array('htmlpath' => $htmlPath, 'url' => $url); - } - - /** - * Function to preclean a url. - * - * Removes absolute path declaration '/front_content.php' or relative path - * definition to actual dir './front_content.php', ampersand entities '&' - * and returns a url like 'front_content.php?idart=12&idlang=1' - * - * @param string $url Url to clean - * @return string Cleaned Url - */ - public static function urlPreClean($url) { - // some preparation of different front_content.php occurence - if (strpos($url, './front_content.php') === 0) { - $url = str_replace('./front_content.php', 'front_content.php', $url); - } elseif (strpos($url, '/front_content.php') === 0) { - $url = str_replace('/front_content.php', 'front_content.php', $url); - } - $url = str_replace('&', '&', $url); - return $url; - } - - /** - * Method to reset all aliases in categories. - * - * Clears all urlname entries in cat_lang table, and sets the value for all - * existing entries. - * - * @deprecated see ModRewrite::recreateCategoriesAliases(); - */ - public static function resetCategoriesAliases() { - self::recreateCategoriesAliases(); - } - - /** - * Recreates all or only empty aliases in categories table. - * - * @param bool $bOnlyEmpty Flag to reset only empty items - */ - public static function recreateCategoriesAliases($bOnlyEmpty = false) { - global $cfg; - - $db = new DB_Contenido(); - - $aCats = array(); - - // get all or only empty categories - $sql = "SELECT name, idcat, idlang FROM " . $cfg['tab']['cat_lang']; - if ($bOnlyEmpty === true) { - $sql .= " WHERE urlname IS NULL OR urlname = '' OR urlpath IS NULL OR urlpath = ''"; - } - - $db->query($sql); - while ($db->next_record()) { - //set new alias - self::setCatWebsafeName($db->f('name'), $db->f('idcat'), $db->f('idlang')); - $aCats[] = array('idcat' => $db->f('idcat'), 'idlang' => $db->f('idlang')); - } - - foreach ($aCats as $p => $item) { - self::setCatUrlPath($item['idcat'], $item['idlang']); - } - - unset($db, $aCats); - } - - /** - * Returns list of all empty category aliases - * - * @param bool $bOnlyNumber - * @return array|int - */ - public static function getEmptyCategoriesAliases($bOnlyNumber = true) { - global $cfg; - - $db = new DB_Contenido(); - $return = ($bOnlyNumber) ? 0 : array(); - - // get all empty categories - $sql = "SELECT name, idcat, idlang FROM " . $cfg['tab']['cat_lang']; - $sql .= " WHERE urlname IS NULL OR urlname = '' OR urlpath IS NULL OR urlpath = ''"; - - $db->query($sql); - - if ($bOnlyNumber) { - $return = (int) $db->num_rows(); - } else { - while ($db->next_record()) { - $return[] = array($db->f('name'), $db->f('idcat'), $db->f('idlang')); - } - } - - unset($db); - return $return; - } - - /** - * Method to reset all aliases in articles. - * - * Clears all urlname entries in art_lang table, and sets the value for all - * existing entries. - * - * @deprecated see ModRewrite::recreateArticlesAliases(); - */ - public static function resetArticlesAliases() { - self::recreateArticlesAliases(); - } - - /** - * Recreates all or only empty urlname entries in art_lang table. - * - * @param bool $bOnlyEmpty Flag to reset only empty items - */ - public static function recreateArticlesAliases($bOnlyEmpty = false) { - global $cfg; - - $db = new DB_Contenido(); - - // get all or only empty articles - $sql = "SELECT title, idart, idlang FROM " . $cfg['tab']['art_lang']; - if ($bOnlyEmpty === true) { - $sql .= " WHERE urlname IS NULL OR urlname = ''"; - } - $db->query($sql); - - while ($db->next_record()) { - //set new alias - self::setArtWebsafeName($db->f('title'), $db->f('idart'), $db->f('idlang')); - } - - unset($db); - } - - /** - * Returns list of all empty article aliases - * - * @param bool $bOnlyNumber - * @return array|int - */ - public static function getEmptyArticlesAliases($bOnlyNumber = true) { - global $cfg; - - $db = new DB_Contenido(); - $return = ($bOnlyNumber) ? 0 : array(); - - // get all empty articles - $sql = "SELECT title, idart, idlang FROM " . $cfg['tab']['art_lang']; - $sql .= " WHERE urlname IS NULL OR urlname = ''"; - - $db->query($sql); - if ($bOnlyNumber) { - $return = (int) $db->num_rows(); - } else { - while ($db->next_record()) { - $return[] = array($db->f('title'), $db->f('idart'), $db->f('idlang')); - } - } - - unset($db); - return $return; - } - - /** - * Method to reset all aliases (categories and articles). - * - * Shortcut to recreateCategoriesAliases() and recreateArticlesAliases() - */ - public static function resetAliases() { - self::recreateCategoriesAliases(); - self::recreateArticlesAliases(); - } - - /** - * Recreate all or only empty aliases (categories and articles). - * - * Shortcut to recreateCategoriesAliases() and recreateArticlesAliases() - * - * @param bool $bOnlyEmpty Flag to reset only empty items - */ - public static function recreateAliases($bOnlyEmpty = false) { - self::recreateCategoriesAliases($bOnlyEmpty); - self::recreateArticlesAliases($bOnlyEmpty); - } - - /** - * Used to postprocess resolved path - * - * Error site handling if category not found - * - * if percentage == 100 and there is no 100 percentage result value, - * error site will be shown - can be adjust by user settings for - * smooth similar effects - 80 to 95 will be best but have to check by user - * - * @deprecated Is no more used - * - * @param array $results Pathresolver results array - * @return mixed Categoryid or false - */ - public static function getIdFromPathresolverResult($results) { - $iMinPercentage = (int) parent::getConfig('category_resolve_min_percentage', 0); - $catId = key($results); - if ($iMinPercentage > 0 && $results[$catId] < $iMinPercentage) { - return false; - } else { - return $catId; - } - } - - /** - * Returns .htaccess related assoziative info array - * - * @return array - */ - public static function getHtaccessInfo() { - global $cfgClient, $client, $cfg; - - $arr = array( - 'contenido_full_path' => str_replace('\\', '/', realpath($cfg['path']['contenido'] . '../') . '/'), - 'client_full_path' => $cfgClient[$client]['path']['frontend'], - ); - $arr['in_contenido_path'] = is_file($arr['contenido_full_path'] . '.htaccess'); - $arr['in_client_path'] = is_file($arr['client_full_path'] . '.htaccess'); - $arr['has_htaccess'] = ($arr['in_contenido_path'] || $arr['in_client_path']); - - return $arr; - } - -} diff --git a/conlite/plugins/cl-mod-rewrite/classes/class.modrewritebase.php b/conlite/plugins/cl-mod-rewrite/classes/class.modrewritebase.php deleted file mode 100644 index 0284fd2..0000000 --- a/conlite/plugins/cl-mod-rewrite/classes/class.modrewritebase.php +++ /dev/null @@ -1,87 +0,0 @@ - - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ - -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -/** - * Abstract base mod rewrite class. - * - * Provides some common features such as common debugging, globals/configuration - * access for childs. - * - * @author Murat Purc - * @package plugin - * @subpackage Mod Rewrite - */ -abstract class ModRewriteBase { - - /** - * Initialization, is to call at least once by an child. - * @deprecated - */ - protected static function initialize($clientId) { - } - - /** - * Returns enabled state of mod rewrite plugin - * - * @return bool - */ - public static function isEnabled() { - return (self::getConfig('use', 0) == 1) ? true : false; - } - - /** - * Sets the enabled state of mod rewrite plugin - * - * @param bool $bEnabled - */ - public static function setEnabled($bEnabled) { - self::setConfig('use', (bool) $bEnabled); - } - - /** - * Returns configuration of mod rewrite, content of gobal $cfg['cl-mod-rewrite'] - * - * @param string $key Name of configuration key - * @param mixed $default Default value to return as a fallback - * @return mixed Desired value mr configuration, either the full configuration - * or one of the desired subpart - */ - public static function getConfig($key = null, $default = null) { - global $cfg; - if ($key == null) { - return $cfg['cl-mod-rewrite']; - } elseif ((string) $key !== '') { - return (isset($cfg['cl-mod-rewrite'][$key])) ? $cfg['cl-mod-rewrite'][$key] : $default; - } else { - return $default; - } - } - - /** - * Sets the configuration of mod rewrite, content of gobal $cfg['cl-mod-rewrite'] - * - * @param string $key Name of configuration key - * @param mixed $value The value to set - */ - public static function setConfig($key, $value) { - global $cfg; - $cfg['cl-mod-rewrite'][$key] = $value; - } - -} diff --git a/conlite/plugins/cl-mod-rewrite/classes/class.modrewritecontroller.php b/conlite/plugins/cl-mod-rewrite/classes/class.modrewritecontroller.php deleted file mode 100644 index 3fb2611..0000000 --- a/conlite/plugins/cl-mod-rewrite/classes/class.modrewritecontroller.php +++ /dev/null @@ -1,676 +0,0 @@ - - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ - -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -/** - * Mod Rewrite controller class. Extracts url parts and sets some necessary globals like: - * - $idart - * - $idcat - * - $client - * - $changeclient - * - $lang - * - $changelang - * - * @author Murat Purc - * @package plugin - * @subpackage Mod Rewrite - */ -class ModRewriteController extends ModRewriteBase { - // Error constants - - const ERROR_CLIENT = 1; - const ERROR_LANGUAGE = 2; - const ERROR_CATEGORY = 3; - const ERROR_ARTICLE = 4; - const ERROR_POST_VALIDATION = 5; - const FRONT_CONTENT = 'front_content.php'; - - /** - * Extracted request uri path parts by path separator '/' - * - * @var array - */ - private $_aParts; - - /** - * Extracted article name from request uri - * - * @var string - */ - private $_sArtName; - - /** - * Remaining path for path resolver (see $GLOBALS['path']) - * - * @var string - */ - private $_sPath; - - /** - * Incomming URL - * - * @var string - */ - private $_sIncommingUrl; - - /** - * Resolved URL - * - * @var string - */ - private $_sResolvedUrl; - - /** - * Client id used by this class - * - * @var int - */ - private $_iClientMR; - - /** - * Language id used by this class - * - * @var int - */ - private $_iLangMR; - - /** - * Flag about occured errors - * - * @var bool - */ - private $_bError = false; - - /** - * One of ERROR_* constants or 0 - * - * @var int - */ - private $_iError = 0; - - /** - * Flag about found routing definition - * - * @var bool - */ - private $_bRoutingFound = false; - - /** - * Constructor, sets several properties. - * - * @param string $incommingUrl Incomming URL - */ - public function __construct($incommingUrl) { - - // CON-1266 make incomming URL lowercase if option "URLS to - // lowercase" is set - if (1 == $this->getConfig('use_lowercase_uri')) { - $incommingUrl = strtolower($incommingUrl); - } - - $this->_sIncommingUrl = $incommingUrl; - $this->_aParts = array(); - $this->_sArtName = ''; - } - - /** - * Getter for overwritten client id (see $GLOBALS['client']) - * - * @return int Client id - */ - public function getClient() { - return $GLOBALS['client']; - } - - /** - * Getter for overwritten change client id (see $GLOBALS['changeclient']) - * - * @return int Change client id - */ - public function getChangeClient() { - return $GLOBALS['changeclient']; - } - - /** - * Getter for article id (see $GLOBALS['idart']) - * - * @return int Article id - */ - public function getIdArt() { - return $GLOBALS['idart']; - } - - /** - * Getter for category id (see $GLOBALS['idcat']) - * - * @return int Category id - */ - public function getIdCat() { - return $GLOBALS['idcat']; - } - - /** - * Getter for language id (see $GLOBALS['lang']) - * - * @return int Language id - */ - public function getLang() { - return $GLOBALS['lang']; - } - - /** - * Getter for change language id (see $GLOBALS['changelang']) - * - * @return int Change language id - */ - public function getChangeLang() { - return $GLOBALS['changelang']; - } - - /** - * Getter for path (see $GLOBALS['path']) - * - * @return string Path, used by path resolver - */ - public function getPath() { - return $this->_sPath; - } - - /** - * Getter for resolved url - * - * @return string Resolved url - */ - public function getResolvedUrl() { - return $this->_sResolvedUrl; - } - - /** - * Returns a flag about found routing definition - * - * return bool Flag about found routing - */ - public function getRoutingFoundState() { - return $this->_bRoutingFound; - } - - /** - * Getter for occured error state - * - * @return bool Flag for occured error - */ - public function errorOccured() { - return $this->_bError; - } - - /** - * Getter for occured error state - * - * @return int Numeric error code - */ - public function getError() { - return $this->_iError; - } - - /** - * Main function to call for mod rewrite related preprocessing jobs. - * - * Executes some private functions to extract request URI and to set needed membervariables - * (client, language, article id, category id, etc.) - */ - public function execute() { - if (parent::isEnabled() == false) { - return; - } - - $this->_extractRequestUri(); - - $this->_initializeClientId(); - - $this->_setClientId(); - - mr_loadConfiguration($this->_iClientMR); - - $this->_setLanguageId(); - - // second call after setting client and language - $this->_extractRequestUri(true); - - $this->_setPathresolverSetting(); - - $this->_setIdart(); - - ModRewriteDebugger::add($this->_aParts, 'ModRewriteController::execute() _setIdart'); - - $this->_postValidation(); - } - - /** - * Extracts request URI and sets member variables $this->_sArtName and $this->_aParts - * - * @param bool $secondCall Flag about second call of this function, is needed - * to re extract url if a routing definition was found - */ - private function _extractRequestUri($secondCall = false) { - global $client; - - // get REQUEST_URI - $requestUri = $_SERVER['REQUEST_URI']; - // CON-1266 make request URL lowercase if option "URLS to - // lowercase" is set - if (1 == $this->getConfig('use_lowercase_uri')) { - $requestUri = strtolower($requestUri); - } - - // check for defined rootdir - if (parent::getConfig('rootdir') !== '/' && strpos($requestUri, $this->_sIncommingUrl) === 0) { - $this->_sIncommingUrl = str_replace(parent::getConfig('rootdir'), '/', $this->_sIncommingUrl); - } - - $aUrlComponents = $this->_parseUrl($this->_sIncommingUrl); - if (isset($aUrlComponents['path'])) { - if (parent::getConfig('rootdir') !== '/' && strpos($aUrlComponents['path'], parent::getConfig('rootdir')) === 0) { - $aUrlComponents['path'] = str_replace(parent::getConfig('rootdir'), '/', $aUrlComponents['path']); - } - - if ($secondCall == true) { - - // @todo: implement real redirect of old front_content.php style urls - // check for routing definition - $routings = parent::getConfig('routing'); - if (is_array($routings) && isset($routings[$aUrlComponents['path']])) { - $aUrlComponents['path'] = $routings[$aUrlComponents['path']]; - if (strpos($aUrlComponents['path'], self::FRONT_CONTENT) !== false) { - // routing destination contains front_content.php - - $this->_bRoutingFound = true; - - // set client language, if not set before - mr_setClientLanguageId($client); - - //rebuild URL - $url = mr_buildNewUrl($aUrlComponents['path']); - - $aUrlComponents = $this->_parseUrl($url); - - // add query parameter to superglobal _GET - if (isset($aUrlComponents['query'])) { - $vars = null; - parse_str($aUrlComponents['query'], $vars); - $_GET = array_merge($_GET, $vars); - } - - $this->_aParts = array(); - } - } else { - return; - } - } - - $aPaths = explode('/', $aUrlComponents['path']); - foreach ($aPaths as $p => $item) { - if (!empty($item)) { - // pathinfo would also work - $arr = explode('.', $item); - $count = count($arr); - if ($count > 0 && '.' . strtolower($arr[$count - 1]) == parent::getConfig('file_extension')) { - array_pop($arr); - $this->_sArtName = trim(implode('.', $arr)); - } else { - $this->_aParts[] = $item; - } - } - } - - if ($secondCall == true) { - // reprocess extracting client and language - $this->_setClientId(); - mr_loadConfiguration($this->_iClientMR); - $this->_setLanguageId(); - } - } - ModRewriteDebugger::add($this->_aParts, 'ModRewriteController::_extractRequestUri() $this->_aParts'); - - // loop parts array and remove existing 'front_content.php' - if ($this->_hasPartArrayItems()) { - foreach ($this->_aParts as $p => $item) { - if ($item == self::FRONT_CONTENT) { - unset($this->_aParts[$p]); - } - } - } - } - - /** - * Tries to initialize the client id. - * This is required to load the proper plugin configuration for current client. - */ - private function _initializeClientId() { - global $client, $changeclient, $load_client; - - $iClient = (isset($client) && (int) $client > 0) ? $client : 0; - $iChangeClient = (isset($changeclient) && (int) $changeclient > 0) ? $changeclient : 0; - $iLoadClient = (isset($load_client) && (int) $load_client > 0) ? $load_client : 0; - - $this->_iClientMR = 0; - if ($iClient > 0 && $iChangeClient == 0) { - $this->_iClientMR = $iClient; - } elseif ($iChangeClient > 0) { - $this->_iClientMR = $iChangeClient; - } else { - $this->_iClientMR = $iLoadClient; - } - - if ((int) $this->_iClientMR > 0) { - // set global client variable - $client = (int) $this->_iClientMR; - } - } - - /** - * Tries to initialize the language id. - */ - private function _initializeLanguageId() { - global $lang, $changelang, $load_lang; - - $iLang = (isset($lang) && (int) $lang > 0) ? $lang : 0; - $iChangeLang = (isset($changelang) && (int) $changelang > 0) ? $changelang : 0; - $iLoadLang = (isset($load_lang) && (int) $load_lang > 0) ? $load_lang : 0; - - $this->_iLangMR = 0; - if ($iLang > 0 && $iChangeLang == 0) { - $this->_iLangMR = $iLang; - } elseif ($iChangeLang > 0) { - $this->_iLangMR = $iChangeLang; - } else { - $this->_iLangMR = $iLoadLang; - } - - if ((int) $this->_iLangMR > 0) { - // set global lang variable - $lang = (int) $this->_iLangMR; - } - } - - /** - * Detects client id from given url - */ - private function _setClientId() { - global $client; - - if ($this->_bError) { - return; - } elseif ($this->_isRootRequest()) { - // request to root - return; - } elseif (parent::getConfig('use_client') !== 1) { - return; - } - - if (parent::getConfig('use_client_name') == 1) { - $detectedClientId = (int) ModRewrite::getClientId(array_shift($this->_aParts)); - } else { - $detectedClientId = (int) array_shift($this->_aParts); - if ($detectedClientId > 0 && !ModRewrite::languageIdExists($detectedClientId)) { - $detectedClientId = 0; - } - } - - if ($detectedClientId > 0) { - // overwrite existing client variables - $this->_iClientMR = $detectedClientId; - $client = $detectedClientId; - } else { - $this->_setError(self::ERROR_CLIENT); - } - } - - /** - * Sets language id - */ - private function _setLanguageId() { - global $lang; - - if ($this->_bError) { - return; - } elseif ($this->_isRootRequest()) { - // request to root - return; - } elseif (parent::getConfig('use_language') !== 1) { - return; - } - - if (parent::getConfig('use_language_name') == 1) { - // thanks to Nicolas Dickinson for multi Client/Language BugFix - $languageName = array_shift($this->_aParts); - $detectedLanguageId = (int) ModRewrite::getLanguageId($languageName, $this->_iClientMR); - } else { - $detectedLanguageId = (int) array_shift($this->_aParts); - if ($detectedLanguageId > 0 && !ModRewrite::clientIdExists($detectedLanguageId)) { - $detectedLanguageId = 0; - } - } - - if ($detectedLanguageId > 0) { - // overwrite existing language variables - $this->_iLangMR = $detectedLanguageId; - $lang = $detectedLanguageId; - } else { - $this->_setError(self::ERROR_LANGUAGE); - } - } - - /** - * Sets path resolver and category id - */ - private function _setPathresolverSetting() { - global $client, $lang, $load_lang, $idcat; - - if ($this->_bError) { - return; - } elseif (!$this->_hasPartArrayItems()) { - return; - } - - $this->_sPath = '/' . implode('/', $this->_aParts) . '/'; - - if (!isset($lang) || (int) $lang <= 0) { - if ((int) $load_lang > 0) { - // load_client is set in frontend/config.php - $lang = (int) $load_lang; - } else { - $clCol = new cApiClientLanguageCollection(); - $clCol->setWhere('idclient', $client); - $clCol->query(); - if ($clItem = $clCol->next()) { - $lang = $clItem->get('idlang'); - } - } - } - - $idcat = (int) ModRewrite::getCatIdByUrlPath($this->_sPath); - - if ($idcat == 0) { - // category couldn't resolved - $this->_setError(self::ERROR_CATEGORY); - $idcat = null; - } else { - // unset $this->_sPath if $idcat could set, otherwhise it would be resolved again. - unset($this->_sPath); - } - - ModRewriteDebugger::add($idcat, 'ModRewriteController->_setPathresolverSetting $idcat'); - ModRewriteDebugger::add($this->_sPath, 'ModRewriteController->_setPathresolverSetting $this->_sPath'); - } - - /** - * Sets article id - */ - private function _setIdart() { - global $idcat, $idart, $lang; - - if ($this->_bError) { - return; - } else if ($this->_isRootRequest()) { - return; - } - - $iIdCat = (isset($idcat) && (int) $idcat > 0) ? $idcat : 0; - $iIdArt = (isset($idart) && (int) $idart > 0) ? $idart : 0; - $detectedIdart = 0; - $defaultStartArtName = parent::getConfig('default_startart_name'); - $currArtName = $this->_sArtName; - - // startarticle name in url - if (parent::getConfig('add_startart_name_to_url') && !empty($currArtName)) { - if ($currArtName == $defaultStartArtName) { - // stored articlename is the default one, remove it ModRewrite::getArtIdByWebsafeName() - // will find the real article name - $currArtName = ''; - } - } - - // Last check, before detecting article id - if ($iIdCat == 0 && $iIdArt == 0 && empty($currArtName)) { - // no idcat, idart and article name - // must be a request to root or with language name and/or client name part! - return; - } - - if ($iIdCat > 0 && $iIdArt == 0 && !empty($currArtName)) { - // existing idcat with no idart and with article name - $detectedIdart = (int) ModRewrite::getArtIdByWebsafeName($currArtName, $iIdCat, $lang); - } elseif ($iIdCat > 0 && $iIdArt == 0 && empty($currArtName)) { - if (parent::getConfig('add_startart_name_to_url') && ($currArtName == '' || $defaultStartArtName == '' || $defaultStartArtName == $this->_sArtName)) { - // existing idcat without idart and without article name or with default start article name - cInclude('classes', 'class.article.php'); - $artColl = new ArticleCollection(array('idcat' => $idcat, 'start' => 1)); - if ($artItem = $artColl->startArticle()) { - $detectedIdart = (int) $artItem->get('idart'); - } - } - } elseif ($iIdCat == 0 && $iIdArt == 0 && !empty($currArtName)) { - // no idcat and idart but article name - $detectedIdart = (int) ModRewrite::getArtIdByWebsafeName($currArtName, $iIdCat, $lang); - } - - if ($detectedIdart > 0) { - $idart = $detectedIdart; - } elseif (!empty($currArtName)) { - $this->_setError(self::ERROR_ARTICLE); - } - - ModRewriteDebugger::add($detectedIdart, 'ModRewriteController->_setIdart $detectedIdart'); - } - - /** - * Does post validation of the extracted data. - * - * One main goal of this function is to prevent duplicated content, which could happen, if - * the configuration 'startfromroot' is activated. - */ - private function _postValidation() { - global $idcat, $idart, $client; - - if ($this->_bError || $this->_bRoutingFound || !$this->_hasPartArrayItems()) { - return; - } - - if (parent::getConfig('startfromroot') == 1 && parent::getConfig('prevent_duplicated_content') == 1) { - - // prevention of duplicated content if '/firstcat/' is directly requested! - - $idcat = (isset($idcat) && (int) $idcat > 0) ? $idcat : null; - $idart = (isset($idart) && (int) $idart > 0) ? $idart : null; - - // compose new parameter - $param = ''; - if ($idcat) { - $param .= 'idcat=' . (int) $idcat; - } - if ($idart) { - $param .= ($param !== '') ? '&idart=' . (int) $idart : 'idart=' . (int) $idart; - } - - if ($param == '') { - return; - } - - // set client language, if not set before - mr_setClientLanguageId($client); - - //rebuild url - $url = mr_buildNewUrl(self::FRONT_CONTENT . '?' . $param); - - $aUrlComponents = @parse_url($this->_sIncommingUrl); - $incommingUrl = (isset($aUrlComponents['path'])) ? $aUrlComponents['path'] : ''; - - ModRewriteDebugger::add($url, 'ModRewriteController->_postValidation validate url'); - ModRewriteDebugger::add($incommingUrl, 'ModRewriteController->_postValidation incommingUrl'); - - // now the new generated uri should be identical with the request uri - if ($incommingUrl !== $url) { - $this->_setError(self::ERROR_POST_VALIDATION); - $idcat = null; - } - } - } - - /** - * Parses the url using defined separators - * - * @param string $url Incoming url - * @return string Parsed url - */ - private function _parseUrl($url) { - $this->_sResolvedUrl = $url; - - $oMrUrlUtil = ModRewriteUrlUtil::getInstance(); - $url = $oMrUrlUtil->toContenidoUrl($url); - - return @parse_url($url); - } - - /** - * Returns state of parts property. - * - * @return bool True if $this->_aParts propery contains items - */ - private function _hasPartArrayItems() { - return (!empty($this->_aParts)); - } - - /** - * Checks if current request was a root request. - * - * @return bool - */ - private function _isRootRequest() { - return ($this->_sIncommingUrl == '/' || $this->_sIncommingUrl == ''); - } - - /** - * Sets error code and error flag (everything greater than 0 is an error) - * @param int $errCode - */ - private function _setError($errCode) { - $this->_iError = (int) $errCode; - $this->_bError = ((int) $errCode > 0); - } - -} \ No newline at end of file diff --git a/conlite/plugins/cl-mod-rewrite/classes/class.modrewritedebugger.php b/conlite/plugins/cl-mod-rewrite/classes/class.modrewritedebugger.php deleted file mode 100644 index 2e3a302..0000000 --- a/conlite/plugins/cl-mod-rewrite/classes/class.modrewritedebugger.php +++ /dev/null @@ -1,88 +0,0 @@ - - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ - -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -/** - * Mod rewrite debugger class. - * - * @author Murat Purc - * @package plugin - * @subpackage Mod Rewrite - */ -class ModRewriteDebugger { - - /** - * Flag to enable debugger - * @var bool - */ - protected static $_bEnabled = false; - - /** - * Enable debugger setter. - * @param bool $bEnabled - */ - public static function setEnabled($bEnabled) { - self::$_bEnabled = (bool) $bEnabled; - } - - /** - * Adds variable to debugger. - * Wrapper for DebuggerFactory::getDebugger('visible_adv'). - * - * @param mixed $mVar The variable to dump - * @param string $sLabel Describtion for passed $mVar - */ - public static function add($mVar, $sLabel = '') { - if (!self::$_bEnabled) { - return; - } - DebuggerFactory::getDebugger('visible_adv')->add($mVar, $sLabel); - } - - /** - * Returns output of all added variables to debug. - * @return string - */ - public static function getAll() { - if (!self::$_bEnabled) { - return ''; - } - - ob_start(); - DebuggerFactory::getDebugger('visible_adv')->showAll(); - $output = ob_get_contents(); - ob_end_clean(); - return $output; - } - - /** - * Logs variable to debugger. - * Wrapper for cDebug::getDebugger(cDebug::DEBUGGER_FILE). - * - * @param mixed $mVar The variable to log the contents - * @param string $sLabel Describtion for passed $mVar - */ - public static function log($mVar, $sLabel = '') { - if (!self::$_bEnabled) { - return; - } - - DebuggerFactory::getDebugger('file')->show($mVar, $sLabel); - } - -} diff --git a/conlite/plugins/cl-mod-rewrite/classes/class.modrewritetest.php b/conlite/plugins/cl-mod-rewrite/classes/class.modrewritetest.php deleted file mode 100644 index 5801ea7..0000000 --- a/conlite/plugins/cl-mod-rewrite/classes/class.modrewritetest.php +++ /dev/null @@ -1,300 +0,0 @@ - - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ - -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -/** - * Mod rewrite test class. - * - * @author Murat Purc - * @package plugin - * @subpackage Mod Rewrite - */ -class ModRewriteTest { - - /** - * Global $cfg array - * @var array - */ - protected $_aCfg; - - /** - * Global $cfg['tab'] array - * @var array - */ - protected $_aCfgTab; - - /** - * Max items to process - * @var int - */ - protected $_iMaxItems; - - /** - * Actual resolved url - * @var string - */ - protected $_sResolvedUrl; - - /** - * Routing found flag - * @var bool - */ - protected $_bRoutingFound = false; - - /** - * Constuctor - * @param int $maxItems Max items (urls to articles/categories) to process - */ - public function __construct($maxItems) { - global $cfg; - $this->_aCfg = & $cfg; - $this->_aCfgTab = & $cfg['tab']; - $this->_iMaxItems = $maxItems; - } - - /** - * Returns resolved URL - * - * @return bool Resolved URL - */ - public function getResolvedUrl() { - return $this->_sResolvedUrl; - } - - /** - * Returns flagz about found routing - * - * @return bool - */ - public function getRoutingFoundState() { - return $this->_bRoutingFound; - } - - /** - * Fetchs full structure of the installation (categories and articles) and returns it back. - * - * @param int $idclient Client id - * @param int $idlang Language id - * @return array Full structure as follows - * - * $arr[idcat] = Category dataset - * $arr[idcat]['articles'][idart] = Article dataset - * - */ - public function fetchFullStructure($idclient = null, $idlang = null) { - global $client, $lang; - - $db = new DB_Contenido(); - $db2 = new DB_Contenido(); - - if (!$idclient || (int) $idclient == 0) { - $idclient = $client; - } - if (!$idlang || (int) $idlang == 0) { - $idlang = $lang; - } - - $aTab = $this->_aCfgTab; - - $aStruct = array(); - - $sql = "SELECT - * - FROM - " . $aTab['cat_tree'] . " AS a, - " . $aTab['cat_lang'] . " AS b, - " . $aTab['cat'] . " AS c - WHERE - a.idcat = b.idcat AND - c.idcat = a.idcat AND - c.idclient = '" . $idclient . "' AND - b.idlang = '" . $idlang . "' - ORDER BY - a.idtree"; - - $db->query($sql); - - $counter = 0; - - while ($db->next_record()) { - - if (++$counter == $this->_iMaxItems) { - break; // break this loop - } - - $idcat = $db->f('idcat'); - $aStruct[$idcat] = $db->Record; - $aStruct[$idcat]['articles'] = array(); - - $sql2 = "SELECT - * - FROM - " . $aTab['cat_art'] . " AS a, - " . $aTab['art'] . " AS b, - " . $aTab['art_lang'] . " AS c - WHERE - a.idcat = '" . $idcat . "' AND - b.idart = a.idart AND - c.idart = a.idart AND - c.idlang = '" . $idlang . "' AND - b.idclient = '" . $idclient . "' - ORDER BY - c.title ASC"; - - $db2->query($sql2); - - while ($db2->next_record()) { - $idart = $db2->f('idart'); - $aStruct[$idcat]['articles'][$idart] = $db2->Record; - if (++$counter == $this->_iMaxItems) { - break 2; // break this and also superior loop - } - } - } - - return $aStruct; - } - - /** - * Creates an URL using passed data. - * - * The result is used to generate seo urls... - * - * @param array $arr Assoziative array with some data as follows: - * - * $arr['idcat'] - * $arr['idart'] - * $arr['idcatart'] - * $arr['idartlang'] - * - * @param string $type Either 'c' or 'a' (category or article). If set to - * 'c' only the parameter idcat will be added to the URL - */ - public function composeURL($arr, $type) { - $type = ($type == 'a') ? 'a' : 'c'; - - $param = array(); - - if ($type == 'c') { - $param[] = 'idcat=' . $arr['idcat']; - } else { - if (mr_getRequest('idart')) { - $param[] = 'idart=' . $arr['idart']; - } - if (mr_getRequest('idcat')) { - $param[] = 'idcat=' . $arr['idcat']; - } - if (mr_getRequest('idcatart')) { - $param[] = 'idcatart=' . $arr['idcatart']; - } - if (mr_getRequest('idartlang')) { - $param[] = 'idartlang=' . $arr['idartlang']; - } - } - $param[] = 'foo=bar'; - return 'front_content.php?' . implode('&', $param); - } - - /** - * Resolves variables of an page (idcat, idart, idclient, idlang, etc.) by - * processing passed url using ModRewriteController - * - * @param string $url Url to resolve - * @return array Assoziative array with resolved data - */ - public function resolveUrl($url) { - // some globals to reset - $aGlobs = array( - 'mr_preprocessedPageError', 'idart', 'idcat' - ); - foreach ($aGlobs as $p => $k) { - if (isset($GLOBALS[$k])) { - unset($GLOBALS[$k]); - } - } - - $aReturn = array(); - - // create an mod rewrite controller instance and execute processing - $oMRController = new ModRewriteController($url); - $oMRController->execute(); - - if ($oMRController->errorOccured()) { - - // an error occured (idcat and or idart couldn't catched by controller) - $aReturn['mr_preprocessedPageError'] = 1; - $aReturn['error'] = $oMRController->getError(); - - $this->_sResolvedUrl = ''; - $this->_bRoutingFound = false; - } else { - - // set some global variables - - $this->_sResolvedUrl = $oMRController->getResolvedUrl(); - $this->_bRoutingFound = $oMRController->getRoutingFoundState(); - - if ($oMRController->getClient()) { - $aReturn['client'] = $oMRController->getClient(); - } - - if ($oMRController->getChangeClient()) { - $aReturn['changeclient'] = $oMRController->getChangeClient(); - } - - if ($oMRController->getLang()) { - $aReturn['lang'] = $oMRController->getLang(); - } - - if ($oMRController->getChangeLang()) { - $aReturn['changelang'] = $oMRController->getChangeLang(); - } - - if ($oMRController->getIdArt()) { - $aReturn['idart'] = $oMRController->getIdArt(); - } - - if ($oMRController->getIdCat()) { - $aReturn['idcat'] = $oMRController->getIdCat(); - } - - if ($oMRController->getPath()) { - $aReturn['path'] = $oMRController->getPath(); - } - } - - return $aReturn; - } - - /** - * Creates a readable string from passed resolved data array. - * - * @param array Assoziative array with resolved data - * @return string Readable resolved data - */ - public function getReadableResolvedData(array $data) { - // compose resolved string - $ret = ''; - foreach ($data as $k => $v) { - $ret .= $k . '=' . $v . '; '; - } - $ret = substr($ret, 0, strlen($ret) - 2); - return $ret; - } - -} diff --git a/conlite/plugins/cl-mod-rewrite/classes/class.modrewriteurlstack.php b/conlite/plugins/cl-mod-rewrite/classes/class.modrewriteurlstack.php deleted file mode 100644 index dbfd893..0000000 --- a/conlite/plugins/cl-mod-rewrite/classes/class.modrewriteurlstack.php +++ /dev/null @@ -1,319 +0,0 @@ - - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -/** - * Mod rewrite url stack class. Provides features to collect urls and to get the - * pretty path and names of categories/articles at one go. - * - * Main goal of this class is to collect urls and to get the urlpath and urlname - * of the related categories/articles at one go. This will reduce the queries - * against the database. - * Therefore the full advantage will be taken by rewriting the urls at codeoutput - * in front_content.php, where you will be able to collect all urls at once... - * - * Usage: - * - * // get the instance - * $oMRUrlStack = ModRewriteUrlStack::getInstance(); - * - * // add several urls to fill the stack - * $oMRUrlStack->add('front_content.php?idcat=123'); - * $oMRUrlStack->add('front_content.php?idart=321'); - * $oMRUrlStack->add('front_content.php?idcatart=213'); - * $oMRUrlStack->add('front_content.php?idcatlang=213'); - * $oMRUrlStack->add('front_content.php?idartlang=312'); - * - * // now the first call will get the pretty path and names from database at one go - * $aPrettyParts = $oMRUrlStack->getPrettyUrlParts('front_content.php?idcat=123'); - * echo $aPrettyParts['urlpath']; // something like 'Main-category-name/Category-name/Another-category-name/' - * echo $aPrettyParts['urlname']; // something like 'Name-of-an-article' - * - * - * @author Murat Purc - * @package plugin - * @subpackage Mod Rewrite - */ -class ModRewriteUrlStack { - - /** - * Self instance - * - * @var ModRewriteUrlStack - */ - private static $_instance; - - /** - * Database object - * - * @var DB_Contenido - */ - private $_oDb; - - /** - * Array for urls - * - * @var array - */ - private $_aUrls = array(); - - /** - * Url stack array - * - * @var array - */ - private $_aStack = array(); - - /** - * CONTENIDO related parameter array - * - * @var array - */ - private $_aConParams = array( - 'idcat' => 1, 'idart' => 1, 'lang' => 1, 'idcatlang' => 1, 'idcatart' => 1, 'idartlang' => 1 - ); - - /** - * Database tables array - * - * @var array - */ - private $_aTab; - - /** - * Language id - * - * @var int - */ - private $_idLang; - - /** - * Constructor, sets some properties. - */ - private function __construct() { - global $cfg, $lang; - $this->_oDb = new DB_Contenido(); - $this->_aTab = $cfg['tab']; - $this->_idLang = $lang; - } - - /** - * Returns a instance of ModRewriteUrlStack (singleton implementation) - * - * @return ModRewriteUrlStack - */ - public static function getInstance() { - if (self::$_instance == null) { - self::$_instance = new ModRewriteUrlStack(); - } - return self::$_instance; - } - - /** - * Adds an url to the stack - * - * @param string Url, like front_content.php?idcat=123... - */ - public function add($url) { - $url = ModRewrite::urlPreClean($url); - if (isset($this->_aUrls[$url])) { - return; - } - - $aUrl = $this->_extractUrl($url); - - // cleanup parameter - foreach ($aUrl['params'] as $p => $v) { - if (!isset($this->_aConParams[$p])) { - unset($aUrl['params'][$p]); - } else { - $aUrl['params'][$p] = (int) $v; - } - } - - // add language id, if not available - if ((int) mr_arrayValue($aUrl['params'], 'lang') == 0) { - $aUrl['params']['lang'] = $this->_idLang; - } - - $sStackId = $this->_makeStackId($aUrl['params']); - $this->_aUrls[$url] = $sStackId; - $this->_aStack[$sStackId] = array('params' => $aUrl['params']); - } - - /** - * Returns the pretty urlparts (only category path an article name) of the - * desired url. - * - * @param string Url, like front_content.php?idcat=123... - * @return array Assoziative array like - * - * $arr['urlpath'] - * $arr['urlname'] - * - */ - public function getPrettyUrlParts($url) { - $url = ModRewrite::urlPreClean($url); - if (!isset($this->_aUrls[$url])) { - $this->add($url); - } - - $sStackId = $this->_aUrls[$url]; - if (!isset($this->_aStack[$sStackId]['urlpath'])) { - $this->_chunkSetPrettyUrlParts($sStackId); - } - $aPretty = array( - 'urlpath' => $this->_aStack[$sStackId]['urlpath'], - 'urlname' => $this->_aStack[$sStackId]['urlname'] - ); - return $aPretty; - } - - /** - * Extracts passed url using parse_urla and adds also the 'params' array to it - * - * @param string Url, like front_content.php?idcat=123... - * @return array Components containing result of parse_url with additional - * 'params' array - */ - private function _extractUrl($url) { - $aUrl = @parse_url($url); - if (isset($aUrl['query'])) { - $aUrl['query'] = str_replace('&', '&', $aUrl['query']); - parse_str($aUrl['query'], $aUrl['params']); - } - if (!isset($aUrl['params']) && !is_array($aUrl['params'])) { - $aUrl['params'] = array(); - } - return $aUrl; - } - - /** - * Extracts article or category related parameter from passed params array - * and generates an identifier. - * - * @param array $aParams Parameter array - * @return string Composed stack id - */ - private function _makeStackId(array $aParams) { - # idcatart - if ((int) mr_arrayValue($aParams, 'idart') > 0) { - $sStackId = 'idart_' . $aParams['idart'] . '_lang_' . $aParams['lang']; - } elseif ((int) mr_arrayValue($aParams, 'idartlang') > 0) { - $sStackId = 'idartlang_' . $aParams['idartlang']; - } elseif ((int) mr_arrayValue($aParams, 'idcatart') > 0) { - $sStackId = 'idcatart_' . $aParams['idcatart'] . '_lang_' . $aParams['lang']; - } elseif ((int) mr_arrayValue($aParams, 'idcat') > 0) { - $sStackId = 'idcat_' . $aParams['idcat'] . '_lang_' . $aParams['lang']; - } elseif ((int) mr_arrayValue($aParams, 'idcatlang') > 0) { - $sStackId = 'idcatlang_' . $aParams['idcatlang']; - } else { - $sStackId = 'lang_' . $aParams['lang']; - } - return $sStackId; - } - - /** - * Main function to get the urlparts of urls. - * - * Composes the query by looping thru stored but non processed urls, executes - * the query and adds the (urlpath and urlname) result to the stack. - * - * @param type $sStackId - * @return type - */ - private function _chunkSetPrettyUrlParts($sStackId) { - // collect stack parameter to get urlpath and urlname - $aStack = array(); - foreach ($this->_aStack as $stackId => $item) { - if (!isset($item['urlpath'])) { - // pretty url is to create - $aStack[$stackId] = $item; - } - } - - // now, it's time to compose the where clause of the query - $sWhere = ''; - foreach ($aStack as $stackId => $item) { - - if ($stackId == $sStackId) { - $aP = $item['params']; - if ((int) mr_arrayValue($aP, 'idart') > 0) { - $sWhere .= '(al.idart = ' . $aP['idart'] . ' AND al.idlang = ' . $aP['lang'] . ') OR '; - } elseif ((int) mr_arrayValue($aP, 'idartlang') > 0) { - $sWhere .= '(al.idartlang = ' . $aP['idartlang'] . ') OR '; - } elseif ((int) mr_arrayValue($aP, 'idcat') > 0) { - $sWhere .= '(cl.idcat = ' . $aP['idcat'] . ' AND cl.idlang = ' . $aP['lang'] . ' AND cl.startidartlang = al.idartlang) OR '; - } elseif ((int) mr_arrayValue($aP, 'idcatart') > 0) { - $sWhere .= '(ca.idcatart = ' . $aP['idcatart'] . ' AND ca.idart = al.idart AND al.idlang = ' . $aP['lang'] . ') OR '; - } elseif ((int) mr_arrayValue($aP, 'idcatlang') > 0) { - $sWhere .= '(cl.idcatlang = ' . $aP['idcatlang'] . ' AND cl.startidartlang = al.idartlang) OR '; - } - } - } - if ($sWhere == '') { - return; - } - $sWhere = cString::getPartOfString($sWhere, 0, -4); - $sWhere = str_replace(' OR ', " OR \n", $sWhere); - - // compose query and execute it - $sql = <<_aTab['art_lang']} AS al, {$this->_aTab['cat_lang']} AS cl, {$this->_aTab['cat_art']} AS ca -WHERE - al.idart = ca.idart AND - ca.idcat = cl.idcat AND - al.idlang = cl.idlang AND - ( $sWhere ) -SQL; - ModRewriteDebugger::add($sql, 'ModRewriteUrlStack->_chunkSetPrettyUrlParts() $sql'); - - $aNewStack = array(); - - // create array of fields, which are to reduce step by step from record set below - $aFields = array('', 'idart', 'idartlang', 'idcatart', 'idcat'); - - $this->_oDb->query($sql); - while ($this->_oDb->next_record()) { - $aRS = $this->_oDb->Record; - - // loop thru fields array - foreach ($aFields as $field) { - if (isset($aRS[$field])) { - // reduce existing field - unset($aRS[$field]); - } - $rsStackID = $this->_makeStackId($aRS); - if (isset($aStack[$rsStackID])) { - // matching stack entry found, add urlpath and urlname to the new stack - $aNewStack[$rsStackID]['urlpath'] = $aRS['urlpath']; - $aNewStack[$rsStackID]['urlname'] = $aRS['urlname']; - break; - } - } - } - ModRewriteDebugger::add($aNewStack, 'ModRewriteUrlStack->_chunkSetPrettyUrlParts() $aNewStack'); - ModRewriteDebugger::add($this->_aStack, 'ModRewriteUrlStack->_chunkSetPrettyUrlParts() $this->_aStack'); - - $this->_aStack = array_merge($this->_aStack, $aNewStack); - } -} \ No newline at end of file diff --git a/conlite/plugins/cl-mod-rewrite/classes/class.modrewriteurlutil.php b/conlite/plugins/cl-mod-rewrite/classes/class.modrewriteurlutil.php deleted file mode 100644 index 37d42ce..0000000 --- a/conlite/plugins/cl-mod-rewrite/classes/class.modrewriteurlutil.php +++ /dev/null @@ -1,306 +0,0 @@ - - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ - -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -/** - * Mod Rewrite url utility class. Handles convertion of Urls from CONTENIDO core - * based url composition pattern to AMR (Advanced Mod Rewrite) url composition - * pattern and vice versa. - * - * @author Murat Purc - * @package plugin - * @subpackage Mod Rewrite - */ -class ModRewriteUrlUtil extends ModRewriteBase { - - /** - * Self instance (singleton implementation) - * @var ModRewriteUrlUtil - */ - private static $_instance; - - /** - * CONTENIDO category word separator - * @var string - */ - private $_catWordSep = '-'; - - /** - * AMR category word separator - * @var string - */ - private $_mrCatWordSep; - - /** - * CONTENIDO category separator - * @var string - */ - private $_catSep = '/'; - - /** - * AMR category separator - * @var string - */ - private $_mrCatSep; - - /** - * CONTENIDO article separator - * @var string - */ - private $_artSep = '/'; - - /** - * AMR article separator - * @var string - */ - private $_mrArtSep; - - /** - * CONTENIDO article word separator - * @var string - */ - private $_artWordSep = '-'; - - /** - * AMR article word separator - * @var string - */ - private $_mrArtWordSep; - - /** - * AMR extension used for articlenames (e. g. .html) - * @var string - */ - private $_mrExt; - - /** - * Constructor, sets some AMR configuration related properties - */ - private function __construct() { - $aCfg = parent::getConfig(); - $this->_mrCatWordSep = $aCfg['category_word_seperator']; - $this->_mrCatSep = $aCfg['category_seperator']; - $this->_mrArtSep = $aCfg['article_seperator']; - $this->_mrArtWordSep = $aCfg['article_word_seperator']; - $this->_mrExt = $aCfg['file_extension']; - } - - /** - * Prevent cloning - */ - private function __clone() { - - } - - /** - * Returns self instance (singleton pattern) - * @return ModRewriteUrlUtil - */ - public static function getInstance() { - if (self::$_instance == null) { - self::$_instance = new ModRewriteUrlUtil(); - } - return self::$_instance; - } - - /** - * Converts passed AMR url path to CONTENIDO url path. - * - * @param string $urlPath AMR url path - * @return string CONTENIDO url path - */ - public function toContenidoUrlPath($urlPath) { - $newUrlPath = $this->_toUrlPath( - $urlPath, $this->_mrCatSep, $this->_catSep, $this->_mrCatWordSep, $this->_catWordSep, $this->_mrArtSep, $this->_artSep - ); - return $newUrlPath; - } - - /** - * Converts passed CONTENIDO url path to AMR url path. - * - * @param string $urlPath CONTENIDO url path - * @return string AMR url path - */ - public function toModRewriteUrlPath($urlPath) { - $newUrlPath = $this->_toUrlPath( - $urlPath, $this->_catSep, $this->_mrCatSep, $this->_catWordSep, $this->_mrCatWordSep, $this->_artSep, $this->_mrArtSep - ); - return $newUrlPath; - } - - /** - * Converts passed url path to a another url path (CONTENIDO to AMR and vice versa). - * - * @param string $urlPath Source url path - * @param string $fromCatSep Source category seperator - * @param string $toCatSep Destination category seperator - * @param string $fromCatWordSep Source category word seperator - * @param string $toCatWordSep Destination category word seperator - * @param string $fromArtSep Source article seperator - * @param string $toArtSep Destination article seperator - * @return string Destination url path - */ - private function _toUrlPath($urlPath, $fromCatSep, $toCatSep, $fromCatWordSep, $toCatWordSep, $fromArtSep, $toArtSep) { - if ((string) $urlPath == '') { - return $urlPath; - } - - if (substr($urlPath, -1) == $fromArtSep) { - $urlPath = substr($urlPath, 0, -1) . '{TAS}'; - } - - // pre replace category word seperator and category seperator - $urlPath = str_replace($fromCatWordSep, '{CWS}', $urlPath); - $urlPath = str_replace($fromCatSep, '{CS}', $urlPath); - - // replace category word seperator - $urlPath = str_replace('{CWS}', $toCatWordSep, $urlPath); - $urlPath = str_replace('{CS}', $toCatSep, $urlPath); - - $urlPath = str_replace('{TAS}', $toArtSep, $urlPath); - - return $urlPath; - } - - /** - * Converts passed AMR url name to CONTENIDO url name. - * - * @param string $urlName AMR url name - * @return string CONTENIDO url name - */ - public function toContenidoUrlName($urlName) { - $newUrlName = $this->_toUrlName($urlName, $this->_mrArtWordSep, $this->_artWordSep); - return $newUrlName; - } - - /** - * Converts passed CONTENIDO url name to AMR url name. - * - * @param string $urlName CONTENIDO url name - * @return string AMR url name - */ - public function toModRewriteUrlName($urlName) { - $newUrlName = $this->_toUrlName($urlName, $this->_artWordSep, $this->_mrArtWordSep); - return $newUrlName; - } - - /** - * Converts passed url name to a another url name (CONTENIDO to AMR and vice versa). - * - * @param string $urlName Source url name - * @param string $fromArtWordSep Source article word seperator - * @param string $toArtWordSep Destination article word seperator - * @return string Destination url name - */ - private function _toUrlName($urlName, $fromArtWordSep, $toArtWordSep) { - if ((string) $urlName == '') { - return $urlName; - } - - $urlName = str_replace($this->_mrExt, '{EXT}', $urlName); - - // replace article word seperator - $urlName = str_replace($fromArtWordSep, $toArtWordSep, $urlName); - - $urlName = str_replace('{EXT}', $this->_mrExt, $urlName); - - return $urlName; - } - - /** - * Converts passed AMR url to CONTENIDO url. - * - * @param string $url AMR url - * @return string CONTENIDO url - */ - public function toContenidoUrl($url) { - if (strpos($url, $this->_mrExt) === false) { - $newUrl = $this->toContenidoUrlPath($url); - } else { - // replace category word and article word seperator - $path = substr($url, 0, strrpos($url, $this->_mrArtSep) + 1); - $name = substr($url, strrpos($url, $this->_mrArtSep) + 1); - $newUrl = $this->toContenidoUrlPath($path) . $this->toContenidoUrlName($name); - } - return $newUrl; - } - - /** - * Converts passed AMR url to CONTENIDO url. - * - * @param string $url AMR url - * @return string CONTENIDO url - */ - public function toModRewriteUrl($url) { - if (strpos($url, $this->_mrExt) === false) { - $newUrl = $this->toModRewriteUrlPath($url); - } else { - // replace category word and article word seperator - $path = substr($url, 0, strrpos($url, $this->_artSep) + 1); - $name = substr($url, strrpos($url, $this->_artSep) + 1); - $newUrl = $this->toModRewriteUrlPath($path) . $this->toModRewriteUrlName($name); - } - return $newUrl; - } - - /** - * Converts passed url to a another url (CONTENIDO to AMR and vice versa). - * - * @param string $url Source url - * @param string $fromCatSep Source category seperator - * @param string $toCatSep Destination category seperator - * @param string $fromCatWordSep Source category word seperator - * @param string $toCatWordSep Destination category word seperator - * @param string $fromArtSep Source article seperator - * @param string $toArtSep Destination article seperator - * @param string $fromArtWordSep Source article word seperator - * @param string $toArtWordSep Destination article word seperator - * @return string Destination url - * - * @deprecated No more used, is to delete - */ - private function _toUrl($url, $fromCatSep, $toCatSep, $fromCatWordSep, $toCatWordSep, $fromArtSep, $toArtSep, $fromArtWordSep, $toArtWordSep) { - if ((string) $url == '') { - return $url; - } - - $url = str_replace($this->_mrExt, '{EXT}', $url); - - // replace category seperator - $url = str_replace($fromCatSep, $toCatSep, $url); - - // replace article seperator - $url = str_replace($fromArtSep, $toArtSep, $url); - - $url = str_replace('{EXT}', $this->_mrExt, $url); - - if (strpos($url, $this->_mrExt) === false) { - // no articlename, replace category word seperator - $url = str_replace($fromCatWordSep, $toCatWordSep, $url); - } else { - // replace category word and article word seperator - $path = str_replace($fromCatWordSep, $toCatWordSep, substr($url, 0, strrpos($url, $toArtSep) + 1)); - $file = str_replace($fromArtWordSep, $toArtWordSep, substr($url, strrpos($url, $toArtSep) + 1)); - $url = $path . $file; - } - - return $url; - } - -} \ No newline at end of file diff --git a/conlite/plugins/cl-mod-rewrite/classes/controller/class.modrewrite_content_controller.php b/conlite/plugins/cl-mod-rewrite/classes/controller/class.modrewrite_content_controller.php deleted file mode 100644 index 9aeaefb..0000000 --- a/conlite/plugins/cl-mod-rewrite/classes/controller/class.modrewrite_content_controller.php +++ /dev/null @@ -1,426 +0,0 @@ - - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ - -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - - -/** - * Content controller for general settings. - * - * @author Murat Purc - * @package plugin - * @subpackage Mod Rewrite - */ -class ModRewrite_ContentController extends ModRewrite_ControllerAbstract { - - /** - * Index action - */ - public function indexAction() { - // donut - $this->_doChecks(); - } - - /** - * Save settings action - */ - public function saveAction() { - $bDebug = $this->getProperty('bDebug'); - $aSeparator = $this->getProperty('aSeparator'); - $aWordSeparator = $this->getProperty('aWordSeparator'); - $routingSeparator = $this->getProperty('routingSeparator'); - - $bError = false; - $aMR = array(); - - $request = (count($_POST) > 0) ? $_POST : $_GET; - mr_requestCleanup($request); - - // use cl-mod-rewrite - if (mr_arrayValue($request, 'use') == 1) { - $this->_oView->use_chk = ' checked="checked"'; - $aMR['cl-mod-rewrite']['use'] = 1; - } else { - $this->_oView->use_chk = ''; - $aMR['cl-mod-rewrite']['use'] = 0; - } - - // root dir - if (mr_arrayValue($request, 'rootdir', '') !== '') { - if (!preg_match('/^[a-zA-Z0-9\-_\/\.]*$/', $request['rootdir'])) { - $sMsg = i18n("The root directory has a invalid format, alowed are the chars [a-zA-Z0-9\-_\/\.]", "cl-mod-rewrite"); - $this->_oView->rootdir_error = $this->_notifyBox('error', $sMsg); - $bError = true; - } elseif (!is_dir($_SERVER['DOCUMENT_ROOT'] . $request['rootdir'])) { - - if (mr_arrayValue($request, 'checkrootdir') == 1) { - // root dir check is enabled, this results in error - $sMsg = i18n("The specified directory '%s' does not exists", "cl-mod-rewrite"); - $sMsg = sprintf($sMsg, $_SERVER['DOCUMENT_ROOT'] . $request['rootdir']); - $this->_oView->rootdir_error = $this->_notifyBox('error', $sMsg); - $bError = true; - } else { - // root dir check ist disabled, take over the setting and - // output a warning. - $sMsg = i18n("The specified directory '%s' does not exists in DOCUMENT_ROOT '%s'. This could happen, if clients DOCUMENT_ROOT differs from CONTENIDO backends DOCUMENT_ROOT. However, the setting will be taken over because of disabled check.", "cl-mod-rewrite"); - $sMsg = sprintf($sMsg, $request['rootdir'], $_SERVER['DOCUMENT_ROOT']); - $this->_oView->rootdir_error = $this->_notifyBox('warning', $sMsg); - } - } - $this->_oView->rootdir = conHtmlentities($request['rootdir']); - $aMR['cl-mod-rewrite']['rootdir'] = $request['rootdir']; - } - - // root dir check - if (mr_arrayValue($request, 'checkrootdir') == 1) { - $this->_oView->checkrootdir_chk = ' checked="checked"'; - $aMR['cl-mod-rewrite']['checkrootdir'] = 1; - } else { - $this->_oView->checkrootdir_chk = ''; - $aMR['cl-mod-rewrite']['checkrootdir'] = 0; - } - - // start from root - if (mr_arrayValue($request, 'startfromroot') == 1) { - $this->_oView->startfromroot_chk = ' checked="checked"'; - $aMR['cl-mod-rewrite']['startfromroot'] = 1; - } else { - $this->_oView->startfromroot_chk = ''; - $aMR['cl-mod-rewrite']['startfromroot'] = 0; - } - - // prevent duplicated content - if (mr_arrayValue($request, 'prevent_duplicated_content') == 1) { - $this->_oView->prevent_duplicated_content_chk = ' checked="checked"'; - $aMR['cl-mod-rewrite']['prevent_duplicated_content'] = 1; - } else { - $this->_oView->prevent_duplicated_content_chk = ''; - $aMR['cl-mod-rewrite']['prevent_duplicated_content'] = 0; - } - - // language settings - if (mr_arrayValue($request, 'use_language') == 1) { - $this->_oView->use_language_chk = ' checked="checked"'; - $this->_oView->use_language_name_disabled = ''; - $aMR['cl-mod-rewrite']['use_language'] = 1; - if (mr_arrayValue($request, 'use_language_name') == 1) { - $this->_oView->use_language_name_chk = ' checked="checked"'; - $aMR['cl-mod-rewrite']['use_language_name'] = 1; - } else { - $this->_oView->use_language_name_chk = ''; - $aMR['cl-mod-rewrite']['use_language_name'] = 0; - } - } else { - $this->_oView->use_language_chk = ''; - $this->_oView->use_language_name_chk = ''; - $this->_oView->use_language_name_disabled = ' disabled="disabled"'; - $aMR['cl-mod-rewrite']['use_language'] = 0; - $aMR['cl-mod-rewrite']['use_language_name'] = 0; - } - - // client settings - if (mr_arrayValue($request, 'use_client') == 1) { - $this->_oView->use_client_chk = ' checked="checked"'; - $this->_oView->use_client_name_disabled = ''; - $aMR['cl-mod-rewrite']['use_client'] = 1; - if (mr_arrayValue($request, 'use_client_name') == 1) { - $this->_oView->use_client_name_chk = ' checked="checked"'; - $aMR['cl-mod-rewrite']['use_client_name'] = 1; - } else { - $this->_oView->use_client_name_chk = ''; - $aMR['cl-mod-rewrite']['use_client_name'] = 0; - } - } else { - $this->_oView->use_client_chk = ''; - $this->_oView->use_client_name_chk = ''; - $this->_oView->use_client_name_disabled = ' disabled="disabled"'; - $aMR['cl-mod-rewrite']['use_client'] = 0; - $aMR['cl-mod-rewrite']['use_client_name'] = 0; - } - - // use lowercase uri - if (mr_arrayValue($request, 'use_lowercase_uri') == 1) { - $this->_oView->use_lowercase_uri_chk = ' checked="checked"'; - $aMR['cl-mod-rewrite']['use_lowercase_uri'] = 1; - } else { - $this->_oView->use_lowercase_uri_chk = ''; - $aMR['cl-mod-rewrite']['use_lowercase_uri'] = 0; - } - - $this->_oView->category_separator_attrib = ''; - $this->_oView->category_word_separator_attrib = ''; - $this->_oView->article_separator_attrib = ''; - $this->_oView->article_word_separator_attrib = ''; - - $separatorPattern = $aSeparator['pattern']; - $separatorInfo = $aSeparator['info']; - - $wordSeparatorPattern = $aSeparator['pattern']; - $wordSeparatorInfo = $aSeparator['info']; - - $categorySeperator = mr_arrayValue($request, 'category_seperator', ''); - $categoryWordSeperator = mr_arrayValue($request, 'category_word_seperator', ''); - $articleSeperator = mr_arrayValue($request, 'article_seperator', ''); - $articleWordSeperator = mr_arrayValue($request, 'article_word_seperator', ''); - - // category seperator - if ($categorySeperator == '') { - $sMsg = i18n("Please specify separator (%s) for category", "cl-mod-rewrite"); - $sMsg = sprintf($sMsg, $separatorInfo); - $this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg); - $bError = true; - } elseif (!preg_match($separatorPattern, $categorySeperator)) { - $sMsg = i18n("Invalid separator for category, allowed one of following characters: %s", "cl-mod-rewrite"); - $sMsg = sprintf($sMsg, $separatorInfo); - $this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg); - $bError = true; - - // category word seperator - } elseif ($categoryWordSeperator == '') { - $sMsg = i18n("Please specify separator (%s) for category words", "cl-mod-rewrite"); - $sMsg = sprintf($sMsg, $wordSeparatorInfo); - $this->_oView->category_word_separator_error = $this->_notifyBox('error', $sMsg); - $bError = true; - } elseif (!preg_match($wordSeparatorPattern, $categoryWordSeperator)) { - $sMsg = i18n("Invalid separator for category words, allowed one of following characters: %s", "cl-mod-rewrite"); - $sMsg = sprintf($sMsg, $wordSeparatorInfo); - $this->_oView->category_word_separator_error = $this->_notifyBox('error', $sMsg); - $bError = true; - - // article seperator - } elseif ($articleSeperator == '') { - $sMsg = i18n("Please specify separator (%s) for article", "cl-mod-rewrite"); - $sMsg = sprintf($sMsg, $separatorInfo); - $this->_oView->article_separator_error = $this->_notifyBox('error', $sMsg); - $bError = true; - } elseif (!preg_match($separatorPattern, $articleSeperator)) { - $sMsg = i18n("Invalid separator for article, allowed is one of following characters: %s", "cl-mod-rewrite"); - $sMsg = sprintf($sMsg, $separatorInfo); - $this->_oView->article_separator_error = $this->_notifyBox('error', $sMsg); - $bError = true; - - // article word seperator - } elseif ($articleWordSeperator == '') { - $sMsg = i18n("Please specify separator (%s) for article words", "cl-mod-rewrite"); - $sMsg = sprintf($sMsg, $wordSeparatorInfo); - $this->_oView->article_word_separator_error = $this->_notifyBox('error', $sMsg); - $bError = true; - } elseif (!preg_match($wordSeparatorPattern, $articleWordSeperator)) { - $sMsg = i18n("Invalid separator for article words, allowed is one of following characters: %s", "cl-mod-rewrite"); - $sMsg = sprintf($sMsg, $wordSeparatorInfo); - $this->_oView->article_word_separator_error = $this->_notifyBox('error', $sMsg); - $bError = true; - - // category_seperator - category_word_seperator - } elseif ($categorySeperator == $categoryWordSeperator) { - $sMsg = i18n("Separator for category and category words must not be identical", "cl-mod-rewrite"); - $this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg); - $bError = true; - // category_seperator - article_word_seperator - } elseif ($categorySeperator == $articleWordSeperator) { - $sMsg = i18n("Separator for category and article words must not be identical", "cl-mod-rewrite"); - $this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg); - $bError = true; - // article_seperator - article_word_seperator - } elseif ($articleSeperator == $articleWordSeperator) { - $sMsg = i18n("Separator for category-article and article words must not be identical", "cl-mod-rewrite"); - $this->_oView->article_separator_error = $this->_notifyBox('error', $sMsg); - $bError = true; - } - - $this->_oView->category_separator = conHtmlentities($categorySeperator); - $aMR['cl-mod-rewrite']['category_seperator'] = $categorySeperator; - $this->_oView->category_word_separator = conHtmlentities($categoryWordSeperator); - $aMR['cl-mod-rewrite']['category_word_seperator'] = $categoryWordSeperator; - $this->_oView->article_separator = conHtmlentities($articleSeperator); - $aMR['cl-mod-rewrite']['article_seperator'] = $articleSeperator; - $this->_oView->article_word_separator = conHtmlentities($articleWordSeperator); - $aMR['cl-mod-rewrite']['article_word_seperator'] = $articleWordSeperator; - - // file extension - if (mr_arrayValue($request, 'file_extension', '') !== '') { - if (!preg_match('/^\.([a-zA-Z0-9\-_\/])*$/', $request['file_extension'])) { - $sMsg = i18n("The file extension has a invalid format, allowed are the chars \.([a-zA-Z0-9\-_\/])", "cl-mod-rewrite"); - $this->_oView->file_extension_error = $this->_notifyBox('error', $sMsg); - $bError = true; - } - $this->_oView->file_extension = conHtmlentities($request['file_extension']); - $aMR['cl-mod-rewrite']['file_extension'] = $request['file_extension']; - } else { - $this->_oView->file_extension = '.html'; - $aMR['cl-mod-rewrite']['file_extension'] = '.html'; - } - - // category resolve min percentage - if (isset($request['category_resolve_min_percentage'])) { - if (!is_numeric($request['category_resolve_min_percentage'])) { - $sMsg = i18n("Value has to be numeric.", "cl-mod-rewrite"); - $this->_oView->category_resolve_min_percentage_error = $this->_notifyBox('error', $sMsg); - $bError = true; - } elseif ($request['category_resolve_min_percentage'] < 0 || $request['category_resolve_min_percentage'] > 100) { - $sMsg = i18n("Value has to be between 0 an 100.", "cl-mod-rewrite"); - $this->_oView->category_resolve_min_percentage_error = $this->_notifyBox('error', $sMsg); - $bError = true; - } - $this->_oView->category_resolve_min_percentage = $request['category_resolve_min_percentage']; - $aMR['cl-mod-rewrite']['category_resolve_min_percentage'] = $request['category_resolve_min_percentage']; - } else { - $this->_oView->category_resolve_min_percentage = '75'; - $aMR['cl-mod-rewrite']['category_resolve_min_percentage'] = '75'; - } - - // add start article name to url - if (mr_arrayValue($request, 'add_startart_name_to_url') == 1) { - $this->_oView->add_startart_name_to_url_chk = ' checked="checked"'; - $aMR['cl-mod-rewrite']['add_startart_name_to_url'] = 1; - if (mr_arrayValue($request, 'add_startart_name_to_url', '') !== '') { - if (!preg_match('/^[a-zA-Z0-9\-_\/\.]*$/', $request['default_startart_name'])) { - $sMsg = i18n("The article name has a invalid format, allowed are the chars /^[a-zA-Z0-9\-_\/\.]*$/", "cl-mod-rewrite"); - $this->_oView->add_startart_name_to_url_error = $this->_notifyBox('error', $sMsg); - $bError = true; - } - $this->_oView->default_startart_name = conHtmlentities($request['default_startart_name']); - $aMR['cl-mod-rewrite']['default_startart_name'] = $request['default_startart_name']; - } else { - $this->_oView->default_startart_name = ''; - $aMR['cl-mod-rewrite']['default_startart_name'] = ''; - } - } else { - $this->_oView->add_startart_name_to_url_chk = ''; - $aMR['cl-mod-rewrite']['add_startart_name_to_url'] = 0; - $this->_oView->default_startart_name = ''; - $aMR['cl-mod-rewrite']['default_startart_name'] = ''; - } - - // rewrite urls at - if (mr_arrayValue($request, 'rewrite_urls_at') == 'congeneratecode') { - $this->_oView->rewrite_urls_at_congeneratecode_chk = ' checked="checked"'; - $this->_oView->rewrite_urls_at_front_content_output_chk = ''; - $aMR['cl-mod-rewrite']['rewrite_urls_at_congeneratecode'] = 1; - $aMR['cl-mod-rewrite']['rewrite_urls_at_front_content_output'] = 0; - } else { - $this->_oView->rewrite_urls_at_congeneratecode_chk = ''; - $this->_oView->rewrite_urls_at_front_content_output_chk = ' checked="checked"'; - $aMR['cl-mod-rewrite']['rewrite_urls_at_congeneratecode'] = 0; - $aMR['cl-mod-rewrite']['rewrite_urls_at_front_content_output'] = 1; - } - - // routing - if (isset($request['rewrite_routing'])) { - $aRouting = array(); - $items = explode("\n", $request['rewrite_routing']); - foreach ($items as $p => $v) { - $routingDef = explode($routingSeparator, $v); - if (count($routingDef) !== 2) { - continue; - } - $routingDef[0] = trim($routingDef[0]); - $routingDef[1] = trim($routingDef[1]); - if ($routingDef[0] == '') { - continue; - } - $aRouting[$routingDef[0]] = $routingDef[1]; - } - $this->_oView->rewrite_routing = conHtmlentities($request['rewrite_routing']); - $aMR['cl-mod-rewrite']['routing'] = $aRouting; - } else { - $this->_oView->rewrite_routing = ''; - $aMR['cl-mod-rewrite']['routing'] = array(); - } - - // redirect invalid article to errorsite - if (isset($request['redirect_invalid_article_to_errorsite'])) { - $this->_oView->redirect_invalid_article_to_errorsite_chk = ' checked="checked"'; - $aMR['cl-mod-rewrite']['redirect_invalid_article_to_errorsite'] = 1; - } else { - $this->_oView->redirect_invalid_article_to_errorsite_chk = ''; - $aMR['cl-mod-rewrite']['redirect_invalid_article_to_errorsite'] = 0; - } - - if ($bError) { - $sMsg = i18n("Please check your input", "cl-mod-rewrite"); - $this->_oView->content_before .= $this->_notifyBox('error', $sMsg); - return; - } - - if ($bDebug == true) { - echo $this->_notifyBox('info', 'Debug'); - echo '
    ';
    -            print_r($aMR['cl-mod-rewrite']);
    -            echo '
    '; - $sMsg = i18n("Configuration has not been saved, because of enabled debugging", "cl-mod-rewrite"); - echo $this->_notifyBox('info', $sMsg); - return; - } - - $bSeparatorModified = $this->_separatorModified($aMR['cl-mod-rewrite']); - - if (mr_setConfiguration($this->_client, $aMR)) { - $sMsg = i18n("Configuration has been saved", "cl-mod-rewrite"); - if ($bSeparatorModified) { - mr_loadConfiguration($this->_client, true); - } - $this->_oView->content_before .= $this->_notifyBox('info', $sMsg); - } else { - $sMsg = i18n("Configuration could not saved. Please check write permissions for %s ", "cl-mod-rewrite"); - $sMsg = sprintf($sMsg, $options['key']); - $this->_oView->content_before .= $this->_notifyBox('error', $sMsg); - } - } - - /** - * Checks, if any sseparators setting is modified or not - * @param array $aNewCfg New configuration send by requests. - * @return bool - */ - protected function _separatorModified($aNewCfg) { - $aCfg = ModRewrite::getConfig(); - - if ($aCfg['category_seperator'] != $aNewCfg['category_seperator']) { - return true; - } elseif ($aCfg['category_word_seperator'] != $aNewCfg['category_word_seperator']) { - return true; - } elseif ($aCfg['article_seperator'] != $aNewCfg['article_seperator']) { - return true; - } elseif ($aCfg['article_word_seperator'] != $aNewCfg['article_word_seperator']) { - return true; - } - return false; - } - - /** - * Does some checks like 'is_start_compatible' check. - * Adds notifications, if something will went wrong... - */ - protected function _doChecks() { - // Check for not supported '$cfg["is_start_compatible"] = true;' mode - if (!empty($this->_cfg['is_start_compatible']) && true === $this->_cfg['is_start_compatible']) { - $sMsg = i18n("Your Contenido installation runs with the setting 'is_start_compatible'. This plugin will not work properly in this mode.
    Please check following topic in Contenido forum to change this:

    is_start_compatible auf neue Version umstellen", "cl-mod-rewrite"); - $this->_oView->content_before .= $this->_notifyBox('warning', $sMsg); - } - - // Check for empty urlpath entries in cat_lang table - $db = new DB_Contenido(); - $sql = "SELECT idcatlang FROM " . $this->_cfg['tab']['cat_lang'] . " WHERE urlpath = ''"; - if ($db->query($sql) && $db->next_record()) { - $sMsg = i18n("It seems as if some categories don't have a set 'urlpath' entry in the database. Please reset empty aliases in %sFunctions%s area.", "cl-mod-rewrite"); - $sMsg = sprintf($sMsg, '', ''); - $this->_oView->content_before .= $this->_notifyBox('warning', $sMsg); - } - - } -} diff --git a/conlite/plugins/cl-mod-rewrite/classes/controller/class.modrewrite_contentexpert_controller.php b/conlite/plugins/cl-mod-rewrite/classes/controller/class.modrewrite_contentexpert_controller.php deleted file mode 100644 index a0ae01f..0000000 --- a/conlite/plugins/cl-mod-rewrite/classes/controller/class.modrewrite_contentexpert_controller.php +++ /dev/null @@ -1,143 +0,0 @@ - - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ - -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - - -/** - * Content expert controller for expert settings/actions. - * - * @author Murat Purc - * @package plugin - * @subpackage Mod Rewrite - */ -class ModRewrite_ContentExpertController extends ModRewrite_ControllerAbstract { - - /** - * Path to restrictive htaccess file - * @var string - */ - protected $_htaccessRestrictive = ''; - - /** - * Path to simple htaccess file - * @var string - */ - protected $_htaccessSimple = ''; - - /** - * Initializer method, sets the paths to htaccess files - */ - public function init() { - $this->_oView->content_before = ''; - - $pluginPath = $this->_cfg['path']['contenido'] . $this->_cfg['path']['plugins'] . 'cl-mod-rewrite/'; - $this->_htaccessRestrictive = $pluginPath . 'files/htaccess_restrictive.txt'; - $this->_htaccessSimple = $pluginPath . 'files/htaccess_simple.txt'; - } - - /** - * Index action - */ - public function indexAction() { - - } - - /** - * Copy htaccess action - */ - public function copyHtaccessAction() { - $type = $this->_getParam('htaccesstype'); - $copy = $this->_getParam('copy'); - - if ($type != 'restrictive' && $type != 'simple') { - return; - } elseif ($copy != 'contenido' && $copy != 'cms') { - return; - } - - $aInfo = $this->getProperty('htaccessInfo'); - - if ($aInfo['has_htaccess']) { - $this->_oView->content_before = $this->_notifyBox('info', 'Die .htaccess existiert bereits im Contenido-/ oder Mandantenverzeichnis, daher wird es nicht kopiert'); - return; - } - - if ($type == 'restrictive') { - $source = $this->_htaccessRestrictive; - } else { - $source = $this->_htaccessSimple; - } - - if ($copy == 'contenido') { - $dest = $aInfo['contenido_full_path'] . '.htaccess'; - } else { - $dest = $aInfo['client_full_path'] . '.htaccess'; - } - - if (!$result = @copy($source, $dest)) { - $this->_oView->content_before = $this->_notifyBox('info', 'Die .htaccess konnte nicht von ' . $source . ' nach ' . $dest . ' kopiert werden!'); - return; - } - - $msg = 'Die .htaccess wurde erfolgreich nach ' . str_replace('.htaccess', '', $dest) . ' kopiert'; - $this->_oView->content_before = $this->_notifyBox('info', $msg); - } - - /** - * Download htaccess action - */ - public function downloadHtaccessAction() { - $type = $this->_getParam('htaccesstype'); - - if ($type != 'restrictive' && $type != 'simple') { - return; - } - - if ($type == 'restrictive') { - $source = $this->_htaccessRestrictive; - } else { - $source = $this->_htaccessSimple; - } - - $this->_oView->content = file_get_contents($source); - - header('Content-Type: text/plain'); - header('Etag: ' . md5(mt_rand())); - header('Content-Disposition: attachment; filename="' . $type . '.htaccess"'); - $this->render('{CONTENT}'); - } - - /** - * Reset aliases action - */ - public function resetAction() { - // recreate all aliases - ModRewrite::recreateAliases(false); - $this->_oView->content_before = $this->_notifyBox('info', 'Alle Aliase wurden zurückgesetzt'); - } - - /** - * Reset only empty aliases action - */ - public function resetEmptyAction() { - // recreate only empty aliases - ModRewrite::recreateAliases(true); - $this->_oView->content_before = $this->_notifyBox('info', 'Nur leere Aliase wurden zurückgesetzt'); - } - -} diff --git a/conlite/plugins/cl-mod-rewrite/classes/controller/class.modrewrite_contenttest_controller.php b/conlite/plugins/cl-mod-rewrite/classes/controller/class.modrewrite_contenttest_controller.php deleted file mode 100644 index 067e3f3..0000000 --- a/conlite/plugins/cl-mod-rewrite/classes/controller/class.modrewrite_contenttest_controller.php +++ /dev/null @@ -1,176 +0,0 @@ - - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ - -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - - -/** - * Content controller to run tests. - * - * @author Murat Purc - * @package plugin - * @subpackage Mod Rewrite - */ -class ModRewrite_ContentTestController extends ModRewrite_ControllerAbstract { - - /** - * Number of max items to process - * @var int - */ - protected $_iMaxItems = 0; - - /** - * Initializer method, sets some view variables - */ - public function init() { - $this->_oView->content = ''; - $this->_oView->form_idart_chk = ($this->_getParam('idart')) ? ' checked="checked"' : ''; - $this->_oView->form_idcat_chk = ($this->_getParam('idcat')) ? ' checked="checked"' : ''; - $this->_oView->form_idcatart_chk = ($this->_getParam('idcatart')) ? ' checked="checked"' : ''; - $this->_oView->form_idartlang_chk = ($this->_getParam('idartlang')) ? ' checked="checked"' : ''; - $this->_oView->form_maxitems = (int) $this->_getParam('maxitems', 200); - $this->_iMaxItems = $this->_oView->form_maxitems; - } - - /** - * Index action - */ - public function indexAction() { - $this->_oView->content = ''; - } - - /** - * Test action - */ - public function testAction() { - $this->_oView->content = ''; - - // Array for testcases - $aTests = array(); - - // Instance of mr test - $oMRTest = new ModRewriteTest($this->_iMaxItems); - - $startTime = getmicrotime(); - - // Fetch complete CONTENIDO page structure - $aStruct = $oMRTest->fetchFullStructure(); - ModRewriteDebugger::add($aStruct, 'mr_test.php $aStruct'); - - // Loop through the structure and compose testcases - foreach ($aStruct as $idcat => $aCat) { - // category - $aTests[] = array( - 'url' => $oMRTest->composeURL($aCat, 'c'), - 'level' => $aCat['level'], - 'name' => $aCat['name'] - ); - - foreach ($aCat['articles'] as $idart => $aArt) { - // articles - $aTests[] = array( - 'url' => $oMRTest->composeURL($aArt, 'a'), - 'level' => $aCat['level'], - 'name' => $aCat['name'] . ' :: ' . $aArt['title'] - ); - } - } - - // compose content - $this->_oView->content = '
    ';
    -
    -        $oMRUrlStack = ModRewriteUrlStack::getInstance();
    -
    -        // first loop to add urls to mr url stack
    -        foreach ($aTests as $p => $v) {
    -            $oMRUrlStack->add($v['url']);
    -        }
    -
    -        $successCounter = 0;
    -        $failCounter = 0;
    -
    -        // second loop to do the rest
    -        foreach ($aTests as $p => $v) {
    -            $url = mr_buildNewUrl($v['url']);
    -            $arr = $oMRTest->resolveUrl($url);
    -            $error = '';
    -            $resUrl = $oMRTest->getResolvedUrl();
    -            $color = 'green';
    -
    -            if ($url !== $resUrl) {
    -                if ($oMRTest->getRoutingFoundState()) {
    -                    $successCounter++;
    -                    $resUrl = 'route to -> ' . $resUrl;
    -                } else {
    -                    $color = 'red';
    -                    $failCounter++;
    -                }
    -            } else {
    -                $successCounter++;
    -            }
    -
    -            // @todo: translate
    -            if (isset($arr['error'])) {
    -                switch ($arr['error']) {
    -                    case ModRewriteController::ERROR_CLIENT:
    -                        $error = 'client';
    -                        break;
    -                    case ModRewriteController::ERROR_LANGUAGE:
    -                        $error = 'language';
    -                        break;
    -                    case ModRewriteController::ERROR_CATEGORY:
    -                        $error = 'category';
    -                        break;
    -                    case ModRewriteController::ERROR_ARTICLE:
    -                        $error = 'article';
    -                        break;
    -                    case ModRewriteController::ERROR_POST_VALIDATION:
    -                        $error = 'validation';
    -                        break;
    -                }
    -            }
    -
    -            $pref = str_repeat('    ', $v['level']);
    -
    -            // render resolve information for current item
    -            $itemTpl = $this->_oView->lng_result_item_tpl;
    -            $itemTpl = str_replace('{pref}', $pref, $itemTpl);
    -            $itemTpl = str_replace('{name}', $v['name'], $itemTpl);
    -            $itemTpl = str_replace('{url_in}', $v['url'], $itemTpl);
    -            $itemTpl = str_replace('{url_out}', $url, $itemTpl);
    -            $itemTpl = str_replace('{color}', $color, $itemTpl);
    -            $itemTpl = str_replace('{url_res}', $resUrl, $itemTpl);
    -            $itemTpl = str_replace('{err}', $error, $itemTpl);
    -            $itemTpl = str_replace('{data}', $oMRTest->getReadableResolvedData($arr), $itemTpl);
    -
    -            $this->_oView->content .= "\n" . $itemTpl . "\n";
    -        }
    -        $this->_oView->content .= '
    '; - - $totalTime = sprintf('%.4f', (getmicrotime() - $startTime)); - - // render information about current test - $msg = $this->_oView->lng_result_message_tpl; - $msg = str_replace('{time}', $totalTime, $msg); - $msg = str_replace('{num_urls}', ($successCounter + $failCounter), $msg); - $msg = str_replace('{num_success}', $successCounter, $msg); - $msg = str_replace('{num_fail}', $failCounter, $msg); - - $this->_oView->content = $msg . $this->_oView->content; - } - -} diff --git a/conlite/plugins/cl-mod-rewrite/classes/controller/class.modrewrite_controller_abstract.php b/conlite/plugins/cl-mod-rewrite/classes/controller/class.modrewrite_controller_abstract.php deleted file mode 100644 index cf1bb01..0000000 --- a/conlite/plugins/cl-mod-rewrite/classes/controller/class.modrewrite_controller_abstract.php +++ /dev/null @@ -1,226 +0,0 @@ - - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ - -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -/** - * Abstract controller for all concrete cl-mod-rewrite controller implementations. - * - * @author Murat Purc - * @package plugin - * @subpackage Mod Rewrite - */ -abstract class ModRewrite_ControllerAbstract { - - /** - * View object, holds all view variables - * @var stdClass - */ - protected $_oView; - - /** - * Global CONTENIDO $cfg variable - * @var array - */ - protected $_cfg; - - /** - * Global CONTENIDO $client variable (client id) - * @var int - */ - protected $_client; - - /** - * Global CONTENIDO $area variable (area name/id) - * @var int|string - */ - protected $_area; - - /** - * Global CONTENIDO $action variable (send by request) - * @var string - */ - protected $_action; - - /** - * Global CONTENIDO $frame variable (current frame in backend) - * @var int - */ - protected $_frame; - - /** - * Global CONTENIDO $contenido variable (session id) - * @var string - */ - protected $_contenido; - - /** - * Template file or template string to render - * @var string - */ - protected $_template = null; - - /** - * Additional properties list - * @var array - */ - protected $_properties = array(); - - /** - * Debug flag - * @var bool - */ - protected $_debug = false; - - /** - * Constructor, sets some properties by assigning global variables to them. - */ - public function __construct() { - global $cfg, $client, $area, $action, $frame, $contenido, $sess; - - $this->_oView = new stdClass(); - $this->_cfg = $cfg; - $this->_area = $area; - $this->_action = $action; - $this->_frame = $frame; - $this->_client = $client; - $this->_contenido = $contenido; - - $this->_oView->area = $this->_area; - $this->_oView->frame = $this->_frame; - $this->_oView->contenido = $this->_contenido; - $this->_oView->sessid = $sess->id; - $this->_oView->lng_more_informations = i18n("More informations", "cl-mod-rewrite"); - - $this->init(); - } - - /** - * Initializer method, could be overwritten by childs. - * This method will be invoked in constructor of ModRewrite_ControllerAbstract. - */ - public function init() { - - } - - /** - * View property setter. - * @param object $oView - */ - public function setView($oView) { - if (is_object($oView)) { - $this->_oView = $oView; - } - } - - /** - * View property getter. - * @return object - */ - public function getView() { - return $this->_oView; - } - - /** - * Property setter. - * @param string $key - * @param mixed $value - */ - public function setProperty($key, $value) { - $this->_properties[$key] = $value; - } - - /** - * Property getter. - * @param string $key - * @param mixed $default - * @return mixed - */ - public function getProperty($key, $default = null) { - return (isset($this->_properties[$key])) ? $this->_properties[$key] : $default; - } - - /** - * Template setter. - * @param string $sTemplate Either full path and name of template file or a template string. - */ - public function setTemplate($sTemplate) { - $this->_template = $sTemplate; - } - - /** - * Template getter. - * @return string - */ - public function getTemplate() { - return $this->_template; - } - - /** - * Renders template by replacing all view variables in template. - * @param string Either full path and name of template file or a template string. - * If not passed, previous set template will be used. - * @throws Exception if no template is set - * @return string - */ - public function render($template = null) { - if ($template == null) { - $template = $this->_template; - } - - if ($template == null) { - throw new Exception('Missing template to render.'); - } - - $oTpl = new Template(); - foreach ($this->_oView as $k => $v) { - $oTpl->set('s', strtoupper($k), $v); - } - $oTpl->generate($template, 0, 0); - } - - /** - * Returns parameter from request, the order is: - * - Return from $_GET, if found - * - Return from $_POST, if found - * - * @param string $key - * @param mixed $default The default value - * @return mixed - */ - protected function _getParam($key, $default = null) { - if (isset($_GET[$key])) { - return $_GET[$key]; - } elseif (isset($_POST[$key])) { - return $_POST[$key]; - } else { - return $default; - } - } - - /** - * Returns rendered notification markup by using global $notification variable. - * @param string $type One of cGuiNotification::LEVEL_* constants - * @param string $msg The message to display - * @return string - */ - protected function _notifyBox($type, $msg) { - global $notification; - return $notification->returnNotification($type, $msg) . '
    '; - } - -} diff --git a/conlite/plugins/cl-mod-rewrite/external/aToolTip/css/atooltip.css b/conlite/plugins/cl-mod-rewrite/external/aToolTip/css/atooltip.css deleted file mode 100644 index 978487f..0000000 --- a/conlite/plugins/cl-mod-rewrite/external/aToolTip/css/atooltip.css +++ /dev/null @@ -1,43 +0,0 @@ -/* -Node structure --------------- -.aToolTip - .aToolTipInner - .aToolTipContent - .aToolTipCloseBtn - -*/ - -.aToolTip { margin:2px 0 0 2px; } - -.aToolTipInner { - border-left:1px solid #b3b3b3; - border-top:1px solid #666; - border-right:2px solid #b3b3b3; - border-bottom:2px solid #b3b3b3; - background:#f1f1f1; - color:#000; - margin:0; - padding:4px 12px 6px 24px; - margin:-2px 0 0 -2px; -} - -.aToolTipInner .aToolTipContent { - position:relative; - margin:0; - padding:0; -} - -a.aToolTipCloseBtn { - display:block; - height:16px; - width:16px; - background:url(../images/infoBtn.gif) no-repeat; - text-indent:-9999px; - outline:none; - position:absolute; - top:1px; - left:1px; - margin:1px 2px 2px 1px; - padding:0px; -} diff --git a/conlite/plugins/cl-mod-rewrite/external/aToolTip/css/style.css b/conlite/plugins/cl-mod-rewrite/external/aToolTip/css/style.css deleted file mode 100644 index 1d3236c..0000000 --- a/conlite/plugins/cl-mod-rewrite/external/aToolTip/css/style.css +++ /dev/null @@ -1,174 +0,0 @@ -/* Eric Meyer's Reset Reloaded */ -/* http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ */ -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, a, abbr, acronym, address, big, cite, code,del, dfn, em, -font, img, ins, kbd, q, s, samp,small, strike, strong, sub, -sup, tt, var,b, u, i, center,dl, dt, dd, ol, ul, li, -fieldset, form, label, legend,table, caption, tbody, tfoot, -thead, tr, th, td { - margin: 0; - padding: 0; - border: 0; - outline: 0; - font-size: 100%; - vertical-align: baseline; - background: transparent; -} -ol, ul {list-style: none;} -blockquote, q {quotes: none;} -table {border-collapse: collapse;border-spacing: 0;} - -.clearfix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;} -/* IE6 */ -* html .clearfix {height: 1%;} -/* IE7 */ -*:first-child+html .clearfix {min-height: 1px;} - - -body { - background: #282828 url(../images/bg.png) repeat-x; - color: #999999; - font-size: 12px; - line-height: 20px; - font-family: Arial, helvetica; -} - -a, -a:link, -a:visited { - color: #FEC92C; - text-decoration: none; - -} - -a:hover, -a:active, -a:focus { - text-decoration: underline; -} - - -a.exampleTip { - color: #FEC92C; -} - -a.exampleTip:hover{ - text-decoration: underline; -} - -.section { - text-align: left; - padding-bottom: 18px; - border-bottom: 1px solid #333; - margin-bottom: 18px; -} - -p { - margin: 0 0 18px; -} - -h2 { - color: #fff; - font-size: 22px; - line-height: 24px; - margin: 0 0 24px; - padding: 0; - font-weight: normal; -} - -h3{ - color: #ddd; - font-size: 14px; - line-height: 18px; - margin: 0 0 18px; -} - - -h1.logo { - display: block; - height: 80px; - width: 260px; - margin: 40px auto 0; -} - - h1.logo a{ - display: block; - height: 80px; - width: 260px; - text-indent: -9999px; - background: url(../images/logo.png) no-repeat; - } - - -ul.demos { - list-style-type: none; - -} - -ul.demos li{ - margin: 0 0 10px 0; -} - - -.primaryWrapper { - margin: 0 auto; - width: 960px; - text-align: center; -} - -.branding{ - text-align: center; - display: block; - height: 120px; -} - - -.ctaBtns {border: none; text-align: center;} - -.ctaBtns p { - width: 263px; - margin: 0 auto; -} - - -.ctaBtns a{ - display: block; - height: 37px; - width: 122px; - text-indent: -9999px; -} - -a.dloadBtn { - background: url(../images/dload-btn.png) no-repeat top left; - float: left; - margin-right: 18px; -} - -a.demoBtn { - background: url(../images/demo-btn.png) no-repeat top left; - float: left; -} - -a.dloadBtn:hover, -a.demoBtn:hover { - background-position: bottom left; -} - - - -.usage p { - margin-bottom: 2px; -} - -ul.quickFacts { - list-style-position: inside; - list-style-type: disc; -} - -p.license, -p.copyright { - font-size: 11px; -} - - - diff --git a/conlite/plugins/cl-mod-rewrite/external/aToolTip/demos.html b/conlite/plugins/cl-mod-rewrite/external/aToolTip/demos.html deleted file mode 100644 index b9f91c8..0000000 --- a/conlite/plugins/cl-mod-rewrite/external/aToolTip/demos.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - aToolTip Demos - - - - - - - - - - - - - - - - - - - - - -
    - -
    -

    aToolTip

    -
    - - - - - -
    -

    Demos

    - -
      -
    • Normal Tooltip - This is a normal tooltip with default settings.
    • -
    • Fixed Tooltip - This is a fixed tooltip that doesnt follow the mouse.
    • -
    • On Click Tooltip - This is a click activated tooltip with content passed in from 'tipContent' param
    • -
    - -
    - - - - - - -

    -Creative Commons License
    This work is licensed under a Creative Commons Attribution 3.0 Unported License. -

    - - -
    - - - - \ No newline at end of file diff --git a/conlite/plugins/cl-mod-rewrite/external/aToolTip/images/bg.png b/conlite/plugins/cl-mod-rewrite/external/aToolTip/images/bg.png deleted file mode 100644 index 35d844b..0000000 Binary files a/conlite/plugins/cl-mod-rewrite/external/aToolTip/images/bg.png and /dev/null differ diff --git a/conlite/plugins/cl-mod-rewrite/external/aToolTip/images/infoBtn.gif b/conlite/plugins/cl-mod-rewrite/external/aToolTip/images/infoBtn.gif deleted file mode 100644 index 8f8629e..0000000 Binary files a/conlite/plugins/cl-mod-rewrite/external/aToolTip/images/infoBtn.gif and /dev/null differ diff --git a/conlite/plugins/cl-mod-rewrite/external/aToolTip/js/atooltip.jquery.js b/conlite/plugins/cl-mod-rewrite/external/aToolTip/js/atooltip.jquery.js deleted file mode 100644 index 83efbbf..0000000 --- a/conlite/plugins/cl-mod-rewrite/external/aToolTip/js/atooltip.jquery.js +++ /dev/null @@ -1,118 +0,0 @@ -/* - jQuery Version: jQuery 1.3.2 - Plugin Name: aToolTip V 1.0 - Plugin by: Ara Abcarians: http://ara-abcarians.com - License: aToolTip is licensed under a Creative Commons Attribution 3.0 Unported License - Read more about this license at --> http://creativecommons.org/licenses/by/3.0/ - Modified: Murat Purc , 2010-01-28: Position clickable tooltip on right side, - remove previous opened tooltip - -Creates following node: ------------------------ -
    -
    -

    - Content - close -
    -
    - -*/ -(function($) { - $.fn.aToolTip = function(options) { - - // setup default settings - var defaults = { - clickIt: false, - closeTipBtn: 'aToolTipCloseBtn', - fixed: false, - inSpeed: 400, - outSpeed: 100, - tipContent: '', - toolTipClass: 'aToolTip', - xOffset: 0, - yOffset: 0 - }, - - // This makes it so the users custom options overrides the default ones - settings = $.extend({}, defaults, options); - - return this.each(function() { - var obj = $(this); - // Decide weather to use a title attr as the tooltip content - if (obj.attr('title') && !settings.tipContent) { - // set the tooltip content/text to be the obj title attribute - var tipContent = obj.attr('title'); - } else { - // if no title attribute set it to the tipContent option in settings - var tipContent = settings.tipContent; - } - - // check if obj has a title attribute and if click feature is off - if(tipContent && !settings.clickIt){ - // Activate on hover - obj.hover(function(el){ - obj.attr({title: ''}); - $('body').append("

    "+ tipContent +"

    "); - $('.' + settings.toolTipClass).css({ - position: 'absolute', - display: 'none', - zIndex: '50000', - top: (obj.offset().top - $('.' + settings.toolTipClass).outerHeight() - settings.yOffset) + 'px', - left: (obj.offset().left + obj.outerWidth() + settings.xOffset) + 'px' - }) - .stop().fadeIn(settings.inSpeed); - }, - function(){ - // Fade out - $('.' + settings.toolTipClass).stop().fadeOut(settings.outSpeed, function(){$(this).remove();}); - }); - } - - // Follow mouse if fixed is false and click is false - if(!settings.fixed && !settings.clickIt){ - obj.mousemove(function(el){ - $('.' + settings.toolTipClass).css({ - top: (el.pageY - $('.' + settings.toolTipClass).outerHeight() - settings.yOffset), - left: (el.pageX + settings.xOffset) - }) - }); - } - - // check if click feature is enabled - if(tipContent && settings.clickIt){ - // Activate on click - obj.click(function(el){ - if (!settings.tipContent) { - obj.attr({title: ''}); - } - -// $('.' + settings.toolTipClass).remove(); - $('.' + settings.toolTipClass).stop().fadeOut(settings.outSpeed, function(){$(this).remove();}); - - $('body').append("

    "+ tipContent +"

    close
    "); - $('.' + settings.toolTipClass).css({ - position: 'absolute', - display: 'none', - zIndex: '50000', -// top: (obj.offset().top - $('.' + settings.toolTipClass).outerHeight() - settings.yOffset) + 'px', -// left: (obj.offset().left + obj.outerWidth() + settings.xOffset) + 'px' - top: (obj.offset().top - settings.yOffset) + 'px', - left: (obj.offset().left + obj.outerWidth() + settings.xOffset) + 'px' - }) - .fadeIn(settings.inSpeed); - // Click to close tooltip - $('.' + settings.closeTipBtn).click(function(){ - $('.' + settings.toolTipClass).fadeOut(settings.outSpeed, function(){$(this).remove();}); - return false; - }); - return false; - }); - } - - }); // END: return this - - // returns the jQuery object to allow for chainability. - return this; - }; -})(jQuery); \ No newline at end of file diff --git a/conlite/plugins/cl-mod-rewrite/external/aToolTip/js/atooltip.min.jquery.js b/conlite/plugins/cl-mod-rewrite/external/aToolTip/js/atooltip.min.jquery.js deleted file mode 100644 index 626b478..0000000 --- a/conlite/plugins/cl-mod-rewrite/external/aToolTip/js/atooltip.min.jquery.js +++ /dev/null @@ -1,2 +0,0 @@ -/*Plugin by: Ara Abcarians: http://ara-abcarians.com License: http://creativecommons.org/licenses/by/3.0/ */ -eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(2($){$.O.w=2(d){8 e={9:f,q:\'P\',x:f,r:Q,s:R,y:\'\',1:\'w\',g:5,h:5},0=$.S({},e,d);i 3.T(2(){8 b=$(3);j(b.k(\'l\')){8 c=b.k(\'l\')}U{8 c=0.y}j(c&&!0.9){b.V(2(a){b.k({l:\'\'});$(\'z\').t("

    "+c+"

    ");$(\'.\'+0.1).u({B:\'C\',D:\'E\',F:\'G\',6:(b.n().6-$(\'.\'+0.1).v()-0.h)+\'o\',7:(b.n().7+b.H()+0.g)+\'o\'}).I().J(0.r)},2(){$(\'.\'+0.1).I().K(0.s,2(){$(3).L()})})}j(!0.x&&!0.9){b.W(2(a){$(\'.\'+0.1).u({6:(a.X-$(\'.\'+0.1).v()-0.h),7:(a.Y+0.g)})})}j(c&&0.9){b.M(2(a){b.k({l:\'\'});$(\'z\').t("

    "+c+"

    ");$(\'.\'+0.1).t("N");$(\'.\'+0.1).u({B:\'C\',D:\'E\',F:\'G\',6:(b.n().6-$(\'.\'+0.1).v()-0.h)+\'o\',7:(b.n().7+b.H()+0.g)+\'o\'}).J(0.r);$(\'.\'+0.q).M(2(){$(\'.\'+0.1).K(0.s,2(){$(3).L()});i f});i f})}});i 3}})(11);',62,64,'settings|toolTipClass|function|this|class||top|left|var|clickIt||||||false|xOffset|yOffset|return|if|attr|title|div|offset|px||closeTipBtn|inSpeed|outSpeed|append|css|outerHeight|aToolTip|fixed|tipContent|body|aToolTipContent|position|absolute|display|none|zIndex|50000|outerWidth|stop|fadeIn|fadeOut|remove|click|close|fn|aToolTipCloseBtn|400|100|extend|each|else|hover|mousemove|pageY|pageX|href|alt|jQuery'.split('|'),0,{})) \ No newline at end of file diff --git a/conlite/plugins/cl-mod-rewrite/external/aToolTip/js/jquery.min.js b/conlite/plugins/cl-mod-rewrite/external/aToolTip/js/jquery.min.js deleted file mode 100644 index 55c2e6d..0000000 --- a/conlite/plugins/cl-mod-rewrite/external/aToolTip/js/jquery.min.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * jQuery JavaScript Library v1.3.2 - * http://jquery.com/ - * - * Copyright (c) 2009 John Resig - * Dual licensed under the MIT and GPL licenses. - * http://docs.jquery.com/License - * - * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) - * Revision: 6246 - */ -(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
    "]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
    ","
    "]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); -/* - * Sizzle CSS Selector Engine - v0.9.3 - * Copyright 2009, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

    ";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
    ";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
    ").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
    ';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); \ No newline at end of file diff --git a/conlite/plugins/cl-mod-rewrite/files/htaccess_restrictive.txt b/conlite/plugins/cl-mod-rewrite/files/htaccess_restrictive.txt deleted file mode 100644 index 1ce3a7a..0000000 --- a/conlite/plugins/cl-mod-rewrite/files/htaccess_restrictive.txt +++ /dev/null @@ -1,61 +0,0 @@ -################################################################################ -# ConLite AMR plugin restrictive rewrite rules set. -# -# Contains strict rules, each rewrite exclusion must be set manually. -# - Exclude requests to directories usage/, conlite/, setup/, cms/upload/ -# - Exclude requests to cms/front_content.php, cms/dbfs.php -# - Pass thru requests to common ressources (pictures, movies, js, css, pdf) -# -# @version 1.0.0 -# @author Ortwin Pinke -# @author Murat Purc -# @copyright 2019 ConLite Team -# @link http://www.conlite.org -# -# Versions before 1.0 copyright 4fb, author Murat Purc -# -# $Id: htaccess_restrictive.txt 145 2019-10-25 16:00:47Z oldperl $ -################################################################################ - - - - # Enable rewrite engine - RewriteEngine on - - # Specify a base URL-path for the rules - RewriteBase /cms - - # Catch some common exploits in query string to get rid of them. - # NOTE: Conditions to prevent protocols (ftp, http[s]) in query string could - # be a disadvantage in some cases. - RewriteCond %{QUERY_STRING} contenido_path=.*$ [NC,OR] - RewriteCond %{QUERY_STRING} cfg\[path\]=.*$ [NC,OR] - RewriteCond %{QUERY_STRING} _PHPLIB\[libdir\]=.*$ [NC,OR] - RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR] - RewriteCond %{QUERY_STRING} ftp://.*$ [NC,OR] - RewriteCond %{QUERY_STRING} http[s]*://.*$ [NC] - RewriteRule ^.* - [F,L] # all matching conditions from above will end in nirvana - - # Exclude some files and directories from rewriting - RewriteRule ^usage/.*$ - [L] - RewriteRule ^conlite/.*$ - [L] - RewriteRule ^setup/.*$ - [L] - RewriteRule ^cms/upload/.*$ - [L] - RewriteRule ^cms/test/.*$ - [L] - RewriteRule ^cms/front_content.php.*$ - [L] - RewriteRule ^cms/dbfs.php.*$ - [L] - - # Exclude common extensions from rewriting and pass remaining requests to - # front_content.php. - RewriteRule !\.(avi|css|doc|flv|gif|gzip|ico|jpeg|jpg|js|mov|mp3|pdf|png|ppt|rar|svg|swf|txt|wav|wmv|xml|zip)$ front_content.php [NC,QSA,L] - - - -# Some rules to compress files. -# NOTE: Following settings are not mod rewrite specific, but enabling mod_deflate -# for some file types can help to reduce bandwith. - - - SetOutputFilter DEFLATE - - \ No newline at end of file diff --git a/conlite/plugins/cl-mod-rewrite/files/htaccess_simple.txt b/conlite/plugins/cl-mod-rewrite/files/htaccess_simple.txt deleted file mode 100644 index 05df099..0000000 --- a/conlite/plugins/cl-mod-rewrite/files/htaccess_simple.txt +++ /dev/null @@ -1,59 +0,0 @@ -################################################################################ -# ConLite AMR plugin simple rewrite rules set. -# -# Contains few easy to handle rewrite rules. -# -# @version 1.0.0 -# @author Ortwin Pinke -# @author Murat Purc -# @copyright 2019 ConLite Team -# @link http://www.conlite.org -# -# Versions before 1.0 copyright 4fb, author Murat Purc -# -# $Id: htaccess_simple.txt 145 2019-10-25 16:00:47Z oldperl $ -################################################################################ - - - - # Enable rewrite engine - RewriteEngine on - - # Specify a base URL-path for the rules - RewriteBase /cms - - # Catch some common exploits in query string to get rid of them - # NOTE: Conditions to prevent protocols (ftp, http[s]) in query string could - # be a disadvantage in some cases - RewriteCond %{QUERY_STRING} contenido_path=.*$ [NC,OR] - RewriteCond %{QUERY_STRING} cfg\[path\]=.*$ [NC,OR] - RewriteCond %{QUERY_STRING} _PHPLIB\[libdir\]=.*$ [NC,OR] - RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR] - RewriteCond %{QUERY_STRING} ftp://.*$ [NC,OR] - RewriteCond %{QUERY_STRING} http[s]*://.*$ [NC] - RewriteRule ^.* - [F,L] # all matching conditions from above will end in nirvana - - # Rewrite request to root to front_content.php - RewriteRule ^$ front_content.php [QSA,L] - - # Exclude following request from rewriting - # tests for favicon.ico, valid symlinks (-s), not empty files (-l) and folders (-d) - RewriteCond %{REQUEST_URI} ^/favicon.ico$ [OR] - RewriteCond %{REQUEST_FILENAME} -s [OR] - RewriteCond %{REQUEST_FILENAME} -l [OR] - RewriteCond %{REQUEST_FILENAME} -d - RewriteRule ^.*$ - [NC,L] - - # Pass other requests to front_content.php - RewriteRule ^.*$ front_content.php [QSA,NC,L] - - - -# Some rules to compress files. -# NOTE: Following settings are not mod rewrite specific, but enabling mod_deflate -# for some file types can help to reduce bandwith. - - - SetOutputFilter DEFLATE - - \ No newline at end of file diff --git a/conlite/plugins/cl-mod-rewrite/includes/config.mod_rewrite_default.php b/conlite/plugins/cl-mod-rewrite/includes/config.mod_rewrite_default.php deleted file mode 100644 index 99c3b30..0000000 --- a/conlite/plugins/cl-mod-rewrite/includes/config.mod_rewrite_default.php +++ /dev/null @@ -1,114 +0,0 @@ - - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ - -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - - -global $cfg; - -// Use advanced mod_rewrites ( 1 = yes, 0 = none ) -$cfg['cl-mod-rewrite']['use'] = 0; - -// Path to the htaccess file with trailling slash from domain-root! -$cfg['cl-mod-rewrite']['rootdir'] = '/'; - -// Check path to the htaccess file ( 1 = yes, 0 = none ) -$cfg['cl-mod-rewrite']['checkrootdir'] = 1; - -// Start TreeLocation from Root Tree (set to 1) or get location from first category (set to 0) -$cfg['cl-mod-rewrite']['startfromroot'] = 0; - -// Prevent Duplicated Content, if startfromroot is enabled ( 1 = yes, 0 = none ) -$cfg['cl-mod-rewrite']['prevent_duplicated_content'] = 0; - -// is multilanguage? ( 1 = yes, 0 = none ) -$cfg['cl-mod-rewrite']['use_language'] = 0; - -// use language name in url? ( 1 = yes, 0 = none ) -$cfg['cl-mod-rewrite']['use_language_name'] = 0; - -// is multiclient in only one directory? ( 1 = yes, 0 = none ) -$cfg['cl-mod-rewrite']['use_client'] = 0; - -// use client name in url? ( 1 = yes, 0 = none ) -$cfg['cl-mod-rewrite']['use_client_name'] = 0; - -// use lowercase url? ( 1 = yes, 0 = none ) -$cfg['cl-mod-rewrite']['use_lowercase_uri'] = 1; - -// file extension for article links -$cfg['cl-mod-rewrite']['file_extension'] = '.html'; - -// The percentage if the category name have to match with database names. -$cfg['cl-mod-rewrite']['category_resolve_min_percentage'] = '75'; - -// Add start article name to url (1 = yes, 0 = none) -$cfg['cl-mod-rewrite']['add_startart_name_to_url'] = 1; - -// Default start article name to use, depends on active add_startart_name_to_url -$cfg['cl-mod-rewrite']['default_startart_name'] = 'index'; - -// Rewrite urls on generating the code for the page. If active, the responsibility will be -// outsourced to moduleoutputs and you have to adapt the moduleoutputs manually. Each output of -// internal article/category links must be processed by using $sess->url. (1 = yes, 0 = none) -$cfg['cl-mod-rewrite']['rewrite_urls_at_congeneratecode'] = 0; - -// Rewrite urls on output of htmlcode at front_content.php. Is the old way, and doesn't require -// adapting of moduleoutputs. On the other hand usage of this way will be slower than rewriting -// option above. (1 = yes, 0 = none) -$cfg['cl-mod-rewrite']['rewrite_urls_at_front_content_output'] = 1; - - -// Following five settings write urls like this one: -// www.domain.de/category1-category2.articlename.html -// Changes of these settings causes a reset of all aliases, see Advanced Mod Rewrite settings in -// backend. -// NOTE: category_seperator and article_seperator must contain different character. -// Separator for categories -$cfg['cl-mod-rewrite']['category_seperator'] = '/'; - -// Separator between category and article -$cfg['cl-mod-rewrite']['article_seperator'] = '/'; - -// Word seperator in category names -$cfg['cl-mod-rewrite']['category_word_seperator'] = '-'; - -// Word seperator in article names -$cfg['cl-mod-rewrite']['article_word_seperator'] = '-'; - - -// Routing settings for incomming urls. Here you can define routing rules as follows: -// $cfg['cl-mod-rewrite']['routing'] = array( -// '/a_incomming/url/foobar.html' => '/new_url/foobar.html', # route /a_incomming/url/foobar.html to /new_url/foobar.html -// '/cms/' => '/' # route /cms/ to / (doc root of client) -// ); -$cfg['cl-mod-rewrite']['routing'] = array(); - - -// Redirect invalid articles to errorpage (1 = yes, 0 = none) -$cfg['cl-mod-rewrite']['redirect_invalid_article_to_errorsite'] = 0; - diff --git a/conlite/plugins/cl-mod-rewrite/includes/config.plugin.php b/conlite/plugins/cl-mod-rewrite/includes/config.plugin.php deleted file mode 100644 index b00024b..0000000 --- a/conlite/plugins/cl-mod-rewrite/includes/config.plugin.php +++ /dev/null @@ -1,167 +0,0 @@ - - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ - -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -global $_cecRegistry, $cfg, $contenido, $area, $client, $load_client; - -#################################################################################################### -/** - * Chain Contenido.Frontend.CreateURL - * This chain is called inside some scripts (front_content.php) to create urls. - * - * @todo: Is added to provide downwards compatibility for the amr plugin. - * There is no need for this chain since CONTENIDO 4.8.9 contains its own Url building feature. - * @deprecated - * - * Parameters & order: - * string URL including parameter value pairs - * - * Returns: - * string Returns modified URL - */ -$_cecRegistry->registerChain("Contenido.Frontend.CreateURL", "string"); -#################################################################################################### -// initialize client id -if (isset($client) && (int) $client > 0) { - $clientId = (int) $client; -} elseif (isset($load_client) && (int) $load_client > 0) { - $clientId = (int) $load_client; -} else { - $clientId = ''; -} - - -// include necessary sources -cInclude('classes', 'Debug/DebuggerFactory.class.php'); - -plugin_include('cl-mod-rewrite', 'classes/controller/class.modrewrite_controller_abstract.php'); -plugin_include('cl-mod-rewrite', 'classes/controller/class.modrewrite_content_controller.php'); -plugin_include('cl-mod-rewrite', 'classes/controller/class.modrewrite_contentexpert_controller.php'); -plugin_include('cl-mod-rewrite', 'classes/controller/class.modrewrite_contenttest_controller.php'); -plugin_include('cl-mod-rewrite', 'classes/class.modrewritebase.php'); -plugin_include('cl-mod-rewrite', 'classes/class.modrewrite.php'); -plugin_include('cl-mod-rewrite', 'classes/class.modrewritecontroller.php'); -plugin_include('cl-mod-rewrite', 'classes/class.modrewritedebugger.php'); -plugin_include('cl-mod-rewrite', 'classes/class.modrewritetest.php'); -plugin_include('cl-mod-rewrite', 'classes/class.modrewriteurlstack.php'); -plugin_include('cl-mod-rewrite', 'classes/class.modrewriteurlutil.php'); -plugin_include('cl-mod-rewrite', 'includes/functions.mod_rewrite.php'); - - -global $lngAct; - -$lngAct['cl-mod-rewrite']['mod_rewrite'] = i18n("Advanced Mod Rewrite", "cl-mod-rewrite"); -$lngAct['cl-mod-rewrite']['mod_rewrite_expert'] = i18n("Advanced Mod Rewrite functions", "cl-mod-rewrite"); -$lngAct['cl-mod-rewrite']['mod_rewrite_test'] = i18n("Advanced Mod Rewrite test", "cl-mod-rewrite"); - - -// set debug configuration -if (isset($contenido)) { - ModRewriteDebugger::setEnabled(true); -} else { - ModRewriteDebugger::setEnabled(false); -} - -// initialize mr plugin -ModRewrite::initialize($clientId); - -if (ModRewrite::isEnabled()) { - - $aMrCfg = ModRewrite::getConfig(); - - $_cecRegistry = cApiCecRegistry::getInstance(); - - // Add new tree function to CONTENIDO Extension Chainer - $_cecRegistry->addChainFunction('Contenido.Action.str_newtree.AfterCall', 'mr_strNewTree'); - - // Add move subtree function to CONTENIDO Extension Chainer - $_cecRegistry->addChainFunction('Contenido.Action.str_movesubtree.AfterCall', 'mr_strMoveSubtree'); - - // Add new category function to CONTENIDO Extension Chainer - $_cecRegistry->addChainFunction('Contenido.Action.str_newcat.AfterCall', 'mr_strNewCategory'); - - // Add rename category function to CONTENIDO Extension Chainer - $_cecRegistry->addChainFunction('Contenido.Action.str_renamecat.AfterCall', 'mr_strRenameCategory'); - - // Add move up category function to CONTENIDO Extension Chainer - $_cecRegistry->addChainFunction('Contenido.Action.str_moveupcat.AfterCall', 'mr_strMoveUpCategory'); - - // Add move down category function to CONTENIDO Extension Chainer - $_cecRegistry->addChainFunction('Contenido.Action.str_movedowncat.AfterCall', 'mr_strMovedownCategory'); - - // Add copy category function to CONTENIDO Extension Chainer - $_cecRegistry->addChainFunction('Contenido.Category.strCopyCategory', 'mr_strCopyCategory'); - - // Add category sync function to CONTENIDO Extension Chainer - $_cecRegistry->addChainFunction('Contenido.Category.strSyncCategory_Loop', 'mr_strSyncCategory'); - - // Add save article (new and existing category) function to CONTENIDO Extension Chainer - $_cecRegistry->addChainFunction('Contenido.Action.con_saveart.AfterCall', 'mr_conSaveArticle'); - - // Add move article function to CONTENIDO Extension Chainer - $_cecRegistry->addChainFunction('Contenido.Article.conMoveArticles_Loop', 'mr_conMoveArticles'); - - // Add duplicate article function to CONTENIDO Extension Chainer - $_cecRegistry->addChainFunction('Contenido.Article.conCopyArtLang_AfterInsert', 'mr_conCopyArtLang'); - - // Add sync article function to CONTENIDO Extension Chainer - $_cecRegistry->addChainFunction('Contenido.Article.conSyncArticle_AfterInsert', 'mr_conSyncArticle'); - - if (!isset($contenido)) { - // we are not in backend, add cec functions for rewriting - // Add mr related function for hook "after plugins loaded" to CONTENIDO Extension Chainer - $_cecRegistry->addChainFunction('Contenido.Frontend.AfterLoadPlugins', 'mr_runFrontendController'); - - // Add url rewriting function to CONTENIDO Extension Chainer - // @todo: no more need since CONTENIDO 4.8.9 provides central Url building, - // but it is still available because of downwards compatibility - // @deprecated - $_cecRegistry->addChainFunction('Contenido.Frontend.CreateURL', 'mr_buildNewUrl'); - - // overwrite url builder configuration with own url builder - $cfg['url_builder']['name'] = 'MR'; - $cfg['config'] = array(); - cInclude('classes', 'Url/Contenido_Url.class.php'); - cInclude('classes', 'UrlBuilder/Contenido_UrlBuilderConfig.class.php'); - Contenido_UrlBuilderConfig::setConfig($cfg['url_builder']); - - if ($aMrCfg['rewrite_urls_at_congeneratecode'] == 1) { - // Add url rewriting at code generation to CONTENIDO Extension Chainer - $_cecRegistry->addChainFunction('Contenido.Content.conGenerateCode', 'mr_buildGeneratedCode'); - } elseif ($aMrCfg['rewrite_urls_at_front_content_output'] == 1) { - // Add url rewriting at html output to CONTENIDO Extension Chainer - $_cecRegistry->addChainFunction('Contenido.Frontend.HTMLCodeOutput', 'mr_buildGeneratedCode'); - } else { - // Fallback solution: Add url rewriting at code generation to CONTENIDO Extension Chainer - $_cecRegistry->addChainFunction('Contenido.Content.conGenerateCode', 'mr_buildGeneratedCode'); - } - } -} - -if (isset($contenido) && isset($area) && $area == 'mod_rewrite_test') { - // configure url builder to enable it on test page - $cfg['url_builder']['name'] = 'MR'; - $cfg['config'] = array(); - Contenido_UrlBuilderConfig::setConfig($cfg['url_builder']); - ModRewrite::setEnabled(true); -} - -unset($clientId, $options); diff --git a/conlite/plugins/cl-mod-rewrite/includes/front_content_controller.php b/conlite/plugins/cl-mod-rewrite/includes/front_content_controller.php deleted file mode 100644 index d5a8f1a..0000000 --- a/conlite/plugins/cl-mod-rewrite/includes/front_content_controller.php +++ /dev/null @@ -1,102 +0,0 @@ - - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ - -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - - -global $client, $changeclient, $cfgClient, $lang, $changelang, $idart, $idcat, $path, $mr_preprocessedPageError; - -ModRewriteDebugger::add(ModRewrite::getConfig(), 'front_content_controller.php mod rewrite config'); - - -// create an mod rewrite controller instance and execute processing -$oMRController = new ModRewriteController($_SERVER['REQUEST_URI']); -$oMRController->execute(); - -if ($oMRController->errorOccured()) { - - // an error occured (idcat and or idart couldn't catched by controller) - - $iRedirToErrPage = ModRewrite::getConfig('redirect_invalid_article_to_errorsite', 0); - // try to redirect to errorpage if desired - if ($iRedirToErrPage == 1 && (int) $client > 0 && (int) $lang > 0) { - global $errsite_idcat, $errsite_idart; - - if ($cfgClient['set'] != 'set') { - rereadClients(); - } - - // errorpage - $aParams = array( - 'client' => $client, 'idcat' => $errsite_idcat[$client], 'idart' => $errsite_idart[$client], - 'lang' => $lang, 'error' => '1' - ); - $errsite = 'Location: ' . Contenido_Url::getInstance()->buildRedirect($aParams); - mr_header($errsite); - exit(); - } -} else { - - // set some global variables - - if ($oMRController->getClient()) { - $client = $oMRController->getClient(); - } - - if ($oMRController->getChangeClient()) { - $changeclient = $oMRController->getChangeClient(); - } - - if ($oMRController->getLang()) { - $lang = $oMRController->getLang(); - } - - if ($oMRController->getChangeLang()) { - $changelang = $oMRController->getChangeLang(); - } - - if ($oMRController->getIdArt()) { - $idart = $oMRController->getIdArt(); - } - - if ($oMRController->getIdCat()) { - $idcat = $oMRController->getIdCat(); - } - - if ($oMRController->getPath()) { - $path = $oMRController->getPath(); - } -} - -// some debugs -ModRewriteDebugger::add($mr_preprocessedPageError, 'mr $mr_preprocessedPageError', __FILE__); -if ($oMRController->getError()) { - ModRewriteDebugger::add($oMRController->getError(), 'mr error', __FILE__); -} -ModRewriteDebugger::add($idart, 'mr $idart', __FILE__); -ModRewriteDebugger::add($idcat, 'mr $idcat', __FILE__); -ModRewriteDebugger::add($lang, 'mr $lang', __FILE__); -ModRewriteDebugger::add($client, 'mr $client', __FILE__); - diff --git a/conlite/plugins/cl-mod-rewrite/includes/functions.mod_rewrite.php b/conlite/plugins/cl-mod-rewrite/includes/functions.mod_rewrite.php deleted file mode 100644 index d93dd73..0000000 --- a/conlite/plugins/cl-mod-rewrite/includes/functions.mod_rewrite.php +++ /dev/null @@ -1,945 +0,0 @@ - - * @copyright www.polycoder.de - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -global $_cecRegistry, $cfg, $contenido, $area, $client, $load_client; - -/** - * Processes cl-mod-rewrite related job for created new tree. - * - * Will be called by chain 'Contenido.Action.str_newtree.AfterCall'. - * - * @param array $data Assoziative array with some values - * @return array Passed parameter - */ -function mr_strNewTree(array $data) { - global $lang; - - ModRewriteDebugger::log($data, 'mr_strNewTree $data'); - - if ((int) $data['newcategoryid'] > 0) { - $mrCatAlias = (trim($data['categoryalias']) !== '') ? trim($data['categoryalias']) : trim($data['categoryname']); - // set new urlname - because original set urlname isn''t validated for double entries in same parent category - ModRewrite::setCatWebsafeName($mrCatAlias, $data['newcategoryid'], $lang); - ModRewrite::setCatUrlPath($data['newcategoryid'], $lang); - } - - return $data; -} - -/** - * Processes cl-mod-rewrite related job for created new category. - * - * Will be called by chain 'Contenido.Action.str_newcat.AfterCall'. - * - * @param array $data Assoziative array with some values - * @return array Passed parameter - */ -function mr_strNewCategory(array $data) { - global $lang; - - ModRewriteDebugger::log($data, 'mr_strNewCategory $data'); - - if ((int) $data['newcategoryid'] > 0) { - $mrCatAlias = (trim($data['categoryalias']) !== '') ? trim($data['categoryalias']) : trim($data['categoryname']); - // set new urlname - because original set urlname isn''t validated for double entries in same parent category - ModRewrite::setCatWebsafeName($mrCatAlias, $data['newcategoryid'], $lang); - ModRewrite::setCatUrlPath($data['newcategoryid'], $lang); - } - - return $data; -} - -/** - * Processes cl-mod-rewrite related job for renamed category - * 2010-02-01: and now all existing subcategories and modify their paths too... - * 2010-02-01: max 50 recursion level - * - * Will be called by chain 'Contenido.Action.str_renamecat.AfterCall'. - * - * @param array $data Assoziative array with some values - * @return array Passed parameter - */ -function mr_strRenameCategory(array $data) { - ModRewriteDebugger::log($data, 'mr_strRenameCategory $data'); - - // hes 20100102 - // maximal 50 recursion level - $recursion = (is_int($data['recursion'])) ? $data['recursion'] : 1; - if ($recursion > 50) { - exit("#20100201-1503: sorry - maximum function nesting level of " . $recursion . " reached"); - } - - $mrCatAlias = (trim($data['newcategoryalias']) !== '') ? trim($data['newcategoryalias']) : trim($data['newcategoryname']); - if ($mrCatAlias != '') { - // set new urlname - because original set urlname isn''t validated for double entries in same parent category - ModRewrite::setCatWebsafeName($mrCatAlias, $data['idcat'], $data['lang']); - ModRewrite::setCatUrlPath($data['idcat'], $data['lang']); - } - - // hes 20100102 - // now dive into all existing subcategories and modify their paths too... - $str = 'parentid=' . $data['idcat']; - $oCatColl = new cApiCategoryCollection($str); - - while ($oCat = $oCatColl->next()) { - // hes 20100102 - $str = 'idcat=' . $oCat->get('idcat') . ' AND idlang=' . (int) $data['lang']; - $oCatLanColl = new cApiCategoryLanguageCollection($str); - if ($oCatLan = $oCatLanColl->next()) { - // hes 20100102 - $childData = array( - 'idcat' => $oCat->get('idcat'), - 'lang' => (int) $data['lang'], - 'newcategoryname' => $oCatLan->get('name'), - 'newcategoryalias' => $oCatLan->get('urlname'), - 'recursion' => $recursion + 1 - ); - - $resData = mr_strRenameCategory($childData); - } - } - - return $data; -} - -/** - * Processes cl-mod-rewrite related job after moving a category up. - * - * Will be called by chain 'Contenido.Action.str_moveupcat.AfterCall'. - * - * @todo do we really need processing of the category? there is no mr relevant data - * changes while moving the category on same level, level and name won't change - * - * @param int $idcat Category id - * @return int Category id - */ -function mr_strMoveUpCategory($idcat) { - ModRewriteDebugger::log($idcat, 'mr_strMoveUpCategory $idcat'); - - // category check - $cat = new cApiCategory((int) $idcat); - if (!$cat->get('preid')) { - return; - } - - // get all cat languages - $aIdLang = ModRewrite::getCatLanguages($idcat); - - // update ... - foreach ($aIdLang as $iIdLang) { - // get urlname - $sCatname = ModRewrite::getCatName($idcat, $iIdLang); - // set new urlname - because original set urlname isn't validated for double entries in same parent category - ModRewrite::setCatWebsafeName($sCatname, $idcat, $iIdLang); - } - - return $idcat; -} - -/** - * Processes cl-mod-rewrite related job after moving a category down. - * - * Will be called by chain 'Contenido.Action.str_movedowncat.AfterCall'. - * - * @todo do we really need processing of the category? there is no mr relevant data - * changes while moving the category on same level, level and name won't change - * - * @param int $idcat Id of category beeing moved down - * @return int Category id - */ -function mr_strMovedownCategory($idcat) { - ModRewriteDebugger::log($idcat, 'mr_strMovedownCategory $idcat'); - - // category check - $cat = new cApiCategory((int) $idcat); - if (!$cat->get('id')) { - return; - } - - // get all cat languages - $aIdLang = ModRewrite::getCatLanguages($idcat); - // update ... - foreach ($aIdLang as $iIdLang) { - // get urlname - $sCatname = ModRewrite::getCatName($idcat, $iIdLang); - // set new urlname - because original set urlname isn't validated for double entries in same parent category - ModRewrite::setCatWebsafeName($sCatname, $idcat, $iIdLang); - } - - return $idcat; -} - -/** - * Processes cl-mod-rewrite related job after moving a category subtree. - * - * Will be called by chain 'Contenido.Action.str_movesubtree.AfterCall'. - * - * @param array $data Assoziative array with some values - * @return array Passed parameter - */ -function mr_strMoveSubtree(array $data) { - ModRewriteDebugger::log($data, 'mr_strMoveSubtree $data'); - - // category check - if ((int) $data['idcat'] <= 0) { - return; - } - - // next category check - $cat = new cApiCategory($data['idcat']); - if (!$cat->get('idcat')) { - return; - } - - // get all cat languages - $aIdLang = ModRewrite::getCatLanguages($data['idcat']); - // update all languages - foreach ($aIdLang as $iIdLang) { - // get urlname - $sCatname = ModRewrite::getCatName($data['idcat'], $iIdLang); - // set new urlname - because original set urlname isn't validated for double entries in same parent category - ModRewrite::setCatWebsafeName($sCatname, $data['idcat'], $iIdLang); - ModRewrite::setCatUrlPath($data['idcat'], $iIdLang); - } - - // now dive into all existing subcategories and modify their paths too... - $oCatColl = new cApiCategoryCollection('parentid=' . $data['idcat']); - while ($oCat = $oCatColl->next()) { - mr_strMoveSubtree(array('idcat' => $oCat->get('idcat'))); - } - - return $data; -} - -/** - * Processes cl-mod-rewrite related job after copying a category subtree. - * - * Will be called by chain 'Contenido.Category.strCopyCategory'. - * - * @param array $data Assoziative array with some values - * @return array Passed parameter - */ -function mr_strCopyCategory(array $data) { - ModRewriteDebugger::log($data, 'mr_strCopyCategory $data'); - - $idcat = (int) $data['newcat']->get('idcat'); - if ($idcat <= 0) { - return $data; - } - - // get all cat languages - $aIdLang = ModRewrite::getCatLanguages($idcat); - // update ... - foreach ($aIdLang as $iIdLang) { - // get urlname - $sCatname = ModRewrite::getCatName($idcat, $iIdLang); - // set new urlname - because original set urlname isn't validated for double entries in same parent category - ModRewrite::setCatWebsafeName($sCatname, $idcat, $iIdLang); - ModRewrite::setCatUrlPath($idcat, $iIdLang); - } -} - -/** - * Processes cl-mod-rewrite related job during structure synchronisation process, - * sets the urlpath of current category. - * - * Will be called by chain 'Contenido.Category.strSyncCategory_Loop'. - * - * @param array $data Assoziative array with some values - * @return array Passed parameter - */ -function mr_strSyncCategory(array $data) { - ModRewriteDebugger::log($data, 'mr_strSyncCategory $data'); - ModRewrite::setCatUrlPath($data['idcat'], $data['idlang']); - return $data; -} - -/** - * Processes cl-mod-rewrite related job for saved articles (new or modified article). - * - * Will be called by chain 'Contenido.Action.con_saveart.AfterCall'. - * - * @param array $data Assoziative array with some article properties - * @return array Passed parameter - */ -function mr_conSaveArticle(array $data) { - global $tmp_firstedit, $client; - - ModRewriteDebugger::log($data, 'mr_conSaveArticle $data'); - - if ((int) $data['idart'] == 0) { - return $data; - } - - if (strlen(trim($data['urlname'])) == 0) { - $data['urlname'] = $data['title']; - } - - if (1 == $tmp_firstedit) { - // new article - $aLanguages = getLanguagesByClient($client); - - foreach ($aLanguages as $iLang) { - ModRewrite::setArtWebsafeName($data['urlname'], $data['idart'], $iLang, $data['idcat']); - } - } else { - // modified article - $aArticle = ModRewrite::getArtIdByArtlangId($data['idartlang']); - - if (isset($aArticle['idart']) && isset($aArticle['idlang'])) { - ModRewrite::setArtWebsafeName($data['urlname'], $aArticle['idart'], $aArticle['idlang'], $data['idcat']); - } - } - - return $data; -} - -/** - * Processes cl-mod-rewrite related job for articles beeing moved. - * - * Will be called by chain 'Contenido.Article.conMoveArticles_Loop'. - * - * @param array $data Assoziative array with record entries - * @return array Loop through of arguments - */ -function mr_conMoveArticles($data) { - ModRewriteDebugger::log($data, 'mr_conMoveArticles $data'); - - // too defensive but secure way - if (!is_array($data)) { - return $data; - } elseif (!isset($data['idartlang'])) { - return $data; - } elseif (!isset($data['idart'])) { - return $data; - } - - $arr_art = ModRewrite::getArtIds($data['idartlang']); - if (count($arr_art) == 2) { - ModRewrite::setArtWebsafeName($arr_art["urlname"], $data['idart'], $arr_art["idlang"]); - } - - return $data; -} - -/** - * Processes cl-mod-rewrite related job for duplicated articles. - * - * Will be called by chain 'Contenido.Article.conCopyArtLang_AfterInsert'. - * - * @param array $data Assoziative array with record entries - * @return array Loop through of arguments - */ -function mr_conCopyArtLang($data) { - ModRewriteDebugger::log($data, 'mr_conCopyArtLang $data'); - - // too defensive but secure way - if (!is_array($data)) { - return $data; - } elseif (!isset($data['title'])) { - return $data; - } elseif (!isset($data['idart'])) { - return $data; - } elseif (!isset($data['idlang'])) { - return $data; - } - - ModRewrite::setArtWebsafeName($data['title'], $data['idart'], $data['idlang']); - - return $data; -} - -/** - * Processes cl-mod-rewrite related job for synchronized articles. - * - * Will be called by chain 'Contenido.Article.conSyncArticle_AfterInsert'. - * - * @param array $data Assoziative array with record entries as follows: - * - * array( - * 'src_art_lang' => Recordset (assoziative array) of source item from con_art_lang table - * 'dest_art_lang' => Recordset (assoziative array) of inserted destination item from con_art_lang table - * ); - * - * - * @return array Loop through of argument - */ -function mr_conSyncArticle($data) { - ModRewriteDebugger::log($data, 'mr_conSyncArticle $data'); - - // too defensive but secure way - if (!is_array($data)) { - return $data; - } elseif (!isset($data['src_art_lang']) || !is_array($data['src_art_lang'])) { - return $data; - } elseif (!isset($data['dest_art_lang']) || !is_array($data['dest_art_lang'])) { - return $data; - } elseif (!isset($data['dest_art_lang']['idart'])) { - return $data; - } elseif (!isset($data['dest_art_lang']['idlang'])) { - return $data; - } - - if (!isset($data['src_art_lang']['urlname'])) { - $artLang = new cApiArticleLanguage($data['src_art_lang']['idartlang']); - $urlname = $artLang->get('urlname'); - } else { - $urlname = $data['src_art_lang']['urlname']; - } - - if ($urlname) { - ModRewrite::setArtWebsafeName($urlname, $data['dest_art_lang']['idart'], $data['dest_art_lang']['idlang']); - } - - return $data; -} - -/** - * Works as a wrapper for Contenido_Url. - * - * Will also be called by chain 'Contenido.Frontend.CreateURL'. - * - * @todo: Still exists bcause of downwards compatibility (some other modules/plugins are using it) - * - * @param string $url URL to rebuild - * @return string New URL - */ -function mr_buildNewUrl($url) { - global $lang; - - ModRewriteDebugger::add($url, 'mr_buildNewUrl() in -> $url'); - - $oUrl = Contenido_Url::getInstance(); - $aUrl = $oUrl->parse($url); - - // add language, if not exists - if (!isset($aUrl['params']['lang'])) { - $aUrl['params']['lang'] = $lang; - } - - // build url - $newUrl = $oUrl->build($aUrl['params']); - - // add existing fragment - if (isset($aUrl['fragment'])) { - $newUrl .= '#' . $aUrl['fragment']; - } - - $arr = array( - 'in' => $url, - 'out' => $newUrl, - ); - ModRewriteDebugger::add($arr, 'mr_buildNewUrl() in -> out'); - - return $newUrl; -} - -/** - * Replaces existing ancors inside passed code, while rebuilding the urls. - * - * Will be called by chain 'Contenido.Content.conGenerateCode' or - * 'Contenido.Frontend.HTMLCodeOutput' depening on cl-mod-rewrite settings. - * - * @param string $code Code to prepare - * @return string New code - */ -function mr_buildGeneratedCode($code) { - global $client, $cfgClient; - - ModRewriteDebugger::add($code, 'mr_buildGeneratedCode() in'); - - // mod rewrite is activated - if (ModRewrite::isEnabled()) { - $sseStarttime = getmicrotime(); - - // anchor hack - $code = preg_replace_callback("/]*)href\s*=\s*[\"|\'][\/]#(.?|.+?)[\"|\']([^>]*)>/i", function($match) { - return ModRewrite::rewriteHtmlAnchor($match); - }, $code); - - // remove tinymce single quote entities: - $code = str_replace("'", "'", $code); - - $baseUri = cRegistry::getFrontendUrl(); - $baseUri = CEC_Hook::execute("Contenido.Frontend.BaseHrefGeneration", $baseUri); - - // CON-1389 modifier /e is deprecated as of PHP 5.5 - $code = preg_replace_callback("/([\"|\'|=])upload\/(.?|.+?)([\"|\'|>])/i", function($match) use ($baseUri) { - return stripslashes($match[1] . $baseUri . 'upload/' . $match[2] . $match[3]); - }, $code); - - // define some preparations to replace /front_content.php & ./front_content.php - // against front_content.php, because urls should start with front_content.php - $aPattern = array( - '/([\"|\'|=])\/front_content\.php(.?|.+?)([\"|\'|>])/i', - '/([\"|\'|=])\.\/front_content\.php(.?|.+?)([\"|\'|>])/i' - ); - - $aReplace = array( - '\1front_content.php\2\3', - '\1front_content.php\2\3' - ); - - // perform the pre replacements - $code = preg_replace($aPattern, $aReplace, $code); - - // create url stack object and fill it with found urls... - $oMRUrlStack = ModRewriteUrlStack::getInstance(); - $oMRUrlStack->add('front_content.php'); - - $matches = null; - preg_match_all("/([\"|\'|=])front_content\.php(.?|.+?)([\"|\'|>])/i", $code, $matches, PREG_SET_ORDER); - foreach ($matches as $val) { - $oMRUrlStack->add('front_content.php' . $val[2]); - } - - // ok let it beginn, build the clean urls - $code = str_replace('"front_content.php"', '"' . mr_buildNewUrl('front_content.php') . '"', $code); - $code = str_replace("'front_content.php'", "'" . mr_buildNewUrl('front_content.php') . "'", $code); - $code = preg_replace_callback("/([\"|\'|=])front_content\.php(.?|.+?)([\"|\'|>])/i", function($match) { - ModRewriteDebugger::add($match, 'mr_buildGeneratedCode() matches'); - $sHref = $match[1] . mr_buildNewUrl('front_content.php' . $match[2]) . $match[3]; - ModRewriteDebugger::add($sHref, 'mr_buildGeneratedCode() matches -> href'); - return $sHref; - }, $code); - - ModRewriteDebugger::add($code, 'mr_buildGeneratedCode() out'); - - $sseEndtime = getmicrotime(); - } else { - // anchor hack for non modrewrite websites - $code = preg_replace_callback("/]*)href\s*=\s*[\"|\'][\/]#(.?|.+?)[\"|\']([^>]*)>/i", function($match) { - return ModRewrite::contenidoHtmlAnchor($match, $GLOBALS['is_XHTML']); - }, $code); - } - - ModRewriteDebugger::add(($sseEndtime - $sseStarttime), 'mr_buildGeneratedCode() total spend time'); - - if ($debug = mr_debugOutput(false)) { - $code = cString::iReplaceOnce("", $debug . "\n", $code); - } - - return $code; - // print "\n\n"; -} - -/** - * Sets language of client, like done in front_content.php - * - * @param int $client Client id - */ -function mr_setClientLanguageId($client) { - global $lang, $load_lang, $cfg; - - if ((int) $lang > 0) { - // there is nothing to do - return; - } elseif ($load_lang) { - // load_client is set in frontend/config.php - $lang = $load_lang; - return; - } - - // try to get clients language from table - $sql = "SELECT B.idlang FROM " - . $cfg['tab']['clients_lang'] . " AS A, " - . $cfg['tab']['lang'] . " AS B " - . "WHERE " - . "A.idclient='" . ((int) $client) . "' AND A.idlang=B.idlang" - . "LIMIT 0,1"; - - if ($aData = mr_queryAndNextRecord($sql)) { - $lang = $aData['idlang']; - } -} - -/** - * Loads Advanced Mod Rewrite configuration for passed client using serialized - * file containing the settings. - * - * File is placed in /contenido/cl-mod-rewrite/includes/and is named like - * config.mod_rewrite_{client_id}.php. - * - * @param int $clientId Id of client - * @param bool $forceReload Flag to force to reload configuration, e. g. after - * done changes on it - */ -function mr_loadConfiguration($clientId, $forceReload = false) { - global $cfg; - static $aLoaded; - - $clientId = (int) $clientId; - if (!isset($aLoaded)) { - $aLoaded = array(); - } elseif (isset($aLoaded[$clientId]) && $forceReload == false) { - return; - } - - $mrConfig = mr_getConfiguration($clientId); - - if (is_array($mrConfig)) { - // merge mod rewrite configuration with global cfg array - $cfg = array_merge($cfg, $mrConfig); - } else { - // couldn't load configuration, set defaults - include_once($cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-mod-rewrite/includes/config.mod_rewrite_default.php'); - } - - $aLoaded[$clientId] = true; -} - -function mr_getConfigurationFilePath($clientId) { - $clientConfig = cRegistry::getClientConfig((int) $clientId); - $fePath = $clientConfig['path']['frontend']; - return $fePath . 'data/config/' . CL_ENVIRONMENT . '/config.mod_rewrite.php'; -} - -/** - * Returns the mod rewrite configuration array of an client. - * - * File is placed in /contenido/cl-mod-rewrite/includes/and is named like - * config.mod_rewrite_{client_id}.php. - * - * @param int $clientId Id of client - * @return array|null - */ -function mr_getConfiguration($clientId) { - global $cfg; - - $clientId = (int) $clientId; - - $file = mr_getConfigurationFilePath($clientId); - - if (!is_file($file) || !is_readable($file)) { - $backendPath = cRegistry::getBackendPath(); - $file = $cfg['path']['config'] . 'config.mod_rewrite_' . $clientId . '.php'; - } - - if (!is_file($file) || !is_readable($file)) { - $backendPath = cRegistry::getBackendPath(); - $file = $backendPath . $cfg['path']['plugins'] . 'cl-mod-rewrite/includes/config.mod_rewrite_' . $clientId . '.php'; - } - - if (!is_file($file) || !is_readable($file)) { - return null; - } - - if ($content = file_get_contents($file)) { - $content = unserialize($content); - if (array_key_exists("mod_rewrite", $content)) { - $content['cl-mod-rewrite'] = $content['mod_rewrite']; - unset($content['mod_rewrite']); - } - return $content; - } else { - return null; - } -} - -/** - * Saves the mod rewrite configuration array of an client. - * - * File is placed in /contenido/cl-mod-rewrite/includes/and is named like - * config.mod_rewrite_{client_id}.php. - * - * @param int $clientId Id of client - * @param array $config Configuration to save - * @return bool - */ -function mr_setConfiguration($clientId, array $config) { - $sClientPath = cRegistry::getClientConfig(cRegistry::getClientId())['path']['frontend']; - $sConfigClientPath = $sClientPath.'/data/config/'.CL_ENVIRONMENT.'/'; - - if (is_writable($sClientPath) && !file_exists($sConfigClientPath)) { - try { - mkdir($sConfigClientPath, 0777, true); - } catch (Exception $ex) { - $oWriter = cLogWriter::factory("File", array('destination' => 'contenido.log')); - $oLog = new cLog($oWriter); - $oLog->log($ex->getFile() . " (" . $ex->getLine() . "): " . $ex->getMessage(), cLog::WARN); - } - } - - if(file_exists($sConfigClientPath) && is_writable($sConfigClientPath)) { - $file = $sConfigClientPath. 'config.mod_rewrite.php'; - } else { - $file = cRegistry::getConfigValue('path', 'contenido') . cRegistry::getConfigValue('path', 'plugins') . 'cl-mod-rewrite/includes/config.mod_rewrite_' . cRegistry::getClientId() . '.php'; - } - - $result = file_put_contents($file, serialize($config)); - return ($result) ? true : false; -} - -/** - * Includes the frontend controller script which parses the url and extacts - * needed data like idcat, idart, lang and client from it. - * - * Will be called by chain 'Contenido.Frontend.AfterLoadPlugins' at front_content.php. - * - * @return bool Just a return value - */ -function mr_runFrontendController() { - $iStartTime = getmicrotime(); - - plugin_include('cl-mod-rewrite', 'includes/config.plugin.php'); - - if (ModRewrite::isEnabled() == true) { - plugin_include('cl-mod-rewrite', 'includes/front_content_controller.php'); - - $totalTime = sprintf('%.4f', (getmicrotime() - $iStartTime)); - ModRewriteDebugger::add($totalTime, 'mr_runFrontendController() total time'); - } - - return true; -} - -/** - * Cleanups passed string from characters beeing repeated two or more times - * - * @param string $char Character to remove - * @param string $string String to clean from character - * @return string Cleaned string - */ -function mr_removeMultipleChars($char, $string) { - while (strpos($string, $char . $char) !== false) { - $string = str_replace($char . $char, $char, $string); - } - return $string; -} - -/** - * Returns amr related translation text - * - * @param string $key The message id as string - * @return string Related message - */ -function mr_i18n($key) { - global $lngAMR; - return (is_array($lngAMR) && isset($lngAMR[$key])) ? $lngAMR[$key] : 'n. a.'; -} - -################################################################################ -### Some helper functions, which are not plugin specific - -/** - * Database query helper. Used to execute a select statement and to return the - * result of first recordset. - * - * Minimizes following code: - * - * // default way - * $db = new DB_Contenido(); - * $sql = "SELECT * FROM foo WHERE bar='foobar'"; - * $db->query($sql); - * $db->next_record(); - * $data = $db->Record; - * - * // new way - * $sql = "SELECT * FROM foo WHERE bar='foobar'"; - * $data = mr_queryAndNextRecord($sql); - * - * - * @param string $query Query to execute - * @return mixed Assoziative array including recordset or null - */ -function mr_queryAndNextRecord($query) { - static $db; - if (!isset($db)) { - $db = new DB_Contenido(); - } - if (!$db->query($query)) { - return null; - } - return ($db->next_record()) ? $db->Record : null; -} - -/** - * Returns value of an array key (assoziative or indexed). - * - * Shortcut function for some ways to access to arrays: - * - * // old way - * if (is_array($foo) && isset($foo['bar']) && $foo['bar'] == 'yieeha') { - * // do something - * } - * - * // new, more readable way: - * if (mr_arrayValue($foo, 'bar') == 'yieeha') { - * // do something - * } - * - * // old way - * if (is_array($foo) && isset($foo['bar'])) { - * $jep = $foo['bar']; - * } else { - * $jep = 'yummy'; - * } - * - * // new way - * $jep = mr_arrayValue($foo, 'bar', 'yummy'); - * - * - * @param array $array The array - * @param mixed $key Position of an indexed array or key of an assoziative array - * @param mixed $default Default value to return - * @return mixed Either the found value or the default value - */ -function mr_arrayValue($array, $key, $default = null) { - if (!is_array($array)) { - return $default; - } elseif (!isset($array[$key])) { - return $default; - } else { - return $array[$key]; - } -} - -/** - * Request cleanup function. Request data is allways tainted and must be filtered. - * Pass the array to cleanup using several options. - * Emulates array_walk_recursive(). - * - * @param mixed $data Data to cleanup - * @param array $options Default options array, provides only 'filter' key with several - * filter functions which are to execute as follows: - * - * $options['filter'] = array('trim', 'myFilterFunc'); - * - * If no filter functions are set, 'trim', 'strip_tags' and 'stripslashes' - * will be used by default. - * A userdefined function must accept the value as a parameter and must return - * the filtered parameter, e. g. - * - * function myFilter($data) { - * // do what you want with the data, e. g. cleanup of xss content - * return $data; - * } - * - * - * @return mixed Cleaned data - */ -function mr_requestCleanup(&$data, $options = null) { - if (!mr_arrayValue($options, 'filter')) { - $options['filter'] = array('trim', 'strip_tags', 'stripslashes'); - } - - if (is_array($data)) { - foreach ($data as $p => $v) { - $data[$p] = mr_requestCleanup($v, $options); - } - } else { - foreach ($options['filter'] as $filter) { - if ($filter == 'trim') { - $data = trim($data); - } elseif ($filter == 'strip_tags') { - $data = strip_tags($data); - } elseif ($filter == 'stripslashes') { - $data = stripslashes($data); - } elseif (function_exists($filter)) { - $data = call_user_func($filter, $data); - } - } - } - return $data; -} - -/** - * Minimalistic'n simple way to get request variables. - * - * Checks occurance in $_GET, then in $_POST. Uses trim() and strip_tags() to preclean data. - * - * @param string $key Name of var to get - * @param mixed $default Default value to return - * @return mixed The value - */ -function mr_getRequest($key, $default = null) { - static $cache; - if (!isset($cache)) { - $cache = array(); - } - if (isset($cache[$key])) { - return $cache[$key]; - } - if (isset($_GET[$key])) { - $val = $_GET[$key]; - } elseif (isset($_POST[$key])) { - $val = $_POST[$key]; - } else { - $val = $default; - } - $cache[$key] = strip_tags(trim($val)); - return $cache[$key]; -} - -/** - * Replaces calling of header method for redirects in front_content.php, - * used during development. - * - * @param $header Header value for redirect - */ -function mr_header($header) { - header($header); - return; - - $header = str_replace('Location: ', '', $header); - echo ' - - -

    ' . $header . '

    '; - mr_debugOutput(); - echo ''; - exit(); -} - -/** - * Debug output only during development - * - * @param bool $print Flag to echo the debug data - * @return mixed Either the debug data, if parameter $print is set to true, or nothing - */ -function mr_debugOutput($print = true) { - global $DB_Contenido_QueryCache; - if (isset($DB_Contenido_QueryCache) && is_array($DB_Contenido_QueryCache) && count($DB_Contenido_QueryCache) > 0) { - ModRewriteDebugger::add($DB_Contenido_QueryCache, 'sql statements'); - - // calculate total time consumption of queries - $timeTotal = 0; - foreach ($DB_Contenido_QueryCache as $pos => $item) { - $timeTotal += $item['time']; - } - ModRewriteDebugger::add($timeTotal, 'sql total time'); - } - - $sOutput = ModRewriteDebugger::getAll(); - if ($print == true) { - echo $sOutput; - } else { - return $sOutput; - } -} diff --git a/conlite/plugins/cl-mod-rewrite/includes/include.mod_rewrite_content.php b/conlite/plugins/cl-mod-rewrite/includes/include.mod_rewrite_content.php deleted file mode 100644 index 05227e0..0000000 --- a/conlite/plugins/cl-mod-rewrite/includes/include.mod_rewrite_content.php +++ /dev/null @@ -1,312 +0,0 @@ - - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ - -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -global $client, $cfg; - -################################################################################ -##### Initialization - -if ((int) $client <= 0) { - // if there is no client selected, display empty page - $oPage = new cPage; - $oPage->render(); - return; -} - - -$action = (isset($_REQUEST['mr_action'])) ? $_REQUEST['mr_action'] : 'index'; -$bDebug = false; - - -################################################################################ -##### Some variables - - -$oMrController = new ModRewrite_ContentController(); - -$aMrCfg = ModRewrite::getConfig(); - -// downwards compatibility to previous plugin versions -if (mr_arrayValue($aMrCfg, 'category_seperator', '') == '') { - $aMrCfg['category_seperator'] = '/'; -} -if (mr_arrayValue($aMrCfg, 'category_word_seperator', '') == '') { - $aMrCfg['category_word_seperator'] = '-'; -} -if (mr_arrayValue($aMrCfg, 'article_seperator', '') == '') { - $aMrCfg['article_seperator'] = '/'; -} -if (mr_arrayValue($aMrCfg, 'article_word_seperator', '') == '') { - $aMrCfg['article_word_seperator'] = '-'; -} - -// some settings -$aSeparator = array( - 'pattern' => '/^[\/\-_\.\$~]{1}$/', - 'info' => '/ - . _ ~' -); -$aWordSeparator = array( - 'pattern' => '/^[\-_\.\$~]{1}$/', - 'info' => '- . _ ~' -); - -$routingSeparator = '>>>'; - - -$oMrController->setProperty('bDebug', $bDebug); -$oMrController->setProperty('aSeparator', $aSeparator); -$oMrController->setProperty('aWordSeparator', $aWordSeparator); -$oMrController->setProperty('routingSeparator', $routingSeparator); - -// define basic data contents (used for template) -$oView = $oMrController->getView(); -$oView->content_before = ''; -$oView->idclient = $client; -$oView->use_chk = (ModRewrite::isEnabled()) ? ' checked="checked"' : ''; -$oView->header_notes_css = 'display:none;'; - -// mr copy .htaccess -// @todo copy htacccess check into ModRewrite_ContentController->_doChecks() -$aHtaccessInfo = ModRewrite::getHtaccessInfo(); -if ($aHtaccessInfo['has_htaccess']) { - $oView->htaccess_info_css = 'display:none;'; -} else { - $oView->header_notes_css = 'display:table-row;'; - $oView->htaccess_info_css = 'display:block;'; -} - -// empty aliases -$iEmptyArticleAliases = ModRewrite::getEmptyArticlesAliases(); -$iEmptyCategoryAliases = ModRewrite::getEmptyCategoriesAliases(); -if ($iEmptyArticleAliases > 0 || $iEmptyCategoryAliases > 0) { - $oView->header_notes_css = 'display:table-row;'; - $oView->emptyaliases_info_css = 'display:block;'; -} else { - $oView->emptyaliases_info_css = 'display:none;'; -} - -// mr root dir -$oView->rootdir = $aMrCfg['rootdir']; -$oView->rootdir_error = ''; - -// mr check root dir -$oView->checkrootdir_chk = ($aMrCfg['checkrootdir'] == 1) ? ' checked="checked"' : ''; - -// mr start from root -$oView->startfromroot_chk = ($aMrCfg['startfromroot'] == 1) ? ' checked="checked"' : ''; - -// mr prevent duplicated content -$oView->prevent_duplicated_content_chk = ($aMrCfg['prevent_duplicated_content'] == 1) ? ' checked="checked"' : ''; - -// mr language usage -$oView->use_language_chk = ($aMrCfg['use_language'] == 1) ? ' checked="checked"' : ''; -$oView->use_language_name_chk = ($aMrCfg['use_language_name'] == 1) ? ' checked="checked"' : ''; -$oView->use_language_name_disabled = ($aMrCfg['use_language'] == 1) ? '' : ' disabled="disabled"'; - -// mr client usage -$oView->use_client_chk = ($aMrCfg['use_client'] == 1) ? ' checked="checked"' : ''; -$oView->use_client_name_chk = ($aMrCfg['use_client_name'] == 1) ? ' checked="checked"' : ''; -$oView->use_client_name_disabled = ($aMrCfg['use_client'] == 1) ? '' : ' disabled="disabled"'; - -// mr lowecase uri -$oView->use_lowercase_uri_chk = ($aMrCfg['use_lowercase_uri'] == 1) ? ' checked="checked"' : ''; - -// mr category/category word separator -$oView->category_separator = $aMrCfg['category_seperator']; -$oView->category_separator_attrib = ''; -$oView->category_word_separator = $aMrCfg['category_word_seperator']; -$oView->category_word_separator_attrib = ''; -$oView->category_separator_error = ''; -$oView->category_word_separator_error = ''; - -// mr article/article word separator -$oView->article_separator = $aMrCfg['article_seperator']; -$oView->article_separator_attrib = ''; -$oView->article_word_separator = $aMrCfg['article_word_seperator']; -$oView->article_word_separator_attrib = ''; -$oView->article_separator_error = ''; -$oView->article_word_separator_error = ''; - -// mr file extension -$oView->file_extension = $aMrCfg['file_extension']; -$oView->file_extension_error = ''; - -// mr category name resolve percentage -$oView->category_resolve_min_percentage = $aMrCfg['category_resolve_min_percentage']; -$oView->category_resolve_min_percentage_error = ''; - -// mr add start article name to url -$oView->add_startart_name_to_url_chk = ($aMrCfg['add_startart_name_to_url'] == 1) ? ' checked="checked"' : ''; -$oView->add_startart_name_to_url_error = ''; -$oView->default_startart_name = $aMrCfg['default_startart_name']; - -// mr rewrite urls at -$oView->rewrite_urls_at_congeneratecode_chk = ($aMrCfg['rewrite_urls_at_congeneratecode'] == 1) ? ' checked="checked"' : ''; -$oView->rewrite_urls_at_front_content_output_chk = ($aMrCfg['rewrite_urls_at_front_content_output'] == 1) ? ' checked="checked"' : ''; -$oView->content_after = ''; - -// mr rewrite routing -$data = ''; -if (is_array($aMrCfg['routing'])) { - foreach ($aMrCfg['routing'] as $uri => $route) { - $data .= $uri . $routingSeparator . $route . "\n"; - } -} -$oView->rewrite_routing = $data; - -// mr redirect invalid article -$oView->redirect_invalid_article_to_errorsite_chk = ($aMrCfg['redirect_invalid_article_to_errorsite'] == 1) ? ' checked="checked"' : ''; - - -$oView->lng_version = i18n("Version", "cl-mod-rewrite"); -$oView->lng_author = i18n("Author", "cl-mod-rewrite"); -$oView->lng_mail_to_author = i18n("E-Mail to author", "cl-mod-rewrite"); -$oView->lng_pluginpage = i18n("Plugin page", "cl-mod-rewrite"); -$oView->lng_visit_pluginpage = i18n("Visit plugin page", "cl-mod-rewrite"); -$oView->lng_opens_in_new_window = i18n("opens page in new window", "cl-mod-rewrite"); -$oView->lng_contenido_forum = i18n("CONTENIDO forum", "cl-mod-rewrite"); -$oView->lng_pluginthread_in_contenido_forum = i18n("Plugin thread in CONTENIDO forum", "cl-mod-rewrite"); -$oView->lng_plugin_settings = i18n("Plugin settings", "cl-mod-rewrite"); -$oView->lng_note = i18n("Note", "cl-mod-rewrite"); - -// @todo copy htacccess check into ModRewrite_ContentController->_doChecks() -$sMsg = i18n("The .htaccess file could not found either in CONTENIDO installation directory nor in client directory.
    It should set up in %sFunctions%s area, if needed.", "cl-mod-rewrite"); -$oView->lng_msg_no_htaccess_found = sprintf($sMsg, '', ''); - -$sMsg = i18n("Found", "cl-mod-rewrite"); -$oView->lng_msg_no_emptyaliases_found = sprintf($sMsg, '', ''); - -$oView->lng_enable_amr = i18n("Enable Advanced Mod Rewrite", "cl-mod-rewrite"); - -$oView->lng_msg_enable_amr_info = i18n("Disabling of plugin does not result in disabling mod rewrite module of the web server - This means,
    all defined rules in the .htaccess are still active and could create unwanted side effects.

    Apache mod rewrite could be enabled/disabled by setting the RewriteEngine directive.
    Any defined rewrite rules could remain in the .htaccess and they will not processed,
    if the mod rewrite module is disabled", "cl-mod-rewrite"); - -$oView->lng_example = i18n("Example", "cl-mod-rewrite"); - -$oView->lng_msg_enable_amr_info_example = i18n("# enable apache mod rewrite module\nRewriteEngine on\n\n# disable apache mod rewrite module\nRewriteEngine off", "cl-mod-rewrite"); - -$oView->lng_rootdir = i18n("Path to .htaccess from DocumentRoot", "cl-mod-rewrite"); -$oView->lng_rootdir_info = i18n("Type '/' if the .htaccess file lies inside the wwwroot (DocumentRoot) folder.
    Type the path to the subfolder fromm wwwroot, if CONTENIDO is installed in a subfolder within the wwwroot
    (e. g. http://domain/mycontenido -> path = '/mycontenido/')", "cl-mod-rewrite"); - -$oView->lng_checkrootdir = i18n("Check path to .htaccess", "cl-mod-rewrite"); -$oView->lng_checkrootdir_info = i18n("The path will be checked, if this option is enabled.
    But this could result in an error in some cases, even if the specified path is valid and
    clients DocumentRoot differs from CONTENIDO backend DocumentRoot.", "cl-mod-rewrite"); - -$oView->lng_startfromroot = i18n("Should the name of root category be displayed in the URL?", "cl-mod-rewrite"); -$oView->lng_startfromroot_lbl = i18n("Start from root category", "cl-mod-rewrite"); -$oView->lng_startfromroot_info = i18n("If enabled, the name of the root category (e. g. 'Mainnavigation' in a CONTENIDO default installation), will be preceded to the URL.", "cl-mod-rewrite"); - -$oView->lng_use_client = i18n("Are several clients maintained in one directory?", "cl-mod-rewrite"); -$oView->lng_use_client_lbl = i18n("Prepend client to the URL", "cl-mod-rewrite"); -$oView->lng_use_client_name_lbl = i18n("Use client name instead of the id", "cl-mod-rewrite"); - -$oView->lng_use_language = i18n("Should the language appear in the URL (required for multi language websites)?", "cl-mod-rewrite"); -$oView->lng_use_language_lbl = i18n("Prepend language to the URL", "cl-mod-rewrite"); -$oView->lng_use_language_name_lbl = i18n("Use language name instead of the id", "cl-mod-rewrite"); - -$oView->lng_userdefined_separators_header = i18n("Configure your own separators with following 4 settings
    to control generated URLs to your own taste", "cl-mod-rewrite"); -$oView->lng_userdefined_separators_example = i18n("www.domain.com/category1-category2.articlename.html\nwww.domain.com/category1/category2-articlename.html\nwww.domain.com/category.name1~category2~articlename.html\nwww.domain.com/category_name1-category2-articlename.foo", "cl-mod-rewrite"); -$oView->lng_userdefined_separators_example_a = i18n("Category separator has to be different from category-word separator", "cl-mod-rewrite"); -$oView->lng_userdefined_separators_example_a_example = i18n("# Example: Category separator (/) and category-word separator (_)\ncategory_one/category_two/articlename.html", "cl-mod-rewrite"); -$oView->lng_userdefined_separators_example_b = i18n("Category separator has to be different from article-word separator", "cl-mod-rewrite"); -$oView->lng_userdefined_separators_example_b_example = i18n("# Example: Category separator (/) and article-word separator (-)\ncategory_one/category_two/article-description.html", "cl-mod-rewrite"); -$oView->lng_userdefined_separators_example_c = i18n("Category-article separator has to be different from article-word separator", "cl-mod-rewrite"); -$oView->lng_userdefined_separators_example_c_example = i18n("# Example: Category-article separator (/) and article-word separator (-)\ncategory_one/category_two/article-description.html", "cl-mod-rewrite"); - -$oView->lng_category_separator = i18n("Category separator (delemiter between single categories)", "cl-mod-rewrite"); -$oView->lng_catart_separator_info = sprintf(i18n("(possible values: %s)", "cl-mod-rewrite"), $aSeparator['info']); -$oView->lng_word_separator_info = sprintf(i18n("(possible values: %s)", "cl-mod-rewrite"), $aWordSeparator['info']); -$oView->lng_category_word_separator = i18n("Category-word separator (delemiter between category words)", "cl-mod-rewrite"); -$oView->lng_article_separator = i18n("Category-article separator (delemiter between category-block and article)", "cl-mod-rewrite"); -$oView->lng_article_word_separator = i18n("Article-word separator (delemiter between article words)", "cl-mod-rewrite"); - -$oView->lng_add_startart_name_to_url = i18n("Append article name to URLs", "cl-mod-rewrite"); -$oView->lng_add_startart_name_to_url_lbl = i18n("Append article name always to URLs (even at URLs to categories)", "cl-mod-rewrite"); -$oView->lng_default_startart_name = i18n("Default article name without extension", "cl-mod-rewrite"); -$oView->lng_default_startart_name_info = i18n("e. g. 'index' for index.ext
    In case of selected 'Append article name always to URLs' option and a empty field,
    the name of the start article will be used", "cl-mod-rewrite"); - -$oView->lng_file_extension = i18n("File extension at the end of the URL", "cl-mod-rewrite"); -$oView->lng_file_extension_info = i18n("Specification of file extension with a preceded dot
    e.g. '.html' for http://host/foo/bar.html", "cl-mod-rewrite"); -$oView->lng_file_extension_info2 = i18n("It's strongly recommended to specify a extension here,
    if the option 'Append article name always to URLs' was not selected.

    Otherwise URLs to categories and articles would have the same format
    which may result in unresolvable categories/articles in some cases.", "cl-mod-rewrite"); -$oView->lng_file_extension_info3 = i18n("It's necessary to specify a file extension at the moment, due do existing issues, which are not solved until yet. An not defined extension may result in invalid article detection in some cases.", "cl-mod-rewrite"); - -$oView->lng_use_lowercase_uri = i18n("Should the URLs be written in lower case?", "cl-mod-rewrite"); -$oView->lng_use_lowercase_uri_lbl = i18n("URLs in lower case", "cl-mod-rewrite"); - -$oView->lng_prevent_duplicated_content = i18n("Duplicated content", "cl-mod-rewrite"); -$oView->lng_prevent_duplicated_content_lbl = i18n("Prevent duplicated content", "cl-mod-rewrite"); - -$oView->lng_prevent_duplicated_content_info = i18n("Depending on configuration, pages could be found thru different URLs.
    Enabling of this option prevents this. Examples for duplicated content", "cl-mod-rewrite"); -$oView->lng_prevent_duplicated_content_info2 = i18n("Name of the root category in the URL: Feasible is /maincategory/subcategory/ and /subcategory/\nLanguage in the URL: Feasible is /german/category/ and /1/category/\nClient in the URL: Feasible is /client/category/ und /1/category/", "cl-mod-rewrite"); -$oView->lng_prevent_duplicated_content_info2 = '
  • ' . str_replace("\n", '
  • ', $oView->lng_prevent_duplicated_content_info2) . '
  • '; - -$oView->lng_category_resolve_min_percentage = i18n("Percentage for similar category paths in URLs", "cl-mod-rewrite"); -$oView->lng_category_resolve_min_percentage_info = i18n("This setting refers only to the category path of a URL. If AMR is configured
    to prepend e. g. the root category, language and/or client to the URL,
    the specified percentage will not applied to those parts of the URL.
    An incoming URL will be cleaned from those values and the remaining path (urlpath of the category)
    will be checked against similarities.", "cl-mod-rewrite"); -$oView->lng_category_resolve_min_percentage_example = i18n("100 = exact match with no tolerance\n85 = paths with little errors will match to similar ones\n0 = matching will work even for total wrong paths", "cl-mod-rewrite"); - -$oView->lng_redirect_invalid_article_to_errorsite = i18n("Redirect in case of invalid articles", "cl-mod-rewrite"); -$oView->lng_redirect_invalid_article_to_errorsite_lbl = i18n("Redirect to error page in case of invaid articles", "cl-mod-rewrite"); -$oView->lng_redirect_invalid_article_to_errorsite_info = i18n("The start page will be displayed if this option is not enabled", "cl-mod-rewrite"); - -$oView->lng_rewrite_urls_at = i18n("Moment of URL generation", "cl-mod-rewrite"); -$oView->lng_rewrite_urls_at_front_content_output_lbl = i18n("a.) During the output of HTML code of the page", "cl-mod-rewrite"); -$oView->lng_rewrite_urls_at_front_content_output_info = i18n("Clean-URLs will be generated during page output. Modules/Plugins are able to generate URLs to frontend
    as usual as in previous CONTENIDO versions using a format like 'front_content.php?idcat=1&idart=2'.
    The URLs will be replaced by the plugin to Clean-URLs before sending the HTML output.", "cl-mod-rewrite"); -$oView->lng_rewrite_urls_at_front_content_output_info2 = i18n("Differences to variant b.)", "cl-mod-rewrite"); -$oView->lng_rewrite_urls_at_front_content_output_info3 = i18n("Still compatible to old modules/plugins, since no changes in codes are required\nAll occurring URLs in HTML code, even those set by wysiwyg, will be switched to Clean-URLs\nAll URLs will usually be collected and converted to Clean-URLs at once.
    Doing it this way reduces the amount of executed database significantly.", "cl-mod-rewrite"); -$oView->lng_rewrite_urls_at_front_content_output_info3 = '
  • ' . str_replace("\n", '
  • ', $oView->rewrite_urls_at_front_content_output_info3) . '
  • '; - -$oView->lng_rewrite_urls_at_congeneratecode_lbl = i18n("b.) In modules or plugins", "cl-mod-rewrite"); -$oView->lng_rewrite_urls_at_congeneratecode_info = i18n("By using this option, all Clean-URLs will be generated directly in module or plugins.
    This means, all areas in modules/plugins, who generate internal URLs to categories/articles, have to be adapted manually.
    All Clean-URLs have to be generated by using following function:", "cl-mod-rewrite"); -$oView->lng_rewrite_urls_at_congeneratecode_example = i18n("# structure of a normal url\n\$url = 'front_content.php?idart=123&lang=2&client=1';\n\n# creation of a url by using the CONTENIDOs Url-Builder (since 4.8.9),\n# wich expects the parameter as a assoziative array\n\$params = array('idart'=>123, 'lang'=>2, 'client'=>1);\n\$newUrl = Contenido_Url::getInstance()->build(\$params);", "cl-mod-rewrite"); -$oView->lng_rewrite_urls_at_congeneratecode_info2 = i18n("Differences to variant a.)", "cl-mod-rewrite"); -$oView->lng_rewrite_urls_at_congeneratecode_info3 = i18n("The default way to generate URLs to fronend pages\nEach URL in modules/plugins has to be generated by UriBuilder\nEach generated Clean-Url requires a database query", "cl-mod-rewrite"); -$oView->lng_rewrite_urls_at_congeneratecode_info3 = '
  • ' . str_replace("\n", '
  • ', $oView->lng_rewrite_urls_at_congeneratecode_info3) . '
  • '; - -$oView->lng_rewrite_routing = i18n("Routing", "cl-mod-rewrite"); -$oView->lng_rewrite_routing_info = i18n("Routing definitions for incoming URLs", "cl-mod-rewrite"); -$oView->lng_rewrite_routing_info2 = i18n("Type one routing definition per line as follows:", "cl-mod-rewrite"); -$oView->lng_rewrite_routing_example = i18n("# {incoming_url}>>>{new_url}\n/incoming_url/name.html>>>new_url/new_name.html\n\n# route a specific incoming url to a new page\n/campaign/20_percent_on_everything_except_animal_food.html>>>front_content.php?idcat=23\n\n# route request to wwwroot to a specific page\n/>>>front_content.php?idart=16", "cl-mod-rewrite"); -$oView->lng_rewrite_routing_info3 = i18n("The routing does not sends a HTTP header redirection to the destination URL, the redirection will happen internally by
    replacing the detected incoming URL against the new destination URL (overwriting of article- categoryid)\nIncoming URLs can point to non existing resources (category/article), but the desttination URLs should point
    to valid CONTENIDO articles/categories\nDestination URLs should point to real URLs to categories/articles,
    e. g.front_content.php?idcat=23 or front_content.php?idart=34\nThe language id should attached to the URL in multi language sites
    e. g. front_content.php?idcat=23&lang=1\nThe client id should attached to the URL in multi client sites sharing the same folder
    e. g. front_content.php?idcat=23&client=2\nThe destination URL should not start with '/' or './' (wrong: /front_content.php, correct: front_content.php)", "cl-mod-rewrite"); -$oView->lng_rewrite_routing_info3 = '
  • ' . str_replace("\n", '
  • ', $oView->lng_rewrite_routing_info3) . '
  • '; - -$oView->lng_discard_changes = i18n("Discard changes", "cl-mod-rewrite"); -$oView->lng_save_changes = i18n("Save changes", "cl-mod-rewrite"); - - -################################################################################ -##### Action processing - -if ($action == 'index') { - $oMrController->indexAction(); -} elseif ($action == 'save') { - $oMrController->saveAction(); -} elseif ($action == 'reset') { - $oMrController->resetAction(); -} elseif ($action == 'resetempty') { - $oMrController->resetEmptyAction(); -} else { - $oMrController->indexAction(); -} - - -################################################################################ -##### Output - -$oMrController->render( - $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-mod-rewrite/templates/content.html' -); - diff --git a/conlite/plugins/cl-mod-rewrite/includes/include.mod_rewrite_content_top.php b/conlite/plugins/cl-mod-rewrite/includes/include.mod_rewrite_content_top.php deleted file mode 100644 index cb5b555..0000000 --- a/conlite/plugins/cl-mod-rewrite/includes/include.mod_rewrite_content_top.php +++ /dev/null @@ -1,18 +0,0 @@ -generate( - $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'mod_rewrite/templates/content_top.html', 0, 0 -); diff --git a/conlite/plugins/cl-mod-rewrite/includes/include.mod_rewrite_contentexpert.php b/conlite/plugins/cl-mod-rewrite/includes/include.mod_rewrite_contentexpert.php deleted file mode 100644 index f6581bc..0000000 --- a/conlite/plugins/cl-mod-rewrite/includes/include.mod_rewrite_contentexpert.php +++ /dev/null @@ -1,119 +0,0 @@ - - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ - -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -global $client, $cfg; - -################################################################################ -##### Initialization - -if ((int) $client <= 0) { - // if there is no client selected, display empty page - $oPage = new cPage; - $oPage->render(); - return; -} - -$action = (isset($_REQUEST['mr_action'])) ? $_REQUEST['mr_action'] : 'index'; -$debug = false; - - -################################################################################ -##### Some variables - - -$oMrController = new ModRewrite_ContentExpertController(); - -$aMrCfg = ModRewrite::getConfig(); - -$aHtaccessInfo = ModRewrite::getHtaccessInfo(); - -// define basic data contents (used for template) -$oView = $oMrController->getView(); - -// view variables -$oView->copy_htaccess_css = 'display:table-row;'; -$oView->copy_htaccess_error = ''; -$oView->copy_htaccess_contenido_chk = ' checked="checked"'; -$oView->copy_htaccess_cms_chk = ''; -$oView->contenido_full_path = $aHtaccessInfo['contenido_full_path']; -$oView->client_full_path = $aHtaccessInfo['client_full_path']; -$oView->content_after = ''; - -$oMrController->setProperty('htaccessInfo', $aHtaccessInfo); - -// view language variables -$oView->lng_plugin_functions = i18n("Plugin functions", "cl-mod-rewrite"); - -$oView->lng_copy_htaccess_type = i18n("Copy/Download .htaccess template", "cl-mod-rewrite"); -$oView->lng_copy_htaccess_type_lbl = i18n("Select .htaccess template", "cl-mod-rewrite"); -$oView->lng_copy_htaccess_type1 = i18n("Restrictive .htaccess", "cl-mod-rewrite"); -$oView->lng_copy_htaccess_type2 = i18n("Simple .htaccess", "cl-mod-rewrite"); -$oView->lng_copy_htaccess_type_info1 = i18n("Contains rules with restrictive settings.
    All requests pointing to extension avi, css, doc, flv, gif, gzip, ico, jpeg, jpg, js, mov,
    mp3, pdf, png, ppt, rar, txt, wav, wmv, xml, zip, will be excluded vom rewriting.
    Remaining requests will be rewritten to front_content.php,
    except requests to 'contenido/', 'setup/', 'cms/upload', 'cms/front_content.php', etc.
    Each resource, which has to be excluded from rewriting must be specified explicitly.", "cl-mod-rewrite"); - -$oView->lng_copy_htaccess_type_info2 = i18n("Contains a simple collection of rules. Each requests pointing to valid symlinks, folders or
    files, will be excluded from rewriting. Remaining requests will be rewritten to front_content.php", "cl-mod-rewrite"); - -$oView->lng_copy_htaccess_to = i18n("and copy to", "cl-mod-rewrite"); -$oView->lng_copy_htaccess_to_contenido = i18n("CONTENIDO installation directory", "cl-mod-rewrite"); -$oView->lng_copy_htaccess_to_contenido_info = i18n("Copy the selected .htaccess template into CONTENIDO installation directory

        {CONTENIDO_FULL_PATH}.

    This is the recommended option for a CONTENIDO installation with one or more clients
    who are running on the same domain.", "cl-mod-rewrite"); -$oView->lng_copy_htaccess_to_contenido_info = str_replace('{CONTENIDO_FULL_PATH}', $oView->contenido_full_path, $oView->lng_copy_htaccess_to_contenido_info); -$oView->lng_copy_htaccess_to_client = i18n("client directory", "cl-mod-rewrite"); -$oView->lng_copy_htaccess_to_client_info = i18n("Copy the selected .htaccess template into client's directory

        {CLIENT_FULL_PATH}.

    This is the recommended option for a multiple client system
    where each client has it's own domain/subdomain", "cl-mod-rewrite"); -$oView->lng_copy_htaccess_to_client_info = str_replace('{CLIENT_FULL_PATH}', $oView->client_full_path, $oView->lng_copy_htaccess_to_client_info); -$oView->lng_or = i18n("or", "cl-mod-rewrite"); -$oView->lng_download = i18n("Download", "cl-mod-rewrite"); -$oView->lng_download_info = i18n("Download selected .htaccess template to copy it to the destination folder
    or to take over the settings manually.", "cl-mod-rewrite"); - -$oView->lng_resetaliases = i18n("Reset category-/ and article aliases", "cl-mod-rewrite"); -$oView->lng_resetempty_link = i18n("Reset only empty aliases", "cl-mod-rewrite"); -$oView->lng_resetempty_info = i18n("Only empty aliases will be reset, existing aliases, e. g. manually set aliases, will not be changed.", "cl-mod-rewrite"); -$oView->lng_resetall_link = i18n("Reset all aliases", "cl-mod-rewrite"); -$oView->lng_resetall_info = i18n("Reset all category-/article aliases. Existing aliases will be overwritten.", "cl-mod-rewrite"); -$oView->lng_note = i18n("Note", "cl-mod-rewrite"); -$oView->lng_resetaliases_note = i18n("This process could require some time depending on amount of categories/articles.
    The aliases will not contain the configured plugin separators, but the CONTENIDO default separators '/' und '-', e. g. '/category-word/article-word'.
    Execution of this function ma be helpful to prepare all or empty aliases for the usage by the plugin.", "cl-mod-rewrite"); - -$oView->lng_discard_changes = i18n("Discard changes", "cl-mod-rewrite"); -$oView->lng_save_changes = i18n("Save changes", "cl-mod-rewrite"); - - -################################################################################ -##### Action processing - -if ($action == 'index') { - $oMrController->indexAction(); -} elseif ($action == 'copyhtaccess') { - $oMrController->copyHtaccessAction(); -} elseif ($action == 'downloadhtaccess') { - $oMrController->downloadHtaccessAction(); - exit(); -} elseif ($action == 'reset') { - $oMrController->resetAction(); -} elseif ($action == 'resetempty') { - $oMrController->resetEmptyAction(); -} else { - $oMrController->indexAction(); -} - - -################################################################################ -##### Output - -$oMrController->render( - $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-mod-rewrite/templates/contentexpert.html' -); - diff --git a/conlite/plugins/cl-mod-rewrite/includes/include.mod_rewrite_contenttest.php b/conlite/plugins/cl-mod-rewrite/includes/include.mod_rewrite_contenttest.php deleted file mode 100644 index 90a1032..0000000 --- a/conlite/plugins/cl-mod-rewrite/includes/include.mod_rewrite_contenttest.php +++ /dev/null @@ -1,83 +0,0 @@ - - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ - -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -global $client, $cfg; - - -################################################################################ -##### Initialization - -if ((int) $client <= 0) { - // if there is no client selected, display empty page - $oPage = new cPage; - $oPage->render(); - return; -} - - -################################################################################ -##### Processing - -$mrTestNoOptionSelected = false; -if (!mr_getRequest('idart') && !mr_getRequest('idcat') && !mr_getRequest('idcatart') && !mr_getRequest('idartlang')) { - $mrTestNoOptionSelected = true; -} - - -$oMrTestController = new ModRewrite_ContentTestController(); - - -// view language variables -$oView = $oMrTestController->getView(); -$oView->lng_form_info = i18n("Define options to genereate the URLs by using the form below and run the test.", "cl-mod-rewrite"); -$oView->lng_form_label = i18n("Parameter to use", "cl-mod-rewrite"); -$oView->lng_maxitems_lbl = i18n("Number of URLs to generate", "cl-mod-rewrite"); -$oView->lng_run_test = i18n("Run test", "cl-mod-rewrite"); - -$oView->lng_result_item_tpl = i18n("{pref}{name}
    {pref}Builder in: {url_in}
    {pref}Builder out: {url_out}
    {pref}Resolved URL: {url_res}
    {pref}Resolver err: {err}
    {pref}Resolved data: {data}", "cl-mod-rewrite"); - -$oView->lng_result_message_tpl = i18n("Duration of test run: {time} seconds.
    Number of processed URLs: {num_urls}
    Successful resolved: {num_success}
    Errors during resolving: {num_fail}", "cl-mod-rewrite"); - - -################################################################################ -##### Action processing - -if ($mrTestNoOptionSelected) { - $oMrTestController->indexAction(); -} else { - $oMrTestController->testAction(); -} - -$oView = $oMrTestController->getView(); -$oView->content .= mr_debugOutput(false); - - -################################################################################ -##### Output - -$oMrTestController->render( - $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-mod-rewrite/templates/contenttest.html' -); diff --git a/conlite/plugins/cl-mod-rewrite/locale/de_DE/LC_MESSAGES/cl-mod-rewrite.mo b/conlite/plugins/cl-mod-rewrite/locale/de_DE/LC_MESSAGES/cl-mod-rewrite.mo deleted file mode 100644 index bd03a82..0000000 Binary files a/conlite/plugins/cl-mod-rewrite/locale/de_DE/LC_MESSAGES/cl-mod-rewrite.mo and /dev/null differ diff --git a/conlite/plugins/cl-mod-rewrite/locale/de_DE/LC_MESSAGES/cl-mod-rewrite.po b/conlite/plugins/cl-mod-rewrite/locale/de_DE/LC_MESSAGES/cl-mod-rewrite.po deleted file mode 100644 index e9bdf52..0000000 --- a/conlite/plugins/cl-mod-rewrite/locale/de_DE/LC_MESSAGES/cl-mod-rewrite.po +++ /dev/null @@ -1,944 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: ConLite AMR\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-15 18:37+0200\n" -"PO-Revision-Date: 2017-07-16 13:36+0100\n" -"Last-Translator: Ortwin Pinke \n" -"Language-Team: Ortwin Pinke \n" -"Language: de_DE\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-KeywordsList: i18n\n" -"X-Generator: Poedit 1.5.4\n" -"X-Poedit-SearchPath-0: mod_rewrite\n" - -#: includes/include.mod_rewrite_content.php:177 -msgid "Version" -msgstr "Version" - -#: includes/include.mod_rewrite_content.php:178 -msgid "Author" -msgstr "Autor" - -#: includes/include.mod_rewrite_content.php:179 -msgid "E-Mail to author" -msgstr "E-Mail an Autor" - -#: includes/include.mod_rewrite_content.php:180 -msgid "Plugin page" -msgstr "Pluginseite" - -#: includes/include.mod_rewrite_content.php:181 -msgid "Visit plugin page" -msgstr "Pluginseite besuchen" - -#: includes/include.mod_rewrite_content.php:182 -msgid "opens page in new window" -msgstr "öffnet Seite in einem neuen Fenster" - -#: includes/include.mod_rewrite_content.php:183 -msgid "CONTENIDO forum" -msgstr "CONTENIDO Forum" - -#: includes/include.mod_rewrite_content.php:184 -msgid "Plugin thread in CONTENIDO forum" -msgstr "Pluginbeitrag im CONTENIDO Forum" - -#: includes/include.mod_rewrite_content.php:185 -msgid "Plugin settings" -msgstr "Plugineinstellungen" - -#: includes/include.mod_rewrite_content.php:186 -#: includes/include.mod_rewrite_contentexpert.php:87 -msgid "Note" -msgstr "Hinweis" - -#: includes/include.mod_rewrite_content.php:189 -#, php-format -msgid "" -"The .htaccess file could not found either in CONTENIDO installation " -"directory nor in client directory.
    It should set up in %sFunctions%s " -"area, if needed." -msgstr "" -"Es wurde weder im CONTENIDO Installationsverzeichnis noch im " -"Mandantenverzeichnis eine .htaccess Datei gefunden.
    Die .htaccess Datei " -"sollte gegebenenfalls im Bereich %sFunktionen%s eingerichtet werden." - -#: includes/include.mod_rewrite_content.php:192 -#, php-format -msgid "" -"Found some category and/or article aliases. It is recommended to run the " -"reset function in %sFunctions%s area, if needed." -msgstr "" -"Einige leere Kategorie- und/oder Artikelaliase wurden gefunden. Es wird " -"empfohlen, diese über den Bereich %sFunktionen%s zurückzusetzen." - -#: includes/include.mod_rewrite_content.php:195 -msgid "Enable Advanced Mod Rewrite" -msgstr "Advanced Mod Rewrite aktivieren" - -#: includes/include.mod_rewrite_content.php:197 -msgid "" -"Disabling of plugin does not result in disabling mod rewrite module of the " -"web server - This means,
    all defined rules in the .htaccess are still " -"active and could create unwanted side effects.

    Apache mod rewrite " -"could be enabled/disabled by setting the RewriteEngine directive.
    Any " -"defined rewrite rules could remain in the .htaccess and they will not " -"processed,
    if the mod rewrite module is disabled" -msgstr "" -"Beim Deaktivieren des Plugins wird das mod rewrite Modul des Webservers " -"nicht mit deaktiviert - Das bedeutet,
    dass alle in der .htaccess " -"definerten Regeln weiterhin aktiv sind und einen unerwünschten Nebeneffekt " -"haben können.

    Apache mod rewrite lässt sich in der .htaccess durch " -"das Setzen der RewriteEngine-Direktive aktivieren/deaktivieren.
    Wird das " -"mod rewrite Modul deaktiviert, können die in der .htaccess definierten " -"Regeln weiterhin bleiben, sie werden
    dann nicht verarbeitet." - -#: includes/include.mod_rewrite_content.php:199 -msgid "Example" -msgstr "Beispiel" - -#: includes/include.mod_rewrite_content.php:201 -msgid "" -"# enable apache mod rewrite module\n" -"RewriteEngine on\n" -"\n" -"# disable apache mod rewrite module\n" -"RewriteEngine off" -msgstr "" -"# aktivieren des apache mod rewrite moduls\n" -"RewriteEngine on\n" -"\n" -"# deaktivieren des apache mod rewrite moduls\n" -"RewriteEngine off" - -#: includes/include.mod_rewrite_content.php:203 -msgid "Path to .htaccess from DocumentRoot" -msgstr "Pfad zur .htaccess Datei vom DocumentRoot ausgehend" - -#: includes/include.mod_rewrite_content.php:204 -msgid "" -"Type '/' if the .htaccess file lies inside the wwwroot (DocumentRoot) folder." -"
    Type the path to the subfolder fromm wwwroot, if CONTENIDO is installed " -"in a subfolder within the wwwroot
    (e. g. http://domain/mycontenido -> " -"path = '/mycontenido/')" -msgstr "" -"Liegt die .htaccess im wwwroot (DocumentRoot), ist '/' anzugeben, ist " -"CONTENIDO in einem
    Unterverzeichnis von wwwroot installiert, ist der " -"Pfad vom wwwroot aus anzugeben
    (z. B. http://domain/mycontenido -> " -"Pfad = '/mycontenido/')." - -#: includes/include.mod_rewrite_content.php:206 -msgid "Check path to .htaccess" -msgstr "Pfad zur .htaccess Datei überprüfen" - -#: includes/include.mod_rewrite_content.php:207 -msgid "" -"The path will be checked, if this option is enabled.
    But this could " -"result in an error in some cases, even if the specified path is valid " -"and
    clients DocumentRoot differs from CONTENIDO backend DocumentRoot." -msgstr "" -"Ist diese Option aktiv, wird der eingegebene Pfad überprüft. Das kann unter " -"
    Umständen einen Fehler verursachen, obwohl der Pfad zwar richtig ist, " -"aber der Mandant
    einen anderen DocumentRoot als das CONTENIDO Backend " -"hat." - -#: includes/include.mod_rewrite_content.php:209 -msgid "Should the name of root category be displayed in the URL?" -msgstr "Soll der Name des Hauptbaumes mit in der URL erscheinen?" - -#: includes/include.mod_rewrite_content.php:210 -msgid "Start from root category" -msgstr "Start vom Hauptbaum aus" - -#: includes/include.mod_rewrite_content.php:211 -msgid "" -"If enabled, the name of the root category (e. g. 'Mainnavigation' in a " -"CONTENIDO default installation), will be preceded to the URL." -msgstr "" -"Ist diese Option gewählt, wird der Name des Hauptbaumes (Kategoriebaum, " -"
    z. B. 'Hauptnavigation' bei CONTENIDO Standardinstallation) der URL " -"vorangestellt." - -#: includes/include.mod_rewrite_content.php:213 -msgid "Are several clients maintained in one directory?" -msgstr "Werden mehrere Mandanten in einem Verzeichnis gepflegt?" - -#: includes/include.mod_rewrite_content.php:214 -msgid "Prepend client to the URL" -msgstr "Mandant an die URL voranstellen" - -#: includes/include.mod_rewrite_content.php:215 -msgid "Use client name instead of the id" -msgstr "Name des Mandanten anstatt die Id verwenden" - -#: includes/include.mod_rewrite_content.php:217 -msgid "" -"Should the language appear in the URL (required for multi language websites)?" -msgstr "" -"Soll die Sprache mit in der URL erscheinen (für Mehrsprachsysteme " -"unabdingbar)?" - -#: includes/include.mod_rewrite_content.php:218 -msgid "Prepend language to the URL" -msgstr "Sprache an die URL voranstellen" - -#: includes/include.mod_rewrite_content.php:219 -msgid "Use language name instead of the id" -msgstr "Name der Sprache anstatt die Id verwenden" - -#: includes/include.mod_rewrite_content.php:221 -msgid "" -"Configure your own separators with following 4 settings
    to control " -"generated URLs to your own taste" -msgstr "" -"Mit den nächsten 4 Einstellungen können die Trennzeichen in " -"den
    generierten URLs nach den eigenen Wünschen gesetzt werden." - -#: includes/include.mod_rewrite_content.php:222 -msgid "" -"www.domain.com/category1-category2.articlename.html\n" -"www.domain.com/category1/category2-articlename.html\n" -"www.domain.com/category.name1~category2~articlename.html\n" -"www.domain.com/category_name1-category2-articlename.foo" -msgstr "" -"www.domain.de/kategorie1-kategorie2.artikelname.html\n" -"www.domain.de/kategorie1/kategorie2-artikelname.html\n" -"www.domain.de/kategorie.name1~kategorie2~artikelname.html\n" -"www.domain.de/kategorie_name1-kategorie2-artikelname.foo" - -#: includes/include.mod_rewrite_content.php:223 -msgid "Category separator has to be different from category-word separator" -msgstr "" -"Kategorie-Separator und Kategoriewort-Separator müssen unterschiedlich sein" - -#: includes/include.mod_rewrite_content.php:224 -msgid "" -"# Example: Category separator (/) and category-word separator (_)\n" -"category_one/category_two/articlename.html" -msgstr "" -"# Beispiel: Kategorie-Separator (/) und Kategoriewort-Separator (_)\n" -"kategorie_eins/kategorie_zwei/artikelname.html" - -#: includes/include.mod_rewrite_content.php:225 -msgid "Category separator has to be different from article-word separator" -msgstr "" -"Kategorie-Separator und Artikelwort-Separator müssen unterschiedlich sein" - -#: includes/include.mod_rewrite_content.php:226 -msgid "" -"# Example: Category separator (/) and article-word separator (-)\n" -"category_one/category_two/article-description.html" -msgstr "" -"# Beispiel: Kategorie-Separator (/) und Artikelwort-Separator (-)\n" -"kategorie_eins/kategorie_zwei/artikel-bezeichnung.html" - -#: includes/include.mod_rewrite_content.php:227 -msgid "" -"Category-article separator has to be different from article-word separator" -msgstr "" -"Kategorie-Artikel-Separator und Artikelwort-Separator müssen unterschiedlich " -"sein" - -#: includes/include.mod_rewrite_content.php:228 -msgid "" -"# Example: Category-article separator (/) and article-word separator (-)\n" -"category_one/category_two/article-description.html" -msgstr "" -"# Beispiel: Kategorie-Artikel-Separator (/) und Artikelwort-Separator (-)\n" -"kategorie_eins/kategorie_zwei/artikel-bezeichnung.html" - -#: includes/include.mod_rewrite_content.php:230 -msgid "Category separator (delemiter between single categories)" -msgstr "Kategorie-Separator (Trenner zwischen einzelnen Kategorien)" - -#: includes/include.mod_rewrite_content.php:231 -#: includes/include.mod_rewrite_content.php:232 -#, php-format -msgid "(possible values: %s)" -msgstr "(mögliche Werte: %s)" - -#: includes/include.mod_rewrite_content.php:233 -msgid "Category-word separator (delemiter between category words)" -msgstr "Kategoriewort-Separator (Trenner zwischen einzelnen Kategoriewörtern)" - -#: includes/include.mod_rewrite_content.php:234 -msgid "" -"Category-article separator (delemiter between category-block and article)" -msgstr "" -"Kategorie-Artikel-Separator (Trenner zwischen Kategorieabschnitt und " -"Artikelname)" - -#: includes/include.mod_rewrite_content.php:235 -msgid "Article-word separator (delemiter between article words)" -msgstr "Artikelwort-Separator (Trenner zwischen einzelnen Artikelwörtern)" - -#: includes/include.mod_rewrite_content.php:237 -msgid "Append article name to URLs" -msgstr "Artikelname an URLs anhängen" - -#: includes/include.mod_rewrite_content.php:238 -msgid "Append article name always to URLs (even at URLs to categories)" -msgstr "Artikelname immer an die URLs anhängen (auch bei URLs zu Kategorien)" - -#: includes/include.mod_rewrite_content.php:239 -msgid "Default article name without extension" -msgstr "Standard-Artikelname ohne Dateiendung" - -#: includes/include.mod_rewrite_content.php:240 -msgid "" -"e. g. 'index' for index.ext
    In case of selected 'Append article name " -"always to URLs' option and a empty field,
    the name of the start article " -"will be used" -msgstr "" -"z. B. 'index' für index.ext.
    Wenn die Option 'Artikelname immer an die " -"URLs anhängen' aktiviert und das Feld leer ist,
    wird der Name des " -"Startartikels verwendet." - -#: includes/include.mod_rewrite_content.php:242 -msgid "File extension at the end of the URL" -msgstr "Dateiendung am Ende der URL" - -#: includes/include.mod_rewrite_content.php:243 -msgid "" -"Specification of file extension with a preceded dot
    e.g. '.html' for " -"http://host/foo/bar.html" -msgstr "" -"Angabe der Dateiendung mit einem vorangestellten Punkt,
    z. B. '.html' für " -"http://host/foo/bar.html" - -#: includes/include.mod_rewrite_content.php:244 -msgid "" -"It's strongly recommended to specify a extension here,
    if the option " -"'Append article name always to URLs' was not selected.

    Otherwise URLs " -"to categories and articles would have the same format
    which may result in " -"unresolvable categories/articles in some cases." -msgstr "" -"Falls die Option 'Artikelname immer an die URLs anhängen' nicht gewählt " -"wurde,
    ist es zwingend notwending, dass hier eine Dateiendung angegeben " -"wird.

    Sonst haben URLs zu Kategorien und zu Seiten das gleiche " -"Format, und die korrekte
    Auflösung der Kategorie und/oder des Artikels " -"kann nicht gewährleistet werden." - -#: includes/include.mod_rewrite_content.php:245 -msgid "" -"It's necessary to specify a file extension at the moment, due do existing " -"issues, which are not solved until yet. An not defined extension may result " -"in invalid article detection in some cases." -msgstr "" -"Aufgrund diverser Probleme, die noch nicht in dieser Version gelöst " -"wurden konnten, sollte unbedingt eine Endung angegeben werden. Ohne eine " -"angegebene Endung kann es zur fehlerhaften Erkennung der Artikel kommen." - -#: includes/include.mod_rewrite_content.php:247 -msgid "Should the URLs be written in lower case?" -msgstr "Sollen die URLs klein geschrieben werden?" - -#: includes/include.mod_rewrite_content.php:248 -msgid "URLs in lower case" -msgstr "URLs in Kleinbuchstaben" - -#: includes/include.mod_rewrite_content.php:250 -msgid "Duplicated content" -msgstr "Duplicated Content" - -#: includes/include.mod_rewrite_content.php:251 -msgid "Prevent duplicated content" -msgstr "Duplicated Content verhindern" - -#: includes/include.mod_rewrite_content.php:253 -msgid "" -"Depending on configuration, pages could be found thru different URLs." -"
    Enabling of this option prevents this. Examples for duplicated content" -msgstr "" -"Seiten werden je nach Konfiguration unter verschiedenen URLs gefunden." -"
    Das Aktivieren dieser Option unterbindet dies. Beispiele für duplicated " -"Content" - -#: includes/include.mod_rewrite_content.php:254 -msgid "" -"Name of the root category in the URL: Feasible is /maincategory/subcategory/ " -"and /subcategory/\n" -"Language in the URL: Feasible is /german/category/ and /1/category/\n" -"Client in the URL: Feasible is /client/category/ und /1/category/" -msgstr "" -"Name des Hauptbaumes in der URL: Möglich /hauptkategorie/unterkategorie/ " -"und /unterkategorie/\n" -"Sprache in der URL: Möglich /deutsch/kategorie/ und /1/kategorie/\n" -"Mandant in der URL: Möglich /mandant/kategorie/ und /1/kategorie/" - -#: includes/include.mod_rewrite_content.php:257 -msgid "Percentage for similar category paths in URLs" -msgstr "Prozentsatz für ähnliche Kategorie-Pfade in URLs" - -#: includes/include.mod_rewrite_content.php:258 -msgid "" -"This setting refers only to the category path of a URL. If AMR is " -"configured
    to prepend e. g. the root category, language and/or client to " -"the URL,
    the specified percentage will not applied to those parts of the " -"URL.
    An incoming URL will be cleaned from those values and the remaining " -"path (urlpath of the category)
    will be checked against similarities." -msgstr "" -"Diese Einstellung bezieht sich nur auf den Kategorieteil einer URL. Ist AMR " -"so konfiguriert, dass z. B. die
    Hauptnavigation und/oder Sprache sowie " -"der Name des Mandanten an die URL vorangestellt wird, so wird der hier " -"
    definierte Prozentsatz nicht auf diese Werte der URL angewendet.
    Eine " -"ankommende URL wird von solchen Präfixen entfernt, der übrig gebliebene Pfad " -"(Urlpfad der Kategorie)
    wird auf die Ähnlichkleit hin geprüft." - -#: includes/include.mod_rewrite_content.php:259 -msgid "" -"100 = exact match with no tolerance\n" -"85 = paths with little errors will match to similar ones\n" -"0 = matching will work even for total wrong paths" -msgstr "" -"100 = exakte überinstimmung, keine fehlertoleranz\n" -"85 = pfade mit kleineren fehlern ergeben auch treffern\n" -"0 = vollständig fehlerhafte pfade ergeben dennoch einen treffer" - -#: includes/include.mod_rewrite_content.php:261 -msgid "Redirect in case of invalid articles" -msgstr "Weiterleitung bei ungültigen Artikeln" - -#: includes/include.mod_rewrite_content.php:262 -msgid "Redirect to error page in case of invaid articles" -msgstr "Bei ungültigen Artikeln zur Fehlerseite weiterleiten" - -#: includes/include.mod_rewrite_content.php:263 -msgid "The start page will be displayed if this option is not enabled" -msgstr "Ist die Option nicht aktiv, wird die Startseite angezeigt" - -#: includes/include.mod_rewrite_content.php:265 -msgid "Moment of URL generation" -msgstr "Zeitpunkt zum Generieren der URLs" - -#: includes/include.mod_rewrite_content.php:266 -msgid "a.) During the output of HTML code of the page" -msgstr "a.) Bei der Ausgabe des HTML Codes der Seite" - -#: includes/include.mod_rewrite_content.php:267 -msgid "" -"Clean-URLs will be generated during page output. Modules/Plugins are able to " -"generate URLs to frontend
    as usual as in previous CONTENIDO versions " -"using a format like 'front_content.php?idcat=1&idart=2'.
    The URLs " -"will be replaced by the plugin to Clean-URLs before sending the HTML output." -msgstr "" -"Clean-URLs werden bei der Ausgabe der Seite generiert. Module/Plugins können " -"URLs zum Frontend,
    wie in früheren Versionen von CONTENIDO üblich, nach " -"dem Muster 'front_content.php?idcat=1&idart=2'
    ausgeben. Die URLs " -"werden vom Plugin vor der Ausgabe des HTML-Outputs Clean-URLs ersetzt." - -#: includes/include.mod_rewrite_content.php:268 -msgid "Differences to variant b.)" -msgstr "Unterschiede zur Variante b.)" - -#: includes/include.mod_rewrite_content.php:269 -msgid "" -"Still compatible to old modules/plugins, since no changes in codes are " -"required\n" -"All occurring URLs in HTML code, even those set by wysiwyg, will be switched " -"to Clean-URLs\n" -"All URLs will usually be collected and converted to Clean-URLs at once." -"
    Doing it this way reduces the amount of executed database significantly." -msgstr "" -"Weiterhin Kompatibel zu älteren Modulen/Plugins, da keine Änderungen am Code " -"nötig sind\n" -"Sämtliche im HTML-Code vorkommende URLs, auch über wysiwyg gesetzte URLs, " -"
    werden auf Clean-URLs umgestellt\n" -"Alle umzuschreibenden URLs werden in der Regel \"gesammelt\" und auf eimmal " -"umgeschreiben,
    dadurch wird die Anzahl der DB-Abfragen sehr stark " -"minimiert" - -#: includes/include.mod_rewrite_content.php:272 -msgid "b.) In modules or plugins" -msgstr "b.) In Modulen oder Plugins" - -#: includes/include.mod_rewrite_content.php:273 -msgid "" -"By using this option, all Clean-URLs will be generated directly in module or " -"plugins.
    This means, all areas in modules/plugins, who generate internal " -"URLs to categories/articles, have to be adapted manually.
    All Clean-URLs " -"have to be generated by using following function:" -msgstr "" -"Bei dieser Option werden die Clean-URLs direkt in Modulen/Plugins generiert. " -"Das bedeutet,
    dass alle internen URLs auf Kategorien/Artikel in den " -"Modulausgaben ggf. manuell angepasst werden müssen.
    Clean-URLs müssen " -"dann stets mit folgender Funktion erstellt werden:" - -#: includes/include.mod_rewrite_content.php:274 -msgid "" -"# structure of a normal url\n" -"$url = 'front_content.php?idart=123&lang=2&client=1';\n" -"\n" -"# creation of a url by using the CONTENIDOs Url-Builder (since 4.8.9),\n" -"# wich expects the parameter as a assoziative array\n" -"$params = array('idart'=>123, 'lang'=>2, 'client'=>1);\n" -"$newUrl = Contenido_Url::getInstance()->build($params);" -msgstr "" -"# aufbau einer normalen url\n" -"$url = 'front_content.php?idart=123&lang=2&client=1';\n" -"\n" -"# erstellen der neuen Url über CONTENIDOs Url-Builder (seit 4.8.9),\n" -"# der die Parameter als assoziatives array erwartet\n" -"$params = array('idart'=>123, 'lang'=>2, 'client'=>1);\n" -"$newUrl = Contenido_Url::getInstance()->build($params);" - -#: includes/include.mod_rewrite_content.php:275 -msgid "Differences to variant a.)" -msgstr "Unterschiede zur Variante a.)" - -#: includes/include.mod_rewrite_content.php:276 -msgid "" -"The default way to generate URLs to fronend pages\n" -"Each URL in modules/plugins has to be generated by UriBuilder\n" -"Each generated Clean-Url requires a database query" -msgstr "" -"Der Standardweg um URLs zu Frontendseiten zu generieren\n" -"Jede URL in Modulen/Plugins ist vom UrlBuilder zu erstellen\n" -"Für jede umzuschreibende URL ist eine Datenbankabfrage nötig" - -#: includes/include.mod_rewrite_content.php:279 -msgid "Routing" -msgstr "Routing" - -#: includes/include.mod_rewrite_content.php:280 -msgid "Routing definitions for incoming URLs" -msgstr "Routing Definitionen für eingehende URLs" - -#: includes/include.mod_rewrite_content.php:281 -msgid "Type one routing definition per line as follows:" -msgstr "Pro Zeile eine Routing Definition wie folgt eingeben:" - -#: includes/include.mod_rewrite_content.php:282 -msgid "" -"# {incoming_url}>>>{new_url}\n" -"/incoming_url/name.html>>>new_url/new_name.html\n" -"\n" -"# route a specific incoming url to a new page\n" -"/campaign/20_percent_on_everything_except_animal_food.html>>>front_content." -"php?idcat=23\n" -"\n" -"# route request to wwwroot to a specific page\n" -"/>>>front_content.php?idart=16" -msgstr "" -"# {eingehende_url}>>>{neue_url}\n" -"/eingehende_url/name.html>>>neue_url/neuer_name.html\n" -"\n" -"# bestimmte eingehende url zur einer seite weiterleiten\n" -"/aktionen/20_prozent_auf_alles_ausser_tiernahrung.html>>>front_content.php?" -"idcat=23\n" -"\n" -"# request zum wwwroot auf eine bestimmte seite routen\n" -"/>>>front_content.php?idart=16" - -#: includes/include.mod_rewrite_content.php:283 -msgid "" -"The routing does not sends a HTTP header redirection to the destination URL, " -"the redirection will happen internally by
    replacing the detected incoming " -"URL against the new destination URL (overwriting of article- categoryid)\n" -"Incoming URLs can point to non existing resources (category/article), but " -"the desttination URLs should point
    to valid CONTENIDO articles/" -"categories\n" -"Destination URLs should point to real URLs to categories/articles,
    e. g." -"front_content.php?idcat=23 or front_content.php?idart=34\n" -"The language id should attached to the URL in multi language sites
    e. g. " -"front_content.php?idcat=23&lang=1\n" -"The client id should attached to the URL in multi client sites sharing the " -"same folder
    e. g. front_content.php?idcat=23&client=2\n" -"The destination URL should not start with '/' or './' (wrong: /front_content." -"php, correct: front_content.php)" -msgstr "" -"Das Routing schickt keinen HTTP Header mit einer Weiterleitung zur Ziel-URL, " -"die Umleitung findet intern
    durch das Ersetzen der erkannten " -"Eingangsseite gegen die neue Zielseite statt (Überschreiben der Artikel-/" -"Kategorieid)\n" -"Eingehende URLs können auch nicht vorhandene Ressourcen (Kategorie, Artikel) " -"sein, hinter der Ziel URL muss eine
    gültige CONTENIDO-Seite (Kategorie/" -"Artikel) liegen\n" -"Als Ziel URL sollte eine reale URL zur Kategorie/Seite angegeben werden, " -"
    z. B. front_content.php?idcat=23 oder front_content.php?idart=34.\n" -"Bei mehrsprachigen Auftritten sollte die Id der Sprache angehängt werden, " -"
    z. B. front_content.php?idcat=23&lang=1\n" -"Bei mehreren Mandanten im gleichen Verzeichnis sollte die Id des Mandanten " -"angehängt werden,
    z. B. front_content.php?idcat=23&client=2\n" -"Die Zielurl sollte nicht mit '/' oder './' beginnen (falsch: /front_content." -"php, richtig: front_content.php)" - -#: includes/include.mod_rewrite_content.php:286 -#: includes/include.mod_rewrite_contentexpert.php:90 -msgid "Discard changes" -msgstr "Änderungen verwerfen" - -#: includes/include.mod_rewrite_content.php:287 -#: includes/include.mod_rewrite_contentexpert.php:91 -msgid "Save changes" -msgstr "Änderungen speichern" - -#: includes/include.mod_rewrite_contenttest.php:55 -msgid "" -"Define options to genereate the URLs by using the form below and run the " -"test." -msgstr "" -"Optionen zum Generieren der URLs im folgenden Formular setzen und den Test " -"starten." - -#: includes/include.mod_rewrite_contenttest.php:56 -msgid "Parameter to use" -msgstr "Zu verwendende Parameter" - -#: includes/include.mod_rewrite_contenttest.php:57 -msgid "Number of URLs to generate" -msgstr "Anzahl der zu generierenden URLs" - -#: includes/include.mod_rewrite_contenttest.php:58 -msgid "Run test" -msgstr "Test starten" - -#: includes/include.mod_rewrite_contenttest.php:60 -msgid "" -"{pref}{name}
    {pref}Builder in: {url_in}
    {pref}" -"Builder out: {url_out}
    {pref}Resolved URL: " -"{url_res}
    {pref}Resolver err: {err}
    {pref}Resolved data: {data}" -msgstr "" -"{pref}{name}
    {pref}Builder Eingang: {url_in}
    {pref}" -"Builder Ausgang: {url_out}
    {pref}Aufgelöste " -"URL: {url_res}
    {pref}Aufgelöse-Fehler: {err}
    {pref}" -"Aufgelöste Daten: {data}" - -#: includes/include.mod_rewrite_contenttest.php:62 -msgid "" -"Duration of test run: {time} seconds.
    Number of processed URLs: {num_urls}" -"
    Successful resolved: {num_success}
    Errors during resolving: {num_fail}" -msgstr "" -"Dauer des Testdurchlaufs: {time} Sekunden.
    Anzahl verarbeiteter URLs: " -"{num_urls}
    Erfolgreich aufgelöst: {num_success}" -"
    Fehler beim Auflösen: {num_fail}" - -#: includes/include.mod_rewrite_contentexpert.php:61 -msgid "Plugin functions" -msgstr "Plugin Funktionen" - -#: includes/include.mod_rewrite_contentexpert.php:63 -msgid "Copy/Download .htaccess template" -msgstr ".htaccess Vorlage kopieren/downloaden" - -#: includes/include.mod_rewrite_contentexpert.php:64 -msgid "Select .htaccess template" -msgstr ".htaccess Vorlage auswählen" - -#: includes/include.mod_rewrite_contentexpert.php:65 -msgid "Restrictive .htaccess" -msgstr "Restriktive .htaccess" - -#: includes/include.mod_rewrite_contentexpert.php:66 -msgid "Simple .htaccess" -msgstr "Einfache .htaccess" - -#: includes/include.mod_rewrite_contentexpert.php:67 -msgid "" -"Contains rules with restrictive settings.
    All requests pointing to " -"extension avi, css, doc, flv, gif, gzip, ico, jpeg, jpg, js, mov,
    mp3, " -"pdf, png, ppt, rar, txt, wav, wmv, xml, zip, will be excluded vom rewriting." -"
    Remaining requests will be rewritten to front_content.php,
    except " -"requests to 'contenido/', 'setup/', 'cms/upload', 'cms/front_content.php', " -"etc.
    Each resource, which has to be excluded from rewriting must be " -"specified explicitly." -msgstr "" -"Enthält Regeln mit restriktiveren Einstellungen.
    Alle Anfragen, die auf " -"die Dateienendung avi, css, doc, flv, gif, gzip, ico, jpeg, jpg, js, mov, " -"
    mp3, pdf, png, ppt, rar, txt, wav, wmv, xml, zip gehen, werden vom " -"Umschreiben ausgeschlossen.
    Alle anderen Anfragen, werden an " -"front_content.php umschrieben.
    Ausgeschlossen davon sind 'contenido/', " -"'setup/', 'cms/upload', 'cms/front_content.php', usw.
    Jede neue " -"Ressource, die vom Umschreiben ausgeschlossen werden soll, muss explizit " -"definiert werden." - -#: includes/include.mod_rewrite_contentexpert.php:69 -msgid "" -"Contains a simple collection of rules. Each requests pointing to valid " -"symlinks, folders or
    files, will be excluded from rewriting. Remaining " -"requests will be rewritten to front_content.php" -msgstr "" -"Enthält eine einfachere Sammlung an Regeln. Alle Anfragen, die auf gültige " -"Symlinks, Verzeichnisse oder
    Dateien gehen, werden vom Umschreiben " -"ausgeschlossen. Restliche Anfragen werden an front_content." -"php
    umschrieben." - -#: includes/include.mod_rewrite_contentexpert.php:71 -msgid "and copy to" -msgstr "und kopieren in" - -#: includes/include.mod_rewrite_contentexpert.php:72 -msgid "CONTENIDO installation directory" -msgstr "das CONTENIDO Installationsverzeichnis" - -#: includes/include.mod_rewrite_contentexpert.php:73 -msgid "" -"Copy the selected .htaccess template into CONTENIDO installation " -"directory

        {CONTENIDO_FULL_PATH}.

    This " -"is the recommended option for a CONTENIDO installation with one or more " -"clients
    who are running on the same domain." -msgstr "" -"Die gewählte .htaccess Vorlage in das CONTENIDO " -"Installationsverzeichnis
    \n" -"
    \n" -"    {CONTENIDO_FULL_PATH}
    \n" -"
    \n" -"kopieren.
    \n" -"Das ist die empfohlene Option für eine CONTENIDO-Installation mit einem " -"Mandanten oder
    \n" -"mehreren Mandanten, die alle unter der gleichen Domain laufen." - -#: includes/include.mod_rewrite_contentexpert.php:75 -msgid "client directory" -msgstr "das Mandantenverzeichnis" - -#: includes/include.mod_rewrite_contentexpert.php:76 -msgid "" -"Copy the selected .htaccess template into client's directory

     " -"   {CLIENT_FULL_PATH}.

    This is the recommended option " -"for a multiple client system
    where each client has it's own domain/" -"subdomain" -msgstr "" -"Die gewählte .htaccess Vorlage in das Mandantenerzeichnis
    \n" -"
    \n" -"    {CLIENT_FULL_PATH}
    \n" -"
    \n" -"kopieren.
    \n" -"Diese Option ist z. B. bei einem Mehrmandantensystem empfohlen,
    \n" -"wenn jeder Mandant unter einer eigenen Domain/Subdomain läuft." - -#: includes/include.mod_rewrite_contentexpert.php:78 -msgid "or" -msgstr "oder" - -#: includes/include.mod_rewrite_contentexpert.php:79 -msgid "Download" -msgstr "Downloaden" - -#: includes/include.mod_rewrite_contentexpert.php:80 -msgid "" -"Download selected .htaccess template to copy it to the destination " -"folder
    or to take over the settings manually." -msgstr "" -"Die gewählte .htaccess Vorlage downloaden um z. B. die Datei manuell
    \n" -"in das Verzeichnis zu kopieren oder Einstellungen zu übernehmen." - -#: includes/include.mod_rewrite_contentexpert.php:82 -msgid "Reset category-/ and article aliases" -msgstr "Kategorie-/ und Artikel-Aliase zurücksetzen" - -#: includes/include.mod_rewrite_contentexpert.php:83 -msgid "Reset only empty aliases" -msgstr "Nur leere Aliase zurücksetzen" - -#: includes/include.mod_rewrite_contentexpert.php:84 -msgid "" -"Only empty aliases will be reset, existing aliases, e. g. manually set " -"aliases, will not be changed." -msgstr "" -"Nur leere Kategorie-/Artikelaliase initial setzen
    Vorhandene Aliase, z.B. " -"vorher manuell gesetze Aliase werden nicht geändert." - -#: includes/include.mod_rewrite_contentexpert.php:85 -msgid "Reset all aliases" -msgstr "Alle Aliase zurücksetzen" - -#: includes/include.mod_rewrite_contentexpert.php:86 -msgid "" -"Reset all category-/article aliases. Existing aliases will be overwritten." -msgstr "" -"Alle Kategorie-/Artikelaliase neu setzen.
    Vorhandene Aliase werden " -"überschrieben." - -#: includes/include.mod_rewrite_contentexpert.php:88 -msgid "" -"This process could require some time depending on amount of categories/" -"articles.
    The aliases will not contain the configured plugin separators, " -"but the CONTENIDO default separators '/' und '-', e. g. '/category-word/" -"article-word'.
    Execution of this function ma be helpful to prepare all or " -"empty aliases for the usage by the plugin." -msgstr "" -"Dieser Prozess kann je nach Anzahl der Kategorien/Artikel etwas Zeit in " -"Anspruch nehmen.
    \n" -"Die Aliase erhalten nicht die oben konfigurierten Separatoren, sondern die " -"CONTENIDO-Standardseparatoren '/' und '-', z. B. '/category-word/article-" -"word'.
    \n" -"Das Ausführen dieser Funktion kann Hilfreich sein, um sämtliche oder nur " -"leere Aliase nachträglich auf die Verwendung mit dem Plugin anzupassen." - -#: includes/config.plugin.php:71 -msgid "Advanced Mod Rewrite" -msgstr "Advanced Mod Rewrite" - -#: includes/config.plugin.php:72 -msgid "Advanced Mod Rewrite functions" -msgstr "Advanced Mod Rewrite Funktionen" - -#: includes/config.plugin.php:73 -msgid "Advanced Mod Rewrite test" -msgstr "Advanced Mod Rewrite Test" - -#: classes/controller/class.modrewrite_controller_abstract.php:107 -msgid "More informations" -msgstr "Weitere Informationen" - -#: classes/controller/class.modrewrite_content_controller.php:65 -msgid "" -"The root directory has a invalid format, alowed are the chars [a-zA-Z0-9\\-_" -"\\/\\.]" -msgstr "" -"Das Rootverzeichnis hat ein ungültiges Format, erlaubt sind die Zeichen [a-" -"zA-Z0-9\\-_\\/\\.]" - -#: classes/controller/class.modrewrite_content_controller.php:72 -#, php-format -msgid "The specified directory '%s' does not exists" -msgstr "Das angegebene Verzeichnis '%s' existiert nicht" - -#: classes/controller/class.modrewrite_content_controller.php:79 -#, php-format -msgid "" -"The specified directory '%s' does not exists in DOCUMENT_ROOT '%s'. This " -"could happen, if clients DOCUMENT_ROOT differs from CONTENIDO backends " -"DOCUMENT_ROOT. However, the setting will be taken over because of disabled " -"check." -msgstr "" -"Das angegebene Verzeichnis '%s' existiert nicht im DOCUMENT_ROOT '%s'. Das " -"kann vorkommen, wenn das DOCUMENT_ROOT des Mandanten vom CONTENIDO Backend " -"DOCUMENT_ROOT abweicht. Die Einstellung wird dennoch übernommen, da die " -"Überprüfung abgeschaltet wurde." - -#: classes/controller/class.modrewrite_content_controller.php:182 -#, php-format -msgid "Please specify separator (%s) for category" -msgstr "Bitte Trenner (%s) für Kategoriewörter angeben" - -#: classes/controller/class.modrewrite_content_controller.php:187 -#, php-format -msgid "Invalid separator for category, allowed one of following characters: %s" -msgstr "Trenner für Kategorie ist ungültig, erlaubt ist eines der Zeichen: %s" - -#: classes/controller/class.modrewrite_content_controller.php:194 -#, php-format -msgid "Please specify separator (%s) for category words" -msgstr "Bitte Trenner (%s) für Kategorie angeben" - -#: classes/controller/class.modrewrite_content_controller.php:199 -#, php-format -msgid "" -"Invalid separator for category words, allowed one of following characters: %s" -msgstr "Trenner für Kategorie ist ungültig, erlaubt ist eines der Zeichen: %s" - -#: classes/controller/class.modrewrite_content_controller.php:206 -#, php-format -msgid "Please specify separator (%s) for article" -msgstr "Bitte Trenner (%s) für Kategoriewörter angeben" - -#: classes/controller/class.modrewrite_content_controller.php:211 -#, php-format -msgid "" -"Invalid separator for article, allowed is one of following characters: %s" -msgstr "Trenner für Kategorie ist ungültig, erlaubt ist eines der Zeichen: %s" - -#: classes/controller/class.modrewrite_content_controller.php:218 -#, php-format -msgid "Please specify separator (%s) for article words" -msgstr "Bitte Trenner (%s) für Kategorie angeben" - -#: classes/controller/class.modrewrite_content_controller.php:223 -#, php-format -msgid "" -"Invalid separator for article words, allowed is one of following characters: " -"%s" -msgstr "Trenner für Kategorie ist ungültig, erlaubt ist eines der Zeichen: %s" - -#: classes/controller/class.modrewrite_content_controller.php:230 -msgid "Separator for category and category words must not be identical" -msgstr "Trenner für Kategorie und Kategoriewörter dürfen nicht identisch sein" - -#: classes/controller/class.modrewrite_content_controller.php:235 -msgid "Separator for category and article words must not be identical" -msgstr "Separator for category and article words must not be identical" - -#: classes/controller/class.modrewrite_content_controller.php:240 -msgid "Separator for category-article and article words must not be identical" -msgstr "" -"Trenner für Kategorie-Artikel und Artikelwörter dürfen nicht identisch sein" - -#: classes/controller/class.modrewrite_content_controller.php:257 -msgid "" -"The file extension has a invalid format, allowed are the chars \\.([a-zA-" -"Z0-9\\-_\\/])" -msgstr "" -"Das Rootverzeichnis hat ein ungültiges Format, erlaubt sind die Zeichen [a-" -"zA-Z0-9\\-_\\/\\.]" - -#: classes/controller/class.modrewrite_content_controller.php:271 -msgid "Value has to be numeric." -msgstr "Wert muss numerisch sein." - -#: classes/controller/class.modrewrite_content_controller.php:275 -msgid "Value has to be between 0 an 100." -msgstr "Wert muss zwischen 0 und 100 sein." - -#: classes/controller/class.modrewrite_content_controller.php:292 -msgid "" -"The article name has a invalid format, allowed are the chars /^[a-zA-Z0-9\\-_" -"\\/\\.]*$/" -msgstr "" -"Das Rootverzeichnis hat ein ungültiges Format, erlaubt sind die Zeichen [a-" -"zA-Z0-9\\-_\\/\\.]" - -#: classes/controller/class.modrewrite_content_controller.php:355 -msgid "Please check your input" -msgstr "Bitte überprüfen Sie ihre Eingaben" - -#: classes/controller/class.modrewrite_content_controller.php:365 -msgid "Configuration has not been saved, because of enabled debugging" -msgstr "Konfiguration wurde nicht gespeichert, weil debugging aktiv ist" - -#: classes/controller/class.modrewrite_content_controller.php:373 -msgid "Configuration has been saved" -msgstr "Die Konfiguration wurde gespeichert" - -#: classes/controller/class.modrewrite_content_controller.php:379 -#, php-format -msgid "Configuration could not saved. Please check write permissions for %s " -msgstr "" -"Konfiguration konnte nicht gespeichert werden. Überprüfen Sie bitte die " -"Schreibrechte für %s" - -#: classes/controller/class.modrewrite_content_controller.php:412 -msgid "" -"Your Contenido installation runs with the setting 'is_start_compatible'. " -"This plugin will not work properly in this mode.
    Please check following " -"topic in Contenido forum to change this:

    is_start_compatible auf neue Version umstellen" -msgstr "" -"Ihre Contenido-Installation läuft mit der Einstellung 'is_start_compatible'. " -"Dieses Plugin wird mit dieser Einstellung nicht wie gewünscht funktionieren." -"
    Bitte überprüfen Sie folngenden Beitrag im Contenido Forum, um dies zu " -"ändern:

    is_start_compatible auf neue Version " -"umstellen" - -#: classes/controller/class.modrewrite_content_controller.php:420 -#, php-format -msgid "" -"It seems as if some categories don't have a set 'urlpath' entry in the " -"database. Please reset empty aliases in %sFunctions%s area." -msgstr "" -"Es scheint so zu sein, als ob zu einigen Kategorien die Datenbank-Einträge " -"für 'urlpath' fehlen. Bitte setzen Sie leere Aliase unter %sFunktionen%s " -"zurück." - -#~ msgid "No Client selected" -#~ msgstr "Kein Mandant ausgewählt" diff --git a/conlite/plugins/cl-mod-rewrite/locale/mod_rewrite.pot b/conlite/plugins/cl-mod-rewrite/locale/mod_rewrite.pot deleted file mode 100644 index 7a90803..0000000 --- a/conlite/plugins/cl-mod-rewrite/locale/mod_rewrite.pot +++ /dev/null @@ -1,744 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-15 18:37+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: includes/include.mod_rewrite_content.php:177 -msgid "Version" -msgstr "" - -#: includes/include.mod_rewrite_content.php:178 -msgid "Author" -msgstr "" - -#: includes/include.mod_rewrite_content.php:179 -msgid "E-Mail to author" -msgstr "" - -#: includes/include.mod_rewrite_content.php:180 -msgid "Plugin page" -msgstr "" - -#: includes/include.mod_rewrite_content.php:181 -msgid "Visit plugin page" -msgstr "" - -#: includes/include.mod_rewrite_content.php:182 -msgid "opens page in new window" -msgstr "" - -#: includes/include.mod_rewrite_content.php:183 -msgid "CONTENIDO forum" -msgstr "" - -#: includes/include.mod_rewrite_content.php:184 -msgid "Plugin thread in CONTENIDO forum" -msgstr "" - -#: includes/include.mod_rewrite_content.php:185 -msgid "Plugin settings" -msgstr "" - -#: includes/include.mod_rewrite_content.php:186 -#: includes/include.mod_rewrite_contentexpert.php:87 -msgid "Note" -msgstr "" - -#: includes/include.mod_rewrite_content.php:189 -#, php-format -msgid "" -"The .htaccess file could not found either in CONTENIDO installation " -"directory nor in client directory.
    It should set up in %sFunctions%s " -"area, if needed." -msgstr "" - -#: includes/include.mod_rewrite_content.php:192 -#, php-format -msgid "" -"Found some category and/or article aliases. It is recommended to run the " -"reset function in %sFunctions%s area, if needed." -msgstr "" - -#: includes/include.mod_rewrite_content.php:195 -msgid "Enable Advanced Mod Rewrite" -msgstr "" - -#: includes/include.mod_rewrite_content.php:197 -msgid "" -"Disabling of plugin does not result in disabling mod rewrite module of the " -"web server - This means,
    all defined rules in the .htaccess are still " -"active and could create unwanted side effects.

    Apache mod rewrite " -"could be enabled/disabled by setting the RewriteEngine directive.
    Any " -"defined rewrite rules could remain in the .htaccess and they will not " -"processed,
    if the mod rewrite module is disabled" -msgstr "" - -#: includes/include.mod_rewrite_content.php:199 -msgid "Example" -msgstr "" - -#: includes/include.mod_rewrite_content.php:201 -msgid "" -"# enable apache mod rewrite module\n" -"RewriteEngine on\n" -"\n" -"# disable apache mod rewrite module\n" -"RewriteEngine off" -msgstr "" - -#: includes/include.mod_rewrite_content.php:203 -msgid "Path to .htaccess from DocumentRoot" -msgstr "" - -#: includes/include.mod_rewrite_content.php:204 -msgid "" -"Type '/' if the .htaccess file lies inside the wwwroot (DocumentRoot) folder." -"
    Type the path to the subfolder fromm wwwroot, if CONTENIDO is installed " -"in a subfolder within the wwwroot
    (e. g. http://domain/mycontenido -> " -"path = '/mycontenido/')" -msgstr "" - -#: includes/include.mod_rewrite_content.php:206 -msgid "Check path to .htaccess" -msgstr "" - -#: includes/include.mod_rewrite_content.php:207 -msgid "" -"The path will be checked, if this option is enabled.
    But this could " -"result in an error in some cases, even if the specified path is valid " -"and
    clients DocumentRoot differs from CONTENIDO backend DocumentRoot." -msgstr "" - -#: includes/include.mod_rewrite_content.php:209 -msgid "Should the name of root category be displayed in the URL?" -msgstr "" - -#: includes/include.mod_rewrite_content.php:210 -msgid "Start from root category" -msgstr "" - -#: includes/include.mod_rewrite_content.php:211 -msgid "" -"If enabled, the name of the root category (e. g. 'Mainnavigation' in a " -"CONTENIDO default installation), will be preceded to the URL." -msgstr "" - -#: includes/include.mod_rewrite_content.php:213 -msgid "Are several clients maintained in one directory?" -msgstr "" - -#: includes/include.mod_rewrite_content.php:214 -msgid "Prepend client to the URL" -msgstr "" - -#: includes/include.mod_rewrite_content.php:215 -msgid "Use client name instead of the id" -msgstr "" - -#: includes/include.mod_rewrite_content.php:217 -msgid "" -"Should the language appear in the URL (required for multi language websites)?" -msgstr "" - -#: includes/include.mod_rewrite_content.php:218 -msgid "Prepend language to the URL" -msgstr "" - -#: includes/include.mod_rewrite_content.php:219 -msgid "Use language name instead of the id" -msgstr "" - -#: includes/include.mod_rewrite_content.php:221 -msgid "" -"Configure your own separators with following 4 settings
    to control " -"generated URLs to your own taste" -msgstr "" - -#: includes/include.mod_rewrite_content.php:222 -msgid "" -"www.domain.com/category1-category2.articlename.html\n" -"www.domain.com/category1/category2-articlename.html\n" -"www.domain.com/category.name1~category2~articlename.html\n" -"www.domain.com/category_name1-category2-articlename.foo" -msgstr "" - -#: includes/include.mod_rewrite_content.php:223 -msgid "Category separator has to be different from category-word separator" -msgstr "" - -#: includes/include.mod_rewrite_content.php:224 -msgid "" -"# Example: Category separator (/) and category-word separator (_)\n" -"category_one/category_two/articlename.html" -msgstr "" - -#: includes/include.mod_rewrite_content.php:225 -msgid "Category separator has to be different from article-word separator" -msgstr "" - -#: includes/include.mod_rewrite_content.php:226 -msgid "" -"# Example: Category separator (/) and article-word separator (-)\n" -"category_one/category_two/article-description.html" -msgstr "" - -#: includes/include.mod_rewrite_content.php:227 -msgid "" -"Category-article separator has to be different from article-word separator" -msgstr "" - -#: includes/include.mod_rewrite_content.php:228 -msgid "" -"# Example: Category-article separator (/) and article-word separator (-)\n" -"category_one/category_two/article-description.html" -msgstr "" - -#: includes/include.mod_rewrite_content.php:230 -msgid "Category separator (delemiter between single categories)" -msgstr "" - -#: includes/include.mod_rewrite_content.php:231 -#: includes/include.mod_rewrite_content.php:232 -#, php-format -msgid "(possible values: %s)" -msgstr "" - -#: includes/include.mod_rewrite_content.php:233 -msgid "Category-word separator (delemiter between category words)" -msgstr "" - -#: includes/include.mod_rewrite_content.php:234 -msgid "" -"Category-article separator (delemiter between category-block and article)" -msgstr "" - -#: includes/include.mod_rewrite_content.php:235 -msgid "Article-word separator (delemiter between article words)" -msgstr "" - -#: includes/include.mod_rewrite_content.php:237 -msgid "Append article name to URLs" -msgstr "" - -#: includes/include.mod_rewrite_content.php:238 -msgid "Append article name always to URLs (even at URLs to categories)" -msgstr "" - -#: includes/include.mod_rewrite_content.php:239 -msgid "Default article name without extension" -msgstr "" - -#: includes/include.mod_rewrite_content.php:240 -msgid "" -"e. g. 'index' for index.ext
    In case of selected 'Append article name " -"always to URLs' option and a empty field,
    the name of the start article " -"will be used" -msgstr "" - -#: includes/include.mod_rewrite_content.php:242 -msgid "File extension at the end of the URL" -msgstr "" - -#: includes/include.mod_rewrite_content.php:243 -msgid "" -"Specification of file extension with a preceded dot
    e.g. '.html' for " -"http://host/foo/bar.html" -msgstr "" - -#: includes/include.mod_rewrite_content.php:244 -msgid "" -"It's strongly recommended to specify a extension here,
    if the option " -"'Append article name always to URLs' was not selected.

    Otherwise URLs " -"to categories and articles would have the same format
    which may result in " -"unresolvable categories/articles in some cases." -msgstr "" - -#: includes/include.mod_rewrite_content.php:245 -msgid "" -"It's necessary to specify a file extension at the moment, due do existing " -"issues, which are not solved until yet. An not defined extension may result " -"in invalid article detection in some cases." -msgstr "" - -#: includes/include.mod_rewrite_content.php:247 -msgid "Should the URLs be written in lower case?" -msgstr "" - -#: includes/include.mod_rewrite_content.php:248 -msgid "URLs in lower case" -msgstr "" - -#: includes/include.mod_rewrite_content.php:250 -msgid "Duplicated content" -msgstr "" - -#: includes/include.mod_rewrite_content.php:251 -msgid "Prevent duplicated content" -msgstr "" - -#: includes/include.mod_rewrite_content.php:253 -msgid "" -"Depending on configuration, pages could be found thru different URLs." -"
    Enabling of this option prevents this. Examples for duplicated content" -msgstr "" - -#: includes/include.mod_rewrite_content.php:254 -msgid "" -"Name of the root category in the URL: Feasible is /maincategory/subcategory/ " -"and /subcategory/\n" -"Language in the URL: Feasible is /german/category/ and /1/category/\n" -"Client in the URL: Feasible is /client/category/ und /1/category/" -msgstr "" - -#: includes/include.mod_rewrite_content.php:257 -msgid "Percentage for similar category paths in URLs" -msgstr "" - -#: includes/include.mod_rewrite_content.php:258 -msgid "" -"This setting refers only to the category path of a URL. If AMR is " -"configured
    to prepend e. g. the root category, language and/or client to " -"the URL,
    the specified percentage will not applied to those parts of the " -"URL.
    An incoming URL will be cleaned from those values and the remaining " -"path (urlpath of the category)
    will be checked against similarities." -msgstr "" - -#: includes/include.mod_rewrite_content.php:259 -msgid "" -"100 = exact match with no tolerance\n" -"85 = paths with little errors will match to similar ones\n" -"0 = matching will work even for total wrong paths" -msgstr "" - -#: includes/include.mod_rewrite_content.php:261 -msgid "Redirect in case of invalid articles" -msgstr "" - -#: includes/include.mod_rewrite_content.php:262 -msgid "Redirect to error page in case of invaid articles" -msgstr "" - -#: includes/include.mod_rewrite_content.php:263 -msgid "The start page will be displayed if this option is not enabled" -msgstr "" - -#: includes/include.mod_rewrite_content.php:265 -msgid "Moment of URL generation" -msgstr "" - -#: includes/include.mod_rewrite_content.php:266 -msgid "a.) During the output of HTML code of the page" -msgstr "" - -#: includes/include.mod_rewrite_content.php:267 -msgid "" -"Clean-URLs will be generated during page output. Modules/Plugins are able to " -"generate URLs to frontend
    as usual as in previous CONTENIDO versions " -"using a format like 'front_content.php?idcat=1&idart=2'.
    The URLs " -"will be replaced by the plugin to Clean-URLs before sending the HTML output." -msgstr "" - -#: includes/include.mod_rewrite_content.php:268 -msgid "Differences to variant b.)" -msgstr "" - -#: includes/include.mod_rewrite_content.php:269 -msgid "" -"Still compatible to old modules/plugins, since no changes in codes are " -"required\n" -"All occurring URLs in HTML code, even those set by wysiwyg, will be switched " -"to Clean-URLs\n" -"All URLs will usually be collected and converted to Clean-URLs at once." -"
    Doing it this way reduces the amount of executed database significantly." -msgstr "" - -#: includes/include.mod_rewrite_content.php:272 -msgid "b.) In modules or plugins" -msgstr "" - -#: includes/include.mod_rewrite_content.php:273 -msgid "" -"By using this option, all Clean-URLs will be generated directly in module or " -"plugins.
    This means, all areas in modules/plugins, who generate internal " -"URLs to categories/articles, have to be adapted manually.
    All Clean-URLs " -"have to be generated by using following function:" -msgstr "" - -#: includes/include.mod_rewrite_content.php:274 -msgid "" -"# structure of a normal url\n" -"$url = 'front_content.php?idart=123&lang=2&client=1';\n" -"\n" -"# creation of a url by using the CONTENIDOs Url-Builder (since 4.8.9),\n" -"# wich expects the parameter as a assoziative array\n" -"$params = array('idart'=>123, 'lang'=>2, 'client'=>1);\n" -"$newUrl = Contenido_Url::getInstance()->build($params);" -msgstr "" - -#: includes/include.mod_rewrite_content.php:275 -msgid "Differences to variant a.)" -msgstr "" - -#: includes/include.mod_rewrite_content.php:276 -msgid "" -"The default way to generate URLs to fronend pages\n" -"Each URL in modules/plugins has to be generated by UriBuilder\n" -"Each generated Clean-Url requires a database query" -msgstr "" - -#: includes/include.mod_rewrite_content.php:279 -msgid "Routing" -msgstr "" - -#: includes/include.mod_rewrite_content.php:280 -msgid "Routing definitions for incoming URLs" -msgstr "" - -#: includes/include.mod_rewrite_content.php:281 -msgid "Type one routing definition per line as follows:" -msgstr "" - -#: includes/include.mod_rewrite_content.php:282 -msgid "" -"# {incoming_url}>>>{new_url}\n" -"/incoming_url/name.html>>>new_url/new_name.html\n" -"\n" -"# route a specific incoming url to a new page\n" -"/campaign/20_percent_on_everything_except_animal_food.html>>>front_content." -"php?idcat=23\n" -"\n" -"# route request to wwwroot to a specific page\n" -"/>>>front_content.php?idart=16" -msgstr "" - -#: includes/include.mod_rewrite_content.php:283 -msgid "" -"The routing does not sends a HTTP header redirection to the destination URL, " -"the redirection will happen internally by
    replacing the detected incoming " -"URL against the new destination URL (overwriting of article- categoryid)\n" -"Incoming URLs can point to non existing resources (category/article), but " -"the desttination URLs should point
    to valid CONTENIDO articles/" -"categories\n" -"Destination URLs should point to real URLs to categories/articles,
    e. g." -"front_content.php?idcat=23 or front_content.php?idart=34\n" -"The language id should attached to the URL in multi language sites
    e. g. " -"front_content.php?idcat=23&lang=1\n" -"The client id should attached to the URL in multi client sites sharing the " -"same folder
    e. g. front_content.php?idcat=23&client=2\n" -"The destination URL should not start with '/' or './' (wrong: /front_content." -"php, correct: front_content.php)" -msgstr "" - -#: includes/include.mod_rewrite_content.php:286 -#: includes/include.mod_rewrite_contentexpert.php:90 -msgid "Discard changes" -msgstr "" - -#: includes/include.mod_rewrite_content.php:287 -#: includes/include.mod_rewrite_contentexpert.php:91 -msgid "Save changes" -msgstr "" - -#: includes/include.mod_rewrite_contenttest.php:55 -msgid "" -"Define options to genereate the URLs by using the form below and run the " -"test." -msgstr "" - -#: includes/include.mod_rewrite_contenttest.php:56 -msgid "Parameter to use" -msgstr "" - -#: includes/include.mod_rewrite_contenttest.php:57 -msgid "Number of URLs to generate" -msgstr "" - -#: includes/include.mod_rewrite_contenttest.php:58 -msgid "Run test" -msgstr "" - -#: includes/include.mod_rewrite_contenttest.php:60 -msgid "" -"{pref}{name}
    {pref}Builder in: {url_in}
    {pref}" -"Builder out: {url_out}
    {pref}Resolved URL: " -"{url_res}
    {pref}Resolver err: {err}
    {pref}Resolved data: {data}" -msgstr "" - -#: includes/include.mod_rewrite_contenttest.php:62 -msgid "" -"Duration of test run: {time} seconds.
    Number of processed URLs: {num_urls}" -"
    Successful resolved: {num_success}
    Errors during resolving: {num_fail}" -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:61 -msgid "Plugin functions" -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:63 -msgid "Copy/Download .htaccess template" -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:64 -msgid "Select .htaccess template" -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:65 -msgid "Restrictive .htaccess" -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:66 -msgid "Simple .htaccess" -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:67 -msgid "" -"Contains rules with restrictive settings.
    All requests pointing to " -"extension avi, css, doc, flv, gif, gzip, ico, jpeg, jpg, js, mov,
    mp3, " -"pdf, png, ppt, rar, txt, wav, wmv, xml, zip, will be excluded vom rewriting." -"
    Remaining requests will be rewritten to front_content.php,
    except " -"requests to 'contenido/', 'setup/', 'cms/upload', 'cms/front_content.php', " -"etc.
    Each resource, which has to be excluded from rewriting must be " -"specified explicitly." -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:69 -msgid "" -"Contains a simple collection of rules. Each requests pointing to valid " -"symlinks, folders or
    files, will be excluded from rewriting. Remaining " -"requests will be rewritten to front_content.php" -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:71 -msgid "and copy to" -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:72 -msgid "CONTENIDO installation directory" -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:73 -msgid "" -"Copy the selected .htaccess template into CONTENIDO installation " -"directory

        {CONTENIDO_FULL_PATH}.

    This " -"is the recommended option for a CONTENIDO installation with one or more " -"clients
    who are running on the same domain." -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:75 -msgid "client directory" -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:76 -msgid "" -"Copy the selected .htaccess template into client's directory

     " -"   {CLIENT_FULL_PATH}.

    This is the recommended option " -"for a multiple client system
    where each client has it's own domain/" -"subdomain" -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:78 -msgid "or" -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:79 -msgid "Download" -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:80 -msgid "" -"Download selected .htaccess template to copy it to the destination " -"folder
    or to take over the settings manually." -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:82 -msgid "Reset category-/ and article aliases" -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:83 -msgid "Reset only empty aliases" -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:84 -msgid "" -"Only empty aliases will be reset, existing aliases, e. g. manually set " -"aliases, will not be changed." -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:85 -msgid "Reset all aliases" -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:86 -msgid "" -"Reset all category-/article aliases. Existing aliases will be overwritten." -msgstr "" - -#: includes/include.mod_rewrite_contentexpert.php:88 -msgid "" -"This process could require some time depending on amount of categories/" -"articles.
    The aliases will not contain the configured plugin separators, " -"but the CONTENIDO default separators '/' und '-', e. g. '/category-word/" -"article-word'.
    Execution of this function ma be helpful to prepare all or " -"empty aliases for the usage by the plugin." -msgstr "" - -#: includes/config.plugin.php:71 -msgid "Advanced Mod Rewrite" -msgstr "" - -#: includes/config.plugin.php:72 -msgid "Advanced Mod Rewrite functions" -msgstr "" - -#: includes/config.plugin.php:73 -msgid "Advanced Mod Rewrite test" -msgstr "" - -#: classes/controller/class.modrewrite_controller_abstract.php:107 -msgid "More informations" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:65 -msgid "" -"The root directory has a invalid format, alowed are the chars [a-zA-Z0-9\\-_" -"\\/\\.]" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:72 -#, php-format -msgid "The specified directory '%s' does not exists" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:79 -#, php-format -msgid "" -"The specified directory '%s' does not exists in DOCUMENT_ROOT '%s'. This " -"could happen, if clients DOCUMENT_ROOT differs from CONTENIDO backends " -"DOCUMENT_ROOT. However, the setting will be taken over because of disabled " -"check." -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:182 -#, php-format -msgid "Please specify separator (%s) for category" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:187 -#, php-format -msgid "Invalid separator for category, allowed one of following characters: %s" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:194 -#, php-format -msgid "Please specify separator (%s) for category words" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:199 -#, php-format -msgid "" -"Invalid separator for category words, allowed one of following characters: %s" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:206 -#, php-format -msgid "Please specify separator (%s) for article" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:211 -#, php-format -msgid "" -"Invalid separator for article, allowed is one of following characters: %s" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:218 -#, php-format -msgid "Please specify separator (%s) for article words" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:223 -#, php-format -msgid "" -"Invalid separator for article words, allowed is one of following characters: " -"%s" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:230 -msgid "Separator for category and category words must not be identical" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:235 -msgid "Separator for category and article words must not be identical" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:240 -msgid "Separator for category-article and article words must not be identical" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:257 -msgid "" -"The file extension has a invalid format, allowed are the chars \\.([a-zA-" -"Z0-9\\-_\\/])" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:271 -msgid "Value has to be numeric." -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:275 -msgid "Value has to be between 0 an 100." -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:292 -msgid "" -"The article name has a invalid format, allowed are the chars /^[a-zA-Z0-9\\-_" -"\\/\\.]*$/" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:355 -msgid "Please check your input" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:365 -msgid "Configuration has not been saved, because of enabled debugging" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:373 -msgid "Configuration has been saved" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:379 -#, php-format -msgid "Configuration could not saved. Please check write permissions for %s " -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:412 -msgid "" -"Your Contenido installation runs with the setting 'is_start_compatible'. " -"This plugin will not work properly in this mode.
    Please check following " -"topic in Contenido forum to change this:

    is_start_compatible auf neue Version umstellen" -msgstr "" - -#: classes/controller/class.modrewrite_content_controller.php:420 -#, php-format -msgid "" -"It seems as if some categories don't have a set 'urlpath' entry in the " -"database. Please reset empty aliases in %sFunctions%s area." -msgstr "" diff --git a/conlite/plugins/cl-mod-rewrite/locale/potfiles.txt b/conlite/plugins/cl-mod-rewrite/locale/potfiles.txt deleted file mode 100644 index 99d35d7..0000000 --- a/conlite/plugins/cl-mod-rewrite/locale/potfiles.txt +++ /dev/null @@ -1,24 +0,0 @@ -./includes/include.mod_rewrite_content.php -./includes/include.mod_rewrite_contenttest.php -./includes/functions.mod_rewrite.php -./includes/include.mod_rewrite_contentexpert.php -./includes/front_content_controller.php -./includes/config.mod_rewrite_default.php -./includes/include.mod_rewrite_content_top.php -./includes/config.plugin.php -./external/aToolTip/demos.html -./templates/content.html -./templates/contenttest.html -./templates/content_top.html -./templates/contentexpert.html -./classes/controller/class.modrewrite_contenttest_controller.php -./classes/controller/class.modrewrite_contentexpert_controller.php -./classes/controller/class.modrewrite_controller_abstract.php -./classes/controller/class.modrewrite_content_controller.php -./classes/class.modrewritedebugger.php -./classes/class.modrewritetest.php -./classes/class.modrewrite.php -./classes/class.modrewriteurlstack.php -./classes/class.modrewritebase.php -./classes/class.modrewritecontroller.php -./classes/class.modrewriteurlutil.php diff --git a/conlite/plugins/cl-mod-rewrite/scripts/mod_rewrite.js b/conlite/plugins/cl-mod-rewrite/scripts/mod_rewrite.js deleted file mode 100644 index 521a65f..0000000 --- a/conlite/plugins/cl-mod-rewrite/scripts/mod_rewrite.js +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Project: - * CONTENIDO Content Management System - * - * Description: - * Plugin Advanced Mod Rewrite JavaScript functions. - * - * Requirements: - * @con_php_req 5.0 - * - * - * @package CONTENIDO Plugins - * @version 0.1 - * @author Murat Purc - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * @since file available since CONTENIDO release 4.9.0 - * - * {@internal - * created 2011-04-11 - * - * $Id: mod_rewrite.js 128 2019-07-03 11:58:28Z oldperl $: - * }} - * - */ - - -var mrPlugin = { - lng: { - more_informations: "More informations" - }, - - toggle: function(id) { - // do some animation ;-) - $('#' + id).slideToggle("slow"); - }, - - showReadme: function() { - }, - - initializeSettingsPage: function() { - $(document).ready(function() { - $("#mr_use_language").change(function() { - if (true == $(this).attr("checked")) { - $("#mr_use_language_name").removeAttr("disabled"); - } else { - $("#mr_use_language_name").attr("disabled", "disabled"); - } - }); - - $("#mr_use_client").change(function() { - if (true == $(this).attr("checked")) { - $("#mr_use_client_name").removeAttr("disabled"); - } else { - $("#mr_use_client_name").attr("disabled", "disabled"); - } - }); - - $("#mr_add_startart_name_to_url").change(function() { - if (true == $(this).attr("checked")) { - $("#mr_default_startart_name").removeAttr("disabled") - .removeClass("disabled"); - } else { - $("#mr_default_startart_name").attr("disabled", "disabled") - .addClass("disabled"); - } - }); - - mrPlugin._initializeTooltip(); - }); - }, - - initializeExterpPage: function() { - $(document).ready(function() { - mrPlugin._initializeTooltip(); - }); - }, - - _initializeTooltip: function() { - $(".mrPlugin a.i-link").each(function () { - $(this).attr("href", "javascript:void(0);"); - $(this).attr("title", mrPlugin.lng.more_informations); - var id = $(this).attr("id").substring(0, $(this).attr("id").indexOf("-link")); - $(this).aToolTip({ - clickIt: true, - xOffset: -20, - yOffset: 4, - outSpeed: 250, - tipContent: $("#" + id).html() - }); - }); - } -}; - diff --git a/conlite/plugins/cl-mod-rewrite/styles/styles.css b/conlite/plugins/cl-mod-rewrite/styles/styles.css deleted file mode 100644 index e0a1734..0000000 --- a/conlite/plugins/cl-mod-rewrite/styles/styles.css +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Project: - * CONTENIDO Content Management System - * - * Description: - * Plugin Advanced Mod Rewrite JavaScript functions. - * - * Requirements: - * @con_php_req 5.0 - * - * - * @package CONTENIDO Plugins - * @version 0.1 - * @author Murat Purc - * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * @since file available since CONTENIDO release 4.9.0 - * - * {@internal - * created 2011-04-11 - * - * $Id: styles.css 128 2019-07-03 11:58:28Z oldperl $: - * }} - * - */ - - -/** - * mrPlugin main page - * @section mrPlugin - */ - -body.mrPlugin {margin:10px;} - -.mrPlugin a {color:#0060b1;} -.mrPlugin strong {font-weight:bold;} -.mrPlugin img {border:none;} - -.mrPlugin pre.example {padding:3px 5px; border:1px #000 dashed; width:60%; min-width:650px;} - -.mrPlugin li {padding-bottom:0.4em;} - -.mrPlugin span.note {color:red;} -.mrPlugin input.disabled {background-color:#dadada;} - -.mrPlugin .altBg {background-color:#f1f1f1;} -.mrPlugin .aToolTip ul {padding-left:1em;} -.mrPlugin .clear {clear:both; font-size:0pt !important; height:0pt !important; line-height:0pt !important;} -.mrPlugin .blockLeft {display:block; float:left;} -.mrPlugin .blockRight {display:block; float:right;} -.mrPlugin .nodisplay {display:none;} - - -/* Header box */ -.mrPlugin .headerBox {background-color:#e2e2e2; border:1px solid #b5b5b5; padding:6px; margin-bottom:10px;} -.mrPlugin .headerBox p {margin:0; padding:0;} -.mrPlugin .headerBox ul {margin-bottom:0;} - - -/* Content table */ -.mrPlugin table#contenttable {border:0; border-top:1px; border-left:1px; border-bottom:1px; border-color:#b3b3b3; border-style:solid;} -.mrPlugin table#contenttable th {font-weight:bold; text-align:left;} -.mrPlugin table#contenttable tr {background-color:#fff;} -.mrPlugin th, .mrPlugin td {vertical-align:top;} -.mrPlugin td.col-I {border:0; border-bottom:1px; border-right:1px; border-color:#b3b3b3; border-style:solid;} -.mrPlugin td.col-II {border:0; border-bottom:1px; border-right:1px; border-color:#b3b3b3; border-style:solid;} - -.mrPlugin tr.marked td {background-color:#f2b7a1;} - - -/* Info button */ -.mrPlugin a.infoButton, -.mrPlugin a.infoButton:hover {display:block; float:left; width:16px; height:16px; background:transparent url(../../../images/info.gif) no-repeat; margin:0 0 0 5px;} -.mrPlugin a.infoButton.v2, -.mrPlugin a.infoButton:hover.v2 {margin-top:2px;} - - -/* Plugininfo layer */ -.mrPlugin .pluginInfo {} -.mrPlugin .pluginInfo p {font-weight:bold; margin:0; padding:0;} -.mrPlugin .pluginInfo ul {margin:0; padding:0; list-style-type:none;} -.mrPlugin .pluginInfo li {margin:0; padding:0;} -.mrPlugin .pluginInfo li.first {margin-top:0.6em;} - - - -/** - * mrPlugin test page - * @section mrPluginTest - */ - -/** @extends body.mrPlugin */ -body.mrPluginTest {} - -.mrPluginTest .headerBox form {float:left; width:35%; background:#e2e2e2; margin:0; padding-top:10px;} -.mrPluginTest .headerBox fieldset {margin-bottom:10px;} -.mrPluginTest .headerBox fieldset p {margin:0;} -.mrPluginTest .headerBox form .chk {width:24%; float:left;} -.mrPluginTest a {font-family:monospace;} diff --git a/conlite/plugins/cl-mod-rewrite/templates/content.html b/conlite/plugins/cl-mod-rewrite/templates/content.html deleted file mode 100644 index 87de490..0000000 --- a/conlite/plugins/cl-mod-rewrite/templates/content.html +++ /dev/null @@ -1,370 +0,0 @@ - - - - mod_rewrite_content - - - - - - - - - - - - - - -
    - -
    - -{CONTENT_BEFORE} - -
    - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {LNG_PLUGIN_SETTINGS}
    - {LNG_NOTE}
    -

    - {LNG_MSG_NO_HTACCESS_FOUND}
    -

    -

    - {LNG_MSG_NO_EMPTYALIASES_FOUND}
    -

    -
    -
    - - -
    -
    - -
    {LNG_ROOTDIR} - {ROOTDIR_ERROR} - -
    - -
    -
    - - -
    -
    - -
    {LNG_USE_CLIENT} - -
    -
    - -
    -
    {LNG_USE_LANGUAGE} - -
    -
    - -
    -
    {LNG_STARTFROMROOT} -
    - - -
    -
    - -
    - {LNG_USERDEFINED_SEPARATORS_HEADER} -
    - -
    {LNG_CATEGORY_SEPARATOR} - {CATEGORY_SEPARATOR_ERROR} - - {LNG_CATART_SEPARATOR_INFO} -
    {LNG_CATEGORY_WORD_SEPARATOR} - {CATEGORY_WORD_SEPARATOR_ERROR} - - {LNG_WORD_SEPARATOR_INFO} -
    {LNG_ARTICLE_SEPARATOR} - {ARTICLE_SEPARATOR_ERROR} - - {LNG_CATART_SEPARATOR_INFO} -
    {LNG_ARTICLE_WORD_SEPARATOR} - {ARTICLE_WORD_SEPARATOR_ERROR} - - {LNG_WORD_SEPARATOR_INFO} -
    {LNG_ADD_STARTART_NAME_TO_URL} - {ADD_STARTART_NAME_TO_URL_ERROR} - -
    -
    -
    -
    - -
    -
    - -
    {LNG_FILE_EXTENSION} - {FILE_EXTENSION_ERROR} -
    -
    -
    -
    - -

    {LNG_FILE_EXTENSION_INFO3}

    -
    {LNG_USE_LOWERCASE_URI} - - -
    {LNG_PREVENT_DUPLICATED_CONTENT} -
    -
    -
    -
    - -
    {LNG_CATEGORY_RESOLVE_MIN_PERCENTAGE} - {CATEGORY_RESOLVE_MIN_PERCENTAGE_ERROR} -
    - (0 - 100) -
    -
    - -
    {LNG_REDIRECT_INVALID_ARTICLE_TO_ERRORSITE} -
    - -
    -
    -
    - -
    {LNG_REWRITE_URLS_AT} -
    - - -
    -
    - -
    - -
    - -
    -
    -
    - -
    {LNG_REWRITE_ROUTING} -
    {LNG_REWRITE_ROUTING_INFO}
    -
    - - -
    - - - -
    - -
    - -{CONTENT_AFTER} - - - \ No newline at end of file diff --git a/conlite/plugins/cl-mod-rewrite/templates/content_top.html b/conlite/plugins/cl-mod-rewrite/templates/content_top.html deleted file mode 100644 index 7cc6ccf..0000000 --- a/conlite/plugins/cl-mod-rewrite/templates/content_top.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - mod_rewrite_content_menu_top - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/conlite/plugins/cl-mod-rewrite/templates/contentexpert.html b/conlite/plugins/cl-mod-rewrite/templates/contentexpert.html deleted file mode 100644 index f672bbb..0000000 --- a/conlite/plugins/cl-mod-rewrite/templates/contentexpert.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - mod_rewrite_content_expert - - - - - - - - - - - - - - -
    -{LNG_PLUGIN_FUNCTIONS} -
    - -{CONTENT_BEFORE} - -
    - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - -
    {LNG_COPY_HTACCESS_TYPE} - {COPY_HTACCESS_ERROR} - -
    - -
    - - -
    -
    - - {LNG_COPY_HTACCESS_TO}
    -
    - - {LNG_COPY_HTACCESS_TO_CONTENIDO} -
    - -
    - - - {LNG_COPY_HTACCESS_TO_CLIENT} -
    - -
    - - {LNG_OR}
    -
    - - {LNG_DOWNLOAD} -
    - -
    - -
    -
    - {LNG_RESETALIASES} - - - {LNG_RESETEMPTY_LINK} -
    - -
    - - - {LNG_RESETALL_LINK} -
    - -
    - {LNG_NOTE}:
    - {LNG_RESETALIASES_NOTE} -
    - - - -
    - -
    - -{CONTENT_AFTER} - - - \ No newline at end of file diff --git a/conlite/plugins/cl-mod-rewrite/templates/contenttest.html b/conlite/plugins/cl-mod-rewrite/templates/contenttest.html deleted file mode 100644 index a0b3af2..0000000 --- a/conlite/plugins/cl-mod-rewrite/templates/contenttest.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - mod_rewrite_content_test - - - - - - - - - - - - -
    -

    {LNG_FORM_INFO}

    -

    - - - -
    - {LNG_FORM_LABEL} -

    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    -
    -
    - -
    -
    - -
    -
    -
    -
    -
    -
    - -{CONTENT} - - - diff --git a/conlite/plugins/cl-mod-rewrite/xml/lang_de_DE.xml b/conlite/plugins/cl-mod-rewrite/xml/lang_de_DE.xml deleted file mode 100644 index 284d0fc..0000000 --- a/conlite/plugins/cl-mod-rewrite/xml/lang_de_DE.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - -
    AMR
    - Einstellungen - Funktionen - Test -
    -
    -
    -
    \ No newline at end of file diff --git a/conlite/plugins/cl-mod-rewrite/xml/lang_en_US.xml b/conlite/plugins/cl-mod-rewrite/xml/lang_en_US.xml deleted file mode 100644 index e762395..0000000 --- a/conlite/plugins/cl-mod-rewrite/xml/lang_en_US.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - -
    AMR
    - Settings - Functions - Test -
    -
    -
    -
    \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/.gitignore b/conlite/plugins/cl-workflow/.gitignore deleted file mode 100644 index d8fe4fa..0000000 --- a/conlite/plugins/cl-workflow/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/.project diff --git a/conlite/plugins/cl-workflow/LICENSE b/conlite/plugins/cl-workflow/LICENSE deleted file mode 100644 index f288702..0000000 --- a/conlite/plugins/cl-workflow/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. 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 -them 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 prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. 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. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey 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; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If 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 convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU 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 that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - 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. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -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. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/conlite/plugins/cl-workflow/README.md b/conlite/plugins/cl-workflow/README.md deleted file mode 100644 index 2ef2b9e..0000000 --- a/conlite/plugins/cl-workflow/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# cl-workflow -Workflow Plugin for ConLite diff --git a/conlite/plugins/cl-workflow/cl_plugin.xml b/conlite/plugins/cl-workflow/cl_plugin.xml deleted file mode 100644 index 48803f8..0000000 --- a/conlite/plugins/cl-workflow/cl_plugin.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - ConLite Workflow - cl-workflow - 6BAFECC4-AF63-51CE-839D-A4E5FBBEB4A9 - ConLite Workflow adds a simple worflow management to your ConLite CMS - ConLite Team - ConLite Team - cl-workflow@conlite.org - https://conlite.org - 0.1.0 - GNU Lesser General Public License - - - - - - - workflow - workflow_common - workflow_steps - workflow_step_edit - con_workflow - - - workflow_show - workflow_create - workflow_save - workflow_delete - workflow_step_edit - workflow_step_up - workflow_step_down - workflow_save_step - workflow_create_step - workflow_step_delete - workflow_user_up - workflow_user_down - workflow_create_user - workflow_user_delete - workflow_cat_assign - workflow_do_action - workflow_inherit_down - workflow_task_user_select - workflow_do_action - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/classes/class.workflow.php b/conlite/plugins/cl-workflow/classes/class.workflow.php deleted file mode 100644 index 842b5d5..0000000 --- a/conlite/plugins/cl-workflow/classes/class.workflow.php +++ /dev/null @@ -1,125 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * - * {@internal - * created 2003-07-18 - * - * $Id: class.workflow.php 128 2019-07-03 11:58:28Z oldperl $ - * }} - * - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -/** - * Class Workflows - * Class for workflow management - * @author Timo A. Hummel - * @version 0.2 - * @copyright four for business 2003 - */ -class Workflows extends ItemCollection { - - /** - * Constructor Function - * @param none - */ - function __construct() { - global $cfg; - parent::__construct($cfg["tab"]["workflow"], "idworkflow"); - $this->_setItemClass("Workflow"); - } - - function create() { - global $auth, $client, $lang; - $newitem = parent::createNewItem(); - $newitem->setField("created", date("Y-m-d H-i-s")); - $newitem->setField("idauthor", $auth->auth["uid"]); - $newitem->setField("idclient", $client); - $newitem->setField("idlang", $lang); - $newitem->store(); - - return ($newitem); - } - - /** - * Deletes all corresponding informations to this workflow and delegate call to parent - * @param integer $idWorkflow - id of workflow to delete - */ - function delete($idWorkflow) { - global $cfg; - $oDb = new DB_ConLite(); - - $aItemIdsDelete = array(); - $sSql = 'SELECT idworkflowitem FROM ' . $cfg["tab"]["workflow_items"] . ' WHERE idworkflow = ' . Contenido_Security::toInteger($idWorkflow) . ';'; - $oDb->query($sSql); - while ($oDb->next_record()) { - array_push($aItemIdsDelete, Contenido_Security::escapeDB($oDb->f('idworkflowitem'), $oDb)); - } - - $aUserSequencesDelete = array(); - $sSql = 'SELECT idusersequence FROM ' . $cfg["tab"]["workflow_user_sequences"] . ' WHERE idworkflowitem in (' . implode(',', $aItemIdsDelete) . ');'; - $oDb->query($sSql); - while ($oDb->next_record()) { - array_push($aUserSequencesDelete, Contenido_Security::escapeDB($oDb->f('idusersequence'), $oDb)); - } - - $sSql = 'DELETE FROM ' . $cfg["tab"]["workflow_user_sequences"] . ' WHERE idworkflowitem in (' . implode(',', $aItemIdsDelete) . ');'; - $oDb->query($sSql); - - $sSql = 'DELETE FROM ' . $cfg["tab"]["workflow_actions"] . ' WHERE idworkflowitem in (' . implode(',', $aItemIdsDelete) . ');'; - $oDb->query($sSql); - - $sSql = 'DELETE FROM ' . $cfg["tab"]["workflow_items"] . ' WHERE idworkflow = ' . Contenido_Security::toInteger($idWorkflow) . ';'; - $oDb->query($sSql); - - $sSql = 'DELETE FROM ' . $cfg["tab"]["workflow_allocation"] . ' WHERE idworkflow = ' . Contenido_Security::toInteger($idWorkflow) . ';'; - $oDb->query($sSql); - - $sSql = 'DELETE FROM ' . $cfg["tab"]["workflow_art_allocation"] . ' WHERE idusersequence in (' . implode(',', $aUserSequencesDelete) . ');'; - $oDb->query($sSql); - - parent::delete($idWorkflow); - } - -} - -/** - * Class Workflow - * Class for a single workflow item - * @author Timo A. Hummel - * @version 0.1 - * @copyright four for business 2003 - */ -class Workflow extends Item { - - /** - * Constructor - * - * @global array $cfg - */ - function __construct() { - global $cfg; - parent::__construct($cfg["tab"]["workflow"], "idworkflow"); - } - -} \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/classes/class.workflowactions.php b/conlite/plugins/cl-workflow/classes/class.workflowactions.php deleted file mode 100644 index a3809ec..0000000 --- a/conlite/plugins/cl-workflow/classes/class.workflowactions.php +++ /dev/null @@ -1,126 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * - * {@internal - * created 2003-07-18 - * - * $Id: class.workflowactions.php 128 2019-07-03 11:58:28Z oldperl $ - * }} - * - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -/** - * Class WorkflowActions - * Class for workflow action collections - * @author Timo A. Hummel - * @version 0.2 - * @copyright four for business 2003 - */ -class WorkflowActions extends ItemCollection { - - /** - * Constructor Function - * @param string $table The table to use as information source - */ - function __construct() { - global $cfg; - parent::__construct($cfg["tab"]["workflow_actions"], "idworkflowaction"); - $this->_setItemClass("WorkflowAction"); - } - - /** - * - * @param type $idworkflowitem - * @param type $action - * @return boolean - */ - function get($idworkflowitem, $action) { - $this->select("idworkflowitem = '" . Contenido_Security::escapeDB($idworkflowitem, NULL) . "' AND action = '" . Contenido_Security::escapeDB($action, NULL) . "'"); - if ($this->next()) { - return true; - } else { - return false; - } - } - - function getAvailableWorkflowActions() { - $availableWorkflowActions = array( - "publish" => i18n("Publish article", "workflow"), - "lock" => i18n("Lock article", "workflow"), - "last" => i18n("Move back to last editor", "workflow"), - "reject" => i18n("Reject article", "workflow"), - "articleedit" => i18n("Edit article content", "workflow"), - "propertyedit" => i18n("Edit article properties", "workflow"), - "templateedit" => i18n("Edit template", "workflow"), - "revise" => i18n("Revise article", "workflow")); - - return($availableWorkflowActions); - } - - function set($idworkflowitem, $action) { - $this->select("idworkflowitem = '" . Contenido_Security::escapeDB($idworkflowitem, NULL) . "' AND action = '" . Contenido_Security::escapeDB($action, NULL) . "'"); - if (!$this->next()) { - $newitem = parent::createNewItem(); - $newitem->setField("idworkflowitem", $idworkflowitem); - $newitem->setField("action", $action); - $newitem->store(); - } - } - - function remove($idworkflowitem, $action) { - $this->select("idworkflowitem = '$idworkflowitem' AND action = '$action'"); - if ($item = $this->next()) { - $this->delete($item->getField("idworkflowaction")); - } - } - - function select($where = "", $group_by = "", $order_by = "", $limit = "") { - global $client; - - return parent::select($where, $group_by, $order_by, $limit); - } - -} - -/** - * Class WorkflowAction - * Class for a single workflow action - * @author Timo A. Hummel - * @version 0.1 - * @copyright four for business 2003 - */ -class WorkflowAction extends Item { - - /** - * Constructor - * @global type $cfg - */ - function __construct() { - global $cfg; - parent::__construct($cfg["tab"]["workflow_actions"], "idworkflowaction"); - } - -} - -?> \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/classes/class.workflowallocation.php b/conlite/plugins/cl-workflow/classes/class.workflowallocation.php deleted file mode 100644 index 164690b..0000000 --- a/conlite/plugins/cl-workflow/classes/class.workflowallocation.php +++ /dev/null @@ -1,223 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * - * {@internal - * created 2003-07-18 - * - * $Id: class.workflowallocation.php 128 2019-07-03 11:58:28Z oldperl $ - * }} - * - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -/** - * Class WorkflowAllocations - * Class for workflow allocation management - * @author Timo A. Hummel - * @version 0.2 - * @copyright four for business 2003 - */ -class WorkflowAllocations extends ItemCollection { - - /** - * Constructor Function - * @param string $table The table to use as information source - */ - function __construct() { - global $cfg; - parent::__construct($cfg["tab"]["workflow_allocation"], "idallocation"); - $this->_setItemClass("WorkflowAllocation"); - } - - /** @deprecated [2011-03-15] Old constructor function for downwards compatibility */ - function WorkflowAllocations() { - cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()"); - $this->__construct(); - } - - function delete($idallocation) { - global $cfg, $lang; - - $obj = new WorkflowAllocation; - $obj->loadByPrimaryKey($idallocation); - - $idcatlang = $obj->get("idcatlang"); - - $db = new DB_ConLite; - $sql = "SELECT idcat FROM " . $cfg["tab"]["cat_lang"] . " WHERE idcatlang = '" . Contenido_Security::toInteger($idcatlang) . "'"; - $db->query($sql); - $db->next_record(); - $idcat = $db->f("idcat"); - - $sql = "SELECT idart FROM " . $cfg["tab"]["cat_art"] . " WHERE idcat = '" . Contenido_Security::toInteger($idcat) . "'"; - $db->query($sql); - - while ($db->next_record()) { - $idarts[] = $db->f("idart"); - } - - $idartlangs = array(); - - if (is_array($idarts)) { - foreach ($idarts as $idart) { - $sql = "SELECT idartlang FROM " . $cfg["tab"]["art_lang"] . " WHERE idart = '" . Contenido_Security::toInteger($idart) . "' and idlang = '" . Contenido_Security::toInteger($lang) . "'"; - $db->query($sql); - if ($db->next_record()) { - $idartlangs[] = $db->f("idartlang"); - } - } - } - - $workflowArtAllocation = new WorkflowArtAllocation; - $workflowArtAllocations = new WorkflowArtAllocations; - - foreach ($idartlangs as $idartlang) { - $workflowArtAllocation->loadBy("idartlang", $idartlang); - $workflowArtAllocations->delete($workflowArtAllocation->get("idartallocation")); - } - - parent::delete($idallocation); - } - - function create($idworkflow, $idcatlang) { - $this->select("idcatlang = '$idcatlang'"); - - if ($this->next() !== false) { - $this->lasterror = i18n("Category already has a workflow assigned", "workflow"); - return false; - } - - $workflows = new Workflows; - $workflows->select("idworkflow = '$idworkflow'"); - - if ($workflows->next() === false) { - $this->lasterror = i18n("Workflow doesn't exist", "workflow"); - return false; - } - $newitem = parent::createNewItem(); - if (!$newitem->setWorkflow($idworkflow)) { - $this->lasterror = $newitem->lasterror; - $workflows->delete($newitem->getField("idallocation")); - return false; - } - - if (!$newitem->setCatLang($idcatlang)) { - $this->lasterror = $newitem->lasterror; - $workflows->delete($newitem->getField("idallocation")); - return false; - } - - $newitem->store(); - - return ($newitem); - } - -} - -/** - * Class WorkflowAllocation - * Class for a single workflow allocation item - * @author Timo A. Hummel - * @version 0.1 - * @copyright four for business 2003 - */ -class WorkflowAllocation extends Item { - - /** - * Constructor Function - * @param string $table The table to use as information source - */ - function __construct() { - global $cfg; - - parent::__construct($cfg["tab"]["workflow_allocation"], "idallocation"); - } - - /** @deprecated [2011-03-15] Old constructor function for downwards compatibility */ - function WorkflowAllocation() { - cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()"); - $this->__construct(); - } - - /** - * Overridden setField function. Users should only use setWorkflow. - * @param string $field Void field since we override the usual setField function - * @param string $value Void field since we override the usual setField function - */ - function setField($field, $value, $bSafe = true) { - die("Don't use setField for WorkflowAllocation items! Use setWorkflow instead!"); - } - - /** - * setWorkflow sets the workflow for the current item. - * @param int $idworkflow Workflow-ID to set the item to - */ - function setWorkflow($idworkflow) { - $workflows = new Workflows; - - $workflows->select("idworkflow = '$idworkflow'"); - - if ($workflows->next() === false) { - $this->lasterror = i18n("Workflow doesn't exist", "workflow"); - return false; - } - - parent::setField("idworkflow", $idworkflow); - parent::store(); - return true; - } - - /** - * setCatLang sets the idcatlang for the current item. Should - * only be called by the create function. - * @param int $idcatlang idcatlang to set. - */ - function setCatLang($idcatlang) { - global $cfg; - - $allocations = new WorkflowAllocations; - - $allocations->select("idcatlang = '$idcatlang'"); - - if ($allocations->next() !== false) { - $this->lasterror = i18n("Category already has a workflow assigned", "workflow"); - return false; - } - - $db = new DB_ConLite; - $sql = "SELECT idcatlang FROM " . $cfg["tab"]["cat_lang"] . " WHERE idcatlang = '" . Contenido_Security::toInteger($idcatlang) . "'"; - $db->query($sql); - - if (!$db->next_record()) { - $this->lasterror = i18n("Category doesn't exist, assignment failed", "workflow"); - return false; - } - - parent::setField("idcatlang", $idcatlang); - parent::store(); - return true; - } - -} - -?> \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/classes/class.workflowartallocation.php b/conlite/plugins/cl-workflow/classes/class.workflowartallocation.php deleted file mode 100644 index 811b013..0000000 --- a/conlite/plugins/cl-workflow/classes/class.workflowartallocation.php +++ /dev/null @@ -1,332 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * - * {@internal - * created 2003-07-18 - * modified : 2008-06-25 - use php mailer class instead of mail() - * - * $Id: class.workflowartallocation.php 128 2019-07-03 11:58:28Z oldperl $: - * }} - * - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -/** - * Class WorkflowArtAllocations - * Class for workflow art allocation management - * @author Timo A. Hummel - * @version 0.2 - * @copyright four for business 2003 - */ -class WorkflowArtAllocations extends ItemCollection { - - /** - * Constructor Function - * @param string $table The table to use as information source - */ - function __construct() { - global $cfg; - parent::__construct($cfg["tab"]["workflow_art_allocation"], "idartallocation"); - $this->_setItemClass("WorkflowArtAllocation"); - } - - /** @deprecated [2011-03-15] Old constructor function for downwards compatibility */ - function WorkflowArtAllocations() { - cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()"); - $this->__construct(); - } - - function create($idartlang) { - global $cfg; - - $sql = "SELECT idartlang FROM " . $cfg["tab"]["art_lang"] . - " WHERE idartlang = '" . Contenido_Security::escapeDB($idartlang, $this->db) . "'"; - - $this->db->query($sql); - if (!$this->db->next_record()) { - $this->lasterror = i18n("Article doesn't exist", "workflow"); - return false; - } - - $this->select("idartlang = '$idartlang'"); - - if ($this->next() !== false) { - $this->lasterror = i18n("Article is already assigned to a usersequence step.", "workflow"); - return false; - } - - $newitem = parent::createNewItem(); - $newitem->setField("idartlang", $idartlang); - $newitem->store(); - - return ($newitem); - } - -} - -/** - * Class WorkflowArtAllocation - * Class for a single workflow allocation item - * @author Timo A. Hummel - * @version 0.1 - * @copyright four for business 2003 - */ -class WorkflowArtAllocation extends Item { - - /** - * Constructor Function - * @param string $table The table to use as information source - */ - function __construct() { - global $cfg; - - parent::__construct($cfg["tab"]["workflow_art_allocation"], "idartallocation"); - } - - /** @deprecated [2011-03-15] Old constructor function for downwards compatibility */ - function WorkflowArtAllocation() { - cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()"); - $this->__construct(); - } - - function getWorkflowItem() { - $userSequence = new WorkflowUserSequence; - $userSequence->loadByPrimaryKey($this->values["idusersequence"]); - - return ($userSequence->getWorkflowItem()); - } - - /** - * Returns the current item position - * @param string $field Void field since we override the usual setField function - * @param string $value Void field since we override the usual setField function - */ - function currentItemPosition() { - $idworkflowitem = $this->get("idworkflowitem"); - - $workflowItems = new WorkflowItems; - $workflowItems->select("idworkflowitem = '$idworkflowitem'"); - - if ($item = $workflowItems->next()) { - return ($item->get("position")); - } - } - - /** - * Returns the current user position - * @param string $field Void field since we override the usual setField function - * @param string $value Void field since we override the usual setField function - */ - function currentUserPosition() { - return ($this->get("position")); - } - - /** - * Overriden store function to send mails - * @param none - */ - function store() { - global $cfg; - - $sMailhost = getSystemProperty('system', 'mail_host'); - if ($sMailhost == '') { - $sMailhost = 'localhost'; - } - - //modified : 2008-06-25 - use php mailer class instead of mail() - $oMail = new PHPMailer(); - $oMail->Host = $sMailhost; - $oMail->IsHTML(0); - $oMail->WordWrap = 1000; - $oMail->IsMail(); - - if (array_key_exists("idusersequence", $this->modifiedValues)) { - $usersequence = new WorkflowUserSequence; - $usersequence->loadByPrimaryKey($this->values["idusersequence"]); - - $email = $usersequence->get("emailnoti"); - $escal = $usersequence->get("escalationnoti"); - - if ($email == 1 || $escal == 1) { - /* Grab the required informations */ - $curEditor = getGroupOrUserName($usersequence->get("iduser")); - $idartlang = $this->get("idartlang"); - $timeunit = $usersequence->get("timeunit"); - $timelimit = $usersequence->get("timelimit"); - - $db = new DB_ConLite; - $sql = "SELECT author, title, idart FROM " . $cfg["tab"]["art_lang"] . " WHERE idartlang = '" . Contenido_Security::escapeDB($idartlang, $db) . "'"; - - $db->query($sql); - - if ($db->next_record()) { - $idart = $db->f("idart"); - $title = $db->f("title"); - $author = $db->f("author"); - } - - /* Extract category */ - $sql = "SELECT idcat FROM " . $cfg["tab"]["cat_art"] . " WHERE idart = '" . Contenido_Security::escapeDB($idart, $db) . "'"; - $db->query($sql); - - if ($db->next_record()) { - $idcat = $db->f("idcat"); - } - - $sql = "SELECT name FROM " . $cfg["tab"]["cat_lang"] . " WHERE idcat = '" . Contenido_Security::escapeDB($idcat, $db) . "'"; - $db->query($sql); - - if ($db->next_record()) { - $catname = $db->f("name"); - } - - $starttime = $this->get("starttime"); - - - $starttime = strtotime(substr_replace(substr(substr($starttime, 0, 2) . chunk_split(substr($starttime, 2, 6), 2, "-") . chunk_split(substr($starttime, 8), 2, ":"), 0, 19), " ", 10, 1)); - - switch ($timeunit) { - case "Seconds": - $maxtime = $starttime + $timelimit; - break; - case "Minutes": - $maxtime = $starttime + ($timelimit * 60); - break; - case "Hours": - $maxtime = $starttime + ($timelimit * 3600); - break; - case "Days": - $maxtime = $starttime + ($timelimit * 86400); - break; - case "Weeks": - $maxtime = $starttime + ($timelimit * 604800); - break; - case "Months": - $maxtime = $starttime + ($timelimit * 2678400); - break; - case "Years": - $maxtime = $starttime + ($timelimit * 31536000); - break; - default: - $maxtime = $starttime + $timelimit; - } - - if ($email == 1) { - $email = "Hello %s,\n\n" . - "you are assigned as the next editor for the Article %s.\n\n" . - "More informations:\n" . - "Article: %s\n" . - "Category: %s\n" . - "Editor: %s\n" . - "Author: %s\n" . - "Editable from: %s\n" . - "Editable to: %s\n"; - - $filledMail = sprintf($email, - $curEditor, - $title, - $title, - $catname, - $curEditor, - $author, - date("Y-m-d H:i:s", $starttime), - date("Y-m-d H:i:s", $maxtime)); - $user = new User; - - if (isGroup($usersequence->get("iduser"))) { - $sql = "select idgroupuser, user_id FROM " . $cfg["tab"]["groupmembers"] . " WHERE - group_id = '" . Contenido_Security::escapeDB($usersequence->get("iduser"), $db) . "'"; - $db->query($sql); - - while ($db->next_record()) { - $user->loadUserByUserID($db->f("user_id")); - //modified : 2008-06-25 - use php mailer class instead of mail() - $oMail->AddAddress($user->getField("email"), ""); - $oMail->Subject = stripslashes(i18n('Workflow notification')); - $oMail->Body = $filledMail; - $oMail->Send(); - } - } else { - $user->loadUserByUserID($usersequence->get("iduser")); - //modified : 2008-06-25 - use php mailer class instead of mail() - $oMail->AddAddress($user->getField("email"), ""); - $oMail->Subject = stripslashes(i18n('Workflow notification')); - $oMail->Body = $filledMail; - $oMail->Send(); - } - } else { - $email = "Hello %s,\n\n" . - "you are assigned as the escalator for the Article %s.\n\n" . - "More informations:\n" . - "Article: %s\n" . - "Category: %s\n" . - "Editor: %s\n" . - "Author: %s\n" . - "Editable from: %s\n" . - "Editable to: %s\n"; - - $filledMail = sprintf($email, - $curEditor, - $title, - $title, - $catname, - $curEditor, - $author, - date("Y-m-d H:i:s", $starttime), - date("Y-m-d H:i:s", $maxtime)); - - $user = new User; - - if (isGroup($usersequence->get("iduser"))) { - - $sql = "select idgroupuser, user_id FROM " . $cfg["tab"]["groupmembers"] . " WHERE - group_id = '" . Contenido_Security::escapeDB($usersequence->get("iduser"), $db) . "'"; - $db->query($sql); - - while ($db->next_record()) { - $user->loadUserByUserID($db->f("user_id")); - echo "mail to " . $user->getField("email") . "
    "; - //modified : 2008-06-25 - use php mailer class instead of mail() - $oMail->AddAddress($user->getField("email"), ""); - $oMail->Subject = stripslashes(i18n('Workflow escalation')); - $oMail->Body = $filledMail; - $oMail->Send(); - } - } else { - $user->loadUserByUserID($usersequence->get("iduser")); - echo "mail to " . $user->getField("email") . "
    "; - //modified : 2008-06-25 - use php mailer class instead of mail() - $oMail->AddAddress($user->getField("email"), ""); - $oMail->Subject = stripslashes(i18n('Workflow escalation')); - $oMail->Body = $filledMail; - $oMail->Send(); - } - } - } - } - return parent::store(); - } - -} - -?> \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/classes/class.workflowitems.php b/conlite/plugins/cl-workflow/classes/class.workflowitems.php deleted file mode 100644 index 62c8c4f..0000000 --- a/conlite/plugins/cl-workflow/classes/class.workflowitems.php +++ /dev/null @@ -1,304 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * - * {@internal - * created 2003-07-18 - * - * $Id: class.workflowitems.php 128 2019-07-03 11:58:28Z oldperl $ - * }} - * - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -/** - * Class WorkflowItems - * Class for workflow item management - * @author Timo A. Hummel - * @version 0.2 - * @copyright four for business 2003 - */ -class WorkflowItems extends ItemCollection { - - /** - * Constructor Function - * @param string $table The table to use as information source - */ - function __construct() { - global $cfg; - parent::__construct($cfg["tab"]["workflow_items"], "idworkflowitem"); - $this->_setItemClass("WorkflowItem"); - } - - /** @deprecated [2011-03-15] Old constructor function for downwards compatibility */ - function WorkflowItems() { - cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()"); - $this->__construct(); - } - - function delete($id) { - global $cfg; - $item = new WorkflowItem; - $item->loadByPrimaryKey($id); - $pos = $item->get("position"); - $idworkflow = $item->get("idworkflow"); - $oDb = new DB_ConLite(); - - $this->select("position > $pos AND idworkflow = '" . Contenido_Security::escapeDB($idworkflow, $oDb) . "'"); - while ($obj = $this->next()) { - $obj->setPosition($obj->get("position") - 1); - $obj->store(); - } - - $aUserSequencesDelete = array(); - $sSql = 'SELECT idusersequence FROM ' . $cfg["tab"]["workflow_user_sequences"] . ' WHERE idworkflowitem = ' . $id . ';'; - $oDb->query($sSql); - while ($oDb->next_record()) { - array_push($aUserSequencesDelete, Contenido_Security::escapeDB($oDb->f('idusersequence'), $oDb)); - } - - $sSql = 'DELETE FROM ' . $cfg["tab"]["workflow_actions"] . ' WHERE idworkflowitem = ' . Contenido_Security::escapeDB($id, $oDb) . ';'; - $oDb->query($sSql); - - $this->updateArtAllocation($id, 1); - - if (count($aUserSequencesDelete) > 0) { - $sSql = 'DELETE FROM ' . $cfg["tab"]["workflow_user_sequences"] . ' WHERE idusersequence in (' . implode(',', $aUserSequencesDelete) . ');'; - $oDb->query($sSql); - } - } - - function updateArtAllocation($idworkflowitem, $delete = false) { - global $idworkflow, $cfg; - $oDb = new DB_ConLite(); - - $aUserSequences = array(); - $sSql = 'SELECT idusersequence FROM ' . $cfg["tab"]["workflow_user_sequences"] . ' WHERE idworkflowitem = ' . Contenido_Security::escapeDB($idworkflowitem, $oDb) . ';'; - - $oDb->query($sSql); - while ($oDb->next_record()) { - array_push($aUserSequences, Contenido_Security::escapeDB($oDb->f('idusersequence'), $oDb)); - } - - $aIdArtLang = array(); - if (count($aUserSequences) > 0) { - $sSql = 'SELECT idartlang FROM ' . $cfg["tab"]["workflow_art_allocation"] . ' WHERE idusersequence in (' . implode(',', $aUserSequences) . ');'; - $oDb->query($sSql); - while ($oDb->next_record()) { - array_push($aIdArtLang, $oDb->f('idartlang')); - } - $sSql = 'DELETE FROM ' . $cfg["tab"]["workflow_art_allocation"] . ' WHERE idusersequence in (' . implode(',', $aUserSequences) . ');'; - $oDb->query($sSql); - } - - if ($delete) { - parent::delete($idworkflowitem); - } - - foreach ($aIdArtLang as $iIdArtLang) { - setUserSequence($iIdArtLang, $idworkflow); - } - } - - function swap($idworkflow, $pos1, $pos2) { - $this->select("idworkflow = '$idworkflow' AND position = '$pos1'"); - if (($item = $this->next()) === false) { - $this->lasterror = i18n("Swapping items failed: Item doesn't exist", "workflow"); - return false; - } - - $pos1ID = $item->getField("idworkflowitem"); - - $this->select("idworkflow = '$idworkflow' AND position = '$pos2'"); - if (($item = $this->next()) === false) { - $this->lasterror = i18n("Swapping items failed: Item doesn't exist", "workflow"); - return false; - } - - $pos2ID = $item->getField("idworkflowitem"); - - $item = new WorkflowItem(); - $item->loadByPrimaryKey($pos1ID); - $item->setPosition($pos2); - $item->store(); - $item->loadByPrimaryKey($pos2ID); - $item->setPosition($pos1); - $item->store(); - - $this->updateArtAllocation($pos1ID); - $this->updateArtAllocation($pos2ID); - return (true); - } - - function create($idworkflow) { - $workflows = new Workflows; - - $workflows->select("idworkflow = '$idworkflow'"); - - if ($workflows->next() === false) { - $this->lasterror = i18n("Can't add item to workflow: Workflow doesn't exist", "workflow"); - return false; - } - - $this->select("idworkflow = '$idworkflow'", "", "position DESC", "1"); - - $item = $this->next(); - - if ($item === false) { - $lastPos = 1; - } else { - $lastPos = $item->getField("position") + 1; - } - - $newItem = parent::createNewItem(); - if ($newItem->init($idworkflow, $lastPos) === false) { - $this->delete($newItem->getField("idworkflowitem")); - $this->lasterror = $newItem->lasterror; - return false; - } - - if ($item === false) { - $this->updateArtAllocation(0); - } - - return ($newItem); - } - -} - -/** - * Class WorkflowItem - * Class for a single workflow item - * @author Timo A. Hummel - * @version 0.1 - * @copyright four for business 2003 - */ -class WorkflowItem extends Item { - - /** - * Constructor Function - * @param string $table The table to use as information source - */ - function __construct() { - global $cfg; - - parent::__construct($cfg["tab"]["workflow_items"], "idworkflowitem"); - } - - /** @deprecated [2011-03-15] Old constructor function for downwards compatibility */ - function WorkflowItem() { - cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()"); - $this->__construct(); - } - - function getStepRights() { - $idwfi = $this->values["idworkflowitem"]; - $workflowActions = new WorkflowActions; - - $actions = WorkflowActions::getAvailableWorkflowActions(); - - foreach ($actions as $key => $value) { - $rights[$key] = $workflowActions->get($idwfi, $key); - } - - return $rights; - } - - /** - * Overridden setField function. - * @param string $field Void field since we override the usual setField function - * @param string $value Void field since we override the usual setField function - */ - function setField($field, $value, $bSafe = TRUE) { - if ($this->virgin == true) { - $this->lasterror = i18n("No item loaded", "workflow"); - return false; - } - - if ($field == "idsequence") { - die("You can't set the idsequence field using this method. Use 'create' in the WorkflowItems class."); - } - - if ($field == "idworkflow") { - die("You can't set the workflow ID using this method. Use 'create' in the WorkflowItems class!"); - } - - if ($field == "position") { - die("You can't set the position ID using this method. Use 'create' or 'swap' to create or move items!"); - } - - if ($field == "idtask" && $value != 0) { - $taskCollection = new WorkflowTasks; - $taskCollection->select("idtask = '$value'"); - if ($taskCollection->next() === false) { - $this->lasterror = i18n("Requested task doesn't exist, can't assign", "workflow"); - return false; - } - } - - parent::setField($field, $value, $bSafe); - } - - /** - * init initializes a new wf_items entry. Should - * only be called by the create function. - * @param int $idworkflow The workflow to set the item to - */ - function init($idworkflow, $idposition) { - global $cfg; - - $workflows = new Workflows; - - $workflows->select("idworkflow = '$idworkflow'"); - - if ($workflows->next() === false) { - $this->lasterror = i18n("Workflow doesn't exist", "workflow"); - return false; - } - - $workflowItems = new WorkflowItems; - $workflowItems->select("position = '$idposition' AND idworkflow = '$idworkflow'"); - if ($workflowItems->next()) { - $this->lasterror = i18n("Position in this workflow already exists.", "workflow"); - return false; - } - - parent::setField("idworkflow", $idworkflow); - parent::setField("position", $idposition); - parent::store(); - return true; - } - - /** - * setPosition Sets the position for an item. Should only be - * called by the "swap" function - * @param int $idposition The new position ID - */ - function setPosition($idposition) { - parent::setField("position", $idposition); - parent::store(); - return true; - } - -} - -?> \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/classes/class.workflowtasks.php b/conlite/plugins/cl-workflow/classes/class.workflowtasks.php deleted file mode 100644 index c0aeda1..0000000 --- a/conlite/plugins/cl-workflow/classes/class.workflowtasks.php +++ /dev/null @@ -1,100 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * - * {@internal - * created 2003-07-18 - * - * $Id: class.workflowtasks.php 128 2019-07-03 11:58:28Z oldperl $ - * }} - * - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -/** - * Class WorkflowTasks - * Class for workflow task collections - * @author Timo A. Hummel - * @version 0.2 - * @copyright four for business 2003 - */ -class WorkflowTasks extends ItemCollection { - - /** - * Constructor Function - * @param string $table The table to use as information source - */ - function __construct() { - global $cfg; - parent::__construct($cfg["tab"]["tasks"], "idtask"); - $this->_setItemClass("WorkflowTask"); - } - - /** @deprecated [2011-03-15] Old constructor function for downwards compatibility */ - function WorkflowTasks() { - cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()"); - $this->__construct(); - } - - function create() { - $newitem = parent::createNewItem(); - return ($newitem); - } - - function select($where = "", $group_by = "", $order_by = "", $limit = "") { - global $client; - - if ($where != "") { - $where = $where . " AND idclient = '" . Contenido_Security::escapeDB($client, NULL) . "'"; - } - return parent::select($where, $group_by, $order_by, $limit); - } - -} - -/** - * Class WorkflowTask - * Class for a single workflow task item - * @author Timo A. Hummel - * @version 0.1 - * @copyright four for business 2003 - */ -class WorkflowTask extends Item { - - /** - * Constructor Function - * @param string $table The table to use as information source - */ - function __construct() { - global $cfg; - parent::__construct($cfg["tab"]["tasks"], "idtask"); - } - - /** @deprecated [2011-03-15] Old constructor function for downwards compatibility */ - function WorkflowTask() { - cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()"); - $this->__construct(); - } - -} - -?> \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/classes/class.workflowusersequence.php b/conlite/plugins/cl-workflow/classes/class.workflowusersequence.php deleted file mode 100644 index 9f13636..0000000 --- a/conlite/plugins/cl-workflow/classes/class.workflowusersequence.php +++ /dev/null @@ -1,258 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * - * {@internal - * created 2003-07-18 - * - * $Id: class.workflowusersequence.php 128 2019-07-03 11:58:28Z oldperl $ - * }} - * - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -/** - * Class WorkflowUserSequences - * Class for workflow user sequence management - * @author Timo A. Hummel - * @version 0.2 - * @copyright four for business 2003 - */ -class WorkflowUserSequences extends ItemCollection { - - /** - * Constructor Function - * @param string $table The table to use as information source - */ - function __construct() { - global $cfg; - parent::__construct($cfg["tab"]["workflow_user_sequences"], "idusersequence"); - $this->_setItemClass("WorkflowUserSequence"); - } - - /** @deprecated [2011-03-15] Old constructor function for downwards compatibility */ - function WorkflowUserSequences() { - cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()"); - $this->__construct(); - } - - function delete($id) { - global $cfg, $idworkflow; - - $item = new WorkflowUserSequence; - $item->loadByPrimaryKey($id); - - $pos = $item->get("position"); - $idworkflowitem = $item->get("idworkflowitem"); - $this->select("position > $pos AND idworkflowitem = '" . Contenido_Security::escapeDB($idworkflowitem, NULL) . "'"); - while ($obj = $this->next()) { - $pos = $obj->get("position") - 1; - $obj->setPosition($pos); - $obj->store(); - } - - parent::delete($id); - - $this->updateArtAllocation($id); - } - - function updateArtAllocation($idusersequence) { - global $idworkflow, $cfg; - $oDb = new DB_ConLite(); - - $aIdArtLang = array(); - $sSql = 'SELECT idartlang FROM ' . $cfg["tab"]["workflow_art_allocation"] . ' WHERE idusersequence = ' . Contenido_Security::escapeDB($idusersequence, $oDb) . ';'; - $oDb->query($sSql); - while ($oDb->next_record()) { - array_push($aIdArtLang, $oDb->f('idartlang')); - } - - $sSql = 'DELETE FROM ' . $cfg["tab"]["workflow_art_allocation"] . ' WHERE idusersequence = ' . Contenido_Security::escapeDB($idusersequence, $oDb) . ';'; - $oDb->query($sSql); - - - foreach ($aIdArtLang as $iIdArtLang) { - setUserSequence($iIdArtLang, $idworkflow); - } - } - - function create($idworkflowitem) { - global $auth, $client, $idworkflow; - $newitem = parent::createNewItem(); - - $workflowitems = new WorkflowItems; - if (!$workflowitems->exists($idworkflowitem)) { - $this->delete($newitem->getField("idusersequence")); - $this->lasterror = i18n("Workflow item doesn't exist. Can't create entry.", "workflow"); - return false; - } - - $this->select("idworkflowitem = '" . Contenido_Security::escapeDB($idworkflowitem, NULL) . "'", "", "position DESC", "1"); - - $item = $this->next(); - - if ($item === false) { - $lastPos = 1; - } else { - $lastPos = $item->getField("position") + 1; - } - - $newitem->setWorkflowItem($idworkflowitem); - $newitem->setPosition($lastPos); - $newitem->store(); - - return ($newitem); - } - - function swap($idworkflowitem, $pos1, $pos2) { - $this->select("idworkflowitem = '$idworkflowitem' AND position = '" . Contenido_Security::escapeDB($pos1, NULL) . "'"); - if (($item = $this->next()) === false) { - $this->lasterror = i18n("Swapping items failed: Item doesn't exist", "workflow"); - return false; - } - - $pos1ID = $item->getField("idusersequence"); - - $this->select("idworkflowitem = '$idworkflowitem' AND position = '" . Contenido_Security::escapeDB($pos2, NULL) . "'"); - if (($item = $this->next()) === false) { - $this->lasterror(i18n("Swapping items failed: Item doesn't exist", "workflow")); - return false; - } - - $pos2ID = $item->getField("idusersequence"); - - $item = new WorkflowUserSequence(); - $item->loadByPrimaryKey($pos1ID); - $item->setPosition($pos2); - $item->store(); - $item->loadByPrimaryKey($pos2ID); - $item->setPosition($pos1); - $item->store(); - - $this->updateArtAllocation($pos2ID); - $this->updateArtAllocation($pos1ID); - - return (true); - } - -} - -/** - * Class WorkflowUserSequence - * Class for a single workflow item - * @author Timo A. Hummel - * @version 0.1 - * @copyright four for business 2003 - */ -class WorkflowUserSequence extends Item { - - /** - * Constructor Function - * @param string $table The table to use as information source - */ - function __construct() { - global $cfg; - parent::__construct($cfg["tab"]["workflow_user_sequences"], "idusersequence"); - } - - /** @deprecated [2011-03-15] Old constructor function for downwards compatibility */ - function WorkflowUserSequence() { - cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()"); - $this->__construct(); - } - - /** - * Override setField Function to prevent that somebody modifies - * idsequence. - * @param string $field Field to set - * @param string $valie Value to set - */ - function setField($field, $value, $bSafe = true) { - global $cfg; - - switch ($field) { - case "idworkflowitem": - die("Please use create to modify idsequence. Direct modifications are not allowed"); - case "idusersequence": - die("Please use create to modify idsequence. Direct modifications are not allowed"); - case "position": - die("Please use create and swap to set the position. Direct modifications are not allowed"); - case "iduser": - if ($value != 0) { - $db = new DB_ConLite; - $sql = "SELECT user_id FROM " . $cfg["tab"]["phplib_auth_user_md5"] . - " WHERE user_id = '" . Contenido_Security::escapeDB($value, $db) . "'"; - $db->query($sql); - - if (!$db->next_record()) { - $sql = "SELECT group_id FROM " . $cfg["tab"]["groups"] . - " WHERE group_id = '" . Contenido_Security::escapeDB($value, $db) . "'"; - - $db->query($sql); - if (!$db->next_record()) { - $this->lasterror = i18n("Can't set user_id: User or group doesn't exist", "workflow"); - return false; - } - } - $idusersquence = parent::getField('idusersequence'); - } - } - - parent::setField($field, $value, $bSafe); - if ($idusersquence) { - WorkflowUserSequences::updateArtAllocation(0); - } - } - - /** - * Returns the associated workflowItem for this user sequence - * @param none - */ - function getWorkflowItem() { - if (!$this->virgin) { - $workflowItem = new WorkflowItem; - $workflowItem->loadByPrimaryKey($this->values["idworkflowitem"]); - return ($workflowItem); - } else { - return false; - } - } - - /** - * Interface to set idworkflowitem. Should only be called by "create". - * @param string $value The value to set - */ - function setWorkflowItem($value) { - parent::setField("idworkflowitem", $value); - } - - /** - * Interface to set idworkflowitem. Should only be called by "create". - * @param string $value The value to set - */ - function setPosition($value) { - parent::setField("position", $value); - } - -} - -?> \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/cronjobs/advance_workflow.php b/conlite/plugins/cl-workflow/cronjobs/advance_workflow.php deleted file mode 100644 index 7669682..0000000 --- a/conlite/plugins/cl-workflow/cronjobs/advance_workflow.php +++ /dev/null @@ -1,103 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * - * {@internal - * created 2003-05-26 - * modified 2010-05-20, Murat Purc, removed request check during processing ticket [#CON-307] - * - * $Id: advance_workflow.php 128 2019-07-03 11:58:28Z oldperl $ - * }} - * - */ -define('CON_FRAMEWORK', true); - - -// Contenido startup process -include_once ('../../../includes/startup.php'); - -cInclude("includes", "cfg_language_de.inc.php"); -cInclude("includes", "functions.con.php"); -plugin_include('workflow', 'includes/functions.workflow.php'); - -$workflowartallocations = new WorkflowArtAllocations; -$workflowusersequences = new WorkflowUserSequences; - -$workflowartallocations->select(); - -while ($obj = $workflowartallocations->next()) { - $starttime = $obj->get("starttime"); - $idartlang = $obj->get("idartlang"); - $lastidusersequence = $obj->get("lastusersequence"); - - $usersequence = getCurrentUserSequence($idartlang, 0); - - if ($usersequence != $lastidusersequence) { - - $workflowusersequences->select("idusersequence = '$usersequence'"); - - if ($wfobj = $workflowusersequences->next()) { - $wfitem = $wfobj->get("idworkflowitem"); - $pos = $wfobj->get("position"); - $timeunit = $wfobj->get("timeunit"); - $timelimit = $wfobj->get("timelimit"); - } - - $starttime = strtotime(substr_replace(substr(substr($starttime, 0, 2) . chunk_split(substr($starttime, 2, 6), 2, "-") . chunk_split(substr($starttime, 8), 2, ":"), 0, 19), " ", 10, 1)); - switch ($timeunit) { - case "Seconds": - $maxtime = $starttime + $timelimit; - break; - case "Minutes": - $maxtime = $starttime + ($timelimit * 60); - break; - case "Hours": - $maxtime = $starttime + ($timelimit * 3600); - break; - case "Days": - $maxtime = $starttime + ($timelimit * 86400); - break; - case "Weeks": - $maxtime = $starttime + ($timelimit * 604800); - break; - case "Months": - $maxtime = $starttime + ($timelimit * 2678400); - break; - case "Years": - $maxtime = $starttime + ($timelimit * 31536000); - break; - default: - $maxtime = $starttime + $timelimit; - } - - - - if ($maxtime < time()) { - $pos = $pos + 1; - $workflowusersequences->select("idworkflowitem = '$wfitem' AND position = '" . Contenido_Security::escapeDB($pos, NULL) . "'"); - - if ($wfobj = $workflowusersequences->next()) { - $obj->set("idusersequence", $wfobj->get("idusersequence")); - $obj->store(); - } - } - } -} -?> diff --git a/conlite/plugins/cl-workflow/images/no_verschieben.gif b/conlite/plugins/cl-workflow/images/no_verschieben.gif deleted file mode 100644 index dbbc5e9..0000000 Binary files a/conlite/plugins/cl-workflow/images/no_verschieben.gif and /dev/null differ diff --git a/conlite/plugins/cl-workflow/images/nu_verschieben.gif b/conlite/plugins/cl-workflow/images/nu_verschieben.gif deleted file mode 100644 index 00e6a36..0000000 Binary files a/conlite/plugins/cl-workflow/images/nu_verschieben.gif and /dev/null differ diff --git a/conlite/plugins/cl-workflow/images/workflow.gif b/conlite/plugins/cl-workflow/images/workflow.gif deleted file mode 100644 index d9c1f78..0000000 Binary files a/conlite/plugins/cl-workflow/images/workflow.gif and /dev/null differ diff --git a/conlite/plugins/cl-workflow/images/workflow_alt.gif b/conlite/plugins/cl-workflow/images/workflow_alt.gif deleted file mode 100644 index d9c1f78..0000000 Binary files a/conlite/plugins/cl-workflow/images/workflow_alt.gif and /dev/null differ diff --git a/conlite/plugins/cl-workflow/images/workflow_email_noti.gif b/conlite/plugins/cl-workflow/images/workflow_email_noti.gif deleted file mode 100644 index d95569d..0000000 Binary files a/conlite/plugins/cl-workflow/images/workflow_email_noti.gif and /dev/null differ diff --git a/conlite/plugins/cl-workflow/images/workflow_erstellen.gif b/conlite/plugins/cl-workflow/images/workflow_erstellen.gif deleted file mode 100644 index 0472fdc..0000000 Binary files a/conlite/plugins/cl-workflow/images/workflow_erstellen.gif and /dev/null differ diff --git a/conlite/plugins/cl-workflow/images/workflow_escal_noti.gif b/conlite/plugins/cl-workflow/images/workflow_escal_noti.gif deleted file mode 100644 index 2c753ac..0000000 Binary files a/conlite/plugins/cl-workflow/images/workflow_escal_noti.gif and /dev/null differ diff --git a/conlite/plugins/cl-workflow/images/workflow_step.gif b/conlite/plugins/cl-workflow/images/workflow_step.gif deleted file mode 100644 index d9745a1..0000000 Binary files a/conlite/plugins/cl-workflow/images/workflow_step.gif and /dev/null differ diff --git a/conlite/plugins/cl-workflow/images/workflow_step_delete.gif b/conlite/plugins/cl-workflow/images/workflow_step_delete.gif deleted file mode 100644 index c7251de..0000000 Binary files a/conlite/plugins/cl-workflow/images/workflow_step_delete.gif and /dev/null differ diff --git a/conlite/plugins/cl-workflow/images/workflow_step_ist_raus.gif b/conlite/plugins/cl-workflow/images/workflow_step_ist_raus.gif deleted file mode 100644 index d9745a1..0000000 Binary files a/conlite/plugins/cl-workflow/images/workflow_step_ist_raus.gif and /dev/null differ diff --git a/conlite/plugins/cl-workflow/images/workflow_step_new.gif b/conlite/plugins/cl-workflow/images/workflow_step_new.gif deleted file mode 100644 index 0472fdc..0000000 Binary files a/conlite/plugins/cl-workflow/images/workflow_step_new.gif and /dev/null differ diff --git a/conlite/plugins/cl-workflow/images/workflow_user.gif b/conlite/plugins/cl-workflow/images/workflow_user.gif deleted file mode 100644 index 0256151..0000000 Binary files a/conlite/plugins/cl-workflow/images/workflow_user.gif and /dev/null differ diff --git a/conlite/plugins/cl-workflow/includes/config.autoloader.php b/conlite/plugins/cl-workflow/includes/config.autoloader.php deleted file mode 100644 index b8d5f11..0000000 --- a/conlite/plugins/cl-workflow/includes/config.autoloader.php +++ /dev/null @@ -1,19 +0,0 @@ - $sAutoloadClassPath.'class.workflow.php', - 'Workflows' => $sAutoloadClassPath.'class.workflow.php', - 'WorkflowAction' => $sAutoloadClassPath.'class.workflowactions.php', - 'WorkflowActions' => $sAutoloadClassPath.'class.workflowactions.php', - 'WorkflowAllocation' => $sAutoloadClassPath.'class.workflowallocation.php', - 'WorkflowAllocations' => $sAutoloadClassPath.'class.workflowallocation.php', - 'WorkflowArtAllocation' => $sAutoloadClassPath.'class.workflowartallocation.php', - 'WorkflowArtAllocations' => $sAutoloadClassPath.'class.workflowartallocation.php', - 'WorkflowItem' => $sAutoloadClassPath.'class.workflowitems.php', - 'WorkflowItems' => $sAutoloadClassPath.'class.workflowitems.php', - 'WorkflowTask' => $sAutoloadClassPath.'class.workflowtasks.php', - 'WorkflowTasks' => $sAutoloadClassPath.'class.workflowtasks.php', - 'WorkflowUserSequence' => $sAutoloadClassPath.'class.workflowusersequence.php', - 'WorkflowUserSequences' => $sAutoloadClassPath.'class.workflowusersequence.php' -); -?> \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/includes/config.plugin.php b/conlite/plugins/cl-workflow/includes/config.plugin.php deleted file mode 100644 index 462cb24..0000000 --- a/conlite/plugins/cl-workflow/includes/config.plugin.php +++ /dev/null @@ -1,71 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * - * @todo move functions to own file and add autoloader (Ortwin) - * - * $Id: config.plugin.php 128 2019-07-03 11:58:28Z oldperl $ - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -plugin_include('cl-workflow', 'includes/functions.workflow.php'); - -$sPluginName = 'cl-workflow'; - -global $lngAct, $modidartlang; - -$lngAct["workflow"]["workflow_delete"] = i18n("Delete workflow", $sPluginName); -$lngAct["con_workflow"]["workflow_task_user_select"] = i18n("Select workflow task", $sPluginName); -$lngAct["workflow_common"]["workflow_show"] = i18n("Show workflow", $sPluginName); -$lngAct["workflow_common"]["workflow_create"] = i18n("Create workflow", $sPluginName); -$lngAct["workflow_common"]["workflow_save"] = i18n("Edit workflow", $sPluginName); -$lngAct["con"]["workflow_do_action"] = i18n("Process workflow step", $sPluginName); -$lngAct["str"]["workflow_inherit_down"] = i18n("Inherit workflow down", $sPluginName); -$lngAct["str"]["workflow_inherit_down"] = i18n("Inherit workflow down", $sPluginName); -$lngAct["workflow_steps"]["workflow_step_edit"] = i18n("Edit workflow step", $sPluginName); -$lngAct["workflow_steps"]["workflow_step_up"] = i18n("Move workflowstep up", $sPluginName); -$lngAct["workflow_steps"]["workflow_step_down"] = i18n("Move workflowstep down", $sPluginName); -$lngAct["workflow_steps"]["workflow_save_step"] = i18n("Save Workflowstep", $sPluginName); -$lngAct["workflow_steps"]["workflow_create_step"] = i18n("Create workflowstep", $sPluginName); -$lngAct["workflow_steps"]["workflow_step_delete"] = i18n("Delete workflowstep", $sPluginName); -$lngAct["workflow_steps"]["workflow_user_up"] = i18n("Move workflowstepuser up", $sPluginName); -$lngAct["workflow_steps"]["workflow_user_down"] = i18n("Move workflowstepuser down", $sPluginName); -$lngAct["workflow_steps"]["workflow_create_user"] = i18n("Create Workflowstepuser", $sPluginName); -$lngAct["workflow_steps"]["workflow_user_delete"] = i18n("Delete Workflowstepuser", $sPluginName); -$lngAct["str"]["workflow_cat_assign"] = i18n("Associate workflow with category", $sPluginName); - -$_cecRegistry->addChainFunction("Contenido.ArticleCategoryList.ListItems", "piworkflowCreateTasksFolder"); -$_cecRegistry->addChainFunction("Contenido.ArticleList.Columns", "piworkflowProcessArticleColumns"); -$_cecRegistry->addChainFunction("Contenido.ArticleList.Actions", "piworkflowProcessActions"); -$_cecRegistry->addChainFunction("Contenido.ArticleList.RenderColumn", "piworkflowRenderColumn"); -$_cecRegistry->addChainFunction("Contenido.ArticleList.RenderAction", "piworkflowRenderAction"); -$_cecRegistry->addChainFunction("Contenido.CategoryList.Columns", "piworkflowCategoryColumns"); -$_cecRegistry->addChainFunction("Contenido.CategoryList.RenderColumn", "piworkflowCategoryRenderColumn"); -$_cecRegistry->addChainFunction("Contenido.Frontend.AllowEdit", "piworkflowAllowArticleEdit"); - - -$cfg["tab"]["workflow"] = $cfg['sql']['sqlprefix'] . "_piwf_workflow"; -$cfg["tab"]["workflow_allocation"] = $cfg['sql']['sqlprefix'] . "_piwf_allocation"; -$cfg["tab"]["workflow_art_allocation"] = $cfg['sql']['sqlprefix'] . "_piwf_art_allocation"; -$cfg["tab"]["workflow_items"] = $cfg['sql']['sqlprefix'] . "_piwf_items"; -$cfg["tab"]["workflow_user_sequences"] = $cfg['sql']['sqlprefix'] . "_piwf_user_sequences"; -$cfg["tab"]["workflow_actions"] = $cfg['sql']['sqlprefix'] . "_piwf_actions"; \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/includes/functions.workflow.php b/conlite/plugins/cl-workflow/includes/functions.workflow.php deleted file mode 100644 index d66e7d3..0000000 --- a/conlite/plugins/cl-workflow/includes/functions.workflow.php +++ /dev/null @@ -1,871 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - - -cInclude("includes", "functions.con.php"); - -function getUsers($listid, $default) { - global $idclient, $cfg, $auth; - - $userlist = new Users; - $users = $userlist->getAccessibleUsers(explode(',', $auth->auth['perm'])); - $grouplist = new Groups; - $groups = $grouplist->getAccessibleGroups(explode(',', $auth->auth['perm'])); - - $tpl2 = new Template; - $tpl2->set('s', 'NAME', 'user' . $listid); - $tpl2->set('s', 'CLASS', 'text_small'); - $tpl2->set('s', 'OPTIONS', 'size=1'); - - $tpl2->set('d', 'VALUE', 0); - $tpl2->set('d', 'CAPTION', '--- ' . i18n("None", "workflow") . ' ---'); - if ($default == 0) { - $tpl2->set('d', 'SELECTED', 'SELECTED'); - } else { - $tpl2->set('d', 'SELECTED', ''); - } - $tpl2->next(); - - if (is_array($users)) { - - foreach ($users as $key => $value) { - - $tpl2->set('d', 'VALUE', $key); - $tpl2->set('d', 'CAPTION', $value["realname"] . " (" . $value["username"] . ")"); - - if ($default == $key) { - $tpl2->set('d', 'SELECTED', 'SELECTED'); - } else { - $tpl2->set('d', 'SELECTED', ''); - } - - $tpl2->next(); - } - } - - $tpl2->set('d', 'VALUE', '0'); - $tpl2->set('d', 'CAPTION', '------------------------------------'); - $tpl2->set('d', 'SELECTED', 'disabled'); - $tpl2->next(); - - if (is_array($groups)) { - - foreach ($groups as $key => $value) { - - $tpl2->set('d', 'VALUE', $key); - $tpl2->set('d', 'CAPTION', $value["groupname"]); - - if ($default == $key) { - $tpl2->set('d', 'SELECTED', 'SELECTED'); - } else { - $tpl2->set('d', 'SELECTED', ''); - } - - $tpl2->next(); - } - } - - return $tpl2->generate($cfg['path']['templates'] . $cfg['templates']['generic_select'], true); -} - -function isCurrentEditor($uid) { - global $auth, $cfg; - - /* Check if the UID is a group. If yes, check if we are in it */ - $user = new User; - if ($user->loadUserByUserID($uid) == false) { - $db2 = new DB_ConLite; - - /* Yes, it's a group. Let's try to load the group members! */ - $sql = "SELECT user_id FROM " - . $cfg["tab"]["groupmembers"] . " - WHERE group_id = '" . Contenido_Security::escapeDB($uid, $db2) . "'"; - - $db2->query($sql); - - while ($db2->next_record()) { - if ($db2->f("user_id") == $auth->auth["uid"]) { - return true; - } - } - } else { - if ($uid == $auth->auth["uid"]) { - return true; - } - } - - return false; -} - -function getActionSelect($idartlang, $idusersequence) { - global $cfg; - - $workflowActions = new WorkflowActions; - - $allActions = $workflowActions->getAvailableWorkflowActions(); - - $wfSelect = new Template; - $wfSelect->set('s', 'NAME', 'wfselect' . $idartlang); - $wfSelect->set('s', 'CLASS', 'text_medium'); - - $userSequence = new WorkflowUserSequence; - $userSequence->loadByPrimaryKey($idusersequence); - - $workflowItem = $userSequence->getWorkflowItem(); - - if ($workflowItem === false) { - return; - } - - $wfRights = $workflowItem->getStepRights(); - - $artAllocation = new WorkflowArtAllocations; - $artAllocation->select("idartlang = '$idartlang'"); - - if ($obj = $artAllocation->next()) { - $laststep = $obj->get("lastusersequence"); - } - - $bExistOption = false; - if ($laststep != $idusersequence) { - $wfSelect->set('d', 'VALUE', 'next'); - $wfSelect->set('d', 'CAPTION', i18n("Confirm", "workflow")); - $wfSelect->set('d', 'SELECTED', 'SELECTED'); - $wfSelect->next(); - $bExistOption = true; - } - - if ($wfRights["last"] == true) { - $wfSelect->set('d', 'VALUE', 'last'); - $wfSelect->set('d', 'CAPTION', i18n("Back to last editor", "workflow")); - $wfSelect->set('d', 'SELECTED', ''); - $wfSelect->next(); - $bExistOption = true; - } - - if ($wfRights["reject"] == true) { - $wfSelect->set('d', 'VALUE', 'reject'); - $wfSelect->set('d', 'CAPTION', i18n("Reject article", "workflow")); - $wfSelect->set('d', 'SELECTED', ''); - $wfSelect->next(); - $bExistOption = true; - } - - if ($wfRights["revise"] == true) { - $wfSelect->set('d', 'VALUE', 'revise'); - $wfSelect->set('d', 'CAPTION', i18n("Revise article", "workflow")); - $wfSelect->set('d', 'SELECTED', ''); - $wfSelect->next(); - $bExistOption = true; - } - - if ($bExistOption) - return ($wfSelect->generate($cfg['path']['templates'] . $cfg['templates']['generic_select'], true)); - else { - return false; - } -} - -#function for inserting todos in wokflow_art_allocation used, when a workflow is associated with a category in content->category - -function setUserSequence($idartlang, $defaultidworkflow) { - $wfaa = new WorkflowArtAllocations; - $wfaa->select("idartlang = '$idartlang'"); - $idusersequence = 0; - - if ($associatedUserSequence = $wfaa->next()) { - $idartallocation = $associatedUserSequence->get("idartallocation"); - $wfaa->delete($idartallocation); - } - - if ($defaultidworkflow != -1) { - $newObj = $wfaa->create($idartlang); - - if (!$newObj) { - /* Try to load */ - $newObj = new WorkflowArtAllocation; - - echo $wfaa->lasterror; - return false; - } - - /* Get the first idusersequence for the new item */ - $workflowItems = new WorkflowItems; - $workflowItems->select("idworkflow = '$defaultidworkflow' AND position = '1'"); - - if ($obj = $workflowItems->next()) { - $firstitem = $obj->get("idworkflowitem"); - } - - $workflowUserSequences = new WorkflowUserSequences; - $workflowUserSequences->select("idworkflowitem = '$firstitem' AND position = '1'"); - - if ($obj = $workflowUserSequences->next()) { - $firstIDUserSequence = $obj->get("idusersequence"); - } - - $newObj->set("idusersequence", $firstIDUserSequence); - $newObj->store(); - - $idusersequence = $newObj->get("idusersequence"); - $associatedUserSequence = $newObj; - } -} - -function getCurrentUserSequence($idartlang, $defaultidworkflow) { - $wfaa = new WorkflowArtAllocations; - $wfaa->select("idartlang = '$idartlang'"); - $idusersequence = 0; - - if ($associatedUserSequence = $wfaa->next()) { - $idusersequence = $associatedUserSequence->get("idusersequence"); - } - - if ($idusersequence == 0) { - if ($associatedUserSequence != false) { - $newObj = $associatedUserSequence; - } else { - $newObj = $wfaa->create($idartlang); - - if (!$newObj) { - /* Try to load */ - $newObj = new WorkflowArtAllocation; - - echo $wfaa->lasterror; - return false; - } - } - - /* Get the first idusersequence for the new item */ - $workflowItems = new WorkflowItems; - $workflowItems->select("idworkflow = '$defaultidworkflow' AND position = '1'"); - - if ($obj = $workflowItems->next()) { - $firstitem = $obj->get("idworkflowitem"); - } - - $workflowUserSequences = new WorkflowUserSequences; - $workflowUserSequences->select("idworkflowitem = '$firstitem' AND position = '1'"); - - if ($obj = $workflowUserSequences->next()) { - $firstIDUserSequence = $obj->get("idusersequence"); - } - - $newObj->set("idusersequence", $firstIDUserSequence); - $newObj->store(); - - $idusersequence = $newObj->get("idusersequence"); - $associatedUserSequence = $newObj; - } - - return ($idusersequence); -} - -function getLastWorkflowStatus($idartlang) { - $wfaa = new WorkflowArtAllocations; - - $wfaa->select("idartlang = '$idartlang'"); - - if ($associatedUserSequence = $wfaa->next()) { - $laststatus = $associatedUserSequence->get("laststatus"); - } else { - return false; - } - - switch ($laststatus) { - case "reject": - return (i18n("Rejected", "workflow")); - break; - case "revise": - return (i18n("Revised", "workflow")); - break; - case "last": - return (i18n("Last", "workflow")); - break; - case "confirm": - return (i18n("Confirmed", "workflow")); - break; - default: - return (i18n("None", "workflow")); - break; - } - return (""); -} - -function doWorkflowAction($idartlang, $action) { - global $cfg, $idcat; - - switch ($action) { - case "last": - $artAllocations = new WorkflowArtAllocations; - $artAllocations->select("idartlang = '$idartlang'"); - - if ($obj = $artAllocations->next()) { - $usersequence = new WorkflowUserSequence; - $usersequence->loadByPrimaryKey($obj->get("idusersequence")); - - $workflowitem = $usersequence->getWorkflowItem(); - - $idworkflow = $workflowitem->get("idworkflow"); - $newpos = $workflowitem->get("position") - 1; - - if ($newpos < 1) { - $newpos = 1; - } - - $workflowitems = new WorkflowItems; - $workflowitems->select("idworkflow = '$idworkflow' AND position = '" . Contenido_Security::escapeDB($newpos, NULL) . "'"); - - if ($nextObj = $workflowitems->next()) { - $userSequences = new WorkflowUserSequences; - $idworkflowitem = $nextObj->get("idworkflowitem"); - $userSequences->select("idworkflowitem = '$idworkflowitem'"); - - if ($nextSeqObj = $userSequences->next()) { - $obj->set("lastusersequence", $obj->get("idusersequence")); - $obj->set("idusersequence", $nextSeqObj->get("idusersequence")); - $obj->set("laststatus", "last"); - $obj->store(); - } - } - } - break; - case "next": - $artAllocations = new WorkflowArtAllocations; - $artAllocations->select("idartlang = '$idartlang'"); - - if ($obj = $artAllocations->next()) { - $usersequence = new WorkflowUserSequence; - $usersequence->loadByPrimaryKey($obj->get("idusersequence")); - - $workflowitem = $usersequence->getWorkflowItem(); - - $idworkflow = $workflowitem->get("idworkflow"); - $newpos = $workflowitem->get("position") + 1; - - $workflowitems = new WorkflowItems; - $workflowitems->select("idworkflow = '$idworkflow' AND position = '" . Contenido_Security::escapeDB($newpos, NULL) . "'"); - - if ($nextObj = $workflowitems->next()) { - $userSequences = new WorkflowUserSequences; - $idworkflowitem = $nextObj->get("idworkflowitem"); - $userSequences->select("idworkflowitem = '$idworkflowitem'"); - - if ($nextSeqObj = $userSequences->next()) { - $obj->set("lastusersequence", '10'); - $obj->set("idusersequence", $nextSeqObj->get("idusersequence")); - $obj->set("laststatus", "confirm"); - $obj->store(); - } - } else { - $workflowitems->select("idworkflow = '$idworkflow' AND position = '" . Contenido_Security::escapeDB($workflowitem->get("position"), NULL) . "'"); - if ($nextObj = $workflowitems->next()) { - $userSequences = new WorkflowUserSequences; - $idworkflowitem = $nextObj->get("idworkflowitem"); - $userSequences->select("idworkflowitem = '$idworkflowitem'"); - - if ($nextSeqObj = $userSequences->next()) { - $obj->set("lastusersequence", $obj->get("idusersequence")); - $obj->set("idusersequence", $nextSeqObj->get("idusersequence")); - $obj->set("laststatus", "confirm"); - $obj->store(); - } - } - } - } - break; - case "reject": - $artAllocations = new WorkflowArtAllocations; - $artAllocations->select("idartlang = '$idartlang'"); - - if ($obj = $artAllocations->next()) { - $usersequence = new WorkflowUserSequence; - $usersequence->loadByPrimaryKey($obj->get("idusersequence")); - - $workflowitem = $usersequence->getWorkflowItem(); - - $idworkflow = $workflowitem->get("idworkflow"); - $newpos = 1; - - $workflowitems = new WorkflowItems; - $workflowitems->select("idworkflow = '$idworkflow' AND position = '" . Contenido_Security::escapeDB($newpos, NULL) . "'"); - - if ($nextObj = $workflowitems->next()) { - $userSequences = new WorkflowUserSequences; - $idworkflowitem = $nextObj->get("idworkflowitem"); - $userSequences->select("idworkflowitem = '$idworkflowitem'"); - - if ($nextSeqObj = $userSequences->next()) { - $obj->set("lastusersequence", $obj->get("idusersequence")); - $obj->set("idusersequence", $nextSeqObj->get("idusersequence")); - $obj->set("laststatus", "reject"); - $obj->store(); - } - } - } - break; - - case "revise": - $db = new DB_ConLite; - $sql = "SELECT idart, idlang FROM " . $cfg["tab"]["art_lang"] . " WHERE idartlang = '" . Contenido_Security::escapeDB($idartlang, $db) . "'"; - $db->query($sql); - $db->next_record(); - $idart = $db->f("idart"); - $idlang = $db->f("idlang"); - - $newidart = conCopyArticle($idart, $idcat, "foo"); - - break; - default: - } -} - -function getWorkflowForUserSequence($usersequence) { - $usersequences = new WorkflowUserSequences; - $workflowitems = new WorkflowItems; - $usersequences->select("idusersequence = '$usersequence'"); - - if ($obj = $usersequences->next()) { - $idworkflowitem = $obj->get("idworkflowitem"); - } else { - return false; - } - - $workflowitems->select("idworkflowitem = '$idworkflowitem'"); - if ($obj = $workflowitems->next()) { - return $obj->get("idworkflow"); - } else { - return false; - } -} - -function workflowSelect($listid, $default, $idcat) { - global $idclient, $cfg, $frame, $area, $workflowworkflows, $client, $lang, $wfcache, $workflowSelectBox; - - $oSelectBox = new cHTMLSelectElement('workflow'); - $oSelectBox = $workflowSelectBox; - - $default = (int) $default; - $workflowSelectBox->updateAttributes(array("id" => "wfselect" . $idcat)); - $workflowSelectBox->updateAttributes(array("name" => "wfselect" . $idcat)); - $workflowSelectBox->setDefault($default); - - $sButton = ''; - - return $workflowSelectBox->render() . $sButton; -} - -function workflowInherit($idcat) { - global $idclient, $cfg, $frame, $area, $workflowworkflows, $sess; - $sUrl = $sess->url("main.php?area=$area&frame=$frame&modidcat=$idcat&action=workflow_inherit_down"); - $sButton = ''; - return $sButton; -} - -/* Helper functions */ - -function getWorkflowForCat($idcat) { - global $lang, $cfg; - - $idcatlang = getCatLang($idcat, $lang); - $workflows = new WorkflowAllocations; - $workflows->select("idcatlang = '$idcatlang'"); - if ($obj = $workflows->next()) { - /* Sanity: Check if the workflow still exists */ - $workflow = new Workflow; - - $res = $workflow->loadByPrimaryKey($obj->get("idworkflow")); - - if ($res == false) { - return 0; - } else { - return $obj->get("idworkflow"); - } - } -} - -function getCatLang($idcat, $idlang) { - global $lang, $cfg; - $db = new DB_ConLite; - - /* Get the idcatlang */ - $sql = "SELECT idcatlang FROM " - . $cfg["tab"]["cat_lang"] . - " WHERE idlang = '" . Contenido_Security::escapeDB($idlang, $db) . "' AND - idcat = '" . Contenido_Security::escapeDB($idcat, $db) . "'"; - - $db->query($sql); - - if ($db->next_record()) { - return ($db->f("idcatlang")); - } -} - -function prepareWorkflowItems() { - - global $action, $lang, $modidcat, $workflowSelectBox, $workflowworkflows, $client, $tpl, $cfg; - - $workflowworkflows = new Workflows; - - if ($action === 'workflow_inherit_down') { - $tmp = strDeeperCategoriesArray($modidcat); - $asworkflow = getWorkflowForCat($modidcat); - - $wfa = new WorkflowAllocations; - - foreach ($tmp as $tmp_cat) { - $idcatlang = getCatLang($tmp_cat, $lang); - - if ($asworkflow == 0) { - $wfa->select("idcatlang = '$idcatlang'"); - - if ($item = $wfa->next()) { - $wfa->delete($item->get("idallocation")); - # delete user sequences for listing in tasklist for each included article - $oArticles = new ArticleCollection(array('idcat' => $idcatlang, 'start' => true, 'offline' => true)); - while ($oArticle = $oArticles->nextArticle()) { - setUserSequence($oArticle->getField('idartlang'), -1); - } - } - } else { - $wfa->select("idcatlang = '$idcatlang'"); - - if ($item = $wfa->next()) { - $item->setWorkflow($asworkflow); - $item->store(); - } else { - $wfa->create($asworkflow, $idcatlang); - # generate user sequences for listing in tasklist for each included article - $oArticles = new ArticleCollection(array('idcat' => $tmp_cat, 'start' => true, 'offline' => true)); - while ($oArticle = $oArticles->nextArticle()) { - setUserSequence($oArticle->getField('idartlang'), $asworkflow); - } - } - } - } - } - if ($action == "workflow_cat_assign") { - $seltpl = "wfselect" . $modidcat; - - $wfa = new WorkflowAllocations; - $idcatlang = getCatLang($modidcat, $lang); - - #associate workflow with category - if ($GLOBALS[$seltpl] != 0) { - $wfa->select("idcatlang = '$idcatlang'"); - if ($item = $wfa->next()) { - $item->setWorkflow($GLOBALS[$seltpl]); - $item->store(); - } else { - $wfa->create($GLOBALS[$seltpl], $idcatlang); - } - - # generate user sequences for listing in tasklist for each included article - $oArticles = new ArticleCollection(array('idcat' => $modidcat, 'start' => true, 'offline' => true)); - while ($oArticle = $oArticles->nextArticle()) { - setUserSequence($oArticle->getField('idartlang'), $GLOBALS[$seltpl]); - } - #unlink workflow with category - } else { - $wfa->select("idcatlang = '$idcatlang'"); - - if ($item = $wfa->next()) { - $alloc = $item->get("idallocation"); - } - $wfa->delete($alloc); - - # delete user sequences for listing in tasklist for each included article - $oArticles = new ArticleCollection(array('idcat' => $modidcat, 'start' => true, 'offline' => true)); - while ($oArticle = $oArticles->nextArticle()) { - setUserSequence($oArticle->getField('idartlang'), -1); - } - } - } - - $workflowSelectBox = new cHTMLSelectElement("foo"); - $workflowSelectBox->setClass("text_medium"); - $workflowworkflows->select("idclient = '$client' AND idlang = '" . Contenido_Security::escapeDB($lang, null) . "'"); - - $workflowOption = new cHTMLOptionElement("--- " . i18n("None", "workflow") . " ---", 0); - $workflowSelectBox->addOptionElement(0, $workflowOption); - - while ($workflow = $workflowworkflows->next()) { - $workflowOption = new cHTMLOptionElement($workflow->get("name"), $workflow->get("idworkflow")); - $workflowSelectBox->addOptionElement($workflow->get("idworkflow"), $workflowOption); - } - - $workflowSelectBox->updateAttributes(array("id" => "wfselect{IDCAT}")); - $workflowSelectBox->updateAttributes(array("name" => "wfselect{IDCAT}")); - - $tpl->set('s', 'PLUGIN_WORKFLOW', $workflowSelectBox->render() . ''); - $tpl->set('s', 'PLUGIN_WORKFLOW_TRANSLATION', i18n("Inherit workflow down", "workflow")); -} - -function piworkflowCategoryRenderColumn($idcat, $type) { - - switch ($type) { - case "workflow": - $value = workflowInherit($idcat) . ''; - break; - } - - return ($value); -} - -function piworkflowCategoryColumns($array) { - prepareWorkflowItems(); - $myarray = array("workflow" => i18n("Workflow", "workflow")); - - return ($myarray); -} - -function piworkflowProcessActions($array) { - global $idcat; - $defaultidworkflow = getWorkflowForCat($idcat); - - if ($defaultidworkflow != 0) { - $narray = array("todo", - "wfartconf", - "wftplconf", - "wfonline", - "wflocked", - "duplicate", - "delete", - "usetime"); - } else { - $narray = $array; - } - - return ($narray); -} - -function piworkflowRenderAction($idcat, $idart, $idartlang, $type) { - global $area, $frame, $idtpl, $cfg, $alttitle, $tmp_articletitle; - global $tmp_artconf, $onlinelink, $lockedlink, $tplconf_link; - - $defaultidworkflow = getWorkflowForCat($idcat); - - $idusersequence = getCurrentUserSequence($idartlang, $defaultidworkflow); - $associatedUserSequence = new WorkflowUserSequence; - $associatedUserSequence->loadByPrimaryKey($idusersequence); - - $currentEditor = $associatedUserSequence->get("iduser"); - $workflowItem = $associatedUserSequence->getWorkflowItem(); - - if (isCurrentEditor($associatedUserSequence->get("iduser"))) { - /* Query rights for this user */ - $wfRights = $workflowItem->getStepRights(); - $mayEdit = true; - } else { - $wfRights = ""; - $mayEdit = false; - } - - switch ($type) { - case "wfartconf": - if ($wfRights["propertyedit"] == true) { - return $tmp_artconf; - } - break; - case "wfonline": - if ($wfRights["publish"] == true) { - return $onlinelink; - } - break; - case "wflocked": - if ($wfRights["lock"] == true) { - return $lockedlink; - } - break; - case "wftplconf": - if ($wfRights["templateedit"] == true) { - return $tplconf_link; - } - default: - break; - } - - return ""; -} - -function piworkflowProcessArticleColumns($array) { - global $idcat, $action, $modidartlang; - - if ($action == "workflow_do_action") { - $selectedAction = "wfselect" . $modidartlang; - doWorkflowAction($modidartlang, $GLOBALS[$selectedAction]); - } - - $defaultidworkflow = getWorkflowForCat($idcat); - - if ($defaultidworkflow != 0) { - $narray = array(); - $bInserted = false; - foreach ($array as $sKey => $sValue) { - $narray[$sKey] = $sValue; - if ($sKey == 'title' && !$bInserted) { - $narray["wftitle"] = $array["title"]; - $narray["wfstep"] = i18n("Workflow Step", "cl-workflow"); - $narray["wfaction"] = i18n("Workflow Action", "cl-workflow"); - $narray["wfeditor"] = i18n("Workflow Editor", "cl-workflow"); - $narray["wflaststatus"] = i18n("Last status", "cl-workflow"); - $bInserted = true; - } - } - unset($narray['title']); - unset($narray['changeddate']); - unset($narray['publisheddate']); - unset($narray['sortorder']); - } else { - $narray = $array; - } - - return ($narray); -} - -function piworkflowAllowArticleEdit($idlang, $idcat, $idart, $user) { - $defaultidworkflow = getWorkflowForCat($idcat); - - if ($defaultidworkflow == 0) { - return true; - } - - $idartlang = getArtLang($idart, $idlang); - $idusersequence = getCurrentUserSequence($idartlang, $defaultidworkflow); - $associatedUserSequence = new WorkflowUserSequence; - $associatedUserSequence->loadByPrimaryKey($idusersequence); - - $currentEditor = $associatedUserSequence->get("iduser"); - - $workflowItem = $associatedUserSequence->getWorkflowItem(); - - if (isCurrentEditor($associatedUserSequence->get("iduser"))) { - $wfRights = $workflowItem->getStepRights(); - $mayEdit = true; - } else { - $wfRights = ""; - $mayEdit = false; - } - - if ($wfRights["articleedit"] == true) { - return true; - } else { - return false; - } -} - -function piworkflowRenderColumn($idcat, $idart, $idartlang, $column) { - global $area, $frame, $idtpl, $cfg, $alttitle, $tmp_articletitle; - $defaultidworkflow = getWorkflowForCat($idcat); - - $idusersequence = getCurrentUserSequence($idartlang, $defaultidworkflow); - $associatedUserSequence = new WorkflowUserSequence; - $associatedUserSequence->loadByPrimaryKey($idusersequence); - - $currentEditor = $associatedUserSequence->get("iduser"); - - $workflowItem = $associatedUserSequence->getWorkflowItem(); - - if (isCurrentEditor($associatedUserSequence->get("iduser"))) { - $wfRights = $workflowItem->getStepRights(); - $mayEdit = true; - } else { - $wfRights = ""; - $mayEdit = false; - } - - switch ($column) { - case "wftitle": - if ($wfRights["articleedit"] == true) { - $mtitle = $tmp_articletitle; - } else { - $mtitle = strip_tags($tmp_articletitle); - } - return ($mtitle); - case "wfstep": - if ($workflowItem === false) { - return "nobody"; - } - - return ($workflowItem->get("position") . ".) " . $workflowItem->get("name")); - case "wfeditor": - $sEditor = getGroupOrUserName($currentEditor); - if (!$sEditor) { - $sEditor = "nobody"; - } - return $sEditor; - case "wfaction": - $defaultidworkflow = getWorkflowForCat($idcat); - $idusersequence = getCurrentUserSequence($idartlang, $defaultidworkflow); - - $sActionSelect = getActionSelect($idartlang, $idusersequence); - if (!$sActionSelect) { - $mayEdit = false; - } - - $form = new UI_Form("wfaction" . $idartlang, "main.php", "get"); - $form->setVar("area", $area); - $form->setVar("action", "workflow_do_action"); - $form->setVar("frame", $frame); - $form->setVar("idcat", $idcat); - $form->setVar("modidartlang", $idartlang); - $form->setVar("idtpl", $idtpl); - $form->add("select", '
    ' . $sActionSelect . ''); - $form->add("button", '
    '); - - if ($mayEdit == true) { - return ($form->render(true)); - } else { - return '--- ' . i18n("None") . ' ---'; - } - - case "wflaststatus": - $sStatus = getLastWorkflowStatus($idartlang); - if (!$sStatus) { - $sStatus = '--- ' . i18n("None") . ' ---'; - } - return $sStatus; - } -} - -function piworkflowCreateTasksFolder() { - global $sess, $cfg; - - $item = array(); - /* Create workflow tasks folder */ - $tmp_mstr = '%s'; - - $mstr = sprintf($tmp_mstr, 'right_bottom', - $sess->url("main.php?area=con_workflow&frame=4"), - 'right_top', - $sess->url("main.php?area=con_workflow&frame=3"), - 'Workflow / Todo'); - - $item["image"] = ''; - $item["title"] = $mstr; - - - return ($item); -} \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/includes/include.workflow_edit.php b/conlite/plugins/cl-workflow/includes/include.workflow_edit.php deleted file mode 100644 index 6adf0b9..0000000 --- a/conlite/plugins/cl-workflow/includes/include.workflow_edit.php +++ /dev/null @@ -1,109 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * - * {@internal - * created 2003-05-20 - * - * $Id: include.workflow_edit.php 128 2019-07-03 11:58:28Z oldperl $ - * }} - * - */ - -if(!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - - -plugin_include('cl-workflow', 'classes/class.workflow.php'); - -$form = new UI_Table_Form("workflow_edit"); -$userclass = new User; -$workflows = new Workflows; - -$workflow = $workflows->loadItem($idworkflow); - -if ($action == "workflow_save") -{ - if ($idworkflow == "-1") - { - $workflow = $workflows->create(); - } - - $workflow->set("name",clHtmlSpecialChars($wfname)); - $workflow->set("description",clHtmlSpecialChars($wfdescription)); - $idworkflow = $workflow->get("idworkflow"); - $workflow->store(); -} - -if ((int) $idworkflow == 0) { - $idworkflow = $_GET['idworkflow']; -} - -if ($idworkflow) { - $sReloadScript = ""; -} else { - $sReloadScript = ''; -} - - -//function formGenerateField ($type, $name, $initvalue, $width, $maxlen) -$form->setVar("area",$area); -$form->setVar("action","workflow_save"); -$form->setVar("idworkflow", $idworkflow); -$form->setVar("frame", $frame); - -if ($workflow->virgin) -{ - $name = i18n("New Workflow", "cl-workflow"); - $header = i18n("Create new workflow", "cl-workflow"); -} else { - $header = i18n("Edit workflow", "cl-workflow"); - $description = $workflow->get("description"); - $name = $workflow->get("name"); - $created = $workflow->get("created"); - $author = $userclass->getRealname($workflow->get("idauthor")); -} - -$form->addHeader($header); -$form->add(i18n("Workflow name", "cl-workflow"),formGenerateField("text","wfname",$name,40,255)); -$form->add(i18n("Description", "cl-workflow"),formGenerateField("textbox","wfdescription",$description,50,10)); -$form->add(i18n("Author", "cl-workflow"),$author); -$form->add(i18n("Created", "cl-workflow"),$created); - -$page = new UI_Page; -$page->setContent($form->render(true)); -$page->addScript('reload', $sReloadScript); - -$page->render(); - - -?> \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/includes/include.workflow_left_top.php b/conlite/plugins/cl-workflow/includes/include.workflow_left_top.php deleted file mode 100644 index 394f706..0000000 --- a/conlite/plugins/cl-workflow/includes/include.workflow_left_top.php +++ /dev/null @@ -1,48 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * - * {@internal - * created 2003-07-18 - * - * $Id: include.workflow_left_top.php 128 2019-07-03 11:58:28Z oldperl $ - * }} - * - */ - -if(!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - - -$create = new Link; -$create->setMultiLink("workflow","","workflow_common","workflow_create"); -//$create->setCLink("workflow_common",4,"workflow_create"); -$create->setContent(i18n("Create workflow", "cl-workflow")); -$create->setCustom("idworkflow","-1"); - -$aAttributes = array(); -$aAttributes['class'] = "addfunction"; -$create->updateAttributes($aAttributes); - -$ui = new UI_Left_Top; -$ui->setLink($create); -$ui->render(); - -?> \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/includes/include.workflow_list.php b/conlite/plugins/cl-workflow/includes/include.workflow_list.php deleted file mode 100644 index fdb4332..0000000 --- a/conlite/plugins/cl-workflow/includes/include.workflow_list.php +++ /dev/null @@ -1,122 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * - * {@internal - * created 2006-01-13 - * - * $Id: include.workflow_list.php 128 2019-07-03 11:58:28Z oldperl $ - * }} - * - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - - -$iIdMarked = (int) $_GET['idworkflow']; - -$workflows = new Workflows; -$sScript = ''; -if ($action == "workflow_delete") { - $workflows->delete($idworkflow); - $sScript = ''; -} - -$ui = new UI_Menu; -$workflows->select("idclient = '$client' AND idlang = '$lang'"); - -while ($workflow = $workflows->next()) { - $wfid = $workflow->getField("idworkflow"); - $wfname = $workflow->getField("name"); - $wfdescription = $workflow->getField("description"); - - /* Create the link to show/edit the workflow */ - $link = new Link; - $link->setMultiLink("workflow", "", "workflow_common", "workflow_show"); - $link->setAlt($wfdescription); - $link->setCustom("idworkflow", $wfid); - - $delTitle = i18n("Delete workflow", "cl-workflow"); - $delDescr = sprintf(i18n("Do you really want to delete the following workflow:

    %s
    ", "cl-workflow"), $wfname); - $delete = '' . $delTitle . ''; - - $ui->setTitle($wfid, $wfname); - $ui->setLink($wfid, $link); - - $ui->setActions($wfid, 'delete', $delete); - - if ($wfid == $iIdMarked) { - $ui->setExtra($wfid, 'id="marked" '); - } -} -$content = $ui->render(false); - -$delScript = ' - '; - -$sInitRowMark = ""; - -$msgboxInclude = ' '; -$page = new UI_Page; -$page->addScript('include', $msgboxInclude); -$page->addScript('del', $delScript); -$page->addScript('refresh', $sScript); -$page->setMargin(0); -$page->setContent($content . $sInitRowMark); -$page->render(); \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/includes/include.workflow_steps.php b/conlite/plugins/cl-workflow/includes/include.workflow_steps.php deleted file mode 100644 index 51c39f4..0000000 --- a/conlite/plugins/cl-workflow/includes/include.workflow_steps.php +++ /dev/null @@ -1,397 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * - * @modified 2008-12-05 Andreas Lindner, make select box values for time unit selection language independent - - * {@internal - * created - * - * $Id: include.workflow_steps.php 128 2019-07-03 11:58:28Z oldperl $: - * }} - * - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -cInclude("includes", "functions.encoding.php"); - -$iIdMarked = (int) $_GET['idworkflowitem']; - -$availableWorkflowActions = WorkflowActions :: getAvailableWorkflowActions(); - -$sCurrentEncoding = getEncodingByLanguage($db, $lang, $cfg); - -if (clHtmlEntities($adduser, ENT_COMPAT, $sCurrentEncoding) == i18n("Add User", "cl-workflow")) { - $action = "workflow_create_user"; -} - -/* Function: Move step up */ -if ($action == "workflow_step_up") { - $workflowitems = new WorkflowItems; - $workflowitems->swap($idworkflow, $position, $position - 1); -} - -/* Function: Move step down */ -if ($action == "workflow_step_down") { - $workflowitems = new WorkflowItems; - $workflowitems->swap($idworkflow, $position, $position + 1); -} - -/* Function: Move user up */ -if ($action == "workflow_user_up") { - $workflowitems = new WorkflowUserSequences; - $workflowitems->swap($idworkflowitem, $position, $position - 1); -} - -/* Function: Move step down */ -if ($action == "workflow_user_down") { - $workflowitems = new WorkflowUserSequences; - $workflowitems->swap($idworkflowitem, $position, $position + 1); -} - -/* Function: Create new step */ -if ($action == "workflow_create_step") { - $workflowitems = new WorkflowItems; - $item = $workflowitems->create($idworkflow); - $item->set("name", i18n("New Workflow Step", "cl-workflow")); - $item->store(); - $idworkflowitem = $item->get("idworkflowitem"); -} - -/* Function: Delete step */ -if ($action == "workflow_step_delete") { - $workflowitems = new WorkflowItems; - $workflowitems->delete($idworkflowitem); -} - -/* Function: Add user */ -if ($action == "workflow_create_user") { - $workflowusers = new WorkflowUserSequences; - $new = $workflowusers->create($idworkflowitem); -} - -/* Function: Remove user */ -if ($action == "workflow_user_delete") { - $workflowusers = new WorkflowUserSequences; - $workflowusers->delete($idusersequence); -} - -/* Function: Save step */ -if ($action == "workflow_save_step" || $action == "workflow_create_user") { - $workflowactions = new WorkflowActions; - - foreach ($availableWorkflowActions as $key => $value) { - if ($wfactions[$key] == 1) { - $workflowactions->set($idworkflowitem, $key); - } else { - $workflowactions->remove($idworkflowitem, $key); - } - } - - $workflowitem = new WorkflowItem; - $workflowitem->loadByPrimaryKey($idworkflowitem); - $workflowitem->setField('idtask', $wftaskselect); - $workflowitem->setField('name', $wfstepname); - $workflowitem->setField('description', $wfstepdescription); - $workflowitem->store(); - - $usersequences = new WorkflowUserSequences; - $usersequences->select("idworkflowitem = '$idworkflowitem'"); - - while ($usersequence = $usersequences->next()) { - $wftime = "time" . $usersequence->get("idusersequence"); - $wfuser = "user" . $usersequence->get("idusersequence"); - - $wftimelimit = "wftimelimit" . $usersequence->get("idusersequence"); - $usersequence->set("timeunit", $$wftime); - $usersequence->set("iduser", $$wfuser); - $usersequence->set("timelimit", $$wftimelimit); - $usersequence->set("emailnoti", $wfemailnoti[$usersequence->get("idusersequence")]); - $usersequence->set("escalationnoti", $wfescalnoti[$usersequence->get("idusersequence")]); - $usersequence->store(); - } -} - -function getTimeUnitSelector($listid, $default) { - global $idclient, $cfg, $auth; - - $timeunits = array(); - $timeunits['Seconds'] = i18n("Seconds", "cl-workflow"); - $timeunits['Minutes'] = i18n("Minutes", "cl-workflow"); - $timeunits['Hours'] = i18n("Hours", "cl-workflow"); - $timeunits['Days'] = i18n("Days", "cl-workflow"); - $timeunits['Weeks'] = i18n("Weeks", "cl-workflow"); - $timeunits['Months'] = i18n("Months", "cl-workflow"); - $timeunits['Years'] = i18n("Years", "cl-workflow"); - - $tpl2 = new Template; - $tpl2->set('s', 'NAME', 'time' . $listid); - $tpl2->set('s', 'CLASS', 'text_small'); - $tpl2->set('s', 'OPTIONS', 'size=1'); - - foreach ($timeunits as $key => $value) { - - $tpl2->set('d', 'VALUE', $key); - $tpl2->set('d', 'CAPTION', $value); - - if ($default == $key) { - $tpl2->set('d', 'SELECTED', 'SELECTED'); - } else { - $tpl2->set('d', 'SELECTED', ''); - } - - $tpl2->next(); - } - - return $tpl2->generate($cfg['path']['templates'] . $cfg['templates']['generic_select'], true); -} - -function getWorkflowList() { - global $idworkflow, $cfg; - - $ui = new UI_Menu; - $workflowitems = new WorkflowItems; - - $workflowitems->select("idworkflow = '$idworkflow'", "", "position ASC"); - - while ($workflowitem = $workflowitems->next()) { - $pos = $workflowitem->get("position"); - $name = $workflowitem->get("name"); - $id = $workflowitem->get("idworkflowitem"); - - $edititem = new Link; - $edititem->setCLink("workflow_steps", 4, "workflow_step_edit"); - $edititem->setCustom("idworkflowitem", $id); - $edititem->setCustom("idworkflow", $idworkflow); - - - $moveup = new Link; - $moveup->setCLink("workflow_steps", 4, "workflow_step_up"); - $moveup->setCustom("idworkflowitem", $id); - $moveup->setCustom("idworkflow", $idworkflow); - $moveup->setCustom("position", $pos); - $moveup->setAlt(i18n("Move step up", "cl-workflow")); - $moveup->setContent(''); - - $movedown = new Link; - $movedown->setCLink("workflow_steps", 4, "workflow_step_down"); - $movedown->setCustom("idworkflowitem", $id); - $movedown->setCustom("idworkflow", $idworkflow); - $movedown->setCustom("position", $pos); - $movedown->setAlt(i18n("Move step down", "cl-workflow")); - $movedown->setContent(''); - - - - $deletestep = new Link; - $deletestep->setCLink("workflow_steps", 4, "workflow_step_delete"); - $deletestep->setCustom("idworkflowitem", $id); - $deletestep->setCustom("idworkflow", $idworkflow); - $deletestep->setCustom("position", $pos); - $deletestep->setAlt(i18n("Delete step", "cl-workflow")); - $deletestep->setContent(''); - - $ui->setTitle($id, "$pos. $name"); - $ui->setLink($id, $edititem); - - if ($pos > 1) { - $ui->setActions($id, "moveup", $moveup->render()); - } else { - $ui->setActions($id, "moveup", ''); - } - - if ($pos < $workflowitems->count()) { - $ui->setActions($id, "movedown", $movedown->render()); - } else { - $ui->setActions($id, "movedown", ''); - } - - $ui->setActions($id, "delete", $deletestep->render()); - - if ($_GET['idworkflowitem'] == $id) { - $ui->setExtra($id, 'id="marked" '); - } - } - - - $content = $ui->render(false); - - return ($content); -} - -function createNewWorkflow() { - global $idworkflow, $cfg; - $content = ""; - $ui = new UI_Menu; - $rowmark = false; - - $createstep = new Link; - $createstep->setCLink("workflow_steps", 4, "workflow_create_step"); - $createstep->setCustom("idworkflow", $idworkflow); - - #$ui->setLink("spacer", NULL); - $ui->setTitle("create", i18n("Create new step", "cl-workflow")); - $ui->setImage("create", $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/workflow_step_new.gif"); - $ui->setLink("create", $createstep); - $ui->setRowmark($rowmark); - $ui->setBgColor("create", $cfg['color']['table_header']); - - $content = $ui->render(false); - return $content; -} - -function editWorkflowStep($idworkflowitem) { - global $area, $idworkflow, $idworkflowitem, $frame, $availableWorkflowActions; - global $notification; - $workflowitem = new WorkflowItem; - - if ($workflowitem->loadByPrimaryKey($idworkflowitem) == false) { - return " "; - } - - $workflowactions = new WorkflowActions; - - $stepname = $workflowitem->get("name"); - $stepdescription = $workflowitem->get("description"); - $id = $workflowitem->get("idworkflowitem"); - $task = $workflowitem->get("idtask"); - - $form = new UI_Table_Form("workflow_edit"); - - $form->setVar("area", $area); - $form->setVar("action", "workflow_save_step"); - $form->setVar("idworkflow", $idworkflow); - $form->setVar("idworkflowitem", $idworkflowitem); - $form->setVar("frame", $frame); - - $form->addHeader(i18n("Edit workflow step", "cl-workflow")); - $form->add(i18n("Step name", "cl-workflow"), formGenerateField("text", "wfstepname", $stepname, 40, 255)); - $form->add(i18n("Step description", "cl-workflow"), formGenerateField("textbox", "wfstepdescription", $stepdescription, 60, 10)); - - foreach ($availableWorkflowActions as $key => $value) { - $actions .= formGenerateCheckbox("wfactions[" . $key . "]", "1", $workflowactions->get($id, $key)) . '' . "
    "; - } - - $form->add(i18n("Actions", "cl-workflow"), $actions); - $form->add(i18n("Assigned users", "cl-workflow"), getWorkflowUsers($idworkflowitem)); - - return $form->render(true); -} - -function getWorkflowUsers($idworkflowitem) { - global $idworkflow, $cfg; - - $ui = new UI_Menu; - $workflowusers = new WorkflowUserSequences; - - $workflowusers->select("idworkflowitem = '$idworkflowitem'", "", "position ASC"); - - while ($workflowitem = $workflowusers->next()) { - $pos = $workflowitem->get("position"); - $iduser = $workflowitem->get("iduser"); - $timelimit = $workflowitem->get("timelimit"); - $timeunit = $workflowitem->get("timeunit"); - $email = $workflowitem->get("emailnoti"); - $escalation = $workflowitem->get("escalationnoti"); - $timeunit = $workflowitem->get("timeunit"); - $id = $workflowitem->get("idusersequence"); - - $moveup = new Link; - $moveup->setCLink("workflow_steps", 4, "workflow_user_up"); - $moveup->setCustom("idworkflowitem", $idworkflowitem); - $moveup->setCustom("idworkflow", $idworkflow); - $moveup->setCustom("position", $pos); - $moveup->setAlt(i18n("Move user up", "cl-workflow")); - #$moveup->setContent(''); - $moveup->setContent(''); - - $movedown = new Link; - $movedown->setCLink("workflow_steps", 4, "workflow_user_down"); - $movedown->setCustom("idworkflowitem", $idworkflowitem); - $movedown->setCustom("idworkflow", $idworkflow); - $movedown->setCustom("position", $pos); - $movedown->setAlt(i18n("Move user down", "cl-workflow")); - $movedown->setContent(''); - - - - $deletestep = new Link; - $deletestep->setCLink("workflow_steps", 4, "workflow_user_delete"); - $deletestep->setCustom("idworkflowitem", $idworkflowitem); - $deletestep->setCustom("idworkflow", $idworkflow); - $deletestep->setCustom("position", $pos); - $deletestep->setCustom("idusersequence", $id); - $deletestep->setAlt(i18n("Delete user", "cl-workflow")); - $deletestep->setContent(''); - - $title = "$pos. " . getUsers($id, $iduser); - $title .= formGenerateField("text", "wftimelimit" . $id, $timelimit, 3, 6); - $title .= getTimeUnitSelector($id, $timeunit); - $altmail = i18n("Notify this user via E-Mail", "cl-workflow"); - $altnoti = i18n("Escalate to this user via E-Mail", "cl-workflow"); - $title .= formGenerateCheckbox("wfemailnoti[" . $id . "]", "1", $email) . ''; - $title .= formGenerateCheckbox("wfescalnoti[" . $id . "]", "1", $escalation) . ''; - - $ui->setTitle($id, $title); - $ui->setLink($id, NULL); - - if ($pos > 1) { - $ui->setActions($id, "moveup", $moveup->render()); - } else { - $ui->setActions($id, "moveup", ''); - } - - if ($pos < $workflowusers->count()) { - $ui->setActions($id, "movedown", $movedown->render()); - } else { - $ui->setActions($id, "movedown", ''); - } - - $ui->setActions($id, "delete", $deletestep->render()); - - $ui->setImage($id, $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/workflow_user.gif"); - } - - $createstep = new Link; - $createstep->setCLink("workflow_steps", 4, "workflow_create_user"); - $createstep->setCustom("idworkflow", $idworkflow); - $createstep->setCustom("idworkflowitem", $idworkflowitem); - - $ui->setLink("spacer", NULL); - - $ui->setTitle("create", ''); - $ui->setLink("create", NULL); - $content = $ui->render(false); - - return ($content); -} - -$tpl = new Template; -$tpl->set('s', 'NEW', createNewWorkflow()); -$tpl->set('s', 'STEPS', getWorkflowList()); -$tpl->set('s', 'EDITSTEP', editWorkflowStep($idworkflowitem)); -$tpl->set('s', 'BORDERCOLOR', $cfg["color"]["table_border"]); -$frame = $tpl->generate($cfg["path"]["contenido"] . $cfg["path"]["plugins"] . "workflow/templates/template.workflow_steps.html", true); - -$page = new UI_Page; -$page->setContent($frame); -$page->render(); diff --git a/conlite/plugins/cl-workflow/includes/include.workflow_subnav.php b/conlite/plugins/cl-workflow/includes/include.workflow_subnav.php deleted file mode 100644 index 6b70c1a..0000000 --- a/conlite/plugins/cl-workflow/includes/include.workflow_subnav.php +++ /dev/null @@ -1,107 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * - * {@internal - * created 2003-05-20 - * modified 2010-05-20, Murat Purc, removed request check during processing ticket [#CON-307] - * - * $Id: include.workflow_subnav.php 128 2019-07-03 11:58:28Z oldperl $ - * }} - * - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - - -$nav = new Contenido_Navigation; - -$parentarea = getParentAreaID($area); -$sql = "SELECT - idarea - FROM - " . $cfg["tab"]["area"] . " AS a - WHERE - a.name = '" . Contenido_Security::escapeDB($parentarea, $db) . "' OR - a.parent_id = '" . Contenido_Security::escapeDB($parentarea, $db) . "' - ORDER BY - idarea"; - -$db->query($sql); - -$in_str = ""; - -while ($db->next_record()) { - $in_str .= $db->f('idarea') . ','; -} - -$len = strlen($in_str) - 1; -$in_str = substr($in_str, 0, $len); -$in_str = '(' . $in_str . ')'; - -$sql = "SELECT - b.location AS location, - a.name AS name - FROM - " . $cfg["tab"]["area"] . " AS a, - " . $cfg["tab"]["nav_sub"] . " AS b - WHERE - b.idarea IN " . Contenido_Security::escapeDB($in_str, $db) . " AND - b.idarea = a.idarea AND - b.level = 1 - ORDER BY - b.idnavs"; - -$db->query($sql); - -while ($db->next_record()) { - - # Extract caption from - # the xml language file - $caption = $nav->getName($db->f("location")); - - $tmp_area = $db->f("name"); - - # Set template data - $tpl->set("d", "ID", 'c_' . $tpl->dyn_cnt); - $tpl->set("d", "CLASS", ''); - $tpl->set("d", "OPTIONS", ''); - $tpl->set("d", "CAPTION", '' . $caption . ''); - if ($area == $tmp_area) { - $tpl->set('s', 'DEFAULT', markSubMenuItem($tpl->dyn_cnt, true)); - } - $tpl->next(); -} - -$tpl->set('s', 'COLSPAN', ($tpl->dyn_cnt * 2) + 2); -$tpl->set('s', 'IDCAT', $idcat); -$tpl->set('s', 'SESSID', $sess->id); -$tpl->set('s', 'CLIENT', $client); -$tpl->set('s', 'LANG', $lang); - - -# Generate the third -# navigation layer -if ($idworkflow <= 0) { - $tpl->generate($cfg["path"]["templates"] . $cfg["templates"]["subnav_blank"]); -} else { - $tpl->generate($cfg["path"]["templates"] . $cfg["templates"]["subnav"]); -} \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/includes/include.workflow_tasks.php b/conlite/plugins/cl-workflow/includes/include.workflow_tasks.php deleted file mode 100644 index 3b450f9..0000000 --- a/conlite/plugins/cl-workflow/includes/include.workflow_tasks.php +++ /dev/null @@ -1,250 +0,0 @@ - - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org - * - * {@internal - * created 2003-07-30 - * - * $Id: include.workflow_tasks.php 128 2019-07-03 11:58:28Z oldperl $ - * }} - * - */ -if (!defined('CON_FRAMEWORK')) { - die('Illegal call'); -} - -plugin_include('workflow', 'includes/functions.workflow.php'); - -global $sess; -$sSession = $sess->id; - -$wfa = new WorkflowArtAllocations; -$wfu = new WorkflowUserSequences; -$users = new User; -$db2 = new DB_ConLite; - -ob_start(); - -if ($usershow == "") { - $usershow = $auth->auth["uid"]; -} - -if (!$perm->have_perm_area_action($area, "workflow_task_user_select")) { - $usershow = $auth->auth["uid"]; -} - -if ($action == "workflow_do_action") { - $selectedAction = "wfselect" . $modidartlang; - doWorkflowAction($modidartlang, $GLOBALS[$selectedAction]); -} - -$wfa->select(); - -while ($wfaitem = $wfa->next()) { - $wfaid = $wfaitem->get("idartallocation"); - $usersequence[$wfaid] = $wfaitem->get("idusersequence"); - $lastusersequence[$wfaid] = $wfaitem->get("lastusersequence"); - $article[$wfaid] = $wfaitem->get("idartlang"); -} - - -if (is_array($usersequence)) { - foreach ($usersequence as $key => $value) { - $wfu->select("idusersequence = '$value'"); - if ($obj = $wfu->next()) { - $userids[$key] = $obj->get("iduser"); - } - } -} - -if (is_array($userids)) { - foreach ($userids as $key => $value) { - $isCurrent[$key] = false; - - if ($usershow == $value) { - $isCurrent[$key] = true; - } - - if ($users->loadUserByUserID($value) == false) { - /* Yes, it's a group. Let's try to load the group members! */ - $sql = "SELECT user_id FROM " - . $cfg["tab"]["groupmembers"] . " - WHERE group_id = '" . $value . "'"; - $db2->query(Contenido_Security::escapeDB($sql, $db2)); - - while ($db2->next_record()) { - if ($db2->f("user_id") == $usershow) { - $isCurrent[$key] = true; - } - } - } else { - if ($value == $usershow) { - $isCurrent[$key] = true; - } - } - - if ($lastusersequence[$key] == $usersequence[$key]) { - $isCurrent[$key] = false; - } - } -} - -$tpl->reset(); -$tpl->setEncoding('iso-8859-1'); -$tpl->set('s', 'SESSID', $sSession); -$tpl->set('s', 'SESSNAME', $sess->name); -$iIDCat = 0; -$iIDTpl = 0; - -if ($perm->have_perm_area_action($area, "workflow_task_user_select")) { - $form = new UI_Form("showusers", $sess->url("main.php?area=$area&frame=$frame")); - $form->setVar("area", $area); - $form->setEvent("submit", "setUsershow();"); - $form->setVar("frame", $frame); - $form->setVar("action", "workflow_task_user_select"); - $form->add("select", i18n("Show users", 'cl-workflow') . ": " . getUsers("show", $usershow)); - $form->add("button", ''); - - $tpl->set('s', 'USERSELECT', $form->render(true)); -} else { - $tpl->set('s', 'USERSELECT', ''); -} - -$pageTitle = i18n('Search results', 'cl-workflow') . ' - ' . i18n('Workflow tasks', 'cl-workflow'); -$tpl->set('s', 'PAGE_TITLE', $pageTitle); - -$tpl->set('s', 'TH_START', i18n("Article", 'cl-workflow')); -$tpl->set('s', 'TH_TEMPLATE', i18n("Template", 'cl-workflow')); -$tpl->set('s', 'TH_ACTIONS', i18n("Actions", 'cl-workflow')); -$tpl->set('s', 'TH_TITLE', i18n("Title", 'cl-workflow')); -$tpl->set('s', 'TH_CHANGED', i18n("Changed", 'cl-workflow')); -$tpl->set('s', 'TH_PUBLISHED', i18n("Published", 'cl-workflow')); -$tpl->set('s', 'TH_WORKFLOW_STEP', i18n("Workflow Step", 'cl-workflow')); -$tpl->set('s', 'TH_WORKFLOW_ACTION', i18n("Workflow Action", 'cl-workflow')); -$tpl->set('s', 'TH_WORKFLOW_EDITOR', i18n("Workflow Editor", 'cl-workflow')); -$tpl->set('s', 'TH_LAST_STATUS', i18n("Last status", 'cl-workflow')); - -$currentUserSequence = new WorkflowUserSequence; - -if (is_array($isCurrent)) { - - foreach ($isCurrent as $key => $value) { - if ($value == true) { - $idartlang = Contenido_Security::toInteger($article[$key]); - $lang = Contenido_Security::toInteger($lang); - $client = Contenido_Security::toInteger($client); - - $sql = "SELECT B.idcat AS idcat, A.title AS title, A.created AS created, A.lastmodified AS changed, - A.idart as idart, E.name as tpl_name, A.idartlang as idartlang, F.idcatlang as idcatlang, - B.idcatart as idcatart, A.idlang as art_lang, F.startidartlang as startidartlang - FROM (" . $cfg["tab"]["art_lang"] . " AS A, - " . $cfg["tab"]["cat_art"] . " AS B, - " . $cfg["tab"]["art"] . " AS C) - LEFT JOIN " . $cfg['tab']['tpl_conf'] . " as D ON A.idtplcfg = D.idtplcfg - LEFT JOIN " . $cfg['tab']['tpl'] . " as E ON D.idtpl = E.`idtpl` - LEFT JOIN " . $cfg['tab']['cat_lang'] . " as F ON B.idcat = F.`idcat` - WHERE A.idartlang = '$idartlang' AND - A.idart = B.idart AND - A.idart = C.idart AND - A.idlang = '$lang' AND - C.idclient = '$client';"; - - $db->query($sql); - - if ($db->next_record()) { - global $area; - //$area = "con"; - $idcat = $db->f("idcat"); - $idart = $db->f("idart"); - - # create javascript multilink - $tmp_mstr = '%s'; - - $mstr = sprintf($tmp_mstr, 'right_top', - $sess->url("main.php?area=con&frame=3&idcat=$idcat&idtpl=$idtpl"), - 'right_bottom', - $sess->url("main.php?area=con_editart&action=con_edit&frame=4&idcat=$idcat&idtpl=$idtpl&idart=$idart"), - $db->f("title")); - - $laststatus = getLastWorkflowStatus($idartlang); - $username = getGroupOrUserName($userids[$key]); - $actionSelect = piworkflowRenderColumn($idcat, $idart, $db->f('idartlang'), 'wfaction'); - - $currentUserSequence->loadByPrimaryKey($usersequence[$key]); - $workflowItem = $currentUserSequence->getWorkflowItem(); - $step = $workflowItem->get("name"); - $description = $workflowItem->get("description"); - - $sRowId = $db->f('idart') . '-' . $db->f('idartlang') . '-' . $db->f('idcat') . '-' . $db->f('idcatlang') . '-' . $db->f('idcatart') . '-' . $db->f('art_lang'); - - if ($db->f('startidartlang') == $db->f('idartlang')) { - $makeStartarticle = "\"{$sFlagTitle}\""; - } else { - $makeStartarticle = "\"{$sFlagTitle}\""; - } - - $todoListeSubject = i18n("Reminder", 'cl-workflow'); - $sReminder = i18n("Set reminder / add to todo list", 'cl-workflow'); - $sReminderHtml = "\"$sReminder\""; - - $templatename = $db->f('tpl_name'); - if (!empty($templatename)) { - $templatename = clHtmlEntities($templatename); - } else { - $templatename = '--- ' . i18n("None", 'cl-workflow') . ' ---'; - } - - if ($i == 0) { - $iIDCat = $db->f("idcat"); - $iIDTpl = $idtpl; - $tpl->set('s', 'FIRST_ROWID', $sRowId); - } - - $tpl->set('d', 'START', $makeStartarticle); - $tpl->set('d', 'TITLE', $mstr); - $tpl->set('d', 'LAST_STATUS', $laststatus); - $tpl->set('d', 'WORKFLOW_EDITOR', $username); - $tpl->set('d', 'WORKFLOW_STEP', $step); - $tpl->set('d', 'WORKFLOW_ACTION', $actionSelect); - $tpl->set('d', 'TEMPLATE', $templatename); - $tpl->set('d', 'BGCOLOR', $cfg['color']['table_dark_offline']); - $tpl->set('d', 'ROWID', $sRowId); - $tpl->set('d', 'ACTIONS', $sReminderHtml); - $tpl->next(); - $i++; - } - } - } -} - -if ($i > 0) { - $tpl->set('s', 'NO_ARTICLES_ROW'); -} else { - $sRow = '' . i18n("No article found.", 'cl-workflow') . ''; - $tpl->set('s', 'NO_ARTICLES_ROW', $sRow); -} - -$sLoadSubnavi = 'parent.parent.frames["right"].frames["right_top"].location.href = \'main.php?area=con&frame=3&idcat=' . $iIDCat . '&idtpl=' . $iIDTpl . '&contenido=' . $sSession . "';"; -$tpl->set('s', 'SUBNAVI', $sLoadSubnavi); - -$frame = ob_get_contents(); -ob_end_clean(); - -$tpl->generate($cfg["path"]['contenido'] . $cfg["path"]["plugins"] . "workflow/templates/template.workflow_tasks.html"); diff --git a/conlite/plugins/cl-workflow/locale/cl-workflow.pot b/conlite/plugins/cl-workflow/locale/cl-workflow.pot deleted file mode 100644 index 57ea508..0000000 --- a/conlite/plugins/cl-workflow/locale/cl-workflow.pot +++ /dev/null @@ -1,398 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-20 18:04+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: classes/class.workflowusersequence.php:105 -msgid "Workflow item doesn't exist. Can't create entry." -msgstr "" - -#: classes/class.workflowusersequence.php:129 -#: classes/class.workflowusersequence.php:137 -#: classes/class.workflowitems.php:125 classes/class.workflowitems.php:133 -msgid "Swapping items failed: Item doesn't exist" -msgstr "" - -#: classes/class.workflowusersequence.php:212 -msgid "Can't set user_id: User or group doesn't exist" -msgstr "" - -#: classes/class.workflowactions.php:69 -msgid "Publish article" -msgstr "" - -#: classes/class.workflowactions.php:70 -msgid "Lock article" -msgstr "" - -#: classes/class.workflowactions.php:71 -msgid "Move back to last editor" -msgstr "" - -#: classes/class.workflowactions.php:72 includes/functions.workflow.php:170 -msgid "Reject article" -msgstr "" - -#: classes/class.workflowactions.php:73 -msgid "Edit article content" -msgstr "" - -#: classes/class.workflowactions.php:74 -msgid "Edit article properties" -msgstr "" - -#: classes/class.workflowactions.php:75 -msgid "Edit template" -msgstr "" - -#: classes/class.workflowactions.php:76 includes/functions.workflow.php:178 -msgid "Revise article" -msgstr "" - -#: classes/class.workflowartallocation.php:67 -msgid "Article doesn't exist" -msgstr "" - -#: classes/class.workflowartallocation.php:74 -msgid "Article is already assigned to a usersequence step." -msgstr "" - -#: classes/class.workflowartallocation.php:265 -#: classes/class.workflowartallocation.php:273 -msgid "Workflow notification" -msgstr "" - -#: classes/class.workflowartallocation.php:311 -#: classes/class.workflowartallocation.php:320 -msgid "Workflow escalation" -msgstr "" - -#: classes/class.workflowitems.php:158 -msgid "Can't add item to workflow: Workflow doesn't exist" -msgstr "" - -#: classes/class.workflowitems.php:233 -msgid "No item loaded" -msgstr "" - -#: classes/class.workflowitems.php:253 -msgid "Requested task doesn't exist, can't assign" -msgstr "" - -#: classes/class.workflowitems.php:274 classes/class.workflowallocation.php:114 -#: classes/class.workflowallocation.php:181 -msgid "Workflow doesn't exist" -msgstr "" - -#: classes/class.workflowitems.php:281 -msgid "Position in this workflow already exists." -msgstr "" - -#: classes/class.workflowallocation.php:106 -#: classes/class.workflowallocation.php:203 -msgid "Category already has a workflow assigned" -msgstr "" - -#: classes/class.workflowallocation.php:212 -msgid "Category doesn't exist, assignment failed" -msgstr "" - -#: includes/include.workflow_tasks.php:124 -msgid "Show users" -msgstr "" - -#: includes/include.workflow_tasks.php:132 -msgid "Search results" -msgstr "" - -#: includes/include.workflow_tasks.php:132 -msgid "Workflow tasks" -msgstr "" - -#: includes/include.workflow_tasks.php:135 -msgid "Article" -msgstr "" - -#: includes/include.workflow_tasks.php:136 -msgid "Template" -msgstr "" - -#: includes/include.workflow_tasks.php:137 -#: includes/include.workflow_steps.php:297 -msgid "Actions" -msgstr "" - -#: includes/include.workflow_tasks.php:138 -msgid "Title" -msgstr "" - -#: includes/include.workflow_tasks.php:139 -msgid "Changed" -msgstr "" - -#: includes/include.workflow_tasks.php:140 -msgid "Published" -msgstr "" - -#: includes/include.workflow_tasks.php:141 includes/functions.workflow.php:730 -msgid "Workflow Step" -msgstr "" - -#: includes/include.workflow_tasks.php:142 includes/functions.workflow.php:731 -msgid "Workflow Action" -msgstr "" - -#: includes/include.workflow_tasks.php:143 includes/functions.workflow.php:732 -msgid "Workflow Editor" -msgstr "" - -#: includes/include.workflow_tasks.php:144 includes/functions.workflow.php:733 -msgid "Last status" -msgstr "" - -#: includes/include.workflow_tasks.php:205 -msgid "Reminder" -msgstr "" - -#: includes/include.workflow_tasks.php:206 -msgid "Set reminder / add to todo list" -msgstr "" - -#: includes/include.workflow_tasks.php:213 includes/functions.workflow.php:43 -#: includes/functions.workflow.php:311 includes/functions.workflow.php:611 -#: includes/functions.workflow.php:841 includes/functions.workflow.php:847 -msgid "None" -msgstr "" - -#: includes/include.workflow_tasks.php:242 -msgid "No article found." -msgstr "" - -#: includes/include.workflow_left_top.php:37 includes/config.plugin.php:39 -msgid "Create workflow" -msgstr "" - -#: includes/config.plugin.php:36 includes/include.workflow_list.php:69 -msgid "Delete workflow" -msgstr "" - -#: includes/config.plugin.php:37 -msgid "Select workflow task" -msgstr "" - -#: includes/config.plugin.php:38 -msgid "Show workflow" -msgstr "" - -#: includes/config.plugin.php:40 includes/include.workflow_edit.php:89 -msgid "Edit workflow" -msgstr "" - -#: includes/config.plugin.php:41 -msgid "Process workflow step" -msgstr "" - -#: includes/config.plugin.php:42 includes/config.plugin.php:43 -#: includes/functions.workflow.php:623 -msgid "Inherit workflow down" -msgstr "" - -#: includes/config.plugin.php:44 includes/include.workflow_steps.php:289 -msgid "Edit workflow step" -msgstr "" - -#: includes/config.plugin.php:45 -msgid "Move workflowstep up" -msgstr "" - -#: includes/config.plugin.php:46 -msgid "Move workflowstep down" -msgstr "" - -#: includes/config.plugin.php:47 -msgid "Save Workflowstep" -msgstr "" - -#: includes/config.plugin.php:48 -msgid "Create workflowstep" -msgstr "" - -#: includes/config.plugin.php:49 -msgid "Delete workflowstep" -msgstr "" - -#: includes/config.plugin.php:50 -msgid "Move workflowstepuser up" -msgstr "" - -#: includes/config.plugin.php:51 -msgid "Move workflowstepuser down" -msgstr "" - -#: includes/config.plugin.php:52 -msgid "Create Workflowstepuser" -msgstr "" - -#: includes/config.plugin.php:53 -msgid "Delete Workflowstepuser" -msgstr "" - -#: includes/config.plugin.php:54 -msgid "Associate workflow with category" -msgstr "" - -#: includes/functions.workflow.php:154 -msgid "Confirm" -msgstr "" - -#: includes/functions.workflow.php:162 -msgid "Back to last editor" -msgstr "" - -#: includes/functions.workflow.php:299 -msgid "Rejected" -msgstr "" - -#: includes/functions.workflow.php:302 -msgid "Revised" -msgstr "" - -#: includes/functions.workflow.php:305 -msgid "Last" -msgstr "" - -#: includes/functions.workflow.php:308 -msgid "Confirmed" -msgstr "" - -#: includes/functions.workflow.php:639 -msgid "Workflow" -msgstr "" - -#: includes/include.workflow_steps.php:43 -#: includes/include.workflow_steps.php:385 -msgid "Add User" -msgstr "" - -#: includes/include.workflow_steps.php:75 -msgid "New Workflow Step" -msgstr "" - -#: includes/include.workflow_steps.php:139 -msgid "Seconds" -msgstr "" - -#: includes/include.workflow_steps.php:140 -msgid "Minutes" -msgstr "" - -#: includes/include.workflow_steps.php:141 -msgid "Hours" -msgstr "" - -#: includes/include.workflow_steps.php:142 -msgid "Days" -msgstr "" - -#: includes/include.workflow_steps.php:143 -msgid "Weeks" -msgstr "" - -#: includes/include.workflow_steps.php:144 -msgid "Months" -msgstr "" - -#: includes/include.workflow_steps.php:145 -msgid "Years" -msgstr "" - -#: includes/include.workflow_steps.php:194 -msgid "Move step up" -msgstr "" - -#: includes/include.workflow_steps.php:202 -msgid "Move step down" -msgstr "" - -#: includes/include.workflow_steps.php:212 -msgid "Delete step" -msgstr "" - -#: includes/include.workflow_steps.php:254 -msgid "Create new step" -msgstr "" - -#: includes/include.workflow_steps.php:290 -msgid "Step name" -msgstr "" - -#: includes/include.workflow_steps.php:291 -msgid "Step description" -msgstr "" - -#: includes/include.workflow_steps.php:298 -msgid "Assigned users" -msgstr "" - -#: includes/include.workflow_steps.php:326 -msgid "Move user up" -msgstr "" - -#: includes/include.workflow_steps.php:335 -msgid "Move user down" -msgstr "" - -#: includes/include.workflow_steps.php:346 -msgid "Delete user" -msgstr "" - -#: includes/include.workflow_steps.php:352 -msgid "Notify this user via E-Mail" -msgstr "" - -#: includes/include.workflow_steps.php:353 -msgid "Escalate to this user via E-Mail" -msgstr "" - -#: includes/include.workflow_list.php:70 -#, php-format -msgid "Do you really want to delete the following workflow:

    %s
    " -msgstr "" - -#: includes/include.workflow_edit.php:86 -msgid "New Workflow" -msgstr "" - -#: includes/include.workflow_edit.php:87 -msgid "Create new workflow" -msgstr "" - -#: includes/include.workflow_edit.php:97 -msgid "Workflow name" -msgstr "" - -#: includes/include.workflow_edit.php:98 -msgid "Description" -msgstr "" - -#: includes/include.workflow_edit.php:99 -msgid "Author" -msgstr "" - -#: includes/include.workflow_edit.php:100 -msgid "Created" -msgstr "" diff --git a/conlite/plugins/cl-workflow/locale/de_DE/LC_MESSAGES/cl-workflow.mo b/conlite/plugins/cl-workflow/locale/de_DE/LC_MESSAGES/cl-workflow.mo deleted file mode 100644 index a5ec096..0000000 Binary files a/conlite/plugins/cl-workflow/locale/de_DE/LC_MESSAGES/cl-workflow.mo and /dev/null differ diff --git a/conlite/plugins/cl-workflow/locale/de_DE/LC_MESSAGES/cl-workflow.po b/conlite/plugins/cl-workflow/locale/de_DE/LC_MESSAGES/cl-workflow.po deleted file mode 100644 index 8a15671..0000000 --- a/conlite/plugins/cl-workflow/locale/de_DE/LC_MESSAGES/cl-workflow.po +++ /dev/null @@ -1,441 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: CL-Workflow V1.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-20 18:04+0200\n" -"PO-Revision-Date: 2020-08-20 18:11+0200\n" -"Last-Translator: Ortwin Pinke \n" -"Language-Team: CL-Dev \n" -"Language: de_DE\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Basepath: M:/Projekte_Persoenlich/timo.hummel/plugin_sources\n" -"X-Poedit-KeywordsList: i18n\n" -"X-Generator: Poedit 2.0.6\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-SearchPath-0: workflow\n" - -#: classes/class.workflowusersequence.php:105 -msgid "Workflow item doesn't exist. Can't create entry." -msgstr "Workflow existiert nicht. Eintrag kann nicht erstellt werden." - -#: classes/class.workflowusersequence.php:129 -#: classes/class.workflowusersequence.php:137 -#: classes/class.workflowitems.php:125 classes/class.workflowitems.php:133 -msgid "Swapping items failed: Item doesn't exist" -msgstr "Tausch der Einträge fehlgeschlagen: Eintrag nicht vorhanden" - -#: classes/class.workflowusersequence.php:212 -msgid "Can't set user_id: User or group doesn't exist" -msgstr "Kann Benutzer-Id nicht zuweisen: Benutzer oder Gruppe nicht vorhanden" - -#: classes/class.workflowactions.php:69 -msgid "Publish article" -msgstr "Artikel veröffentlichen" - -#: classes/class.workflowactions.php:70 -msgid "Lock article" -msgstr "Artikel sperren" - -#: classes/class.workflowactions.php:71 -msgid "Move back to last editor" -msgstr "Zurück zum letzten Bearbeiter" - -#: classes/class.workflowactions.php:72 includes/functions.workflow.php:170 -msgid "Reject article" -msgstr "Artikel ablehnen" - -#: classes/class.workflowactions.php:73 -msgid "Edit article content" -msgstr "Artikelinhalt bearbeiten" - -#: classes/class.workflowactions.php:74 -msgid "Edit article properties" -msgstr "Artikeleigenschaften bearbeiten" - -#: classes/class.workflowactions.php:75 -msgid "Edit template" -msgstr "Template bearbeiten" - -#: classes/class.workflowactions.php:76 includes/functions.workflow.php:178 -msgid "Revise article" -msgstr "Artikel überarbeiten" - -#: classes/class.workflowartallocation.php:67 -msgid "Article doesn't exist" -msgstr "Artikel existiert nicht." - -#: classes/class.workflowartallocation.php:74 -msgid "Article is already assigned to a usersequence step." -msgstr "Artikel ist bereits Benutzerschritt zugeordnet." - -#: classes/class.workflowartallocation.php:265 -#: classes/class.workflowartallocation.php:273 -msgid "Workflow notification" -msgstr "Workflow Notifikation" - -#: classes/class.workflowartallocation.php:311 -#: classes/class.workflowartallocation.php:320 -msgid "Workflow escalation" -msgstr "Workflow Steigerung" - -#: classes/class.workflowitems.php:158 -msgid "Can't add item to workflow: Workflow doesn't exist" -msgstr "" -"Zuordnung des Eintrags zum Workflow nicht möglich: Workflow existiert " -"nicht" - -#: classes/class.workflowitems.php:233 -msgid "No item loaded" -msgstr "Kein Eintrag geladen" - -#: classes/class.workflowitems.php:253 -msgid "Requested task doesn't exist, can't assign" -msgstr "Gewünschte Aufgabe existiert nicht, Zuordnung nicht möglich" - -#: classes/class.workflowitems.php:274 classes/class.workflowallocation.php:114 -#: classes/class.workflowallocation.php:181 -msgid "Workflow doesn't exist" -msgstr "Workflow existiert nicht" - -#: classes/class.workflowitems.php:281 -msgid "Position in this workflow already exists." -msgstr "Position existiert bereits in diesem Workflow." - -#: classes/class.workflowallocation.php:106 -#: classes/class.workflowallocation.php:203 -msgid "Category already has a workflow assigned" -msgstr "Kategorie ist bereits Workflow zugeordnet" - -#: classes/class.workflowallocation.php:212 -msgid "Category doesn't exist, assignment failed" -msgstr "Kategorie existiert nicht, Zuordnung fehlgeschlagen" - -#: includes/include.workflow_tasks.php:124 -msgid "Show users" -msgstr "Zeige Benutzer" - -#: includes/include.workflow_tasks.php:132 -msgid "Search results" -msgstr "Suchergebnis" - -#: includes/include.workflow_tasks.php:132 -msgid "Workflow tasks" -msgstr "Workflow Aufgaben" - -#: includes/include.workflow_tasks.php:135 -msgid "Article" -msgstr "Artikel" - -#: includes/include.workflow_tasks.php:136 -msgid "Template" -msgstr "Template" - -#: includes/include.workflow_tasks.php:137 -#: includes/include.workflow_steps.php:297 -msgid "Actions" -msgstr "Aktionen" - -#: includes/include.workflow_tasks.php:138 -msgid "Title" -msgstr "Titel" - -#: includes/include.workflow_tasks.php:139 -msgid "Changed" -msgstr "Geändert" - -#: includes/include.workflow_tasks.php:140 -msgid "Published" -msgstr "Veröffentlichen" - -#: includes/include.workflow_tasks.php:141 includes/functions.workflow.php:730 -msgid "Workflow Step" -msgstr "Workflow Schritt" - -#: includes/include.workflow_tasks.php:142 includes/functions.workflow.php:731 -msgid "Workflow Action" -msgstr "Workflow Aktion" - -#: includes/include.workflow_tasks.php:143 includes/functions.workflow.php:732 -msgid "Workflow Editor" -msgstr "Workflow Bearbeiter" - -#: includes/include.workflow_tasks.php:144 includes/functions.workflow.php:733 -msgid "Last status" -msgstr "Letzter Status" - -#: includes/include.workflow_tasks.php:205 -msgid "Reminder" -msgstr "Wiedervorlage" - -#: includes/include.workflow_tasks.php:206 -msgid "Set reminder / add to todo list" -msgstr "Wiedervorlage / zur Todoliste hinzuf&uegen" - -#: includes/include.workflow_tasks.php:213 includes/functions.workflow.php:43 -#: includes/functions.workflow.php:311 includes/functions.workflow.php:611 -#: includes/functions.workflow.php:841 includes/functions.workflow.php:847 -msgid "None" -msgstr "Kein" - -#: includes/include.workflow_tasks.php:242 -msgid "No article found." -msgstr "Kein Artikel gefunden." - -#: includes/include.workflow_left_top.php:37 includes/config.plugin.php:39 -msgid "Create workflow" -msgstr "Neuer Workflow" - -#: includes/config.plugin.php:36 includes/include.workflow_list.php:69 -msgid "Delete workflow" -msgstr "Workflow löschen" - -#: includes/config.plugin.php:37 -msgid "Select workflow task" -msgstr "Workflow-Aufgabe auswählen" - -#: includes/config.plugin.php:38 -msgid "Show workflow" -msgstr "Workflow zeigen" - -#: includes/config.plugin.php:40 includes/include.workflow_edit.php:89 -msgid "Edit workflow" -msgstr "Workflow bearbeiten" - -#: includes/config.plugin.php:41 -msgid "Process workflow step" -msgstr "Workflow Schritt durchführen" - -#: includes/config.plugin.php:42 includes/config.plugin.php:43 -#: includes/functions.workflow.php:623 -msgid "Inherit workflow down" -msgstr "Workflow nach unten vererben" - -#: includes/config.plugin.php:44 includes/include.workflow_steps.php:289 -msgid "Edit workflow step" -msgstr "Workflow Schritt bearbeiten" - -#: includes/config.plugin.php:45 -msgid "Move workflowstep up" -msgstr "Workflowschritt nach oben verschieben" - -#: includes/config.plugin.php:46 -msgid "Move workflowstep down" -msgstr "Workflowschritt nach unten verschieben" - -#: includes/config.plugin.php:47 -msgid "Save Workflowstep" -msgstr "Workflowschritt speichen" - -#: includes/config.plugin.php:48 -msgid "Create workflowstep" -msgstr "Workflowschritt erstellen" - -#: includes/config.plugin.php:49 -msgid "Delete workflowstep" -msgstr "Workflowschritt löschen" - -#: includes/config.plugin.php:50 -msgid "Move workflowstepuser up" -msgstr "Workflowschrittbenutzer nach oben verschieben" - -#: includes/config.plugin.php:51 -msgid "Move workflowstepuser down" -msgstr "Workflowschrittbenutzer nach unten verschieben" - -#: includes/config.plugin.php:52 -msgid "Create Workflowstepuser" -msgstr "Workflowschrittbenutzer erstellen" - -#: includes/config.plugin.php:53 -msgid "Delete Workflowstepuser" -msgstr "Workflowschrittbenutzer löschen" - -#: includes/config.plugin.php:54 -msgid "Associate workflow with category" -msgstr "Workflow zu Kategorien zuweisen" - -#: includes/functions.workflow.php:154 -msgid "Confirm" -msgstr "Bestätigen" - -#: includes/functions.workflow.php:162 -msgid "Back to last editor" -msgstr "Zurück zum letzten Bearbeiter" - -#: includes/functions.workflow.php:299 -msgid "Rejected" -msgstr "Abgelehnt" - -#: includes/functions.workflow.php:302 -msgid "Revised" -msgstr "überarbeitet" - -#: includes/functions.workflow.php:305 -msgid "Last" -msgstr "Letzter" - -#: includes/functions.workflow.php:308 -msgid "Confirmed" -msgstr "Bestätigt" - -#: includes/functions.workflow.php:639 -msgid "Workflow" -msgstr "Workflow" - -#: includes/include.workflow_steps.php:43 -#: includes/include.workflow_steps.php:385 -msgid "Add User" -msgstr "Benutzer hinzufügen" - -#: includes/include.workflow_steps.php:75 -msgid "New Workflow Step" -msgstr "Neuer Workflow Schritt" - -#: includes/include.workflow_steps.php:139 -msgid "Seconds" -msgstr "Sekunden" - -#: includes/include.workflow_steps.php:140 -msgid "Minutes" -msgstr "Minuten" - -#: includes/include.workflow_steps.php:141 -msgid "Hours" -msgstr "Stunden" - -#: includes/include.workflow_steps.php:142 -msgid "Days" -msgstr "Tage" - -#: includes/include.workflow_steps.php:143 -msgid "Weeks" -msgstr "Wochen" - -#: includes/include.workflow_steps.php:144 -msgid "Months" -msgstr "Monate" - -#: includes/include.workflow_steps.php:145 -msgid "Years" -msgstr "Jahre" - -#: includes/include.workflow_steps.php:194 -msgid "Move step up" -msgstr "Schritt nach oben bewegen" - -#: includes/include.workflow_steps.php:202 -msgid "Move step down" -msgstr "Schritt nach unten verschieben" - -#: includes/include.workflow_steps.php:212 -msgid "Delete step" -msgstr "Schritt löschen" - -#: includes/include.workflow_steps.php:254 -msgid "Create new step" -msgstr "Neuen Schritt erzeugen" - -#: includes/include.workflow_steps.php:290 -msgid "Step name" -msgstr "Name des Schritts" - -#: includes/include.workflow_steps.php:291 -msgid "Step description" -msgstr "Beschreibung des Schritts" - -#: includes/include.workflow_steps.php:298 -msgid "Assigned users" -msgstr "Zugeordnete Benutzer" - -#: includes/include.workflow_steps.php:326 -msgid "Move user up" -msgstr "Benutzer nach oben verschieben" - -#: includes/include.workflow_steps.php:335 -msgid "Move user down" -msgstr "Benutzer nach unten verschieben" - -#: includes/include.workflow_steps.php:346 -msgid "Delete user" -msgstr "Benutzer löschen" - -#: includes/include.workflow_steps.php:352 -msgid "Notify this user via E-Mail" -msgstr "Diesen Benutzer per e-Mail benachrichtigen" - -#: includes/include.workflow_steps.php:353 -msgid "Escalate to this user via E-Mail" -msgstr "An diesen Benutzer per e-Mail eskalieren" - -#: includes/include.workflow_list.php:70 -#, php-format -msgid "Do you really want to delete the following workflow:

    %s
    " -msgstr "Wollen Sie wirklich den folgenden Workflow löschen:

    %s
    " - -#: includes/include.workflow_edit.php:86 -msgid "New Workflow" -msgstr "Neuer Workflow" - -#: includes/include.workflow_edit.php:87 -msgid "Create new workflow" -msgstr "Neuer Workflow erzeugen" - -#: includes/include.workflow_edit.php:97 -msgid "Workflow name" -msgstr "Workflow Name" - -#: includes/include.workflow_edit.php:98 -msgid "Description" -msgstr "Beschreibung" - -#: includes/include.workflow_edit.php:99 -msgid "Author" -msgstr "Autor" - -#: includes/include.workflow_edit.php:100 -msgid "Created" -msgstr "Erstellt" - -#~ msgid "Recently edited articles" -#~ msgstr "Zuletzt bearbeitete Artikel" - -#~ msgid "Change client" -#~ msgstr "Mandanten wechseln" - -#~ msgid "Welcome" -#~ msgstr "Willkommen" - -#~ msgid "You are logged in as" -#~ msgstr "Sie sind angemeldet als" - -#~ msgid "Last login" -#~ msgstr "Letzter Login" - -#~ msgid "Article is online" -#~ msgstr "Artikel ist online" - -#~ msgid "Article is offline" -#~ msgstr "Artikel ist offline" - -#~ msgid "Current workflow tasks" -#~ msgstr "Aktuelle Workflow Aufgaben" - -#~ msgid "Client" -#~ msgstr "Mandant" - -#~ msgid "Language" -#~ msgstr "Sprache" - -#~ msgid "No tasks found" -#~ msgstr "Keine Aufgabe gefunden" - -#~ msgid "Status" -#~ msgstr "Status" - -#~ msgid "Step" -#~ msgstr "Schritt" - -#~ msgid "Assign workflow to category" -#~ msgstr "Workflow einer Kategorie zuordnen" diff --git a/conlite/plugins/cl-workflow/locale/potfiles.txt b/conlite/plugins/cl-workflow/locale/potfiles.txt deleted file mode 100644 index 08c5f0f..0000000 --- a/conlite/plugins/cl-workflow/locale/potfiles.txt +++ /dev/null @@ -1,19 +0,0 @@ -./classes/class.workflowusersequence.php -./classes/class.workflowactions.php -./classes/class.workflow.php -./classes/class.workflowartallocation.php -./classes/class.workflowitems.php -./classes/class.workflowallocation.php -./classes/class.workflowtasks.php -./templates/template.workflow_steps.html -./templates/template.workflow_tasks.html -./includes/include.workflow_tasks.php -./includes/include.workflow_left_top.php -./includes/config.autoloader.php -./includes/config.plugin.php -./includes/functions.workflow.php -./includes/include.workflow_steps.php -./includes/include.workflow_subnav.php -./includes/include.workflow_list.php -./includes/include.workflow_edit.php -./cronjobs/advance_workflow.php diff --git a/conlite/plugins/cl-workflow/plugin_install.sql b/conlite/plugins/cl-workflow/plugin_install.sql deleted file mode 100644 index f628565..0000000 --- a/conlite/plugins/cl-workflow/plugin_install.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE IF NOT EXISTS !PREFIX!wf_actions ( -idworkflowaction int(10) NOT NULL auto_increment, -idworkflowitem int(10) NOT NULL default 0, -action varchar(255) NOT NULL, -PRIMARY KEY (idworkflowaction) -); -CREATE TABLE IF NOT EXISTS !PREFIX!wf_allocation (idallocation int(10) NOT NULL auto_increment, idworkflow int(10) NOT NULL default 0, idcatlang int(10) NOT NULL default 0, PRIMARY KEY (idallocation)); -CREATE TABLE IF NOT EXISTS !PREFIX!wf_art_allocation (idartallocation int(10) NOT NULL auto_increment, idartlang int(10) NOT NULL default 0, idusersequence int(10) NOT NULL default 0, starttime datetime NOT NULL, laststatus varchar(32) default NULL, lastusersequence int(10) NOT NULL default 0, PRIMARY KEY (idartallocation)); -CREATE TABLE IF NOT EXISTS !PREFIX!wf_items (idworkflowitem int(10) NOT NULL auto_increment, idworkflow int(10) NOT NULL default 0, position int(10) NOT NULL default 0, name varchar(255) NOT NULL default 0, description text NOT NULL, idtask int(10) NOT NULL default 0, PRIMARY KEY (idworkflowitem)); -CREATE TABLE IF NOT EXISTS !PREFIX!wf_user_sequences (idusersequence int(10) NOT NULL auto_increment, idworkflowitem int(10) NOT NULL default 0, iduser varchar(32) NOT NULL, position int(10) NOT NULL default 0, timelimit int(10) NOT NULL default 0, timeunit varchar(32) NOT NULL, emailnoti int(10) NOT NULL default 0, escalationnoti int(10) NOT NULL default 0, PRIMARY KEY (idusersequence)); -CREATE TABLE IF NOT EXISTS !PREFIX!wf_workflow (idworkflow int(10) NOT NULL auto_increment, idclient int(10) NOT NULL default 0, idlang int(10) NOT NULL default 0, idauthor varchar(32) NOT NULL, name varchar(255) NOT NULL, description text NOT NULL, created datetime NOT NULL, PRIMARY KEY (idworkflow)); \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/plugin_uninstall.sql b/conlite/plugins/cl-workflow/plugin_uninstall.sql deleted file mode 100644 index 73cd40e..0000000 --- a/conlite/plugins/cl-workflow/plugin_uninstall.sql +++ /dev/null @@ -1,6 +0,0 @@ -DROP TABLE !PREFIX!wf_actions; -DROP TABLE !PREFIX!wf_allocation; -DROP TABLE !PREFIX!wf_art_allocation; -DROP TABLE !PREFIX!wf_items; -DROP TABLE !PREFIX!wf_user_sequences; -DROP TABLE !PREFIX!wf_workflow; \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/templates/template.workflow_steps.html b/conlite/plugins/cl-workflow/templates/template.workflow_steps.html deleted file mode 100644 index c77def0..0000000 --- a/conlite/plugins/cl-workflow/templates/template.workflow_steps.html +++ /dev/null @@ -1,13 +0,0 @@ -
    - {NEW} -
    - -
    - {STEPS} -
    -
    - {EDITSTEP} -
    -
    - i18n('Warning: Changes will reset active Workflows', 'cl-workflow') -
    \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/templates/template.workflow_tasks.html b/conlite/plugins/cl-workflow/templates/template.workflow_tasks.html deleted file mode 100644 index 375b235..0000000 --- a/conlite/plugins/cl-workflow/templates/template.workflow_tasks.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - {TITLE} - - - - - - - - - - - - -
    -
    {USERSELECT}
    - {PAGE_TITLE} -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {NO_ARTICLES_ROW} - -
    {TH_START}{TH_TITLE}{TH_WORKFLOW_STEP}{TH_WORKFLOW_ACTION}{TH_WORKFLOW_EDITOR}{TH_LAST_STATUS}{TH_TEMPLATE}{TH_ACTIONS}
    {START}{TITLE}{WORKFLOW_STEP}{WORKFLOW_ACTION}{WORKFLOW_EDITOR}{LAST_STATUS}{TEMPLATE}{ACTIONS}
    - - - - - diff --git a/conlite/plugins/cl-workflow/xml/lang_de_DE.xml b/conlite/plugins/cl-workflow/xml/lang_de_DE.xml deleted file mode 100644 index 05962e4..0000000 --- a/conlite/plugins/cl-workflow/xml/lang_de_DE.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - -
    Workflow
    - Workflow-Einstellungen - Schritte -
    -
    - -
    - - -
    diff --git a/conlite/plugins/cl-workflow/xml/lang_en_EN.xml b/conlite/plugins/cl-workflow/xml/lang_en_EN.xml deleted file mode 100644 index 5e4dfc9..0000000 --- a/conlite/plugins/cl-workflow/xml/lang_en_EN.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - -
    Workflow
    - Workflow-Properties - Steps -
    -
    - -
    - - -
    \ No newline at end of file diff --git a/conlite/plugins/cl-workflow/xml/lang_en_US.xml b/conlite/plugins/cl-workflow/xml/lang_en_US.xml deleted file mode 100644 index 5590ceb..0000000 --- a/conlite/plugins/cl-workflow/xml/lang_en_US.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - -
    Workflow
    - Workflow-Properties - Steps -
    -
    - -
    - - -
    diff --git a/var/www/html/conlite213/conlite/plugins/cl-mod-rewrite b/var/www/html/conlite213/conlite/plugins/cl-mod-rewrite new file mode 160000 index 0000000..3217b73 --- /dev/null +++ b/var/www/html/conlite213/conlite/plugins/cl-mod-rewrite @@ -0,0 +1 @@ +Subproject commit 3217b73d08e1b76193f02d2d912134320ef40bfe