You can subscribe to this list here.
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(84) |
Oct
(70) |
Nov
(164) |
Dec
(71) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
(52) |
Feb
(77) |
Mar
(70) |
Apr
(58) |
May
(81) |
Jun
(74) |
Jul
(87) |
Aug
(30) |
Sep
(45) |
Oct
(37) |
Nov
(51) |
Dec
(31) |
2013 |
Jan
(47) |
Feb
(29) |
Mar
(40) |
Apr
(33) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <gem...@li...> - 2011-12-21 09:43:35
|
Revision: 380 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=380&view=rev Author: mennodekker Date: 2011-12-21 09:43:26 +0000 (Wed, 21 Dec 2011) Log Message: ----------- Introducing the RadiusUserDefinition Modified Paths: -------------- trunk/library/classes/Gems/User/UserLoader.php Added Paths: ----------- trunk/library/classes/Gems/User/Adapter/ trunk/library/classes/Gems/User/Adapter/Radius/ trunk/library/classes/Gems/User/Adapter/Radius/COPYING trunk/library/classes/Gems/User/Adapter/Radius/COPYING.LESSER trunk/library/classes/Gems/User/Adapter/Radius/README.TXT trunk/library/classes/Gems/User/Adapter/Radius/radius.class.php trunk/library/classes/Gems/User/Adapter/Radius.php trunk/library/classes/Gems/User/RadiusUserDefinition.php trunk/library/configs/db/tables/gems__radius_config.999.sql Added: trunk/library/classes/Gems/User/Adapter/Radius/COPYING =================================================================== --- trunk/library/classes/Gems/User/Adapter/Radius/COPYING (rev 0) +++ trunk/library/classes/Gems/User/Adapter/Radius/COPYING 2011-12-21 09:43:26 UTC (rev 380) @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + 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. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 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 <http://www.gnu.org/licenses/>. + +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: + + <program> Copyright (C) <year> <name of author> + 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 +<http://www.gnu.org/licenses/>. + + 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 +<http://www.gnu.org/philosophy/why-not-lgpl.html>. Added: trunk/library/classes/Gems/User/Adapter/Radius/COPYING.LESSER =================================================================== --- trunk/library/classes/Gems/User/Adapter/Radius/COPYING.LESSER (rev 0) +++ trunk/library/classes/Gems/User/Adapter/Radius/COPYING.LESSER 2011-12-21 09:43:26 UTC (rev 380) @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. Added: trunk/library/classes/Gems/User/Adapter/Radius/README.TXT =================================================================== --- trunk/library/classes/Gems/User/Adapter/Radius/README.TXT (rev 0) +++ trunk/library/classes/Gems/User/Adapter/Radius/README.TXT 2011-12-21 09:43:26 UTC (rev 380) @@ -0,0 +1,84 @@ +Pure PHP radius class + +Last update: 2009-01-05, release 1.2.2 + +This Radius class is a radius client implementation in pure PHP +following the RFC 2865 rules (http://www.ietf.org/rfc/rfc2865.txt) + + +This class works with at least the following RADIUS servers: + - Authenex Strong Authentication System (ASAS) with two-factor authentication + - FreeRADIUS, a free Radius server implementation for Linux and *nix environments + - Microsoft Radius server IAS + - Mideye RADIUS server (http://www.mideye.com) + - Radl, a free Radius server for Windows + - RSA SecurID + - VASCO Middleware 3.0 server + - WinRadius, Windows Radius server (free for 5 users) + - ZyXEL ZyWALL OTP (Authenex ASAS branded by ZyXEL, cheaper) + + + +USAGE + +require_once('radius.class.php'); +$radius = new Radius($ip_radius_server = 'radius_server_ip_address', $shared_secret = 'radius_shared_secret'[, $radius_suffix = 'optional_radius_suffix'[, $udp_timeout = udp_timeout_in_seconds[, $authentication_port = 1812]]]); +$result = $radius->Access_Request($username = 'username', $password = 'password'[, $udp_timeout = udp_timeout_in_seconds]); + + + +EXAMPLES + +Example 1 + require_once('radius.class.php'); + $radius = new Radius('127.0.0.1', 'secret'); + $radius->SetNasIpAddress('1.2.3.4'); // Needed for some devices (not always auto-detected) + if ($radius->AccessRequest('user', 'pass')) + { + echo "Authentication accepted."; + } + else + { + echo "Authentication rejected."; + } + + +Example 2 + require_once('radius.class.php'); + $radius = new Radius('127.0.0.1', 'secret'); + $radius->SetNasPort(0); + $radius->SetNasIpAddress('1.2.3.4'); // Needed for some devices (not always auto-detected) + if ($radius->AccessRequest('user', 'pass')) + { + echo "Authentication accepted."; + echo "<br />"; + } + else + { + echo "Authentication rejected."; + echo "<br />"; + } + echo $radius->GetReadableReceivedAttributes(); + + + +LICENCE + +Copyright (c) 2008, SysCo systemes de communication sa +SysCo (tm) is a trademark of SysCo systemes de communication sa +(http://www.sysco.ch/) +All rights reserved. + +Pure PHP radius class is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation, either version 3 of the License, +or (at your option) any later version. + +Pure PHP radius class is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with Pure PHP radius class. +If not, see <http://www.gnu.org/licenses/>. Added: trunk/library/classes/Gems/User/Adapter/Radius/radius.class.php =================================================================== --- trunk/library/classes/Gems/User/Adapter/Radius/radius.class.php (rev 0) +++ trunk/library/classes/Gems/User/Adapter/Radius/radius.class.php 2011-12-21 09:43:26 UTC (rev 380) @@ -0,0 +1,840 @@ +<?php + +/********************************************************************* + * + * Pure PHP radius class + * + * This Radius class is a radius client implementation in pure PHP + * following the RFC 2865 rules (http://www.ietf.org/rfc/rfc2865.txt) + * + * This class works with at least the following RADIUS servers: + * - Authenex Strong Authentication System (ASAS) with two-factor authentication + * - FreeRADIUS, a free Radius server implementation for Linux and *nix environments + * - Microsoft Radius server IAS + * - Mideye RADIUS server (http://www.mideye.com) + * - Radl, a free Radius server for Windows + * - RSA SecurID + * - VASCO Middleware 3.0 server + * - WinRadius, Windows Radius server (free for 5 users) + * - ZyXEL ZyWALL OTP (Authenex ASAS branded by ZyXEL, cheaper) + * + * + * LICENCE + * + * Copyright (c) 2008, SysCo systemes de communication sa + * SysCo (tm) is a trademark of SysCo systemes de communication sa + * (http://www.sysco.ch/) + * All rights reserved. + * + * This file is part of the Pure PHP radius class + * + * Pure PHP radius class is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the License, + * or (at your option) any later version. + * + * Pure PHP radius class is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Pure PHP radius class. + * If not, see <http://www.gnu.org/licenses/>. + * + * + * @author: SysCo/al + * @since CreationDate: 2008-01-04 + * @copyright (c) 2008 by SysCo systemes de communication sa + * @version $LastChangedRevision: 1.2.2 $ + * @version $LastChangedDate: 2009-01-05 $ + * @version $LastChangedBy: SysCo/al $ + * @link $HeadURL: radius.class.php $ + * @link http://developer.sysco.ch/php/ + * @link dev...@sy... + * Language: PHP 4.0.7 or higher + * + * + * Usage + * + * require_once('radius.class.php'); + * $radius = new Radius($ip_radius_server = 'radius_server_ip_address', $shared_secret = 'radius_shared_secret'[, $radius_suffix = 'optional_radius_suffix'[, $udp_timeout = udp_timeout_in_seconds[, $authentication_port = 1812]]]); + * $result = $radius->Access_Request($username = 'username', $password = 'password'[, $udp_timeout = udp_timeout_in_seconds]); + * + * + * Examples + * + * Example 1 + * <?php + * require_once('radius.class.php'); + * $radius = new Radius('127.0.0.1', 'secret'); + * $radius->SetNasIpAddress('1.2.3.4'); // Needed for some devices, and not auto_detected if PHP not runned through a web server + * if ($radius->AccessRequest('user', 'pass')) + * { + * echo "Authentication accepted."; + * } + * else + * { + * echo "Authentication rejected."; + * } + * ?> + * + * Example 2 + * <?php + * require_once('radius.class.php'); + * $radius = new Radius('127.0.0.1', 'secret'); + * $radius->SetNasPort(0); + * $radius->SetNasIpAddress('1.2.3.4'); // Needed for some devices, and not auto_detected if PHP not runned through a web server + * if ($radius->AccessRequest('user', 'pass')) + * { + * echo "Authentication accepted."; + * echo "<br />"; + * } + * else + * { + * echo "Authentication rejected."; + * echo "<br />"; + * } + * echo $radius->GetReadableReceivedAttributes(); + * ?> + * + * + * External file needed + * + * none. + * + * + * External file created + * + * none. + * + * + * Special issues + * + * - Sockets support must be enabled. + * * In Linux and *nix environments, the extension is enabled at + * compile time using the --enable-sockets configure option + * * In Windows, PHP Sockets can be activated by un-commenting + * extension=php_sockets.dll in php.ini + * + * + * Other related ressources + * + * FreeRADIUS, a free Radius server implementation for Linux and *nix environments: + * http://www.freeradius.org/ + * + * WinRadius, Windows Radius server (free for 5 users): + * http://www.itconsult2000.com/en/product/WinRadius.zip + * + * Radl, a free Radius server for Windows: + * http://www.loriotpro.com/Products/RadiusServer/FreeRadiusServer_EN.php + * + * DOS command line Radius client: + * http://www.itconsult2000.com/en/product/WinRadiusClient.zip + * + * + * Users feedbacks and comments + * + * 2008-07-02 Pim Koeman/Parantion + * + * When using a radius connection behind a linux iptables firewall + * allow port 1812 and 1813 with udp protocol + * + * IPTABLES EXAMPLE (command line): + * iptables -A AlwaysACCEPT -p udp --dport 1812 -j ACCEPT + * iptables -A AlwaysACCEPT -p udp --dport 1813 -j ACCEPT + * + * or put the lines in /etc/sysconfig/iptables (red-hat type systems (fedora, centos, rhel etc.) + * -A AlwaysACCEPT -p udp --dport 1812 -j ACCEPT + * -A AlwaysACCEPT -p udp --dport 1813 -j ACCEPT + * + * + * Change Log + * + * 2009-01-05 1.2.2 SysCo/al Added Robert Svensson feedback, Mideye RADIUS server is supported + * 2008-11-11 1.2.1 SysCo/al Added Carlo Ferrari resolution in examples (add NAS IP Address for a VASCO Middleware server) + * 2008-07-07 1.2 SysCo/al Added Pim Koeman (Parantion) contribution + * - comments concerning using radius behind a linux iptables firewall + * Added Jon Bright (tick Trading Software AG) contribution + * - false octal encoding with 0xx indexes (indexes are now rewritten in xx only) + * - challenge/response support for the RSA SecurID New-PIN mode + * Added GetRadiusPacketInfo() method + * Added GetAttributesInfo() method + * Added DecodeVendorSpecificContent() (to answer Raul Carvalho's question) + * Added Decoded Vendor Specific Content in debug messages + * 2008-02-04 1.1 SysCo/al Typo error for the udp_timeout parameter (line 256 in the version 1.0) + * 2008-01-07 1.0 SysCo/al Initial release + * + *********************************************************************/ + + +/********************************************************************* + * + * Radius + * Pure PHP radius class + * + * Creation 2008-01-04 + * Update 2009-01-05 + * @package radius + * @version v.1.2.2 + * @author SysCo/al + * + *********************************************************************/ +class Radius +{ + var $_ip_radius_server; // Radius server IP address + var $_shared_secret; // Shared secret with the radius server + var $_radius_suffix; // Radius suffix (default is ''); + var $_udp_timeout; // Timeout of the UDP connection in seconds (default value is 5) + var $_authentication_port; // Authentication port (default value is 1812) + var $_accounting_port; // Accouting port (default value is 1813) + var $_nas_ip_address; // NAS IP address + var $_nas_port; // NAS port + var $_encrypted_password; // Encrypted password, as described in the RFC 2865 + var $_user_ip_address; // Remote IP address of the user + var $_request_authenticator; // Request-Authenticator, 16 octets random number + var $_response_authenticator; // Request-Authenticator, 16 octets random number + var $_username; // Username to sent to the Radius server + var $_password; // Password to sent to the Radius server (clear password, must be encrypted) + var $_identifier_to_send; // Identifier field for the packet to be sent + var $_identifier_received; // Identifier field for the received packet + var $_radius_packet_to_send; // Radius packet code (1=Access-Request, 2=Access-Accept, 3=Access-Reject, 4=Accounting-Request, 5=Accounting-Response, 11=Access-Challenge, 12=Status-Server (experimental), 13=Status-Client (experimental), 255=Reserved + var $_radius_packet_received; // Radius packet code (1=Access-Request, 2=Access-Accept, 3=Access-Reject, 4=Accounting-Request, 5=Accounting-Response, 11=Access-Challenge, 12=Status-Server (experimental), 13=Status-Client (experimental), 255=Reserved + var $_attributes_to_send; // Radius attributes to send + var $_attributes_received; // Radius attributes received + var $_socket_to_server; // Socket connection + var $_debug_mode; // Debug mode flag + var $_attributes_info; // Attributes info array + var $_radius_packet_info; // Radius packet codes info array + var $_last_error_code; // Last error code + var $_last_error_message; // Last error message + + + /********************************************************************* + * + * Name: Radius + * short description: Radius class constructor + * + * Creation 2008-01-04 + * Update 2009-01-05 + * @version v.1.2.2 + * @author SysCo/al + * @param string ip address of the radius server + * @param string shared secret with the radius server + * @param string radius domain name suffix (default is empty) + * @param integer UDP timeout (default is 5) + * @param integer authentication port + * @param integer accounting port + * @return NULL + *********************************************************************/ + public function Radius($ip_radius_server = '127.0.0.1', $shared_secret = '', $radius_suffix = '', $udp_timeout = 5, $authentication_port = 1812, $accounting_port = 1813) + { + $this->_radius_packet_info[1] = 'Access-Request'; + $this->_radius_packet_info[2] = 'Access-Accept'; + $this->_radius_packet_info[3] = 'Access-Reject'; + $this->_radius_packet_info[4] = 'Accounting-Request'; + $this->_radius_packet_info[5] = 'Accounting-Response'; + $this->_radius_packet_info[11] = 'Access-Challenge'; + $this->_radius_packet_info[12] = 'Status-Server (experimental)'; + $this->_radius_packet_info[13] = 'Status-Client (experimental)'; + $this->_radius_packet_info[255] = 'Reserved'; + + $this->_attributes_info[1] = array('User-Name', 'S'); + $this->_attributes_info[2] = array('User-Password', 'S'); + $this->_attributes_info[3] = array('CHAP-Password', 'S'); // Type (1) / Length (1) / CHAP Ident (1) / String + $this->_attributes_info[4] = array('NAS-IP-Address', 'A'); + $this->_attributes_info[5] = array('NAS-Port', 'I'); + $this->_attributes_info[6] = array('Service-Type', 'I'); + $this->_attributes_info[7] = array('Framed-Protocol', 'I'); + $this->_attributes_info[8] = array('Framed-IP-Address', 'A'); + $this->_attributes_info[9] = array('Framed-IP-Netmask', 'A'); + $this->_attributes_info[10] = array('Framed-Routing', 'I'); + $this->_attributes_info[11] = array('Filter-Id', 'T'); + $this->_attributes_info[12] = array('Framed-MTU', 'I'); + $this->_attributes_info[13] = array('Framed-Compression', 'I'); + $this->_attributes_info[14] = array( 'Login-IP-Host', 'A'); + $this->_attributes_info[15] = array('Login-service', 'I'); + $this->_attributes_info[16] = array('Login-TCP-Port', 'I'); + $this->_attributes_info[17] = array('(unassigned)', ''); + $this->_attributes_info[18] = array('Reply-Message', 'T'); + $this->_attributes_info[19] = array('Callback-Number... [truncated message content] |
From: <gem...@li...> - 2011-12-20 11:42:57
|
Revision: 379 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=379&view=rev Author: mennodekker Date: 2011-12-20 11:42:48 +0000 (Tue, 20 Dec 2011) Log Message: ----------- Added a little documentation + updated code (no functional change) Modified Paths: -------------- trunk/library/classes/Gems/Menu/SubMenuItem.php Modified: trunk/library/classes/Gems/Menu/SubMenuItem.php =================================================================== --- trunk/library/classes/Gems/Menu/SubMenuItem.php 2011-12-20 11:18:39 UTC (rev 378) +++ trunk/library/classes/Gems/Menu/SubMenuItem.php 2011-12-20 11:42:48 UTC (rev 379) @@ -92,18 +92,18 @@ return print_r($this->_itemOptions, true); } + /** + * Return true when then $source does NOT contain all items in the parameterFilter + * + * @param Gems_Menu_ParameterCollector $source + * @param type $raiseConditions + * @param type $condition + * @return boolean + */ private function _applyParameterFilter(Gems_Menu_ParameterCollector $source, $raiseConditions, &$condition) { if ($this->_parameterFilter) { foreach ($this->_parameterFilter as $name => $testValue) { - //Transform single value to array for uniform processing - if (!is_array($testValue)) { - $testArray = array(); - $testArray[] = $testValue; - } else { - $testArray = $testValue; - } - $paramValue = $source->getMenuParameter($name); if ($paramValue instanceof MUtil_Lazy_LazyInterface) { @@ -111,8 +111,11 @@ $paramValue = MUtil_Lazy::rise($paramValue); } else { - $newCondition = new MUtil_Lazy_Call('in_array', array($paramValue, $testArray)); - //$newCondition = MUtil_Lazy::comp($testValue, '==', $paramValue); + if (is_array($testValue)) { + $newCondition = new MUtil_Lazy_Call('in_array', array($paramValue, $testValue)); + } else { + $newCondition = MUtil_Lazy::comp($testValue, '==', $paramValue); + } if ($condition instanceof MUtil_Lazy_LazyInterface) { $condition = $condition->if($newCondition); } else { @@ -123,21 +126,23 @@ } - foreach($testArray as $currentTestValue) { - if ($currentTestValue == $paramValue) { + if (is_array($testValue)) { + if (!in_array($paramValue, $testValue)) { if (Gems_Menu::$verbose) { // Mutil_Echo::backtrace(); - MUtil_Echo::r($name . ' => ' . $currentTestValue . ' == ' . $paramValue, $this->get('label') . ' (' . $this->get('controller') . '/' . $this->get('action') . ')'); + MUtil_Echo::r($name . ' => ' . print_r($testValue,true) . ' !== ' . $paramValue, $this->get('label') . ' (' . $this->get('controller') . '/' . $this->get('action') . ')'); } - return; - } else { + return true; + } + } else { + if ($testValue !== $paramValue) { if (Gems_Menu::$verbose) { // Mutil_Echo::backtrace(); - MUtil_Echo::r($name . ' => ' . $currentTestValue . ' !== ' . $paramValue, $this->get('label') . ' (' . $this->get('controller') . '/' . $this->get('action') . ')'); + MUtil_Echo::r($name . ' => ' . $testValue . ' !== ' . $paramValue, $this->get('label') . ' (' . $this->get('controller') . '/' . $this->get('action') . ')'); } + return true; } } - return true; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-20 11:18:51
|
Revision: 378 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=378&view=rev Author: mennodekker Date: 2011-12-20 11:18:39 +0000 (Tue, 20 Dec 2011) Log Message: ----------- updated translations Modified Paths: -------------- trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2011-12-20 11:11:27 UTC (rev 377) +++ trunk/library/languages/default-en.po 2011-12-20 11:18:39 UTC (rev 378) @@ -2,9 +2,9 @@ msgstr "" "Project-Id-Version: Pulse EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-11-28 19:14+0100\n" +"POT-Creation-Date: 2011-12-20 12:12+0100\n" "PO-Revision-Date: \n" -"Last-Translator: Matijs de Jong <mj...@ma...>\n" +"Last-Translator: Menno Dekker <men...@er...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -23,57 +23,57 @@ msgid "Path %s not writable" msgstr "Path %s not writable" -#: classes/GemsEscort.php:891 +#: classes/GemsEscort.php:893 #, php-format msgid "User: %s" msgstr "User: %s" -#: classes/GemsEscort.php:916 +#: classes/GemsEscort.php:918 msgid "version" msgstr "version" -#: classes/GemsEscort.php:1347 +#: classes/GemsEscort.php:1349 msgid "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" msgstr "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" -#: classes/GemsEscort.php:1474 +#: classes/GemsEscort.php:1476 msgid "Please check back later." msgstr "Please check back later." -#: classes/GemsEscort.php:1476 -#: classes/GemsEscort.php:1480 -#: classes/GemsEscort.php:1481 +#: classes/GemsEscort.php:1478 +#: classes/GemsEscort.php:1482 +#: classes/GemsEscort.php:1483 msgid "System is in maintenance mode" msgstr "System is in maintenance mode" -#: classes/GemsEscort.php:1491 +#: classes/GemsEscort.php:1493 msgid "No access to site." msgstr "No access to site." -#: classes/GemsEscort.php:1493 -#: classes/GemsEscort.php:1529 +#: classes/GemsEscort.php:1495 +#: classes/GemsEscort.php:1537 msgid "You have no access to this site." msgstr "You have no access to this site." -#: classes/GemsEscort.php:1509 +#: classes/GemsEscort.php:1511 msgid "No access to page" msgstr "No access to page" -#: classes/GemsEscort.php:1511 +#: classes/GemsEscort.php:1513 #, php-format msgid "Access to this page is not allowed for current role: %s." msgstr "Access to this page is not allowed for current role: %s." -#: classes/GemsEscort.php:1516 -#: classes/GemsEscort.php:1527 +#: classes/GemsEscort.php:1523 +#: classes/GemsEscort.php:1535 msgid "You are no longer logged in." msgstr "You are no longer logged in." -#: classes/GemsEscort.php:1517 +#: classes/GemsEscort.php:1524 msgid "You must login to access this page." msgstr "You must login to access this page." -#: classes/Gems/AccessLog.php:239 +#: classes/Gems/AccessLog.php:236 msgid "Database needs to be updated!" msgstr "Database needs to be updated!" @@ -338,73 +338,73 @@ msgid "Changelog" msgstr "Changelog" -#: classes/Gems/Model.php:193 +#: classes/Gems/Model.php:200 msgid "Respondent nr" msgstr "Patient nr" -#: classes/Gems/Model.php:194 +#: classes/Gems/Model.php:201 msgid "Opened" msgstr "Opened" -#: classes/Gems/Model.php:195 +#: classes/Gems/Model.php:202 msgid "Consent" msgstr "Consent" -#: classes/Gems/Model.php:197 +#: classes/Gems/Model.php:204 msgid "E-Mail" msgstr "E-Mail" -#: classes/Gems/Model.php:202 +#: classes/Gems/Model.php:209 msgid "Gender" msgstr "Gender" -#: classes/Gems/Model.php:203 +#: classes/Gems/Model.php:210 msgid "First name" msgstr "First name" -#: classes/Gems/Model.php:204 +#: classes/Gems/Model.php:211 msgid "Surname prefix" msgstr "Surname prefix" -#: classes/Gems/Model.php:205 +#: classes/Gems/Model.php:212 msgid "Last name" msgstr "Last name" -#: classes/Gems/Model.php:207 +#: classes/Gems/Model.php:214 msgid "Name" msgstr "Name" -#: classes/Gems/Model.php:210 +#: classes/Gems/Model.php:217 msgid "Street" msgstr "Street" -#: classes/Gems/Model.php:211 +#: classes/Gems/Model.php:218 msgid "Zipcode" msgstr "Zipcode" -#: classes/Gems/Model.php:212 +#: classes/Gems/Model.php:219 msgid "City" msgstr "City" -#: classes/Gems/Model.php:214 +#: classes/Gems/Model.php:221 msgid "Phone" msgstr "Phone" -#: classes/Gems/Model.php:216 +#: classes/Gems/Model.php:223 msgid "Birthday" msgstr "Birthday" -#: classes/Gems/Pdf.php:195 +#: classes/Gems/Pdf.php:198 #, php-format msgid "PDF Source File '%s' not found!" msgstr "PDF Source File '%s' not found!" -#: classes/Gems/Pdf.php:237 +#: classes/Gems/Pdf.php:240 #, php-format msgid "Could not create '%s' directory." msgstr "Could not create '%s' directory." -#: classes/Gems/Pdf.php:280 +#: classes/Gems/Pdf.php:283 #, php-format msgid " The error message is: %s" msgstr " The error message is: %s" @@ -431,89 +431,94 @@ msgid "Cache cleaned" msgstr "Cache cleaned" -#: classes/Gems/Controller/BrowseEditAction.php:346 +#: classes/Gems/Controller/BrowseEditAction.php:349 #, php-format msgid "New %s..." msgstr "New %s..." -#: classes/Gems/Controller/BrowseEditAction.php:378 +#: classes/Gems/Controller/BrowseEditAction.php:382 #, php-format msgid "Delete %s" msgstr "Delete %s" -#: classes/Gems/Controller/BrowseEditAction.php:382 +#: classes/Gems/Controller/BrowseEditAction.php:386 #, php-format msgid "%2$u %1$s deleted" msgstr "%2$u %1$s deleted" -#: classes/Gems/Controller/BrowseEditAction.php:396 +#: classes/Gems/Controller/BrowseEditAction.php:400 #, php-format msgid "Edit %s" msgstr "Edit %s" -#: classes/Gems/Controller/BrowseEditAction.php:493 +#: classes/Gems/Controller/BrowseEditAction.php:497 msgid "Free search text" msgstr "Free search text" -#: classes/Gems/Controller/BrowseEditAction.php:564 +#: classes/Gems/Controller/BrowseEditAction.php:568 msgid "Search" msgstr "Search" -#: classes/Gems/Controller/BrowseEditAction.php:580 +#: classes/Gems/Controller/BrowseEditAction.php:584 #, php-format msgid "No %s found" msgstr "No %s found" -#: classes/Gems/Controller/BrowseEditAction.php:653 +#: classes/Gems/Controller/BrowseEditAction.php:657 +#: classes/Gems/Default/ExportAction.php:234 #, php-format msgid "No %s found." msgstr "No %s found." -#: classes/Gems/Controller/BrowseEditAction.php:768 +#: classes/Gems/Controller/BrowseEditAction.php:772 msgid "Are you sure?" msgstr "Are you sure?" -#: classes/Gems/Controller/BrowseEditAction.php:784 +#: classes/Gems/Controller/BrowseEditAction.php:788 +#: classes/Gems/Default/DatabaseAction.php:218 +#: classes/Gems/Default/DatabaseAction.php:528 msgid "Yes" msgstr "Yes" -#: classes/Gems/Controller/BrowseEditAction.php:785 +#: classes/Gems/Controller/BrowseEditAction.php:789 +#: classes/Gems/Default/DatabaseAction.php:219 +#: classes/Gems/Default/DatabaseAction.php:529 msgid "No" msgstr "No" -#: classes/Gems/Controller/BrowseEditAction.php:838 +#: classes/Gems/Controller/BrowseEditAction.php:842 #, php-format msgid "Unknown %s requested" msgstr "Unknown %s requested" -#: classes/Gems/Controller/BrowseEditAction.php:861 +#: classes/Gems/Controller/BrowseEditAction.php:865 #, php-format msgid "New %1$s..." msgstr "New %1$s..." -#: classes/Gems/Controller/BrowseEditAction.php:869 +#: classes/Gems/Controller/BrowseEditAction.php:873 msgid "Save" msgstr "Save" -#: classes/Gems/Controller/BrowseEditAction.php:905 +#: classes/Gems/Controller/BrowseEditAction.php:909 #, php-format msgid "%2$u %1$s saved" msgstr "%2$u %1$s saved" -#: classes/Gems/Controller/BrowseEditAction.php:908 +#: classes/Gems/Controller/BrowseEditAction.php:912 msgid "No changes to save." msgstr "No changes to save." -#: classes/Gems/Controller/BrowseEditAction.php:917 +#: classes/Gems/Controller/BrowseEditAction.php:921 msgid "Input error! No changes saved!" msgstr "Input error! No changes saved!" -#: classes/Gems/Controller/BrowseEditAction.php:945 +#: classes/Gems/Controller/BrowseEditAction.php:949 #, php-format msgid "Show %s" msgstr "Show %s" -#: classes/Gems/Controller/BrowseEditAction.php:952 +#: classes/Gems/Controller/BrowseEditAction.php:956 #, php-format msgid "Unknown %s." msgstr "Unknown %s." @@ -1013,7 +1018,6 @@ msgstr "Export data" #: classes/Gems/Default/ExportAction.php:153 -#: classes/Gems/Default/MailJobAction.php:121 msgid "Survey" msgstr "Survey" @@ -1023,8 +1027,7 @@ msgstr "%s records found." #: classes/Gems/Default/ExportAction.php:172 -#: classes/Gems/Default/IndexAction.php:192 -#: classes/Gems/Default/MailJobAction.php:119 +#: classes/Gems/Default/IndexAction.php:200 msgid "Organization" msgstr "Organization" @@ -1038,7 +1041,6 @@ msgstr "Role" #: classes/Gems/Default/GroupAction.php:92 -#: classes/Gems/Default/MailJobAction.php:104 msgid "Active" msgstr "Active" @@ -1056,88 +1058,88 @@ msgid "Administrative groups" msgstr "Administrative groups" -#: classes/Gems/Default/IndexAction.php:97 +#: classes/Gems/Default/IndexAction.php:105 msgid "Enter your token..." msgstr "Enter your token..." -#: classes/Gems/Default/IndexAction.php:140 +#: classes/Gems/Default/IndexAction.php:148 #, php-format msgid "Login to %s application" msgstr "Login to %s application" -#: classes/Gems/Default/IndexAction.php:144 +#: classes/Gems/Default/IndexAction.php:152 msgid "Login" msgstr "Login" -#: classes/Gems/Default/IndexAction.php:166 +#: classes/Gems/Default/IndexAction.php:174 msgid "Back to login" msgstr "Back to login" -#: classes/Gems/Default/IndexAction.php:214 +#: classes/Gems/Default/IndexAction.php:224 msgid "Password" msgstr "Password" -#: classes/Gems/Default/IndexAction.php:229 +#: classes/Gems/Default/IndexAction.php:239 #, php-format msgid "Reset password for %s application" msgstr "Reset password for %s application" -#: classes/Gems/Default/IndexAction.php:233 +#: classes/Gems/Default/IndexAction.php:243 msgid "Reset password" msgstr "Reset password" -#: classes/Gems/Default/IndexAction.php:279 +#: classes/Gems/Default/IndexAction.php:289 msgid "Username" msgstr "Username" -#: classes/Gems/Default/IndexAction.php:333 +#: classes/Gems/Default/IndexAction.php:355 msgid "Your password must be changed." msgstr "Your password must be changed." -#: classes/Gems/Default/IndexAction.php:345 +#: classes/Gems/Default/IndexAction.php:367 #, php-format msgid "Login successful, welcome %s." msgstr "Login successful, welcome %s." -#: classes/Gems/Default/IndexAction.php:385 +#: classes/Gems/Default/IndexAction.php:407 #, php-format msgid "Good bye: %s." msgstr "Good bye: %s." -#: classes/Gems/Default/IndexAction.php:410 +#: classes/Gems/Default/IndexAction.php:432 msgid "Reset accepted, enter your new password." msgstr "Reset accepted, enter your new password." -#: classes/Gems/Default/IndexAction.php:414 +#: classes/Gems/Default/IndexAction.php:436 msgid "This key timed out or does not belong to this user." msgstr "This key timed out or does not belong to this user." -#: classes/Gems/Default/IndexAction.php:431 +#: classes/Gems/Default/IndexAction.php:459 msgid "Password reset requested" msgstr "Password reset requested" -#: classes/Gems/Default/IndexAction.php:432 +#: classes/Gems/Default/IndexAction.php:460 #, php-format msgid "To reset your password for %s, please click this link: %s" msgstr "To reset your password for %s, please click this link: %s" -#: classes/Gems/Default/IndexAction.php:437 +#: classes/Gems/Default/IndexAction.php:465 msgid "We sent you an e-mail with a reset link. Click on the link in the e-mail." msgstr "We sent you an e-mail with a reset link. Click on the link in the e-mail." -#: classes/Gems/Default/IndexAction.php:439 +#: classes/Gems/Default/IndexAction.php:467 msgid "Unable to send e-mail." msgstr "Unable to send e-mail." -#: classes/Gems/Default/IndexAction.php:444 +#: classes/Gems/Default/IndexAction.php:472 msgid "No such user found or no e-mail address known or user cannot be reset." msgstr "No such user found or no e-mail address known or user cannot be reset." -#: classes/Gems/Default/IndexAction.php:448 +#: classes/Gems/Default/IndexAction.php:476 msgid "We received your password reset key." msgstr "We received your password reset key." -#: classes/Gems/Default/IndexAction.php:449 +#: classes/Gems/Default/IndexAction.php:477 msgid "Please enter the organization and username belonging to this key." msgstr "Please enter the organization and username belonging to this key." @@ -1227,19 +1229,19 @@ msgid "Log" msgstr "Log" -#: classes/Gems/Default/LogMaintenanceAction.php:70 +#: classes/Gems/Default/LogMaintenanceAction.php:71 msgid "Log:" msgstr "Log:" -#: classes/Gems/Default/LogMaintenanceAction.php:71 +#: classes/Gems/Default/LogMaintenanceAction.php:72 msgid "All" msgstr "All" -#: classes/Gems/Default/LogMaintenanceAction.php:77 +#: classes/Gems/Default/LogMaintenanceAction.php:78 msgid "Log action" msgstr "Log action" -#: classes/Gems/Default/LogMaintenanceAction.php:81 +#: classes/Gems/Default/LogMaintenanceAction.php:82 msgid "Log maintenance" msgstr "Log maintenance" @@ -1252,6 +1254,7 @@ msgstr "New automatic mail job..." #: classes/Gems/Default/MailJobAction.php:100 +#: classes/Gems/Default/MailLogAction.php:116 msgid "Template" msgstr "Template" @@ -1423,13 +1426,13 @@ #: classes/Gems/Default/OptionAction.php:113 #: classes/Gems/Default/OptionAction.php:118 #: classes/Gems/Default/SourceAction.php:95 -#: classes/Gems/Default/StaffAction.php:151 +#: classes/Gems/Default/StaffAction.php:144 msgid "Repeat password" msgstr "Repeat password" #: classes/Gems/Default/MailServerAction.php:91 #: classes/Gems/Default/SourceAction.php:74 -#: classes/Gems/Default/StaffAction.php:126 +#: classes/Gems/Default/StaffAction.php:120 msgid "Enter only when changing" msgstr "Enter only when changing the password" @@ -1444,7 +1447,8 @@ msgstr "Email servers" #: classes/Gems/Default/MailTemplateAction.php:75 -#: classes/Gems/Default/StaffAction.php:239 +#: classes/Gems/Default/StaffAction.php:212 +#: classes/Gems/Default/StaffAction.php:245 msgid "(all organizations)" msgstr "(all organizations)" @@ -1486,7 +1490,7 @@ #: classes/Gems/Default/OptionAction.php:188 #: classes/Gems/Default/OrganizationAction.php:139 #: classes/Gems/Default/RespondentAction.php:173 -#: classes/Gems/Default/StaffAction.php:224 +#: classes/Gems/Default/StaffAction.php:228 msgid "Language" msgstr "Language" @@ -1607,25 +1611,32 @@ msgid "Only for programmers." msgstr "Only for programmers." -#: classes/Gems/Default/OrganizationAction.php:178 +#: classes/Gems/Default/OrganizationAction.php:173 +msgid "This can not be changed yet" +msgstr "This can not be changed yet" + +#: classes/Gems/Default/OrganizationAction.php:175 +msgid "User Definition" +msgstr "User Definition" + +#: classes/Gems/Default/OrganizationAction.php:193 msgid "Delete organization" msgstr "Delete organization" -#: classes/Gems/Default/OrganizationAction.php:188 +#: classes/Gems/Default/OrganizationAction.php:203 msgid "Edit organization" msgstr "Edit organization" -#: classes/Gems/Default/OrganizationAction.php:198 +#: classes/Gems/Default/OrganizationAction.php:213 msgid "Participating organizations" msgstr "Participating organizations" -#: classes/Gems/Default/OrganizationAction.php:208 +#: classes/Gems/Default/OrganizationAction.php:223 msgid "Show organization" msgstr "Show organization" #: classes/Gems/Default/OverviewPlanAction.php:115 #: classes/Gems/Default/ProjectSurveysAction.php:88 -#: classes/Gems/Default/SurveyAction.php:203 msgid "survey" msgid_plural "surveys" msgstr[0] "survey" @@ -1748,19 +1759,16 @@ msgstr "Session" #: classes/Gems/Default/ProjectSurveysAction.php:68 -#: classes/Gems/Default/SurveyAction.php:192 msgid "By" msgstr "By" #: classes/Gems/Default/ProjectSurveysAction.php:69 #: classes/Gems/Default/ProjectTracksAction.php:67 -#: classes/Gems/Default/SurveyAction.php:193 msgid "From" msgstr "From" #: classes/Gems/Default/ProjectSurveysAction.php:70 #: classes/Gems/Default/ProjectTracksAction.php:68 -#: classes/Gems/Default/SurveyAction.php:195 msgid "Until" msgstr "Until" @@ -1788,7 +1796,6 @@ msgstr "Questions in survey %s" #: classes/Gems/Default/ProjectTracksAction.php:118 -#: classes/Gems/Default/SurveyAction.php:85 #, php-format msgid "Survey %s does not exist." msgstr "Survey %s does not exist." @@ -1968,7 +1975,6 @@ msgstr "Please settle the informed consent form for this patient." #: classes/Gems/Default/RespondentPlanAction.php:67 -#: classes/Gems/Default/SurveyAction.php:171 msgid "Show respondent" msgstr "Show patient" @@ -2126,15 +2132,19 @@ msgid "Synchronization will update the status of all surveys imported into this project to the status at the sources." msgstr "Synchronization will update the status of all surveys imported into this project to the status at the sources." -#: classes/Gems/Default/SourceAction.php:252 +#: classes/Gems/Default/SourceAction.php:258 msgid "Are you sure you want to synchronize all survey sources?" msgstr "Are you sure you want to synchronize all survey sources?" -#: classes/Gems/Default/StaffAction.php:169 +#: classes/Gems/Default/StaffAction.php:162 +msgid "Users can only login when this box is checked." +msgstr "Users can only login when this box is checked." + +#: classes/Gems/Default/StaffAction.php:163 msgid "If checked the user will logoff when answering a survey." msgstr "If checked the user will logoff when answering a survey." -#: classes/Gems/Default/StaffAction.php:185 +#: classes/Gems/Default/StaffAction.php:183 msgid "You are not allowed to edit this staff member." msgstr "You are not allowed to edit this staff member." @@ -2142,11 +2152,15 @@ msgid "Primary function" msgstr "Primary function" -#: classes/Gems/Default/StaffAction.php:225 +#: classes/Gems/Default/StaffAction.php:229 +msgid "Can login" +msgstr "Can login" + +#: classes/Gems/Default/StaffAction.php:230 msgid "Logout on survey" msgstr "Logout on survey" -#: classes/Gems/Default/StaffAction.php:295 +#: classes/Gems/Default/StaffAction.php:305 msgid "staff member" msgid_plural "staff members" msgstr[0] "staff member" @@ -2212,39 +2226,39 @@ msgid "After completion" msgstr "After completion" -#: classes/Gems/Default/SurveyMaintenanceAction.php:129 +#: classes/Gems/Default/SurveyMaintenanceAction.php:128 msgid "Upload new PDF" msgstr "Upload new PDF" -#: classes/Gems/Default/SurveyMaintenanceAction.php:136 +#: classes/Gems/Default/SurveyMaintenanceAction.php:135 msgid "Usage" msgstr "Usage" -#: classes/Gems/Default/SurveyMaintenanceAction.php:151 +#: classes/Gems/Default/SurveyMaintenanceAction.php:150 msgid "Single Survey Assignment" msgstr "Single Survey Assignment" -#: classes/Gems/Default/SurveyMaintenanceAction.php:196 +#: classes/Gems/Default/SurveyMaintenanceAction.php:195 msgid "Assignable since" msgstr "Assignable since" -#: classes/Gems/Default/SurveyMaintenanceAction.php:197 +#: classes/Gems/Default/SurveyMaintenanceAction.php:196 msgid "Assignable until" msgstr "Assignable until" -#: classes/Gems/Default/SurveyMaintenanceAction.php:203 +#: classes/Gems/Default/SurveyMaintenanceAction.php:202 msgid "Create Single Survey" msgstr "Create Single Survey" -#: classes/Gems/Default/SurveyMaintenanceAction.php:207 +#: classes/Gems/Default/SurveyMaintenanceAction.php:206 msgid "At the moment this survey can only be assigned to respondents as part of an existing track." msgstr "At the moment this survey can only be assigned to paitents as part of an existing track." -#: classes/Gems/Default/SurveyMaintenanceAction.php:260 +#: classes/Gems/Default/SurveyMaintenanceAction.php:259 msgid "Survey should be assigned to a group before making it active." msgstr "Survey should be assigned to a group before making it active." -#: classes/Gems/Default/SurveyMaintenanceAction.php:273 +#: classes/Gems/Default/SurveyMaintenanceAction.php:272 #, php-format msgid "Checking survey results for the %s survey." msgstr "Checking survey results for the %s survey." @@ -2257,34 +2271,34 @@ msgid "Status in source" msgstr "Status in source" -#: classes/Gems/Default/SurveyMaintenanceAction.php:352 +#: classes/Gems/Default/SurveyMaintenanceAction.php:351 msgid "Active in source" msgstr "Active in source" -#: classes/Gems/Default/SurveyMaintenanceAction.php:353 +#: classes/Gems/Default/SurveyMaintenanceAction.php:352 #, php-format msgid "Active in %s" msgstr "Active in %s" -#: classes/Gems/Default/SurveyMaintenanceAction.php:360 +#: classes/Gems/Default/SurveyMaintenanceAction.php:359 msgid "Single" msgstr "Single" -#: classes/Gems/Default/SurveyMaintenanceAction.php:393 +#: classes/Gems/Default/SurveyMaintenanceAction.php:392 #, php-format msgid "%d times in track." msgstr "%d times in track." -#: classes/Gems/Default/SurveyMaintenanceAction.php:395 +#: classes/Gems/Default/SurveyMaintenanceAction.php:394 #, php-format msgid "%d times in %d track(s)." msgstr "%d times in %d track(s)." -#: classes/Gems/Default/SurveyMaintenanceAction.php:399 +#: classes/Gems/Default/SurveyMaintenanceAction.php:398 msgid "Not used in track." msgstr "Not used in track." -#: classes/Gems/Default/SurveyMaintenanceAction.php:401 +#: classes/Gems/Default/SurveyMaintenanceAction.php:400 msgid "Not used in tracks." msgstr "Not used in tracks." @@ -2335,62 +2349,62 @@ msgid "(all tracks)" msgstr "(all tracks)" -#: classes/Gems/Default/TokenPlanAction.php:303 +#: classes/Gems/Default/TokenPlanAction.php:304 msgid "(all rounds)" msgstr "(all rounds)" -#: classes/Gems/Default/TokenPlanAction.php:317 +#: classes/Gems/Default/TokenPlanAction.php:318 msgid "(all surveys)" msgstr "(all surveys)" -#: classes/Gems/Default/TokenPlanAction.php:320 +#: classes/Gems/Default/TokenPlanAction.php:321 msgid "(all actions)" msgstr "(all actions)" -#: classes/Gems/Default/TokenPlanAction.php:321 +#: classes/Gems/Default/TokenPlanAction.php:322 msgid "Not emailed" msgstr "Not emailed" -#: classes/Gems/Default/TokenPlanAction.php:322 +#: classes/Gems/Default/TokenPlanAction.php:323 msgid "To email" msgstr "To email" -#: classes/Gems/Default/TokenPlanAction.php:323 +#: classes/Gems/Default/TokenPlanAction.php:324 msgid "Needs reminder" msgstr "Needs reminder" -#: classes/Gems/Default/TokenPlanAction.php:324 +#: classes/Gems/Default/TokenPlanAction.php:325 msgid "Yet to Answer" msgstr "Yet to Answer" -#: classes/Gems/Default/TokenPlanAction.php:325 +#: classes/Gems/Default/TokenPlanAction.php:326 msgid "Answered" msgstr "Answered" -#: classes/Gems/Default/TokenPlanAction.php:326 +#: classes/Gems/Default/TokenPlanAction.php:327 msgid "Missed" msgstr "Missed" -#: classes/Gems/Default/TokenPlanAction.php:339 +#: classes/Gems/Default/TokenPlanAction.php:341 msgid "(all fillers)" msgstr "(all fillers)" -#: classes/Gems/Default/TokenPlanAction.php:357 +#: classes/Gems/Default/TokenPlanAction.php:363 msgid "(all staff)" msgstr "(all staff)" -#: classes/Gems/Default/TokenPlanAction.php:468 +#: classes/Gems/Default/TokenPlanAction.php:474 msgid "+" msgstr "+" -#: classes/Gems/Default/TokenPlanAction.php:477 +#: classes/Gems/Default/TokenPlanAction.php:483 #: classes/Gems/Default/TrackAction.php:449 msgid "token" msgid_plural "tokens" msgstr[0] "token" msgstr[1] "tokens" -#: classes/Gems/Default/TokenPlanAction.php:482 +#: classes/Gems/Default/TokenPlanAction.php:488 msgid "Token planning" msgstr "Token planning" @@ -2489,22 +2503,26 @@ msgid "Start" msgstr "Start" -#: classes/Gems/Default/TrackActionAbstract.php:300 +#: classes/Gems/Default/TrackActionAbstract.php:214 +msgid "Comment" +msgstr "Comment" + +#: classes/Gems/Default/TrackActionAbstract.php:301 #, php-format msgid "Email %s %s" msgstr "Email %s %s" -#: classes/Gems/Default/TrackActionAbstract.php:306 +#: classes/Gems/Default/TrackActionAbstract.php:307 #, php-format msgid "%s %s not found." msgstr "%s %s not found." -#: classes/Gems/Default/TrackActionAbstract.php:482 +#: classes/Gems/Default/TrackActionAbstract.php:487 #, php-format msgid "Overview of %s track for respondent %s" msgstr "Overview of %s track for patient %s" -#: classes/Gems/Default/TrackActionAbstract.php:486 +#: classes/Gems/Default/TrackActionAbstract.php:491 msgid "This track is currently not assigned to this respondent." msgstr "This track is currently not assigned to this patient." @@ -2840,49 +2858,49 @@ msgid "Clean cache" msgstr "Clean cache" -#: classes/Gems/Menu/MenuAbstract.php:410 +#: classes/Gems/Menu/MenuAbstract.php:412 msgid "Check status" msgstr "Check status" -#: classes/Gems/Menu/MenuAbstract.php:411 +#: classes/Gems/Menu/MenuAbstract.php:413 msgid "Synchronize surveys" msgstr "Synchronize surveys" -#: classes/Gems/Menu/MenuAbstract.php:412 -#: classes/Gems/Menu/MenuAbstract.php:423 +#: classes/Gems/Menu/MenuAbstract.php:414 +#: classes/Gems/Menu/MenuAbstract.php:425 msgid "Check answers" msgstr "Check answers" -#: classes/Gems/Menu/MenuAbstract.php:413 +#: classes/Gems/Menu/MenuAbstract.php:415 msgid "Synchronize all surveys" msgstr "Synchronize all surveys" -#: classes/Gems/Menu/MenuAbstract.php:414 -#: classes/Gems/Menu/MenuAbstract.php:424 +#: classes/Gems/Menu/MenuAbstract.php:416 +#: classes/Gems/Menu/MenuAbstract.php:426 msgid "Check all answers" msgstr "Check all answers" -#: classes/Gems/Menu/MenuAbstract.php:420 +#: classes/Gems/Menu/MenuAbstract.php:422 msgid "PDF" msgstr "PDF" -#: classes/Gems/Menu/MenuAbstract.php:454 +#: classes/Gems/Menu/MenuAbstract.php:456 msgid "Check assignments" msgstr "Check assignments" -#: classes/Gems/Menu/MenuAbstract.php:457 +#: classes/Gems/Menu/MenuAbstract.php:459 msgid "Check all assignments" msgstr "Check all assignments" -#: classes/Gems/Menu/SubMenuItem.php:355 +#: classes/Gems/Menu/SubMenuItem.php:373 msgid "New" msgstr "New" -#: classes/Gems/Menu/SubMenuItem.php:409 +#: classes/Gems/Menu/SubMenuItem.php:427 msgid "Export the current data set to Excel" msgstr "Export the current data set to Excel" -#: classes/Gems/Menu/SubMenuItem.php:413 +#: classes/Gems/Menu/SubMenuItem.php:431 msgid "Excel export" msgstr "Excel export" @@ -3014,47 +3032,52 @@ msgid "Answered surveys" msgstr "Answered surveys" -#: classes/Gems/Tracker/ChangeTracker.php:63 +#: classes/Gems/Tracker/ChangeTracker.php:64 #, php-format msgid "Checked %d tracks." msgstr "Checked %d tracks." -#: classes/Gems/Tracker/ChangeTracker.php:66 +#: classes/Gems/Tracker/ChangeTracker.php:67 #, php-format msgid "Checked %d tokens." msgstr "Checked %d tokens." -#: classes/Gems/Tracker/ChangeTracker.php:71 +#: classes/Gems/Tracker/ChangeTracker.php:72 #, php-format msgid "Answers changed by survey completion event for %d tokens." msgstr "Answers changed by survey completion event for %d tokens." -#: classes/Gems/Tracker/ChangeTracker.php:74 +#: classes/Gems/Tracker/ChangeTracker.php:75 #, php-format msgid "Results and timing changed for %d tokens." msgstr "Results and timing changed for %d tokens." -#: classes/Gems/Tracker/ChangeTracker.php:77 +#: classes/Gems/Tracker/ChangeTracker.php:78 #, php-format msgid "%d token round completion events caused changed to %d tokens." msgstr "%d token round completion events caused changed to %d tokens." -#: classes/Gems/Tracker/ChangeTracker.php:80 +#: classes/Gems/Tracker/ChangeTracker.php:81 #, php-format msgid "%2$d token date changes in %1$d tracks." msgstr "%2$d token date changes in %1$d tracks." -#: classes/Gems/Tracker/ChangeTracker.php:83 +#: classes/Gems/Tracker/ChangeTracker.php:84 #, php-format msgid "Round changes propagated to %d tokens." msgstr "Round changes propagated to %d tokens." -#: classes/Gems/Tracker/ChangeTracker.php:86 +#: classes/Gems/Tracker/ChangeTracker.php:87 #, php-format +msgid "%d tokens deleted by round changes." +msgstr "%d tokens deleted by round changes." + +#: classes/Gems/Tracker/ChangeTracker.php:90 +#, php-format msgid "%d tokens created to by round changes." msgstr "%d tokens created to by round changes." -#: classes/Gems/Tracker/ChangeTracker.php:89 +#: classes/Gems/Tracker/ChangeTracker.php:93 msgid "No tokens were changed." msgstr "No tokens were changed." @@ -3184,28 +3207,28 @@ msgid "Use a track level date." msgstr "Use a track level date." -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:414 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:418 #, php-format msgid "%s track engines cannot be converted to %s track engines." msgstr "%s track engines cannot be converted to %s track engines." -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:657 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:661 #, php-format msgid "%d: %s - %s" msgstr "%d: %s - %s" -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:660 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:663 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:664 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:667 #, php-format msgid "%d: %s" msgstr "%d: %s" -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:666 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:670 #, php-format msgid "%s - %s" msgstr "%s - %s" -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:708 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:712 msgid "After change" msgstr "After change" @@ -3293,53 +3316,53 @@ msgid "Next >" msgstr "Next >" -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:507 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:534 msgid "Submitdate" msgstr "Submitdate" -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:883 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:902 #, php-format msgid "Updated %d Gems tokens to new token definition." msgstr "Updated %d Gems tokens to new token definition." -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:903 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:922 #, php-format msgid "The '%s' survey is no longer active. The survey was removed from LimeSurvey!" msgstr "The '%s' survey is no longer active. The survey was removed from LimeSurvey!" -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1020 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1057 #, php-format msgid "Updated %d token to new token definition in survey '%s'." msgid_plural "Updated %d tokens to new token definition in survey '%s'." msgstr[0] "Updated %d token to new token definition in survey '%s'." msgstr[1] "Updated %d tokens to new token definition in survey '%s'." -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1038 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1075 #, php-format msgid "The status of the '%s' survey has changed." msgstr "The status of the '%s' survey has changed." -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1044 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1081 #, php-format msgid "Survey '%s' IS NO LONGER ACTIVE!!!" msgstr "Survey '%s' IS NO LONGER ACTIVE!!!" -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1050 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1087 #, php-format msgid "The status of the '%s' survey has changed to '%s'." msgstr "The status of the '%s' survey has changed to '%s'." -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1053 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1090 #, php-format msgid "The status warning for the '%s' survey was removed." msgstr "The status warning for the '%s' survey was removed." -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1059 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1096 #, php-format msgid "The name of the '%s' survey has changed to '%s'." msgstr "The name of the '%s' survey has changed to '%s'." -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1069 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1106 #, php-format msgid "Imported the '%s' survey." msgstr "Imported the '%s' survey." @@ -3382,35 +3405,30 @@ msgstr "Rank %d" #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:277 -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:300 -msgid "Comment" -msgstr "Comment" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:277 -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:300 +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:299 msgid " (comment)" msgstr " (comment)" -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:475 +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:474 msgid "Free number" msgstr "Free number" -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:481 +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:480 msgid "Free text (long)" msgstr "Free text (long)" -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:484 +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:483 msgid "Free text (very long)" msgstr "Free text (very long)" #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:623 #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:680 -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:735 +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:734 #, php-format msgid "%s: %s" msgstr "%s: %s" -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:755 +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:754 #, php-format msgid "- %s" msgstr "- %s" @@ -3459,10 +3477,15 @@ msgstr[0] "A password should contain at least one number." msgstr[1] "A password should contain at least %d numbers." -#: classes/Gems/User/User.php:765 +#: classes/Gems/User/User.php:767 msgid "Cookies must be enabled for this site." msgstr "Cookies must be enabled for this site." +#: classes/Gems/User/UserLoader.php:141 +#: classes/Gems/User/UserLoader.php:155 +msgid "Db storage" +msgstr "Db storage" + #: classes/Gems/User/UserPasswordValidator.php:115 msgid "Wrong password." msgstr "Wrong password." @@ -3623,15 +3646,15 @@ msgstr[0] "decade" msgstr[1] "decades" -#: classes/MUtil/Snippets/ModelFormSnippetAbstract.php:174 +#: classes/MUtil/Snippets/ModelFormSnippetAbstract.php:210 msgid "No changes to save!" msgstr "No changes to save!" -#: classes/MUtil/Snippets/ModelFormSnippetAbstract.php:355 +#: classes/MUtil/Snippets/ModelFormSnippetAbstract.php:401 msgid "Unknown edit data requested" msgstr "Unknown edit data requested" -#: classes/MUtil/Snippets/ModelFormSnippetAbstract.php:378 +#: classes/MUtil/Snippets/ModelFormSnippetAbstract.php:424 #, php-format msgid "Input error! Changes to %s not saved!" msgstr "Input error! Changes to %s not saved!" @@ -3772,14 +3795,10 @@ msgid "None available" msgstr "None available" -#: snippets/DeleteInSourceTrackSnippet.php:127 +#: snippets/DeleteInSourceTrackSnippet.php:130 msgid "Edit track" msgstr "Edit track" -#: snippets/DeleteInSourceTrackSnippet.php:173 -msgid "Track deleted." -msgstr "Track deleted." - #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:172 #: snippets/DeleteSingleSurveyNotUsedTokenSnippet.php:143 #: snippets/DeleteTrackTokenSnippet.php:193 @@ -3813,6 +3832,7 @@ msgstr "Deleted token %s for survey %s." #: snippets/DeleteTrackTokenSnippet.php:286 +#: snippets/EditTrackTokenSnippet.php:174 #, php-format msgid "%d token changed by recalculation." msgid_plural "%d tokens changed by recalculation." @@ -3824,7 +3844,6 @@ msgstr "Lists choices changed." #: snippets/EditSingleSurveyTokenSnippet.php:132 -#: snippets/ShowSingleSurveyTokenSnippet.php:150 msgid "Show survey" msgstr "Show survey" @@ -3943,6 +3962,33 @@ msgid "This organization cannot have any respondents." msgstr "This organization cannot have any patients." +#: snippets/Organization/OrganizationEditSnippet.php:71 +msgid "General" +msgstr "General" + +#: snippets/Organization/OrganizationEditSnippet.php:77 +msgid "The contact details for this organization, used for emailing." +msgstr "The contact details for this organization, used for emailing." + +#: snippets/Organization/OrganizationEditSnippet.php:83 +msgid "Email" +msgstr "Email" + +#: snippets/Organization/OrganizationEditSnippet.php:88 +msgid "Access" +msgstr "Access" + +#: snippets/Organization/OrganizationEditSnippet.php:106 +msgid "Can access" +msgstr "Can access" + +#: views/scripts/index/login.phtml:12 +msgid "The Pulse software was made possible thanks to support from " +msgstr "The Pulse software was made possible thanks to support from " + +#~ msgid "Track deleted." +#~ msgstr "Track deleted." + #~ msgid "Cookies must be enabled." #~ msgstr "Cookies must be enabled." @@ -3967,9 +4013,6 @@ #~ msgid "BSN" #~ msgstr "BSN" -#~ msgid "The Pulse software was made possible thanks to support from " -#~ msgstr "The Pulse software was made possible thanks to support from " - #~ msgid "Activity" #~ msgstr "Activity" @@ -4006,9 +4049,6 @@ #~ msgid "No logged errors found." #~ msgstr "No logged errors found." -#~ msgid "Email" -#~ msgstr "Email" - #~ msgid "Lime Survey Sources" #~ msgstr "Lime Survey Sources" Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2011-12-20 11:11:27 UTC (rev 377) +++ trunk/library/languages/default-nl.po 2011-12-20 11:18:39 UTC (rev 378) @@ -2,9 +2,9 @@ msgstr "" "Project-Id-Version: Pulse NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-11-28 19:14+0100\n" +"POT-Creation-Date: 2011-12-20 12:13+0100\n" "PO-Revision-Date: \n" -"Last-Translator: Matijs de Jong <mj...@ma...>\n" +"Last-Translator: Menno Dekker <men...@er...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -23,57 +23,57 @@ msgid "Path %s not writable" msgstr "Path %s niet schrijfbaar" -#: classes/GemsEscort.php:891 +#: classes/GemsEscort.php:893 #, php-format msgid "User: %s" msgstr "Login: %s" -#: classes/GemsEscort.php:916 +#: classes/GemsEscort.php:918 msgid "version" msgstr "versie" -#: classes/GemsEscort.php:1347 +#: classes/GemsEscort.php:1349 msgid "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" msgstr "Let op: uw sessie is verlopen, uw invoer is niet opgeslagen. Controleer uw gegevens en probeer a.u.b. opnieuw." -#: classes/GemsEscort.php:1474 +#: classes/GemsEscort.php:1476 msgid "Please check back later." msgstr "Probeer het later opnieuw." -#: classes/GemsEscort.php:1476 -#: classes/GemsEscort.php:1480 -#: classes/GemsEscort.php:1481 +#: classes/GemsEscort.php:1478 +#: classes/GemsEscort.php:1482 +#: classes/GemsEscort.php:1483 msgid "System is in maintenance mode" msgstr "Systeem is in onderhoudsmodus" -#: classes/GemsEscort.php:1491 +#: classes/GemsEscort.php:1493 msgid "No access to site." msgstr "Geen toegang tot website." -#: classes/GemsEscort.php:1493 -#: classes/GemsEscort.php:1529 +#: classes/GemsEscort.php:1495 +#: classes/GemsEscort.php:1537 msgid "You have no access to this site." msgstr "U heeft geen toegang tot deze website." -#: classes/GemsEscort.php:1509 +#: classes/GemsEscort.php:1511 msgid "No access to page" msgstr "Geen toegang tot pagina" -#: classes/GemsEscort.php:1511 +#: classes/GemsEscort.php:1513 #, php-format msgid "Access to this page is not allowed for current role: %s." msgstr "U heeft geen toegang tot deze pagina. Uw huidige rol is: %s." -#: classes/GemsEscort.php:1516 -#: classes/GemsEscort.php:1527 +#: classes/GemsEscort.php:1523 +#: classes/GemsEscort.php:1535 msgid "You are no longer logged in." msgstr "U bent niet meer ingelogd." -#: classes/GemsEscort.php:1517 +#: classes/GemsEscort.php:1524 msgid "You must login to access this page." msgstr "U moet ingelogd zijn voor toegang tot deze pagina." -#: classes/Gems/AccessLog.php:239 +#: classes/Gems/AccessLog.php:236 msgid "Database needs to be updated!" msgstr "Database dient ververst te worden!" @@ -338,73 +338,73 @@ msgid "Changelog" msgstr "Changelog" -#: classes/Gems/Model.php:193 +#: classes/Gems/Model.php:200 msgid "Respondent nr" msgstr "Patiënt nr" -#: classes/Gems/Model.php:194 +#: classes/Gems/Model.php:201 msgid "Opened" msgstr "Bekeken" -#: classes/Gems/Model.php:195 +#: classes/Gems/Model.php:202 msgid "Consent" msgstr "Toestemming" -#: classes/Gems/Model.php:197 +#: classes/Gems/Model.php:204 msgid "E-Mail" msgstr "Email" -#: classes/Gems/Model.php:202 +#: classes/Gems/Model.php:209 msgid "Gender" msgstr "Geslacht" -#: classes/Gems/Model.php:203 +#: classes/Gems/Model.php:210 msgid "First name" msgstr "Voornaam" -#: classes/Gems/Model.php:204 +#: classes/Gems/Model.php:211 msgid "Surname prefix" msgstr "Tussenvoegsel" -#: classes/Gems/Model.php:205 +#: classes/Gems/Model.php:212 msgid "Last name" msgstr "Achternaam" -#: classes/Gems/Model.php:207 +#: classes/Gems/Model.php:214 msgid "Name" msgstr "Naam" -#: classes/Gems/Model.php:210 +#: classes/Gems/Model.php:217 msgid "Street" msgstr "Straat" -#: classes/Gems/Model.php:211 +#: classes/Gems/Model.php:218 msgid "Zipcode" msgstr "Postcode" -#: classes/Gems/Model.php:212 +#: classes/Gems/Model.php:219 msgid "City" msgstr "Stad" -#: classes/Gems/Model.php:214 +#: classes/Gems/Model.php:221 msgid "Phone" msgstr "Telefoon" -#: classes/Gems/Model.php:216 +#: classes/Gems/Model.php:223 msgid "Birthday" msgstr "Geboren op" -#: classes/Gems/Pdf.php:195 +#: classes/Gems/Pdf.php:198 #, php-format msgid "PDF Source File '%s' not found!" msgstr "PDF bron bestand %s niet gevonden!" -#: classes/Gems/Pdf.php:237 +#: classes/Gems/Pdf.php:240 #, php-format msgid "Could not create '%s' directory." msgstr "Kon de directory '%s' niet aanmaken." -#: classes/Gems/Pdf.php:280 +#: classes/Gems/Pdf.php:283 #, php-format msgid " The error message is: %s" msgstr "De foutmelding is: %s" @@ -431,89 +431,94 @@ msgid "Cache cleaned" msgstr "Cache opgeschoond" -#: classes/Gems/Controller/BrowseEditAction.php:346 +#: classes/Gems/Controller/BrowseEditAction.php:349 #, php-format msgid "New %s..." msgstr "Nieuw %s..." -#: classes/Gems/Controller/BrowseEditAction.php:378 +#: classes/Gems/Controller/BrowseEditAction.php:382 #, php-format msgid "Delete %s" msgstr "Verwijder %s" -#: classes/Gems/Controller/BrowseEditAction.php:382 +#: classes/Gems/Controller/BrowseEditAction.php:386 #, php-format msgid "%2$u %1$s deleted" msgstr "%2$u %1$s verwijderd" -#: classes/Gems/Controller/BrowseEditAction.php:396 +#: classes/Gems/Controller/BrowseEditAction.php:400 #, php-format msgid "Edit %s" msgstr "Bewerk %s" -#: classes/Gems/Controller/BrowseEditAction.php:493 +#: classes/Gems/Controller/BrowseEditAction.php:497 msgid "Free search text" msgstr "Vrije zoek tekst" -#: classes/Gems/Controller/BrowseEditAction.php:564 +#: classes/Gems/Controller/BrowseEditAction.php:568 msgid "Search" msgstr "Zoeken" -#: classes/Gems/Controller/BrowseEditAction.php:580 +#: classes/Gems/Controller/BrowseEditAction.php:584 #, php-format msgid "No %s found" msgstr "Geen %s gevonden" -#: classes/Gems/Controller/BrowseEditAction.php:653 +#: classes/Gems/Controller/BrowseEditAction.php:657 +#: classes/Gems/Default/ExportAction.php:234 #, php-format msgid "No %s found." msgstr "Geen %s gevonden." -#: classes/Gems/Controller/BrowseEditAction.php:768 +#: classes/Gems/Controller/BrowseEditAction.php:772 msgid "Are you sure?" msgstr "Weet u het zeker?" -#: classes/Gems/Controller/BrowseEditAction.php:784 +#: classes/Gems/Controller/BrowseEditAction.php:788 +#: classes/Gems/Default/DatabaseAction.php:218 +#: classes/Gems/Default/DatabaseAction.php:528 msgid "Yes" msgstr "Ja" -#: classes/Gems/Controller/BrowseEditAction.php:785 +#: classes/Gems/Controller/BrowseEditAction.php:789 +#: classes/Gems/Default/DatabaseAction.php:219 +#: classes/Gems/Default/DatabaseAction.php:529 msgid "No" msgstr "Nee" -#: classes/Gems/Controller/BrowseEditAction.php:838 +#: classes/Gems/Controller/BrowseEditAction.php:842 #, php-format msgid "Unknown %s requested" msgstr "Onjuist %s verzoek" -#: classes/Gems/Controller/BrowseEditAction.php:861 +#: classes/Gems/Controller/BrowseEditAction.php:865 #, php-format msgid "New %1$s..." msgstr "Nieuwe %1$s..." -#: classes/Gems/Controller/BrowseEditAction.php:869 +#: classes/Gems/Controller/BrowseEditAction.php:873 msgid "Save" msgstr "Opslaan" -#: classes/Gems/Controller/BrowseEditAction.php:905 +#: classes/Gems/Controller/BrowseEditAction.php:909 #, php-format msgid "%2$u %1$s saved" msgstr "%2$u %1$s opgeslagen" -#: classes/Gems/Controller/BrowseEditAction.php:908 +#: classes/Gems/Controller/BrowseEditAction.php:912 msgid "No changes to save." msgstr "Geen verandering om op te slaan." -#: classes/Gems/Controller/BrowseEditAction.php:917 +#: classes/Gems/Controller/BrowseEditAction.php:921 msgid "Input error! No changes saved!" msgstr "Invoer fout! Veranderingen niet opgeslagen!" -#: classes/Gems/Controller/BrowseEditAction.php:945 +#: classes/Gems/Controller/BrowseEditAction.php:949 #, php-format msgid "Show %s" msgstr "Toon %s" -#: classes/Gems/Controller/BrowseEditAction.php:952 +#: classes/Gems/Controller/BrowseEditAction.php:956 #, php-format msgid "Unknown %s." msgstr "%s is onbekend." @@ -1013,7 +1018,6 @@ msgstr "Exporteer gegevens" #: classes/Gems/Default/ExportAction.php:153 -#: classes/Gems/Default/MailJobAction.php:121 msgid "Survey" msgstr "Vragenlijst" @@ -1023,8 +1027,7 @@ msgstr "%s records gevonden." #: classes/Gems/Default/ExportAction.php:172 -#: classes/Gems/Default/IndexAction.php:192 -#: classes/Gems/Default/MailJobAction.php:119 +#: classes/Gems/Default/IndexAction.php:200 msgid "Organization" msgstr "Organisatie" @@ -1038,7 +1041,6 @@ msgstr "Rol" #: classes/Gems/Default/GroupAction.php:92 -#: classes/Gems/Default/MailJobAction.php:104 msgid "Active" msgstr "Actief" @@ -1056,88 +1058,88 @@ msgid "Administrative groups" msgstr "Beheer groepen" -#: classes/Gems/Default/IndexAction.php:97 +#: classes/Gems/Default/IndexAction.php:105 msgid "Enter your token..." msgstr "Voer uw kenmerk in..." -#: classes/Gems/Default/IndexAction.php:140 +#: classes/Gems/Default/IndexAction.php:148 #, php-format msgid "Login to %s application" msgstr "%s login" -#: classes/Gems/Default/IndexAction.php:144 +#: classes/Gems/Default/IndexAction.php:152 msgid "Login" msgstr "Login" -#: classes/Gems/Default/IndexAction.php:166 +#: classes/Gems/Default/IndexAction.php:174 msgid "Back to login" msgstr "Terug naar de login" -#: classes/Gems/Default/IndexAction.php:214 +#: classes/Gems/Default/IndexAction.php:224 msgid "Password" msgstr "Wachtwoord" -#: classes/Gems/Default/IndexAction.php:229 +#: classes/Gems/Default/IndexAction.php:239 #, php-format msgid "Reset password for %s application" msgstr "Reset wachtwoord voor %s" -#: classes/Gems/Default/IndexAction.php:233 +#: classes/Gems/Default/IndexAction.php:243 msgid "Reset password" msgstr "Reset wachtwoord" -#: classes/Gems/Default/IndexAction.php:279 +#: classes/Gems/Default/IndexAction.php:289 msgid "Username" msgstr "Gebruikersnaam" -#: classes/Gems/Default/IndexAction.php:333 +#: classes/Gems/Default/IndexAction.php:355 msgid "Your password must be changed." msgstr "Uw wachtwoord moet veranderd worden." -#: classes/Gems/Default/IndexAction.php:345 +#: classes/Gems/Default/IndexAction.php:367 #, php-format msgid "Login successful, welcome %s." msgstr "Login in orde, welkom %s." -#: classes/Gems/Default/IndexAction.php:385 +#: classes/Gems/Default/IndexAction.php:407 #, php-format msgid "Good bye: %s." msgstr "Tot ziens: %s." -#: classes/Gems/Default/IndexAction.php:410 +#: classes/Gems/Default/IndexAction.php:432 msgid "Reset accepted, enter your new password." msgstr "Reset geaccepteerd, voer uw nieuwe wachtwoord in." -#: classes/Gems/Default/IndexAction.php:414 +#: classes/Gems/Default/IndexAction.php:436 msgid "This key timed out or does not belong to this user." msgstr "Te oude sleutel of sleutel hoort niet bij gebruiker." -#: classes/Gems/Default/IndexAction.php:431 +#: classes/Gems/Default/IndexAction.php:459 msgid "Password reset requested" msgstr "Wachtwoord reset aangevraagd" -#: classes/Gems/Default/IndexAction.php:432 +#: classes/Gems/Default/IndexAction.php:460 #, php-format msgid "To reset your password for %s, please click this link: %s" msgstr "Om uw wachtwoord voor %s te resetten, klik op deze link: %s" -#: classes/Gems/Default/IndexAction.php:437 +#: classes/Gems/Default/IndexAction.php:465 msgid "We sent you an e-mail with a reset link. Click on the link in the e-mail." msgstr "We hebben u een email met reset link gestuurd. Klik op de link in de email." -#: classes/Gems/Default/IndexAction.php:439 +#: classes/Gems/Default/IndexAction.php:467 msgid "Unable to send e-mail." msgstr "Verzenden e-mail mislukt." -#: classes/Gems/Default/IndexAction.php:444 +#: classes/Gems/Default/IndexAction.php:472 msgid "No such user found or no e-mail address known or user cannot be reset." msgstr "Gebruiker niet gevonden of e-mail adres onbekend of gebruiker kan niet gereset worden." -#: classes/Gems/Default/IndexAction.php:448 +#: classes/Gems/Default/IndexAction.php:476 msgid "We received your password reset key." msgstr "Wachtwoord resetsleutel ontvangen." -#: classes/Gems/Default/IndexAction.php:449 +#: classes/Gems/Default/IndexAction.php:477 msgid "Please enter the organization and username belonging to this key." msgstr "Geef de organisatie en gebruikersnaam die bij deze sleutel horen op." @@ -1227,19 +1229,19 @@ msgid "Log" msgstr "Logboek" -#: classes/Gems/Default/LogMaintenanceAction.php:70 +#: classes/Gems/Default/LogMaintenanceAction.php:71 msgid "Log:" msgstr "Logboek:" -#: classes/Gems/Default/LogMaintenanceAction.php:71 +#: classes/Gems/Default/LogMaintenanceAction.php:72 msgid "All" msgstr "Alles" -#: classes/Gems/Default/LogMaintenanceAction.php:77 +#: classes/Gems/Default/LogMaintenanceAction.php:78 msgid "Log action" msgstr "Logboek actie" -#: classes/Gems/Default/LogMaintenanceAction.php:81 +#: classes/Gems/Default/LogMaintenanceAction.php:82 msgid "Log maintenance" msgstr "Logboek onderhoud" @@ -1252,6 +1254,7 @@ msgstr "Nieuwe automatische mail opdracht..." #: classes/Gems/Default/MailJobAction.php:100 +#: classes/Gems/Default/MailLogAction.php:116 msgid "Template" msgstr "Sjabloon" @@ -1423,13 +1426,13 @@ #: classes/Gems/Default/OptionAction.php:113 #: classes/Gems/Default/OptionAction.php:118 #: classes/Gems/Default/SourceAction.php:95 -#: classes/Gems/Default/StaffAction.php:151 +#: classes/Gems/Default/StaffAction.php:144 msgid "Repeat password" msgstr "Herhaal wachtwoord" #: classes/Gems/Default/MailServerAction.php:91 #: classes/Gems/Default/SourceAction.php:74 -#: classes/Gems/Default/StaffAction.php:126 +#: classes/Gems/Default/StaffAction.php:120 msgid "Enter only when changing" msgstr "Alleen invoeren om het wachtwoord te wijzigen" @@ -1444,7 +1447,8 @@ msgstr "Email servers" #: classes/Gems/Default/MailTemplateAction.php:75 -#: classes/Gems/Default/StaffAction.php:239 +#: classes/Gems/Default/StaffAction.php:212 +#: classes/Gems/Default/StaffAction.php:245 msgid "(all organizations)" msgstr "(alle organisaties)" @@ -1486,7 +1490,7 @@ #: classes/Gems/Default/OptionAction.php:188 #: classes/Gems/Default/OrganizationAction.php:139 #: classes/Gems/Default/RespondentAction.php:173 -#: classes/Gems/Default/StaffAction.php:224 +#: classes/Gems/Default/StaffAction.php:228 msgid "Language" msgstr "Taal" @@ -1560,7 +1564,7 @@ #: classes/Gems/Default/OrganizationAction.php:145 msgid "Accepting" -msgstr "Accepteerd" +msgstr "Accepteert" #: classes/Gems/Default/OrganizationAction.php:145 msgid "Can new respondents be added to the organization?" @@ -1607,25 +1611,32 @@ msgid "Only for programmers." msgstr "Uitsluitend voor programmeurs." -#: classes/Gems/Default/OrganizationAction.php:178 +#: classes/Gems/Default/OrganizationAction.php:173 +msgid "This can not be changed yet" +msgstr "Dit kan nog niet gewijzigd worden" + +#: classes/Gems/Default/OrganizationAction.php:175 +msgid "User Definition" +msgstr "User Definition" + +#: classes/Gems/Default/OrganizationAction.php:193 msgid "Delete organization" msgstr "Verwijder organisatie" -#: classes/Gems/Default/OrganizationAction.php:188 +#: classes/Gems/Default/OrganizationAction.php:203 msgid "Edit organization" msgstr "Bewerk organisatie" -#: classes/Gems/Default/OrganizationAction.php:198 +#: classes/Gems/Default/OrganizationAction.php:213 msgid "Participating organizations" msgstr "Deelnemende organisaties" -#: classes/Gems/Default/OrganizationAction.php:208 +#: classes/Gems/Default/OrganizationAction.php:223 msgid "Show organization" msgstr "Toon organisatie" #: classes/Gems/Default/OverviewPlanAction.php:115 #: classes/Gems/Default/ProjectSurveysAction.php:88 -#: classes/Gems/Default/SurveyAction.php:203 msgid "survey" msgid_plural "surveys" msgstr[0] "vragenlijst" @@ -1748,19 +1759,16 @@ msgstr "Sessie" #: classes/Gems/Default/ProjectSurveysAction.php:68 -#: classes/Gems/Default/SurveyAction.php:192 msgid "By" msgstr "Door" #: classes/Gems/Default/ProjectSurveysAction.php:69 #: classes/Gems/Default/ProjectTracksAction.php:67 -#: classes/Gems/Default/SurveyAction.php:193 msgid "From" msgstr "Van" #: classes/Gems/Default/ProjectSurveysAction.php:70 #: classes/Gems/Default/ProjectTracksAction.php:68 -#: classes/Gems/Default/SurveyAction.php:195 msgid "Until" msgstr "Tot" @@ -1788,7 +1796,6 @@ msgstr "Vragen in vragenlijsten %s" #: classes/Gems/Default/ProjectTracksAction.php:118 -#: classes/Gems/Default/SurveyAction.php:85 #, php-format msgid "Survey %s does not exist." msgstr "Vragenlijst %s bestaat niet." @@ -1968,7 +1975,6 @@ msgstr "A.u.b. het informed consent formulier doornemen met deze patiënt" #: classes/Gems/Default/RespondentPlanAction.php:67 -#: classes/Gems/Default/SurveyAction.php:171 msgid "Show respondent" msgstr "Toon patiënt" @@ -2126,15 +2132,19 @@ msgid "Synchronization will update the status of all surveys imported into this project to the status at the sources." msgstr "Synchronisatie zal de status van alle vragenlijsten in dit project aanpassen aan de status van de bron." -#: classes/Gems/Default/SourceAction.php:252 +#: classes/Gems/Default/SourceAction.php:258 msgid "Are you sure you want to synchronize all survey sources?" msgstr "Weet je zeker dat je alle bronnen wil synchroniseren?" -#: classes/Gems/Default/StaffAction.php:169 +#: classes/Gems/Default/StaffAction.php:162 +msgid "Users can only login when this box is checked." +msgstr "Gebruikers kunnen alleen inloggen als dit is aangevinkt." + +#: classes/Gems/Default/StaffAction.php:163 msgid "If checked the user will logoff when answering a survey." msgstr "Indien actief, dan logt de gebruiker uit voor het beantwoorden van een vragenlijst." -#: classes/Gems/Default/StaffAction.php:185 +#: classes/Gems/Default/StaffAction.php:183 msgid "You are not allowed to edit this staff member." msgstr "U mag deze medewerker niet wijzigen." @@ -2142,11 +2152,15 @@ msgid "Primary function" msgstr "Primaire functie" -#: classes/Gems/Default/StaffAction.php:225 +#: classes/Gems/Default/StaffAction.php:229 +msgid "Can login" +msgstr "Kan inloggen" + +#: classes/Gems/Default/StaffAction.php:230 msgid "Logout on survey" msgstr "Logout bij beantwoorden vragenlijst" -#: classes/Gems/Default/StaffAction.php:295 +#: classes/Gems/Default/StaffAction.php:305 msgid "staff member" msgid_plural "staff members" msgstr[0] "medewerker" @@ -2212,39 +2226,39 @@ msgid "After completion" msgstr "Na afronding" -#: classes/Gems/Default/SurveyMaintenanceAction.php:129 +#: classes/Gems/Default/SurveyMaintenanceAction.php:128 msgid "Upload new PDF" msgstr "Upload nieuwe PDF" -#: classes/Gems/Default/SurveyMaintenanceAction.php:136 +#: classes/Gems/Default/SurveyMaintenanceAction.php:135 msgid "Usage" msgstr "Gebruik" -#: classes/Gems/Default/SurveyMaintenanceAction.php:151 +#: classes/Gems/Default/SurveyMaintenanceAction.php:150 msgid "Single Survey Assignment" msgstr "Losse vragenlijst toewijzing" -#: classes/Gems/Default/SurveyMaintenanceAction.php:196 +#: classes/Gems/Default/SurveyMaintenanceAction.php:195 msgid "Assignable since" msgstr "Toewijsbaar sinds" -#: classes/Gems/Default/SurveyMaintenanceAction.php:197 +#: classes/Gems/Default/SurveyMaintenanceAction.php:196 msgid "Assignable until" msgstr "Toewijsbaar tot" -#: classes/Gems/Default/SurveyMaintenanceAction.php:203 +#: classes/Gems/Default/SurveyMaintenanceAction.php:202 msgid "Create Single Survey" msgstr "Maak losse vragenlijst" -#: classes/Gems/Default/SurveyMaintenanceAction.php:207 +#: classes/Gems/Default/SurveyMaintenanceAction.php:206 msgid "At the moment this survey can only be assigned to respondents as part of an existing track." msgstr "Op dit moment kan deze vragenlijst alleen aan patiënten toegewezen als onderdeel van een traject." -#: classes/Gems/Default/SurveyMaintenanceAction.php:260 +#: classes/Gems/Default/SurveyMaintenanceAction.php:259 msgid "Survey should be assigned to a group before making it active." msgstr "Vragenlijst moet aan een groep toegewezen worden voordat deze actief kan worden gemaakt." -#: classes/Gems/Default/SurveyMaintenanceAction.php:273 +#: classes/Gems/Default/SurveyMaintenanceAction.php:272 #, php-format msgid "Checking survey results for the %s survey." msgstr "Controle op vragenlijstresultaten voor de vragenlijst '%s'." @@ -2257,34 +2271,34 @@ msgid "Status in source" msgstr "Status in bron" -#: classes/Gems/Default/SurveyMaintenanceAction.php:352 +#: classes/Gems/Default/SurveyMaintenanceAction.php:351 msgid "Active in source" msgstr "Actief in bron" -#: classes/Gems/Default/SurveyMaintenanceAction.php:353 +#: classes/Gems/Default/SurveyMaintenanceAction.php:352 #, php-format msgid "Active in %s" msgstr "Actief in %s" -#: classes/Gems/Default/SurveyMaintenanceAction.php:360 +#: classes/Gems/Default/SurveyMaintenanceAction.php:359 msgid "Single" msgstr "Los" -#: classes/Gems/Default/SurveyMaintenanceAction.php:393 +#: classes/Gems/Default/SurveyMaintenanceAction.php:392 #, php-format msgid "%d times in track." msgstr "%d keer in traject." -#: classes/Gems/Default/SurveyMaintenanceAction.php:395 +#: classes/Gems/Default/SurveyMaintenanceAction.php:394 #, php-format msgid "%d times in %d track(s)." msgstr "%d keer in %d traject(en)." -#: classes/Gems/Default/SurveyMaintenanceAction.php:399 +#: classes/Gems/Default/SurveyMaintenanceAction.php:398 msgid "Not used in track." msgstr "Niet in traject gebruikt." -#: classes/Gems/Default/SurveyMaintenanceAction.php:401 +#: classes/Gems/Default/SurveyMaintenanceAction.php:400 msgid "Not used in tracks." msgstr "Niet in trajecten gebruikt." @@ -2335,62 +2349,62 @@ msgid "(all tracks)" msgstr "(alle trajecten)" -#: classes/Gems/Default/TokenPlanAction.php:303 +#: classes/Gems/Default/TokenPlanAction.php:304 msgid "(all rounds)" msgstr "(alle rondes)" -#: classes/Gems/Default/TokenPlanAction.php:317 +#: classes/Gems/Default/TokenPlanAction.php:318 msgid "(all surveys)" msgstr "(alle vragenlijsten)" -#: classes/Gems/Default/TokenPlanAction.php:320 +#: classes/Gems/Default/TokenPlanAction.php:321 msgid "(all actions)" msgstr "(alle acties)" -#: classes/Gems/... [truncated message content] |
From: <gem...@li...> - 2011-12-20 11:11:36
|
Revision: 377 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=377&view=rev Author: mennodekker Date: 2011-12-20 11:11:27 +0000 (Tue, 20 Dec 2011) Log Message: ----------- OrganizationAction: Show allowed organizations in edit screen and leave out self in accessbile by list. Modified Paths: -------------- trunk/library/snippets/Organization/OrganizationEditSnippet.php Modified: trunk/library/snippets/Organization/OrganizationEditSnippet.php =================================================================== --- trunk/library/snippets/Organization/OrganizationEditSnippet.php 2011-12-20 10:51:27 UTC (rev 376) +++ trunk/library/snippets/Organization/OrganizationEditSnippet.php 2011-12-20 11:11:27 UTC (rev 377) @@ -87,8 +87,27 @@ if (!($bridge->getTab('access'))) { $bridge->addTab('access', 'value', $this->_('Access')); } - $this->addItems($bridge, 'gor_has_login', 'gor_add_respondents', 'gor_respondent_group', 'gor_accessible_by', 'gor_user_class'); + //Strip self from list of organizations + if (isset($this->formData['gor_id_organization']) && !empty($this->formData['gor_id_organization'])) { + $multiOptions = $model->get('gor_accessible_by', 'multiOptions'); + unset($multiOptions[$this->formData['gor_id_organization']]); + $model->set('gor_accessible_by', 'multiOptions', $multiOptions); + } + $this->addItems($bridge, 'gor_has_login', 'gor_add_respondents', 'gor_respondent_group', 'gor_accessible_by'); + + //Show what organizations we can access + if (isset($this->formData['gor_id_organization']) && !empty($this->formData['gor_id_organization'])) { + $org = $this->loader->getOrganization($this->formData['gor_id_organization']); + $allowedOrgs = $org->getAllowedOrganizations(); + //Strip self + unset($allowedOrgs[$this->formData['gor_id_organization']]); + $display = join(', ', $allowedOrgs); + $bridge->addExhibitor('allowed', 'value', $display, 'label', $this->_('Can access')); + } + + $this->addItems($bridge, 'gor_user_class'); + if (isset($this->formData['gor_user_class']) && !empty($this->formData['gor_user_class'])) { $class = $this->formData['gor_user_class'] . 'Definition'; $definition = $this->loader->getUserLoader()->getUserDefinition($class); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-20 10:51:38
|
Revision: 376 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=376&view=rev Author: mennodekker Date: 2011-12-20 10:51:27 +0000 (Tue, 20 Dec 2011) Log Message: ----------- StaffAction now should work right with multiple allowed organizations, sometimes the 'new' option doesn't work right when pr.staff.see.all without pr.staff.edit.all Modified Paths: -------------- trunk/library/classes/Gems/Default/StaffAction.php trunk/library/classes/Gems/Menu/MenuAbstract.php Modified: trunk/library/classes/Gems/Default/StaffAction.php =================================================================== --- trunk/library/classes/Gems/Default/StaffAction.php 2011-12-19 15:56:11 UTC (rev 375) +++ trunk/library/classes/Gems/Default/StaffAction.php 2011-12-20 10:51:27 UTC (rev 376) @@ -1,5 +1,4 @@ <?php - /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -175,8 +174,12 @@ $sql = "SELECT ggp_id_group,ggp_role FROM gems__groups WHERE ggp_id_group = " . (int) $data['gsf_id_primary_group']; $groups = $this->db->fetchPairs($sql); + if (!isset($data['gsf_id_organization']) || empty($data['gsf_id_organization'])) { + $data['gsf_id_organization'] = $this->menu->getParameterSource()->getMenuParameter('gsf_id_organization', $this->loader->getCurrentUser()->getCurrentOrganizationId()); + } + if (! ($this->escort->hasPrivilege('pr.staff.edit.all') || - $data['gsf_id_organization'] == $this->escort->getCurrentOrganization())) { + array_key_exists($data['gsf_id_organization'], $this->loader->getCurrentUser()->getAllowedOrganizations()))) { throw new Zend_Exception($this->_('You are not allowed to edit this staff member.')); } } @@ -203,19 +206,25 @@ 'column_expression', "CONCAT(COALESCE(CONCAT(gsf_last_name, ', '), '-, '), COALESCE(CONCAT(gsf_first_name, ' '), ''), COALESCE(gsf_surname_prefix, ''))"); $model->set('gsf_email', 'label', $this->_('E-Mail'), 'itemDisplay', 'MUtil_Html_AElement::ifmail'); - if ($detailed || $this->escort->hasPrivilege('pr.staff.see.all')) { - //$this->menu->getParameterSource()->offsetSet('gsf_id_organization', $this->escort->getCurrentOrganization()); - - $model->set('gsf_id_organization', 'label', $this->_('Organization'), - 'multiOptions', $this->util->getDbLookup()->getOrganizations(), - 'default', $this->escort->getCurrentOrganization()); + $availableOrganizations = $this->util->getDbLookup()->getOrganizations(); + if ($this->escort->hasPrivilege('pr.staff.see.all')) { + // Select organization + $options = array('' => $this->_('(all organizations)')) + $availableOrganizations; + } else { + $allowedOrganizations = $this->loader->getCurrentUser()->getAllowedOrganizations(); + $options = array_intersect($availableOrganizations, $allowedOrganizations); } + $model->set('gsf_id_organization', 'label', $this->_('Organization'), 'multiOptions', $options); $model->set('gsf_id_primary_group', 'label', $this->_('Primary function'), 'multiOptions', MUtil_Lazy::call($this->util->getDbLookup()->getStaffGroups)); $model->set('gsf_gender', 'label', $this->_('Gender'), 'multiOptions', $this->util->getTranslated()->getGenders()); if ($detailed) { - $model->set('gul_user_class', 'default', $this->defaultStaffDefinition); + //Now try to load the current organization and find out if it has a default user definition + //otherwise use the defaultStaffDefinition + $org = $this->loader->getOrganization($this->menu->getParameterSource()->getMenuParameter('gsf_id_organization', $this->loader->getCurrentUser()->getCurrentOrganizationId())); + $orgDef = $org->get('gor_user_class', $this->defaultStaffDefinition); + $model->set('gul_user_class', 'default', $orgDef); $model->set('gsf_iso_lang', 'label', $this->_('Language'), 'multiOptions', $this->util->getLocalized()->getLanguages()); $model->set('gul_can_login', 'label', $this->_('Can login'), 'multiOptions', $this->util->getTranslated()->getYesNo()); $model->set('gsf_logout_on_survey', 'label', $this->_('Logout on survey'), 'multiOptions', $this->util->getTranslated()->getYesNo()); @@ -230,9 +239,16 @@ { $elements = parent::getAutoSearchElements($model, $data); + $availableOrganizations = $this->util->getDbLookup()->getOrganizations(); if ($this->escort->hasPrivilege('pr.staff.see.all')) { // Select organization - $options = array('' => $this->_('(all organizations)')) + $this->getModel()->get('gsf_id_organization', 'multiOptions'); + $options = array('' => $this->_('(all organizations)')) + $availableOrganizations; + } else { + $allowedOrganizations = $this->loader->getCurrentUser()->getAllowedOrganizations(); + $options = array_intersect($availableOrganizations, $allowedOrganizations); + } + + if (count($options)>1) { $select = new Zend_Form_Element_Select('gsf_id_organization', array('multiOptions' => $options)); // Position as second element @@ -244,22 +260,20 @@ } /** - * Additional data filter statements for the user input. + * Returns the default search values for this class instance. * - * User input that has the same name as a model field is automatically - * used as a filter, but if the name is different processing is needed. - * That processing should happen here. + * Used to specify the filter when no values have been entered by the user. * - * @param array $data The current user input - * @return array New filter statements + * @return array */ - protected function getDataFilter(array $data) + public function getDefaultSearchData() { - $filter = parent::getDataFilter($data); + $filter = parent::getDefaultSearchData(); - if (! $this->escort->hasPrivilege('pr.staff.see.all')) { - $filter['gsf_id_organization'] = $this->escort->getCurrentOrganization(); + if (!isset($filter['gsf_id_organization']) || empty($filter['gsf_id_organization'])) { + $filter['gsf_id_organization'] = $this->loader->getCurrentUser()->getCurrentOrganizationId(); } + return $filter; } @@ -295,4 +309,20 @@ { return $this->_('Staff'); } + + public function init() + { + parent::init(); + + //Make sure the menu always has the gsd_id_organization parameter + $orgId = $this->getRequest()->getParam('gsf_id_organization'); + + if (is_null($orgId)) { + //Get the selected gsf_id_organization used in the index + $dataIdx = $this->getCachedRequestData(true, 'index', true); + $orgId = isset($dataIdx['gsf_id_organization']) ? $dataIdx['gsf_id_organization'] : $this->loader->getCurrentUser()->getCurrentOrganizationId(); + } + + $this->menu->getParameterSource()->offsetSet('gsf_id_organization', $orgId); + } } Modified: trunk/library/classes/Gems/Menu/MenuAbstract.php =================================================================== --- trunk/library/classes/Gems/Menu/MenuAbstract.php 2011-12-19 15:56:11 UTC (rev 375) +++ trunk/library/classes/Gems/Menu/MenuAbstract.php 2011-12-20 10:51:27 UTC (rev 376) @@ -380,13 +380,15 @@ { $page = $this->addPage($label, 'pr.staff', 'staff', 'index', $other); $page->addAutofilterAction(); - $page->addCreateAction(); + $createPage = $page->addCreateAction(); $page->addShowAction(); $editPage = $page->addEditAction(); $delPage = $page->addDeleteAction(); if (! $this->escort->hasPrivilege('pr.staff.edit.all')) { - $editPage->setParameterFilter('gsf_id_organization', array_keys($this->escort->loader->getCurrentUser()->getAllowedOrganizations())); - $delPage->setParameterFilter('gsf_id_organization', array_keys($this->escort->loader->getCurrentUser()->getAllowedOrganizations())); + $filter = array_keys($this->escort->loader->getCurrentUser()->getAllowedOrganizations()); + $createPage->setParameterFilter('gsf_id_organization', $filter); + $editPage->setParameterFilter('gsf_id_organization', $filter); + $delPage->setParameterFilter('gsf_id_organization', $filter); } return $page; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-19 15:56:17
|
Revision: 375 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=375&view=rev Author: mennodekker Date: 2011-12-19 15:56:11 +0000 (Mon, 19 Dec 2011) Log Message: ----------- Allow the menu parameter filter to be an array of allowed options StaffAction now takes all allowed organizations into account Modified Paths: -------------- trunk/library/classes/Gems/Default/StaffAction.php trunk/library/classes/Gems/Menu/MenuAbstract.php trunk/library/classes/Gems/Menu/SubMenuItem.php Modified: trunk/library/classes/Gems/Default/StaffAction.php =================================================================== --- trunk/library/classes/Gems/Default/StaffAction.php 2011-12-19 15:00:59 UTC (rev 374) +++ trunk/library/classes/Gems/Default/StaffAction.php 2011-12-19 15:56:11 UTC (rev 375) @@ -204,7 +204,7 @@ $model->set('gsf_email', 'label', $this->_('E-Mail'), 'itemDisplay', 'MUtil_Html_AElement::ifmail'); if ($detailed || $this->escort->hasPrivilege('pr.staff.see.all')) { - $this->menu->getParameterSource()->offsetSet('gsf_id_organization', $this->escort->getCurrentOrganization()); + //$this->menu->getParameterSource()->offsetSet('gsf_id_organization', $this->escort->getCurrentOrganization()); $model->set('gsf_id_organization', 'label', $this->_('Organization'), 'multiOptions', $this->util->getDbLookup()->getOrganizations(), Modified: trunk/library/classes/Gems/Menu/MenuAbstract.php =================================================================== --- trunk/library/classes/Gems/Menu/MenuAbstract.php 2011-12-19 15:00:59 UTC (rev 374) +++ trunk/library/classes/Gems/Menu/MenuAbstract.php 2011-12-19 15:56:11 UTC (rev 375) @@ -385,8 +385,8 @@ $editPage = $page->addEditAction(); $delPage = $page->addDeleteAction(); if (! $this->escort->hasPrivilege('pr.staff.edit.all')) { - $editPage->setParameterFilter('gsf_id_organization', $this->escort->getCurrentOrganization()); - $delPage->setParameterFilter('gsf_id_organization', $this->escort->getCurrentOrganization()); + $editPage->setParameterFilter('gsf_id_organization', array_keys($this->escort->loader->getCurrentUser()->getAllowedOrganizations())); + $delPage->setParameterFilter('gsf_id_organization', array_keys($this->escort->loader->getCurrentUser()->getAllowedOrganizations())); } return $page; Modified: trunk/library/classes/Gems/Menu/SubMenuItem.php =================================================================== --- trunk/library/classes/Gems/Menu/SubMenuItem.php 2011-12-19 15:00:59 UTC (rev 374) +++ trunk/library/classes/Gems/Menu/SubMenuItem.php 2011-12-19 15:56:11 UTC (rev 375) @@ -96,6 +96,14 @@ { if ($this->_parameterFilter) { foreach ($this->_parameterFilter as $name => $testValue) { + //Transform single value to array for uniform processing + if (!is_array($testValue)) { + $testArray = array(); + $testArray[] = $testValue; + } else { + $testArray = $testValue; + } + $paramValue = $source->getMenuParameter($name); if ($paramValue instanceof MUtil_Lazy_LazyInterface) { @@ -103,7 +111,8 @@ $paramValue = MUtil_Lazy::rise($paramValue); } else { - $newCondition = MUtil_Lazy::comp($testValue, '==', $paramValue); + $newCondition = new MUtil_Lazy_Call('in_array', array($paramValue, $testArray)); + //$newCondition = MUtil_Lazy::comp($testValue, '==', $paramValue); if ($condition instanceof MUtil_Lazy_LazyInterface) { $condition = $condition->if($newCondition); } else { @@ -113,13 +122,22 @@ } } - if ($testValue !== $paramValue) { - if (Gems_Menu::$verbose) { - // Mutil_Echo::backtrace(); - MUtil_Echo::r($name . ' => ' . $testValue . ' !== ' . $paramValue, $this->get('label') . ' (' . $this->get('controller') . '/' . $this->get('action') . ')'); + + foreach($testArray as $currentTestValue) { + if ($currentTestValue == $paramValue) { + if (Gems_Menu::$verbose) { + // Mutil_Echo::backtrace(); + MUtil_Echo::r($name . ' => ' . $currentTestValue . ' == ' . $paramValue, $this->get('label') . ' (' . $this->get('controller') . '/' . $this->get('action') . ')'); + } + return; + } else { + if (Gems_Menu::$verbose) { + // Mutil_Echo::backtrace(); + MUtil_Echo::r($name . ' => ' . $currentTestValue . ' !== ' . $paramValue, $this->get('label') . ' (' . $this->get('controller') . '/' . $this->get('action') . ')'); + } } - return true; } + return true; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-19 15:01:08
|
Revision: 374 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=374&view=rev Author: mennodekker Date: 2011-12-19 15:00:59 +0000 (Mon, 19 Dec 2011) Log Message: ----------- All overview screens (period, token, patient) now show organization dropdown when more than one is allowed - removing pr.plan.choose-org Modified Paths: -------------- trunk/library/classes/Gems/Default/TokenPlanAction.php trunk/library/classes/Gems/Menu.php Modified: trunk/library/classes/Gems/Default/TokenPlanAction.php =================================================================== --- trunk/library/classes/Gems/Default/TokenPlanAction.php 2011-12-19 12:39:13 UTC (rev 373) +++ trunk/library/classes/Gems/Default/TokenPlanAction.php 2011-12-19 15:00:59 UTC (rev 374) @@ -340,10 +340,13 @@ ORDER BY ggp_name"; $elements[] = $this->_createSelectElement('gsu_id_primary_group', $sql, $this->_('(all fillers)')); - if (($this->escort instanceof Gems_Project_Organization_MultiOrganizationInterface) && - $this->escort->hasPrivilege('pr.plan.choose-org')){ - // Select organisation - $options = $this->util->getDbLookup()->getOrganizationsWithRespondents(); + // Select organisation + if (($this->escort instanceof Gems_Project_Organization_MultiOrganizationInterface)) { + $availableOrganizations = $this->util->getDbLookup()->getOrganizationsWithRespondents(); + $allowedOrganizations = $this->loader->getCurrentUser()->getAllowedOrganizations(); + + $options = array_intersect($availableOrganizations, $allowedOrganizations); + $elements[] = $this->_createSelectElement('gto_id_organization', $options); } Modified: trunk/library/classes/Gems/Menu.php =================================================================== --- trunk/library/classes/Gems/Menu.php 2011-12-19 12:39:13 UTC (rev 373) +++ trunk/library/classes/Gems/Menu.php 2011-12-19 15:00:59 UTC (rev 374) @@ -551,7 +551,7 @@ $this->addContactPage($this->_('Contact')); // Privileges not associated with menu item - $this->addHiddenPrivilige('pr.plan.choose-org'); + //$this->addHiddenPrivilige('pr.plan.choose-org'); $this->addHiddenPrivilige('pr.plan.mail-as-application'); $this->addHiddenPrivilige('pr.respondent.result'); $this->addHiddenPrivilige('pr.respondent.who'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-19 12:39:24
|
Revision: 373 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=373&view=rev Author: mennodekker Date: 2011-12-19 12:39:13 +0000 (Mon, 19 Dec 2011) Log Message: ----------- Moved AccessLogActions from session to cache Modified Paths: -------------- trunk/library/classes/Gems/AccessLog.php trunk/library/classes/Gems/Default/LogMaintenanceAction.php trunk/library/classes/Gems/Util/ReceptionCode.php trunk/library/classes/Gems/Util.php Added Paths: ----------- trunk/library/classes/Gems/Util/AccessLogActions.php Modified: trunk/library/classes/Gems/AccessLog.php =================================================================== --- trunk/library/classes/Gems/AccessLog.php 2011-12-19 10:21:13 UTC (rev 372) +++ trunk/library/classes/Gems/AccessLog.php 2011-12-19 12:39:13 UTC (rev 373) @@ -4,7 +4,7 @@ /** * Copyright (c) 2011, Erasmus MC * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -15,7 +15,7 @@ * * Neither the name of Erasmus MC nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -56,7 +56,7 @@ * Convenience calls to the log method: * * When you try to call 'log' + anything it will be interpreted as a call to the log - * method where the part following log is the action and the first argument is the + * method where the part following log is the action and the first argument is the * respondentId. When you want to utilize the full power of the logging system, use * the log method directly. * @@ -86,12 +86,12 @@ $this->_userInfo = GemsEscort::getInstance()->session; $this->loadActions(); } - + /** * Return an instance of the Gems_AccesLog class - * + * * @param Zend_Db_Adapter_Abstract $db - * @return Gems_AccessLog + * @return Gems_AccessLog */ public static function getLog(Zend_Db_Adapter_Abstract $db = null) { @@ -107,58 +107,55 @@ protected function getActionId($action) { - if (! array_key_exists($action, $this->_sessionStore->actions)) { + if (! array_key_exists($action, $this->_actions)) { //Check if a refresh fixes the problem $this->loadActions(true); - if (! array_key_exists($action, $this->_sessionStore->actions)) { + if (! array_key_exists($action, $this->_actions)) { $values['glac_name'] = $action; $values['glac_change'] = preg_match('/(save|add|store|delete|remove|create)/', $action); - - /* + + /* * For 1.3 release the default behaviour is to disable logging for all actions, * so we get an opt-in per action - */ + */ $values['glac_log'] = 0; - + /* * Later on, we can set some rules like below to disable logging for * actions like the autofilter */ //$values['glac_log'] = !substr_count($action, '.autofilter'); $values['glac_created'] = new Zend_Db_Expr('CURRENT_TIMESTAMP'); - + $this->_db->insert('gems__log_actions', $values); $this->loadActions(true); } } - return $this->_sessionStore->actions[$action]['id']; + return $this->_actions[$action]['id']; } /** * Load the actions into memory, use optional parameter to enforce refreshing - * - * @param type $reset + * + * @param type $reset */ public function loadActions($reset = false) { //When project escort doesn't implement the log interface, we disable logging and don't load actions - if (GemsEscort::getInstance() instanceof Gems_Project_Log_LogRespondentAccessInterface && - ($reset || (! isset($this->_sessionStore->actions)))) { - - $actions = array(); - - try { - $actionRows = $this->_db->fetchAll('SELECT glac_name, glac_id_action, glac_log FROM gems__log_actions ORDER BY glac_name'); - foreach($actionRows as $actionRow) { - $actions[$actionRow['glac_name']]['id'] = $actionRow['glac_id_action']; - $actions[$actionRow['glac_name']]['log'] = $actionRow['glac_log']; - } - } catch (Exception $e) { - } - - $this->_sessionStore->actions = $actions; + if (GemsEscort::getInstance() instanceof Gems_Project_Log_LogRespondentAccessInterface && + ($reset || (! isset($this->_actions)))) { + + $actions = GemsEscort::getInstance()->getUtil()->getAccessLogActions(); + if ($reset) { + $actions->invalidateCache(); + //Now unset to force a reload + unset(GemsEscort::getInstance()->getUtil()->accessLogActions); + $actions = GemsEscort::getInstance()->getUtil()->getAccessLogActions(); + } + + $this->_actions = $actions->getAllData(); } } @@ -176,14 +173,14 @@ { try { //When project escort doesn't implement the log interface, we disable logging - if (!(GemsEscort::getInstance() instanceof Gems_Project_Log_LogRespondentAccessInterface) + if (!(GemsEscort::getInstance() instanceof Gems_Project_Log_LogRespondentAccessInterface) || (!isset($this->_userInfo->user_id) && $force === false ) ) { return $this; } - /* + /* * For backward compatibility, get the request from the frontcontroller when it - * is not supplied in the + * is not supplied in the */ if (!($request instanceof Zend_Controller_Request_Abstract)) { $request = Zend_Controller_Front::getInstance()->getRequest(); @@ -202,12 +199,12 @@ } else { $values['glua_remote_ip'] = ''; } - - /* - * Now we know for sure that the action is in the sessionstore, check if we + + /* + * Now we know for sure that the action is in the list, check if we * need to log this action */ - if (!($this->_sessionStore->actions[$action]['log']) && !$force) return $this; + if (!($this->_actions[$action]['log']) && !$force) return $this; if (isset($this->_sessionStore->glua_action)) { //If we don't force a logentry, check if it is a duplicate @@ -239,5 +236,5 @@ MUtil_Echo::r(GemsEscort::getInstance()->translate->_('Database needs to be updated!')); return $this; } - } + } } \ No newline at end of file Modified: trunk/library/classes/Gems/Default/LogMaintenanceAction.php =================================================================== --- trunk/library/classes/Gems/Default/LogMaintenanceAction.php 2011-12-19 10:21:13 UTC (rev 372) +++ trunk/library/classes/Gems/Default/LogMaintenanceAction.php 2011-12-19 12:39:13 UTC (rev 373) @@ -55,9 +55,10 @@ return $model; } - public function getAfterSaveRoute($data) { - Gems_AccessLog::getLog()->loadActions(true); - return parent::getAfterSaveRoute($data); + public function afterSave(array $data, $isNew) + { + $this->loader->getUtil()->getAccessLogActions()->invalidateCache(); + return parent::afterSave($data, $isNew); } public function getAutoSearchElements(MUtil_Model_ModelAbstract $model, array $data) { Added: trunk/library/classes/Gems/Util/AccessLogActions.php =================================================================== --- trunk/library/classes/Gems/Util/AccessLogActions.php (rev 0) +++ trunk/library/classes/Gems/Util/AccessLogActions.php 2011-12-19 12:39:13 UTC (rev 373) @@ -0,0 +1,80 @@ +<?php +/** + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * @package Gems + * @subpackage Util + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: ReceptionCode.php 370 2011-12-19 09:27:19Z mennodekker $ + */ + +/** + * Utility function for caching Gems_AccessLog Actions table. + * + * @package Gems + * @subpackage Util + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class Gems_Util_AccessLogActions extends Gems_Registry_CachedArrayTargetAbstract +{ + /** + * Variable to add tags to the cache for cleanup. + * + * @var array + */ + protected $_cacheTags = array('accesslog_actions'); + + /** + * + * @var Zend_Db_Adapter_Abstract + */ + protected $db; + + /** + * Returns the complete record. + * + * @return array + */ + public function getAllData() + { + return $this->_data; + } + + /** + * Load the data when the cache is empty. + * + * @param mixed $id + * @return array The array of data values + */ + protected function loadData($id) + { + return $this->db->fetchAssoc('SELECT glac_name, glac_id_action AS id, glac_log AS log FROM gems__log_actions ORDER BY glac_name'); + } +} Modified: trunk/library/classes/Gems/Util/ReceptionCode.php =================================================================== --- trunk/library/classes/Gems/Util/ReceptionCode.php 2011-12-19 10:21:13 UTC (rev 372) +++ trunk/library/classes/Gems/Util/ReceptionCode.php 2011-12-19 12:39:13 UTC (rev 373) @@ -1,5 +1,4 @@ <?php - /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -28,7 +27,7 @@ * * * @package Gems - * @subpackage Ytil + * @subpackage Util * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License Modified: trunk/library/classes/Gems/Util.php =================================================================== --- trunk/library/classes/Gems/Util.php 2011-12-19 10:21:13 UTC (rev 372) +++ trunk/library/classes/Gems/Util.php 2011-12-19 12:39:13 UTC (rev 373) @@ -101,7 +101,18 @@ */ protected $translated; + /** + * Returns the AccessLogActions + * + * @param string $code + * @return Gems_Util_AccessLogActions + */ + public function getAccessLogActions() + { + return $this->_getClass('accessLogActions', null, array('AccessLogActions')); + } + public function getConsentRejected() { if (isset($this->project->concentRejected)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-19 10:21:23
|
Revision: 372 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=372&view=rev Author: mennodekker Date: 2011-12-19 10:21:13 +0000 (Mon, 19 Dec 2011) Log Message: ----------- Added Paths: ----------- trunk/library/snippets/Generic/ModelTabFormSnippet.php Added: trunk/library/snippets/Generic/ModelTabFormSnippet.php =================================================================== --- trunk/library/snippets/Generic/ModelTabFormSnippet.php (rev 0) +++ trunk/library/snippets/Generic/ModelTabFormSnippet.php 2011-12-19 10:21:13 UTC (rev 372) @@ -0,0 +1,48 @@ +<?php +/** + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @package Gems + * @subpackage Snippets + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ + */ + +/** + * Displays an edit form using tabs based on the model the model set through the $model snippet parameter. + * + * Usage snippet for Gems_Snippets_ModelTabFormSnippetGeneric + * + * @package Gems + * @subpackage Snippets + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class Generic_ModelTabFormSnippet extends Gems_Snippets_ModelTabFormSnippetGeneric +{ } Property changes on: trunk/library/snippets/Generic/ModelTabFormSnippet.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-19 09:37:04
|
Revision: 371 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=371&view=rev Author: mennodekker Date: 2011-12-19 09:36:58 +0000 (Mon, 19 Dec 2011) Log Message: ----------- Doc fixes & created Generic snippet Modified Paths: -------------- trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php Modified: trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php =================================================================== --- trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2011-12-19 09:27:19 UTC (rev 370) +++ trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2011-12-19 09:36:58 UTC (rev 371) @@ -124,7 +124,6 @@ $bridge->addSelect( 'gsu_result_field', 'label', $this->_('Result field'), 'multiOptions', $surveyFields); $bridge->addSelect( 'gsu_beforeanswering_event', 'label', $this->_('Before answering'), 'multiOptions', $this->loader->getEvents()->listSurveyBeforeAnsweringEvents()); $bridge->addSelect( 'gsu_completed_event', 'label', $this->_('After completion'), 'multiOptions', $this->loader->getEvents()->listSurveyCompletionEvents()); - // TODO: gsu_completed_event $bridge->addFile( 'new_pdf', 'label', $this->_('Upload new PDF'), 'accept', 'application/pdf', Modified: trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php =================================================================== --- trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php 2011-12-19 09:27:19 UTC (rev 370) +++ trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php 2011-12-19 09:36:58 UTC (rev 371) @@ -25,8 +25,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * Short description of file - * * @package Gems * @subpackage Snippets * @copyright Copyright (c) 2011 Erasmus MC @@ -35,16 +33,19 @@ */ /** - * Short description for ModelTabFormSnippetGeneric + * Displays an edit form using tabs based on the model the model set through the $model snippet parameter. * - * Long description for class ModelTabFormSnippetGeneric (if any)... + * If you want to use this class "as is" use the 'Generic_ModelTabFormSnippet' snippet. * + * This class is not in the standard snippet loading directories and does not follow + * their naming conventions, but exists only to make it simple to extend this class + * for a specific implementation. + * * @package Gems * @subpackage Snippets * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @since Class available since version 1.0 - * @deprecated Class deprecated since version 2.0 + * @since Class available since version 1.5 */ class Gems_Snippets_ModelTabFormSnippetGeneric extends Gems_Snippets_ModelFormSnippetGeneric { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-19 09:27:32
|
Revision: 370 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=370&view=rev Author: mennodekker Date: 2011-12-19 09:27:19 +0000 (Mon, 19 Dec 2011) Log Message: ----------- Setting keywords Modified Paths: -------------- trunk/library/classes/Gems/Auth/Adapter/Callback.php trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php trunk/library/classes/Gems/Default/ExportAction.php trunk/library/classes/Gems/Default/MailJobAction.php trunk/library/classes/Gems/Default/MailLogAction.php trunk/library/classes/Gems/Default/UpgradeAction.php trunk/library/classes/Gems/Menu/ParameterCollector.php trunk/library/classes/Gems/Model/OrganizationModel.php trunk/library/classes/Gems/Model/StaffModel.php trunk/library/classes/Gems/Registry/CachedArrayTargetAbstract.php trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php trunk/library/classes/Gems/Upgrades.php trunk/library/classes/Gems/UpgradesAbstract.php trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php trunk/library/classes/Gems/User/NoLoginDefinition.php trunk/library/classes/Gems/User/OldStaffUserDefinition.php trunk/library/classes/Gems/User/PasswordChecker.php trunk/library/classes/Gems/User/ProjectUserDefinition.php trunk/library/classes/Gems/User/RespondentUserDefinition.php trunk/library/classes/Gems/User/StaffUserDefinition.php trunk/library/classes/Gems/User/User.php trunk/library/classes/Gems/User/UserDefinitionAbstract.php trunk/library/classes/Gems/User/UserDefinitionConfigurableInterface.php trunk/library/classes/Gems/User/UserDefinitionInterface.php trunk/library/classes/Gems/User/UserLoader.php trunk/library/classes/Gems/User/UserNewPasswordValidator.php trunk/library/classes/Gems/User/UserPasswordValidator.php trunk/library/classes/Gems/Util/LockFile.php trunk/library/classes/Gems/Util/ReceptionCode.php trunk/library/classes/Gems/Util/ReceptionCodeLibrary.php Property Changed: ---------------- trunk/library/classes/Gems/Auth/Adapter/Callback.php trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php trunk/library/classes/Gems/Default/ExportAction.php trunk/library/classes/Gems/Default/MailJobAction.php trunk/library/classes/Gems/Default/MailLogAction.php trunk/library/classes/Gems/Default/UpgradeAction.php trunk/library/classes/Gems/Menu/ParameterCollector.php trunk/library/classes/Gems/Model/OrganizationModel.php trunk/library/classes/Gems/Model/StaffModel.php trunk/library/classes/Gems/Project/ProjectSettings.php trunk/library/classes/Gems/Registry/CachedArrayTargetAbstract.php trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php trunk/library/classes/Gems/Upgrades.php trunk/library/classes/Gems/UpgradesAbstract.php trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php trunk/library/classes/Gems/User/NoLoginDefinition.php trunk/library/classes/Gems/User/OldStaffUserDefinition.php trunk/library/classes/Gems/User/Organization.php trunk/library/classes/Gems/User/PasswordChecker.php trunk/library/classes/Gems/User/ProjectUserDefinition.php trunk/library/classes/Gems/User/RespondentUserDefinition.php trunk/library/classes/Gems/User/StaffUserDefinition.php trunk/library/classes/Gems/User/User.php trunk/library/classes/Gems/User/UserDefinitionAbstract.php trunk/library/classes/Gems/User/UserDefinitionConfigurableInterface.php trunk/library/classes/Gems/User/UserDefinitionInterface.php trunk/library/classes/Gems/User/UserLoader.php trunk/library/classes/Gems/User/UserNewPasswordValidator.php trunk/library/classes/Gems/User/UserPasswordValidator.php trunk/library/classes/Gems/Util/LockFile.php trunk/library/classes/Gems/Util/ReceptionCode.php trunk/library/classes/Gems/Util/ReceptionCodeLibrary.php Modified: trunk/library/classes/Gems/Auth/Adapter/Callback.php =================================================================== --- trunk/library/classes/Gems/Auth/Adapter/Callback.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Auth/Adapter/Callback.php 2011-12-19 09:27:19 UTC (rev 370) @@ -25,26 +25,21 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * Short description of file - * * @package Gems * @subpackage Auth * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + * @version $Id$ */ /** - * Short description for Callback + * A wrapper to use any valid callback for authentication * - * Long description for class Callback (if any)... - * * @package Gems * @subpackage Auth * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @since Class available since version 1.0 - * @deprecated Class deprecated since version 2.0 + * @since Class available since version 1.5 */ class Gems_Auth_Adapter_Callback implements Zend_Auth_Adapter_Interface { Property changes on: trunk/library/classes/Gems/Auth/Adapter/Callback.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php =================================================================== --- trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Default/ExportAction.php =================================================================== --- trunk/library/classes/Gems/Default/ExportAction.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Default/ExportAction.php 2011-12-19 09:27:19 UTC (rev 370) @@ -30,7 +30,7 @@ * @subpackage Default * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: DatabaseAction.php 28 2011-09-16 06:24:15Z mennodekker $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Default/ExportAction.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Default/MailJobAction.php =================================================================== --- trunk/library/classes/Gems/Default/MailJobAction.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Default/MailJobAction.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Default/MailJobAction.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Default/MailLogAction.php =================================================================== --- trunk/library/classes/Gems/Default/MailLogAction.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Default/MailLogAction.php 2011-12-19 09:27:19 UTC (rev 370) @@ -33,7 +33,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Default/MailLogAction.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Default/UpgradeAction.php =================================================================== --- trunk/library/classes/Gems/Default/UpgradeAction.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Default/UpgradeAction.php 2011-12-19 09:27:19 UTC (rev 370) @@ -29,7 +29,7 @@ * @subpackage Default * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Default/UpgradeAction.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Menu/ParameterCollector.php =================================================================== --- trunk/library/classes/Gems/Menu/ParameterCollector.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Menu/ParameterCollector.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Menu/ParameterCollector.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Model/OrganizationModel.php =================================================================== --- trunk/library/classes/Gems/Model/OrganizationModel.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Model/OrganizationModel.php 2011-12-19 09:27:19 UTC (rev 370) @@ -31,7 +31,7 @@ * @subpackage Model * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Model/OrganizationModel.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Model/StaffModel.php =================================================================== --- trunk/library/classes/Gems/Model/StaffModel.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Model/StaffModel.php 2011-12-19 09:27:19 UTC (rev 370) @@ -31,7 +31,7 @@ * @subpackage Model * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Model/StaffModel.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Property changes on: trunk/library/classes/Gems/Project/ProjectSettings.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Registry/CachedArrayTargetAbstract.php =================================================================== --- trunk/library/classes/Gems/Registry/CachedArrayTargetAbstract.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Registry/CachedArrayTargetAbstract.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Registry/CachedArrayTargetAbstract.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php =================================================================== --- trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php 2011-12-19 09:27:19 UTC (rev 370) @@ -31,7 +31,7 @@ * @subpackage Snippets * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php =================================================================== --- trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: AnswerModelSnippet.php 28 2011-09-16 06:24:15Z mennodekker $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Upgrades.php =================================================================== --- trunk/library/classes/Gems/Upgrades.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Upgrades.php 2011-12-19 09:27:19 UTC (rev 370) @@ -31,7 +31,7 @@ * @subpackage Upgrades * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Upgrades.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/UpgradesAbstract.php =================================================================== --- trunk/library/classes/Gems/UpgradesAbstract.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/UpgradesAbstract.php 2011-12-19 09:27:19 UTC (rev 370) @@ -29,7 +29,7 @@ * @subpackage Upgrades * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/UpgradesAbstract.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php =================================================================== --- trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/NoLoginDefinition.php =================================================================== --- trunk/library/classes/Gems/User/NoLoginDefinition.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/NoLoginDefinition.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/NoLoginDefinition.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/OldStaffUserDefinition.php =================================================================== --- trunk/library/classes/Gems/User/OldStaffUserDefinition.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/OldStaffUserDefinition.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/OldStaffUserDefinition.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Property changes on: trunk/library/classes/Gems/User/Organization.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/PasswordChecker.php =================================================================== --- trunk/library/classes/Gems/User/PasswordChecker.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/PasswordChecker.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/PasswordChecker.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/ProjectUserDefinition.php =================================================================== --- trunk/library/classes/Gems/User/ProjectUserDefinition.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/ProjectUserDefinition.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/ProjectUserDefinition.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/RespondentUserDefinition.php =================================================================== --- trunk/library/classes/Gems/User/RespondentUserDefinition.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/RespondentUserDefinition.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/RespondentUserDefinition.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/StaffUserDefinition.php =================================================================== --- trunk/library/classes/Gems/User/StaffUserDefinition.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/StaffUserDefinition.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/StaffUserDefinition.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/User.php =================================================================== --- trunk/library/classes/Gems/User/User.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/User.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/User.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/UserDefinitionAbstract.php =================================================================== --- trunk/library/classes/Gems/User/UserDefinitionAbstract.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/UserDefinitionAbstract.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/UserDefinitionAbstract.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/UserDefinitionConfigurableInterface.php =================================================================== --- trunk/library/classes/Gems/User/UserDefinitionConfigurableInterface.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/UserDefinitionConfigurableInterface.php 2011-12-19 09:27:19 UTC (rev 370) @@ -31,7 +31,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/UserDefinitionConfigurableInterface.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/UserDefinitionInterface.php =================================================================== --- trunk/library/classes/Gems/User/UserDefinitionInterface.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/UserDefinitionInterface.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/UserDefinitionInterface.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/UserLoader.php =================================================================== --- trunk/library/classes/Gems/User/UserLoader.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/UserLoader.php 2011-12-19 09:27:19 UTC (rev 370) @@ -31,7 +31,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/UserLoader.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/UserNewPasswordValidator.php =================================================================== --- trunk/library/classes/Gems/User/UserNewPasswordValidator.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/UserNewPasswordValidator.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/UserNewPasswordValidator.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/UserPasswordValidator.php =================================================================== --- trunk/library/classes/Gems/User/UserPasswordValidator.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/UserPasswordValidator.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/UserPasswordValidator.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Util/LockFile.php =================================================================== --- trunk/library/classes/Gems/Util/LockFile.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Util/LockFile.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Util/LockFile.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Util/ReceptionCode.php =================================================================== --- trunk/library/classes/Gems/Util/ReceptionCode.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Util/ReceptionCode.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Util/ReceptionCode.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Util/ReceptionCodeLibrary.php =================================================================== --- trunk/library/classes/Gems/Util/ReceptionCodeLibrary.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Util/ReceptionCodeLibrary.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Util/ReceptionCodeLibrary.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-19 09:13:14
|
Revision: 369 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=369&view=rev Author: mennodekker Date: 2011-12-19 09:13:07 +0000 (Mon, 19 Dec 2011) Log Message: ----------- Doc fix Modified Paths: -------------- trunk/library/controllers/ExportController.php Modified: trunk/library/controllers/ExportController.php =================================================================== --- trunk/library/controllers/ExportController.php 2011-12-16 15:23:24 UTC (rev 368) +++ trunk/library/controllers/ExportController.php 2011-12-19 09:13:07 UTC (rev 369) @@ -25,7 +25,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * @package controllers */ class ExportController extends Gems_Default_ExportAction { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-16 15:23:35
|
Revision: 368 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=368&view=rev Author: mennodekker Date: 2011-12-16 15:23:24 +0000 (Fri, 16 Dec 2011) Log Message: ----------- Forgot check for compatibility with definitions that are not configurable :) Modified Paths: -------------- trunk/library/classes/Gems/Model/OrganizationModel.php trunk/library/snippets/Organization/OrganizationEditSnippet.php Modified: trunk/library/classes/Gems/Model/OrganizationModel.php =================================================================== --- trunk/library/classes/Gems/Model/OrganizationModel.php 2011-12-16 15:06:43 UTC (rev 367) +++ trunk/library/classes/Gems/Model/OrganizationModel.php 2011-12-16 15:23:24 UTC (rev 368) @@ -131,7 +131,7 @@ $class = $newValues['gor_user_class'] . 'Definition'; $definition = $this->loader->getUserLoader()->getUserDefinition($class); - if ($definition->hasConfig()) { + if ($definition instanceof Gems_User_UserDefinitionConfigurableInterface && $definition->hasConfig()) { $savedValues['config'] = $definition->saveConfig($savedValues,$newValues['config']); if ($definition->getConfigChanged()>0 && $this->getChanged()<1) { $this->setChanged(1); @@ -150,7 +150,7 @@ $class = $data['gor_user_class'] . 'Definition'; $definition = $this->loader->getUserLoader()->getUserDefinition($class); - if ($definition->hasConfig()) { + if ($definition instanceof Gems_User_UserDefinitionConfigurableInterface && $definition->hasConfig()) { $data['config'] = $definition->loadConfig($data); } } Modified: trunk/library/snippets/Organization/OrganizationEditSnippet.php =================================================================== --- trunk/library/snippets/Organization/OrganizationEditSnippet.php 2011-12-16 15:06:43 UTC (rev 367) +++ trunk/library/snippets/Organization/OrganizationEditSnippet.php 2011-12-16 15:23:24 UTC (rev 368) @@ -93,7 +93,7 @@ $class = $this->formData['gor_user_class'] . 'Definition'; $definition = $this->loader->getUserLoader()->getUserDefinition($class); - if ($definition->hasConfig()) { + if ($definition instanceof Gems_User_UserDefinitionConfigurableInterface && $definition->hasConfig()) { $definition->appendConfigFields($bridge); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-16 15:06:52
|
Revision: 367 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=367&view=rev Author: mennodekker Date: 2011-12-16 15:06:43 +0000 (Fri, 16 Dec 2011) Log Message: ----------- Bugfix in OrganizationEditSnipper.php afterSave OrganizationModel can now have a a userDefinition with it's own config options that can be saved anywhere Modified Paths: -------------- trunk/library/classes/Gems/Default/OrganizationAction.php trunk/library/classes/Gems/Model.php trunk/library/snippets/Organization/OrganizationEditSnippet.php Added Paths: ----------- trunk/library/classes/Gems/Model/OrganizationModel.php trunk/library/classes/Gems/User/UserDefinitionConfigurableInterface.php Modified: trunk/library/classes/Gems/Default/OrganizationAction.php =================================================================== --- trunk/library/classes/Gems/Default/OrganizationAction.php 2011-12-16 15:03:03 UTC (rev 366) +++ trunk/library/classes/Gems/Default/OrganizationAction.php 2011-12-16 15:06:43 UTC (rev 367) @@ -114,7 +114,7 @@ */ public function createModel($detailed, $action) { - $model = new MUtil_Model_TableModel('gems__organizations'); + $model = $this->loader->getModels()->getOrganizationModel(); $model->setDeleteValues('gor_active', 0, 'gor_add_respondents', 0); Added: trunk/library/classes/Gems/Model/OrganizationModel.php =================================================================== --- trunk/library/classes/Gems/Model/OrganizationModel.php (rev 0) +++ trunk/library/classes/Gems/Model/OrganizationModel.php 2011-12-16 15:06:43 UTC (rev 367) @@ -0,0 +1,160 @@ +<?php +/** + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The organization model + * + * @package Gems + * @subpackage Model + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + */ + +/** + * Contains the organization + * + * Handles saving of the user definition config + * + * @package Gems + * @subpackage Model + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class Gems_Model_OrganizationModel extends Gems_Model_JoinModel implements MUtil_Registry_TargetInterface +{ + /** + * @var Gems_Loader + */ + public $loader; + + public function __construct() + { + parent::__construct('organization', 'gems__organizations', 'gor'); + } + + /** + * Allows the loader to set resources. + * + * @param string $name Name of resource to set + * @param mixed $resource The resource. + * @return boolean True if $resource was OK + */ + public function answerRegistryRequest($name, $resource) + { + $this->$name = $resource; + + return true; + } + + /** + * Should be called after answering the request to allow the Target + * to check if all required registry values have been set correctly. + * + * @return boolean False if required are missing. + */ + public function checkRegistryRequestsAnswers() + { + return true; + } + + /** + * Filters the names that should not be requested. + * + * Can be overriden. + * + * @param string $name + * @return boolean + */ + protected function filterRequestNames($name) + { + return '_' !== $name[0]; + } + + /** + * Allows the loader to know the resources to set. + * + * Returns those object variables defined by the subclass but not at the level of this definition. + * + * Can be overruled. + * + * @return array of string names + */ + public function getRegistryRequests() + { + return array_filter(array_keys(get_object_vars($this)), array($this, 'filterRequestNames')); + } + + /** + * Save a single model item. + * + * Makes sure the password is saved too using the userclass + * + * @param array $newValues The values to store for a single model item. + * @param array $filter If the filter contains old key values these are used + * to decide on update versus insert. + * @param array $saveTables Optional array containing the table names to save, + * otherwise the tables set to save at model level will be saved. + * @return array The values as they are after saving (they may change). + */ + public function save(array $newValues, array $filter = null, array $saveTables = null) + { + //First perform a save + $savedValues = parent::save($newValues, $filter, $saveTables); + + //Now check if we need to save config values + if (isset($newValues['gor_user_class']) && !empty($newValues['gor_user_class'])) { + $class = $newValues['gor_user_class'] . 'Definition'; + $definition = $this->loader->getUserLoader()->getUserDefinition($class); + + if ($definition->hasConfig()) { + $savedValues['config'] = $definition->saveConfig($savedValues,$newValues['config']); + if ($definition->getConfigChanged()>0 && $this->getChanged()<1) { + $this->setChanged(1); + } + } + } + + return $savedValues; + } + + public function loadFirst($filter = true, $sort = true) + { + $data = parent::loadFirst($filter, $sort); + + if (isset($data['gor_user_class']) && !empty($data['gor_user_class'])) { + $class = $data['gor_user_class'] . 'Definition'; + $definition = $this->loader->getUserLoader()->getUserDefinition($class); + + if ($definition->hasConfig()) { + $data['config'] = $definition->loadConfig($data); + } + } + + return $data; + } +} \ No newline at end of file Modified: trunk/library/classes/Gems/Model.php =================================================================== --- trunk/library/classes/Gems/Model.php 2011-12-16 15:03:03 UTC (rev 366) +++ trunk/library/classes/Gems/Model.php 2011-12-16 15:06:43 UTC (rev 367) @@ -171,6 +171,13 @@ return $model; } + public function getOrganizationModel() + { + $model = $this->_loadClass('OrganizationModel', true); + + return $model; + } + /** * Load project specific model or general Gems model otherwise * Added: trunk/library/classes/Gems/User/UserDefinitionConfigurableInterface.php =================================================================== --- trunk/library/classes/Gems/User/UserDefinitionConfigurableInterface.php (rev 0) +++ trunk/library/classes/Gems/User/UserDefinitionConfigurableInterface.php 2011-12-16 15:06:43 UTC (rev 367) @@ -0,0 +1,83 @@ +<?php +/** + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * @package Gems + * @subpackage User + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + */ + +/** + * + * + * @package Gems + * @subpackage User + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +interface Gems_User_UserDefinitionConfigurableInterface +{ + /** + * Appends the needed fields for this config to the $bridge + * + * @param MUtil_Model_FormBridge $bridge + */ + public function appendConfigFields(MUtil_Model_FormBridge $bridge); + + /** + * Should return the number of changed records for the save performed + */ + public function getConfigChanged(); + + /** + * Do we need to add custom config parameters to use this definition? + * + * @return boolean + */ + public function hasConfig(); + + /** + * Handles loading the config for the given data + * + * @param array $data + * @return array + */ + public function loadConfig($data); + + /** + * Handles saving the configvalues in $values using the $data + * + * @param array $data + * @param array $values + * @return array + */ + public function saveConfig($data, $values); +} \ No newline at end of file Modified: trunk/library/snippets/Organization/OrganizationEditSnippet.php =================================================================== --- trunk/library/snippets/Organization/OrganizationEditSnippet.php 2011-12-16 15:03:03 UTC (rev 366) +++ trunk/library/snippets/Organization/OrganizationEditSnippet.php 2011-12-16 15:06:43 UTC (rev 367) @@ -89,8 +89,17 @@ } $this->addItems($bridge, 'gor_has_login', 'gor_add_respondents', 'gor_respondent_group', 'gor_accessible_by', 'gor_user_class'); + if (isset($this->formData['gor_user_class']) && !empty($this->formData['gor_user_class'])) { + $class = $this->formData['gor_user_class'] . 'Definition'; + $definition = $this->loader->getUserLoader()->getUserDefinition($class); + + if ($definition->hasConfig()) { + $definition->appendConfigFields($bridge); + } + + } + //now add remaining items if any - if (count($this->_items)>0 && !($bridge->getTab('other'))) { $bridge->addTab('other', 'value', $this->_('Other')); } @@ -99,7 +108,7 @@ public function afterSave($changed) { - $org = $this->loader->getOrganization($data['gor_id_organization']); + $org = $this->loader->getOrganization($changed['gor_id_organization']); $org->invalidateCache(); // Make sure any changes in the allowed list are reflected. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-16 15:03:14
|
Revision: 366 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=366&view=rev Author: mennodekker Date: 2011-12-16 15:03:03 +0000 (Fri, 16 Dec 2011) Log Message: ----------- Moved some stuff from ModelTabFormSnipperGeneric to ModelFormSnippetAbstract so normal and tabform can be changed by changing the base snippet Modified Paths: -------------- trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php trunk/library/classes/MUtil/Snippets/ModelFormSnippetAbstract.php Modified: trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php =================================================================== --- trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php 2011-12-16 12:37:11 UTC (rev 365) +++ trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php 2011-12-16 15:03:03 UTC (rev 366) @@ -55,69 +55,6 @@ protected $_form; /** - * Array of item names still to be added to the form - * - * @var array - */ - protected $_items; - - /** - * Add items to the bridge, and remove them from the items array - * - * @param MUtil_Model_FormBridge $bridge - * @param string $element1 - * - * @return void - */ - protected function addItems($bridge, $element1) - { - $args = func_get_args(); - if (count($args)<2) { - throw new Gems_Exception_Coding('Use at least 2 arguments, first the bridge and then one or more idividual items'); - } - - $bridge = array_shift($args); - $elements = $args; - - //Remove the elements from the _items variable - $this->_items = array_diff($this->_items, $elements); - - //And add them to the bridge - foreach($elements as $name) { - if ($label = $this->model->get($name, 'label')) { - $bridge->add($name); - } else { - $bridge->addHidden($name); - } - } - } - - /** - * Adds elements from the model to the bridge that creates the form. - * - * Overrule this function to add different elements to the browse table, without - * having to recode the core table building code. - * - * @param MUtil_Model_FormBridge $bridge - * @param MUtil_Model_ModelAbstract $model - * @param array $items - */ - protected function addFormElements(MUtil_Model_FormBridge $bridge, MUtil_Model_ModelAbstract $model, $items = null) - { - //Get all elements in the model if not already done - $this->initItems(); - - //Now add all remaining items to the last last tab (if any) - foreach($this->_items as $name) { - if ($label = $model->get($name, 'label')) { - $bridge->add($name); - } else { - $bridge->addHidden($name); - } - } - } - - /** * Perform some actions on the form, right before it is displayed but already populated * * Here we add the table display to the form. @@ -156,14 +93,4 @@ return $form; } - - /** - * Initialize the _items variable to hold all items from the model - */ - protected function initItems() - { - if (is_null($this->_items)) { - $this->_items = $this->model->getItemsOrdered(); - } - } } \ No newline at end of file Modified: trunk/library/classes/MUtil/Snippets/ModelFormSnippetAbstract.php =================================================================== --- trunk/library/classes/MUtil/Snippets/ModelFormSnippetAbstract.php 2011-12-16 12:37:11 UTC (rev 365) +++ trunk/library/classes/MUtil/Snippets/ModelFormSnippetAbstract.php 2011-12-16 15:03:03 UTC (rev 366) @@ -60,7 +60,14 @@ protected $_form; /** + * Array of item names still to be added to the form * + * @var array + */ + protected $_items; + + /** + * * @var Zend_Form_Element_Submit */ protected $_saveButton; @@ -149,8 +156,37 @@ */ protected function addFormElements(MUtil_Model_FormBridge $bridge, MUtil_Model_ModelAbstract $model) { - foreach($model->getItemsOrdered() as $name) { - if ($label = $model->get($name, 'label')) { + //Get all elements in the model if not already done + $this->initItems(); + + //And any remaining item + $this->addItems($bridge, $this->_items); + } + + /** + * Add items to the bridge, and remove them from the items array + * + * @param MUtil_Model_FormBridge $bridge + * @param string $element1 + * + * @return void + */ + protected function addItems(MUtil_Model_FormBridge $bridge, $element1) + { + $args = func_get_args(); + if (count($args)<2) { + throw new Gems_Exception_Coding('Use at least 2 arguments, first the bridge and then one or more idividual items'); + } + + $bridge = array_shift($args); + $elements = MUtil_Ra::flatten($args); + + //Remove the elements from the _items variable + $this->_items = array_diff($this->_items, $elements); + + //And add them to the bridge + foreach($elements as $name) { + if ($label = $this->model->get($name, 'label')) { $bridge->add($name); } else { $bridge->addHidden($name); @@ -323,6 +359,16 @@ } /** + * Initialize the _items variable to hold all items from the model + */ + protected function initItems() + { + if (is_null($this->_items)) { + $this->_items = $this->model->getItemsOrdered(); + } + } + + /** * Makes sure there is a form. */ protected function loadForm() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-16 12:37:17
|
Revision: 365 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=365&view=rev Author: mennodekker Date: 2011-12-16 12:37:11 +0000 (Fri, 16 Dec 2011) Log Message: ----------- minor fixes Modified Paths: -------------- trunk/library/classes/Gems/AccessLog.php trunk/library/classes/Gems/Default/IndexAction.php Modified: trunk/library/classes/Gems/AccessLog.php =================================================================== --- trunk/library/classes/Gems/AccessLog.php 2011-12-16 11:07:19 UTC (rev 364) +++ trunk/library/classes/Gems/AccessLog.php 2011-12-16 12:37:11 UTC (rev 365) @@ -194,7 +194,7 @@ $values['glua_by'] = $this->_userInfo->user_id ? $this->_userInfo->user_id : 0; $values['glua_organization'] = $this->_userInfo->user_organization_id ? $this->_userInfo->user_organization_id : 0; $values['glua_action'] = $this->getActionId($action); - $values['glua_role'] = $this->_userInfo->user_role; + $values['glua_role'] = $this->_userInfo->user_role ? $this->_userInfo->user_role : '--not set--' ; $values['glua_created'] = new Zend_Db_Expr('CURRENT_TIMESTAMP'); if ($request instanceof Zend_Controller_Request_Http) { Modified: trunk/library/classes/Gems/Default/IndexAction.php =================================================================== --- trunk/library/classes/Gems/Default/IndexAction.php 2011-12-16 11:07:19 UTC (rev 364) +++ trunk/library/classes/Gems/Default/IndexAction.php 2011-12-16 12:37:11 UTC (rev 365) @@ -406,7 +406,7 @@ $this->addMessage(sprintf($this->_('Good bye: %s.'), $user->getFullName())); $user->unsetAsCurrentUser(); - Zend_Session::regenerateId(); + Zend_Session::destroy(); $this->_reroute(array('action' => 'index'), true); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-16 11:07:30
|
Revision: 364 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=364&view=rev Author: mennodekker Date: 2011-12-16 11:07:19 +0000 (Fri, 16 Dec 2011) Log Message: ----------- Introducing the ModelTabFormSnippet(Generic) first working draft Modified Paths: -------------- trunk/library/classes/MUtil/Model/FormBridge.php trunk/library/snippets/Organization/OrganizationEditSnippet.php Added Paths: ----------- trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php Added: trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php =================================================================== --- trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php (rev 0) +++ trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php 2011-12-16 11:07:19 UTC (rev 364) @@ -0,0 +1,169 @@ +<?php +/** + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Short description of file + * + * @package Gems + * @subpackage Snippets + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + */ + +/** + * Short description for ModelTabFormSnippetGeneric + * + * Long description for class ModelTabFormSnippetGeneric (if any)... + * + * @package Gems + * @subpackage Snippets + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.0 + * @deprecated Class deprecated since version 2.0 + */ +class Gems_Snippets_ModelTabFormSnippetGeneric extends Gems_Snippets_ModelFormSnippetGeneric +{ + /** + * + * @var Gems_TabForm + */ + protected $_form; + + /** + * Array of item names still to be added to the form + * + * @var array + */ + protected $_items; + + /** + * Add items to the bridge, and remove them from the items array + * + * @param MUtil_Model_FormBridge $bridge + * @param string $element1 + * + * @return void + */ + protected function addItems($bridge, $element1) + { + $args = func_get_args(); + if (count($args)<2) { + throw new Gems_Exception_Coding('Use at least 2 arguments, first the bridge and then one or more idividual items'); + } + + $bridge = array_shift($args); + $elements = $args; + + //Remove the elements from the _items variable + $this->_items = array_diff($this->_items, $elements); + + //And add them to the bridge + foreach($elements as $name) { + if ($label = $this->model->get($name, 'label')) { + $bridge->add($name); + } else { + $bridge->addHidden($name); + } + } + } + + /** + * Adds elements from the model to the bridge that creates the form. + * + * Overrule this function to add different elements to the browse table, without + * having to recode the core table building code. + * + * @param MUtil_Model_FormBridge $bridge + * @param MUtil_Model_ModelAbstract $model + * @param array $items + */ + protected function addFormElements(MUtil_Model_FormBridge $bridge, MUtil_Model_ModelAbstract $model, $items = null) + { + //Get all elements in the model if not already done + $this->initItems(); + + //Now add all remaining items to the last last tab (if any) + foreach($this->_items as $name) { + if ($label = $model->get($name, 'label')) { + $bridge->add($name); + } else { + $bridge->addHidden($name); + } + } + } + + /** + * Perform some actions on the form, right before it is displayed but already populated + * + * Here we add the table display to the form. + * + * @return Zend_Form + */ + public function beforeDisplay() + { + //If needed, add a row of link buttons to the bottom of the form + $form = $this->_form; + if ($links = $this->getMenuList()) { + $element = new MUtil_Form_Element_Html('formLinks'); + $element->setValue($links); + $element->setOrder(999); + if ($form instanceof Gems_TabForm) { + $form->resetContext(); + } + $form->addElement($element); + $form->addDisplayGroup(array('formLinks'), 'form_buttons'); + } + } + + /** + * Creates an empty form. Allows overruling in sub-classes. + * + * @param mixed $options + * @return Gems_TabForm + */ + protected function createForm($options = null) + { + $form = new Gems_TabForm($options); + $this->_form = $form; + + //Now first add the saveButton as it needs to be outside the tabs + $this->addSaveButton(); + + return $form; + } + + /** + * Initialize the _items variable to hold all items from the model + */ + protected function initItems() + { + if (is_null($this->_items)) { + $this->_items = $this->model->getItemsOrdered(); + } + } +} \ No newline at end of file Modified: trunk/library/classes/MUtil/Model/FormBridge.php =================================================================== --- trunk/library/classes/MUtil/Model/FormBridge.php 2011-12-16 10:11:39 UTC (rev 363) +++ trunk/library/classes/MUtil/Model/FormBridge.php 2011-12-16 11:07:19 UTC (rev 364) @@ -701,4 +701,17 @@ { return $this->model; } + + /** + * Retrieve a tab from a Gems_TabForm to add extra content to it + * + * @param string $name + * @return Gems_Form_TabSubForm + */ + public function getTab($name) + { + if (method_exists($this->form, 'getTab')) { + return $this->form->getTab($name); + } + } } Modified: trunk/library/snippets/Organization/OrganizationEditSnippet.php =================================================================== --- trunk/library/snippets/Organization/OrganizationEditSnippet.php 2011-12-16 10:11:39 UTC (rev 363) +++ trunk/library/snippets/Organization/OrganizationEditSnippet.php 2011-12-16 11:07:19 UTC (rev 364) @@ -44,7 +44,7 @@ * @license New BSD License * @since Class available since version 1.5 */ -class Organization_OrganizationEditSnippet extends Gems_Snippets_ModelFormSnippetGeneric +class Organization_OrganizationEditSnippet extends Gems_Snippets_ModelTabFormSnippetGeneric { /** * @@ -52,6 +52,51 @@ */ protected $loader; + /** + * Adds elements from the model to the bridge that creates the form. + * + * Overrule this function to add different elements to the browse table, without + * having to recode the core table building code. + * + * @param MUtil_Model_FormBridge $bridge + * @param MUtil_Model_ModelAbstract $model + */ + protected function addFormElements(MUtil_Model_FormBridge $bridge, MUtil_Model_ModelAbstract $model) + { + //Get all elements in the model if not already done + $this->initItems(); + + //Create our tab structure first check if tab already exists to allow extension + if (!($bridge->getTab('general'))) { + $bridge->addTab('general', 'value', $this->_('General')); + } + //Need the first two together for validation + $bridge->addHtml('org')->b($this->_('Organization')); + $this->addItems($bridge, 'gor_name', 'gor_id_organization', 'gor_location', 'gor_url', 'gor_active'); + $bridge->addHtml('contact')->b($this->_('Contact')); + $bridge->addHtml('contact_desc')->i($this->_('The contact details for this organization, used for emailing.')); + $this->addItems($bridge, 'gor_contact_name', 'gor_contact_email'); + $bridge->addHtml('general_other')->b($this->_('Other')); + $this->addItems($bridge, 'gor_iso_lang', 'gor_code', 'gor_has_respondents'); + + if (!($bridge->getTab('email'))) { + $bridge->addTab('email', 'value', $this->_('Email') . ' & ' . $this->_('Token')); + } + $this->addItems($bridge, 'gor_welcome', 'gor_signature'); + + if (!($bridge->getTab('access'))) { + $bridge->addTab('access', 'value', $this->_('Access')); + } + $this->addItems($bridge, 'gor_has_login', 'gor_add_respondents', 'gor_respondent_group', 'gor_accessible_by', 'gor_user_class'); + + //now add remaining items if any + + if (count($this->_items)>0 && !($bridge->getTab('other'))) { + $bridge->addTab('other', 'value', $this->_('Other')); + } + parent::addFormElements($bridge, $model); + } + public function afterSave($changed) { $org = $this->loader->getOrganization($data['gor_id_organization']); @@ -62,4 +107,4 @@ return parent::afterSave($changed); } -} +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-16 10:11:45
|
Revision: 363 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=363&view=rev Author: mennodekker Date: 2011-12-16 10:11:39 +0000 (Fri, 16 Dec 2011) Log Message: ----------- Fix to tabforms: hidden values now go to the subform again as validators (like dbunique) need to have all the needed values in their own subform ( $context ) Make sure that needed hiddens are in the right tab! Modified Paths: -------------- trunk/library/classes/Gems/Form/TableForm.php trunk/library/classes/Gems/TabForm.php Modified: trunk/library/classes/Gems/Form/TableForm.php =================================================================== --- trunk/library/classes/Gems/Form/TableForm.php 2011-12-15 17:21:17 UTC (rev 362) +++ trunk/library/classes/Gems/Form/TableForm.php 2011-12-16 10:11:39 UTC (rev 363) @@ -218,9 +218,9 @@ $element->setDecorators($decorators); if ($element instanceof Zend_Form_Element_Hidden) { - //Add 1000 to the order to place them last and fix some layout problems - $order = $element->getOrder(); - $element->setOrder($order+1000); + //Make row hidden so it takes no height + $decorator = $element->getDecorator('row'); + $decorator->setOption('style', 'display:none;'); } else { $decorator = $element->getDecorator('row'); Modified: trunk/library/classes/Gems/TabForm.php =================================================================== --- trunk/library/classes/Gems/TabForm.php 2011-12-15 17:21:17 UTC (rev 362) +++ trunk/library/classes/Gems/TabForm.php 2011-12-16 10:11:39 UTC (rev 363) @@ -57,7 +57,7 @@ */ public function addElement($element, $name = null, $options = null) { - if ($this->currentTab && !($element instanceof Zend_Form_Element_Hidden)) { + if ($this->currentTab) { return $this->currentTab->addElement($element, $name, $options); } else { parent::addElement($element, $name, $options); @@ -166,6 +166,19 @@ } /** + * Retrieve a named tab (subform) and set the active tab to this one + * + * @param type $name + * @return Gems_Form_TabSubForm + */ + public function getTab($name) + { + $tab = $this->getSubForm($name); + $this->currentTab = $tab; + return $tab; + } + + /** * Create tabs from MUtil_Form_Element_Tab elements * * All elements following an element of type MUtil_Form_Element_Tab will be in tabs @@ -374,7 +387,6 @@ $values = parent::getValues($suppressArrayNotation); foreach ($this->getSubForms() as $key => $subForm) { - $values[$key]; $values = $this->_array_replace_recursive($values, $values[$key]); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-15 17:21:28
|
Revision: 362 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=362&view=rev Author: matijsdejong Date: 2011-12-15 17:21:17 +0000 (Thu, 15 Dec 2011) Log Message: ----------- Progress on progress panel (#45) Documentation extended for HtmlElement.php and TBodyElement.php Modified Paths: -------------- trunk/library/classes/Gems/Default/SourceAction.php trunk/library/classes/MUtil/Html/Code/DynamicAbstract.php trunk/library/classes/MUtil/Html/HtmlElement.php trunk/library/classes/MUtil/Html/ProgressPanel.js trunk/library/classes/MUtil/Html/ProgressPanel.php trunk/library/classes/MUtil/Html/TBodyElement.php Modified: trunk/library/classes/Gems/Default/SourceAction.php =================================================================== --- trunk/library/classes/Gems/Default/SourceAction.php 2011-12-15 15:56:53 UTC (rev 361) +++ trunk/library/classes/Gems/Default/SourceAction.php 2011-12-15 17:21:17 UTC (rev 362) @@ -243,7 +243,11 @@ $this->html->h3($this->_('Synchronize all sources of surveys')); $this->html->pInfo($this->_('Synchronization will update the status of all surveys imported into this project to the status at the sources.')); - // $progress = $this->html->progress('0%'); + /* + $progress = $this->html->progress('0%'); + if ($progress->run($this->getRequest())) { + MUtil_Echo::track('running'); + } // */ if ($data) { $rdata = MUtil_Lazy::repeat($data); Modified: trunk/library/classes/MUtil/Html/Code/DynamicAbstract.php =================================================================== --- trunk/library/classes/MUtil/Html/Code/DynamicAbstract.php 2011-12-15 15:56:53 UTC (rev 361) +++ trunk/library/classes/MUtil/Html/Code/DynamicAbstract.php 2011-12-15 17:21:17 UTC (rev 362) @@ -134,6 +134,36 @@ } /** + * Returns the current field value. + * + * No markers are used. If you want to replace '{path}' with 'x', you + * must specificy the name '{path}', not 'path'. + * + * @param string $name Full name of the field. + * @return string The value placed. + */ + public function getField($name) + { + if (isset($this->_fields[$name])) { + return $this->_fields[$name]; + } + } + + /** + * Checks for the existence of a field value. + * + * No markers are used. If you want to replace '{path}' with 'x', you + * must specificy the name '{path}', not 'path'. + * + * @param string $name Full name of the field. + * @return boolean True if it exists + */ + public function hasField($name) + { + return array_key_exists($name, $this->_fields); + } + + /** * Set a field to search and replace in the content. * * No markers are used. If you want to replace '{path}' with 'x', you Modified: trunk/library/classes/MUtil/Html/HtmlElement.php =================================================================== --- trunk/library/classes/MUtil/Html/HtmlElement.php 2011-12-15 15:56:53 UTC (rev 361) +++ trunk/library/classes/MUtil/Html/HtmlElement.php 2011-12-15 17:21:17 UTC (rev 362) @@ -1,6 +1,5 @@ <?php - /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -286,7 +285,11 @@ /** - * @var boolean|string When true, no content is used, when a string content is added to an attribute with that name. + * Allows the addition of any string content to an attribute with the name specified. + * + * E.g. in the ImgElement all content is added to the 'alt' attribute. + * + * @var boolean|string When not false, content is not used as element content, but added to the attribute */ protected $_contentToTag = false; @@ -476,8 +479,24 @@ protected $_repeatTags = false; + /** + * Extra array with special types for subclasses. + * + * When an object of one of the key types is used, then use + * the class method defined as the value. + * + * @see $_specialTypesDefault + * + * @var array Of 'class or interfacename' => 'class method' of null + */ protected $_specialTypes; + /** + * When an object of one of the key types is used, then use + * the class method defined as the value. + * + * @var array Of 'class or interfacename' => 'class method' + */ private $_specialTypesDefault = array( 'MUtil_Lazy_RepeatableInterface' => 'setRepeater', 'Zend_Paginator' => 'setRepeater', @@ -608,6 +627,16 @@ unset($this->_attribs[$name]); } + /** + * Create an default element for content. + * + * Some elements put their content in a fixed sub element, e.g. table uses tbody, + * tbody uses tr and tr uses td or th. + * + * @param mixed $value + * @param string $offset or null + * @return MUtil_Html_HtmlElement + */ protected function _createDefaultTag($value, $offset = null) { if (null === $offset) { Modified: trunk/library/classes/MUtil/Html/ProgressPanel.js =================================================================== --- trunk/library/classes/MUtil/Html/ProgressPanel.js 2011-12-15 15:56:53 UTC (rev 361) +++ trunk/library/classes/MUtil/Html/ProgressPanel.js 2011-12-15 17:21:17 UTC (rev 362) @@ -9,16 +9,19 @@ function FUNCTION_PREFIX_Update(data) { - document.getElementById('pg-percent').style.width = data.percent + '%'; + main = document.getElementById('{ID}'); // .style.width = data.percent + '%'; - document.getElementById('pg-text-1').innerHTML = data.text; - document.getElementById('pg-text-2').innerHTML = data.text; + inner = main.getElementsByTagName('{CHILD}')[0]; + inner.style.width = data.percent + '%'; + inner.innerHTML = data.text; } function FUNCTION_PREFIX_Finish() { - document.getElementById('pg-percent').style.width = '100%'; + document.getElementById('{id}').style.width = '100%'; document.getElementById('pg-text-1').innerHTML = 'Demo done'; document.getElementById('pg-text-2').innerHTML = 'Demo done'; -} \ No newline at end of file +} + +// FUNCTION_PREFIX_Start(); Modified: trunk/library/classes/MUtil/Html/ProgressPanel.php =================================================================== --- trunk/library/classes/MUtil/Html/ProgressPanel.php 2011-12-15 15:56:53 UTC (rev 361) +++ trunk/library/classes/MUtil/Html/ProgressPanel.php 2011-12-15 17:21:17 UTC (rev 362) @@ -49,6 +49,21 @@ const CODE = "MUtil_Html_ProgressPanel_Code"; /** + * For some elements (e.g. table and tbody) the logical thing to do when content + * is added that does not have an $_allowedChildTags is to add that content to + * the last item (i.e. row: tr) instead of adding a new row to the table or element. + * + * This is different from the standard behaviour: if you add a non-li item to an ul + * item it is added in a new li item. + * + * @see $_allowedChildTags + * @see $_lastChild + * + * @var boolean When true new content not having a $_allowedChildTags is added to $_lastChild. + */ + protected $_addtoLastChild = true; + + /** * Usually no text is appended after an element, but for certain elements we choose * to add a "\n" newline character instead, to keep the output readable in source * view. @@ -68,6 +83,33 @@ ); /** + * When content must contain certain element types only the default child tag contains + * the tagname of the element that is created to contain the content. + * + * When not in $_allowedChildTags the value is added to it in __construct(). + * + * When empty set to the first value of $_allowedChildTags (if any) in __construct(). + * + * @see $_allowedChildTags + * + * @var string The tagname of the element that should be created for content not having an $_allowedChildTags. + */ + protected $_defaultChildTag = 'div'; + + /** + * Name to prefix the functions, to avoid naming clashes. + * + * @var string Default is the classname with an extra underscore + */ + protected $_functionPrefix; + + /** + * + * @var MUtil_Html_HtmlElement + */ + protected $_innerElement; + + /** * Usually no text is appended before an element, but for certain elements we choose * to add a "\n" newline character instead, to keep the output readable in source * view. @@ -77,6 +119,20 @@ protected $_prependString = "\n"; /** + * The name of the parameter used for progress panel signals + * + * @var string + */ + public $progressParameterName = 'progress'; + + /** + * The value required for the progress panel to start running + * + * @var string + */ + public $progressParameterRunValue = 'run'; + + /** * Creates a 'div' progress panel * * @param mixed $arg_array A MUtil_Ra::args data collection. @@ -99,18 +155,34 @@ */ public function getCode() { - if (! $this->offsetExists(self::CODE)) { + if (! isset($this->_content[self::CODE])) { $js = new MUtil_Html_Code_JavaScript(dirname(__FILE__) . '/ProgressPanel.js'); // $js->setInHeader(false); - $js->setField('FUNCTION_PREFIX', __CLASS__); + $js->setField('FUNCTION_PREFIX_', $this->getFunctionPrefix()); + $js->setField('{CHILD}', $this->_defaultChildTag); + $js->setField('{ID}', $this->getAttrib('id')); - $this->offsetSet(self::CODE, $js); + $this->_content[self::CODE] = $js; } - return $this->offsetGet(self::CODE); + return $this->_content[self::CODE]; } /** + * Returns the prefix used for the function names to avoid naming clashes. + * + * @return string + */ + public function getFunctionPrefix() + { + if (! $this->_functionPrefix) { + $this->setFunctionPrefix(__CLASS__ . '_'); + } + + return (string) $this->_functionPrefix; + } + + /** * Creates a 'div' progress panel * * @param mixed $arg_array A MUtil_Ra::args data collection. @@ -134,9 +206,37 @@ */ protected function renderElement(Zend_View_Abstract $view) { - // Make sure the JS code is added - $this->getCode(); + $js = $this->getCode(); + if (! $js->hasField('{URL}')) { + $js->setField('{URL}', $view->url(array($this->progressParameterName => $this->progressParameterRunValue))); + } return parent::renderElement($view); } + + /** + * Checks whether the progress panel should be running + * + * @param Zend_Controller_Request_Abstract $request + * @return boolean + */ + public function run(Zend_Controller_Request_Abstract $request) + { + return $request->getParam($this->progressParameterName) === $this->progressParameterRunValue; + } + + /** + * Name prefix for functions. + * + * Set automatically to __CLASS___, use different name + * in case of name clashes. + * + * @param string $prefix + * @return MUtil_Html_ProgressPanel (continuation pattern) + */ + public function setFunctionPrefix($prefix) + { + $this->_functionPrefix = $prefix; + return $this; + } } Modified: trunk/library/classes/MUtil/Html/TBodyElement.php =================================================================== --- trunk/library/classes/MUtil/Html/TBodyElement.php 2011-12-15 15:56:53 UTC (rev 361) +++ trunk/library/classes/MUtil/Html/TBodyElement.php 2011-12-15 17:21:17 UTC (rev 362) @@ -1,46 +1,53 @@ <?php - -/** - * Copyright (c) 2011, Erasmus MC - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Erasmus MC nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - /** - * @author Matijs de Jong - * @since 1.0 - * @version 1.1 - * @package MUtil + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * @package MUtil * @subpackage Html + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ */ /** - * - * @author Matijs de Jong - * @package MUtil + * A standaard TBODY element, that puts all contents in TR elements, implements the + * ColomInterface and allows you to specify a row class. + * + * You can alternate row classes by using a lazy value. + * + * @see MUtil_Html_TableElement + * + * @package MUtil * @subpackage Html + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.0 */ class MUtil_Html_TBodyElement extends MUtil_Html_HtmlElement implements MUtil_Html_ColumnInterface { @@ -58,6 +65,16 @@ protected $_onEmptyLocal = null; + /** + * Create an default element for content. + * + * Some elements put their content in a fixed sub element, e.g. table uses tbody, + * tbody uses tr and tr uses td or th. + * + * @param mixed $value + * @param string $offset or null + * @return MUtil_Html_HtmlElement + */ protected function _createDefaultTag($value, $offset = null) { $row = parent::_createDefaultTag($value, $offset = null); @@ -73,29 +90,29 @@ /** * Returns the cell or a MUtil_MultiWrapper containing cells that occupy the column position, taking colspan and other functions into account. - * + * * @param int $col The numeric column position, starting at 0; * @return MUtil_Html_HtmlElement Probably an element of this type, but can also be something else, posing as an element. */ public function getColumn($col) { $results = $this->getColumnArray($col); - + switch (count($results)) { case 0: return null; - + case 1: return reset($results); - + default: return new MUtil_MultiWrapper($results); } } - + /** * Returns the cells that occupies the column position, taking colspan and other functions into account, in an array. - * + * * @param int $col The numeric column position, starting at 0; * @return array Of probably one MUtil_Html_HtmlElement */ @@ -111,10 +128,10 @@ return $results; } - + /** * Return the number of columns, taking such niceties as colspan into account - * + * * @return int */ public function getColumnCount() @@ -201,12 +218,12 @@ } /** - * Repeat the element when rendering. - * - * When repeatTags is false (the default) only the content is repeated but + * Repeat the element when rendering. + * + * When repeatTags is false (the default) only the content is repeated but * not the element tags. When repeatTags is true the both the tags and the * content are repeated. - * + * * @param mixed $repeater MUtil_Lazy_RepeatableInterface or something that can be made into one. * @param mixed $onEmptyContent Optional. When not null the content to display when the repeater does not result in data is set. * @param boolean $repeatTags Optional when not null the repeatTags switch is set. @@ -248,7 +265,7 @@ /** * Static helper function for creation, used by @see MUtil_Html_Creator. - * + * * @param mixed $arg_array Optional MUtil_Ra::args processed settings * @return MUtil_Html_TBodyElement with tag 'tbody' */ @@ -260,7 +277,7 @@ /** * Static helper function for creation, used by @see MUtil_Html_Creator. - * + * * @param mixed $arg_array Optional MUtil_Ra::args processed settings * @return MUtil_Html_TBodyElement with tag 'tfoot' */ @@ -272,7 +289,7 @@ /** * Static helper function for creation, used by @see MUtil_Html_Creator. - * + * * @param mixed $arg_array Optional MUtil_Ra::args processed settings * @return MUtil_Html_TBodyElement with tag 'thead' */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-15 15:56:59
|
Revision: 361 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=361&view=rev Author: mennodekker Date: 2011-12-15 15:56:53 +0000 (Thu, 15 Dec 2011) Log Message: ----------- Organization can now have a default userclass, can not be changed (yet) as it needs logic to update the users Next step is to use this class in the staffAction Modified Paths: -------------- trunk/library/classes/Gems/Default/OrganizationAction.php trunk/library/configs/db/patches.sql Modified: trunk/library/classes/Gems/Default/OrganizationAction.php =================================================================== --- trunk/library/classes/Gems/Default/OrganizationAction.php 2011-12-15 15:54:19 UTC (rev 360) +++ trunk/library/classes/Gems/Default/OrganizationAction.php 2011-12-15 15:56:53 UTC (rev 361) @@ -163,6 +163,21 @@ } $model->setIfExists('gor_code', 'label', $this->_('Code name'), 'size', 10, 'description', $this->_('Only for programmers.')); + if($model->has('gor_user_class')) { + $definitions = $this->loader->getUserLoader()->getAvailableStaffDefinitions(); + //Use first element as default + $default = array_shift(array_keys($definitions)); + $model->set('gor_user_class', 'default', $default); + if (count($definitions)>1) { + if ($action !== 'create') { + $model->set('gor_user_class', 'elementClass', 'Exhibitor', 'description', $this->_('This can not be changed yet')); + } + $model->set('gor_user_class', 'label', $this->_('User Definition'), 'multiOptions', $definitions); + } else { + $model->set('elementClass', 'hidden'); + } + } + $model->addColumn("CASE WHEN gor_active = 1 THEN '' ELSE 'deleted' END", 'row_class'); Gems_Model::setChangeFieldsByPrefix($model, 'gor'); Modified: trunk/library/configs/db/patches.sql =================================================================== --- trunk/library/configs/db/patches.sql 2011-12-15 15:54:19 UTC (rev 360) +++ trunk/library/configs/db/patches.sql 2011-12-15 15:56:53 UTC (rev 361) @@ -361,3 +361,6 @@ -- GEMS VERSION: 43 -- PATCH: Add comment field to respondent tracks ALTER TABLE `gems__respondent2track` ADD gr2t_comment varchar(250) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null default null AFTER `gr2t_reception_code`; + +-- PATCH: Default userdefinition per organization +ALTER TABLE gems__organizations ADD `gor_user_class` VARCHAR( 30 ) NOT NULL DEFAULT 'StaffUser' AFTER `gor_code`; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-15 15:54:29
|
Revision: 360 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=360&view=rev Author: matijsdejong Date: 2011-12-15 15:54:19 +0000 (Thu, 15 Dec 2011) Log Message: ----------- Added initRawOutput() and disableLayout() to MUtil_Controller_Action Renamed MUtil/Html/Link to MUtil/Html/Code Modified Paths: -------------- trunk/library/classes/Gems/Controller/BrowseEditAction.php trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php trunk/library/classes/Gems/Default/TrackActionAbstract.php trunk/library/classes/Gems/Pdf.php trunk/library/classes/MUtil/Controller/Action.php trunk/library/classes/MUtil/Controller/html-view.phtml trunk/library/classes/MUtil/Html/ProgressPanel.php trunk/library/layouts/scripts/gems.phtml Added Paths: ----------- trunk/library/classes/MUtil/Html/Code/ trunk/library/classes/MUtil/Html/Code/DynamicAbstract.php trunk/library/classes/MUtil/Html/Code/JavaScript.php Removed Paths: ------------- trunk/library/classes/MUtil/Html/Link/ Modified: trunk/library/classes/Gems/Controller/BrowseEditAction.php =================================================================== --- trunk/library/classes/Gems/Controller/BrowseEditAction.php 2011-12-15 15:40:20 UTC (rev 359) +++ trunk/library/classes/Gems/Controller/BrowseEditAction.php 2011-12-15 15:54:19 UTC (rev 360) @@ -275,7 +275,7 @@ // MUtil_Model::$verbose = true; // We do not need to return the layout, just the above table - Zend_Layout::resetMvcInstance(); + $this->disableLayout(); $this->html[] = $this->_createTable(); $this->html->raw(MUtil_Echo::out()); Modified: trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php =================================================================== --- trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2011-12-15 15:40:20 UTC (rev 359) +++ trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2011-12-15 15:54:19 UTC (rev 360) @@ -415,6 +415,10 @@ public function pdfAction() { + // Make sure nothing else is output + $this->initRawOutput(); + + // Output the PDF $this->loader->getPdf()->echoPdfBySurveyId($this->_getParam(MUtil_Model::REQUEST_ID)); } Modified: trunk/library/classes/Gems/Default/TrackActionAbstract.php =================================================================== --- trunk/library/classes/Gems/Default/TrackActionAbstract.php 2011-12-15 15:40:20 UTC (rev 359) +++ trunk/library/classes/Gems/Default/TrackActionAbstract.php 2011-12-15 15:54:19 UTC (rev 360) @@ -400,6 +400,10 @@ */ public function pdfAction() { + // Make sure nothing else is output + $this->initRawOutput(); + + // Output the PDF $this->loader->getPdf()->echoPdfByTokenId($this->_getIdParam()); } Modified: trunk/library/classes/Gems/Pdf.php =================================================================== --- trunk/library/classes/Gems/Pdf.php 2011-12-15 15:40:20 UTC (rev 359) +++ trunk/library/classes/Gems/Pdf.php 2011-12-15 15:54:19 UTC (rev 360) @@ -118,12 +118,10 @@ * @param Zend_Pdf $pdf * @param string $filename * @param boolean $download + * @param boolean $exit Should the application stop running after output */ - protected function echoPdf(Zend_Pdf $pdf, $filename, $download = false) + protected function echoPdf(Zend_Pdf $pdf, $filename, $download = false, $exit = true) { - // We do not need to return the layout, just the above table - Zend_Layout::resetMvcInstance(); - $content = $pdf->render(); // MUtil_Echo::track($filename); @@ -140,6 +138,11 @@ header('Pragma: public'); echo $content; + + if ($exit) { + // No further output + exit; + } } /** Modified: trunk/library/classes/MUtil/Controller/Action.php =================================================================== --- trunk/library/classes/MUtil/Controller/Action.php 2011-12-15 15:40:20 UTC (rev 359) +++ trunk/library/classes/MUtil/Controller/Action.php 2011-12-15 15:54:19 UTC (rev 360) @@ -1,6 +1,5 @@ <?php - /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -26,15 +25,14 @@ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * @author Matijs de Jong - * @since 1.0 - * @version 1.1 + * + * * @package MUtil * @subpackage Controller - * @copyright Copyright (c) 2010 Erasmus MC (www.erasmusmc.nl) & MagnaFacta (www.magnafacta.nl) + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ */ /** @@ -44,15 +42,18 @@ * - title attribute for use in htm/head/title element * - flashMessenger use standardised and simplified * - use of Zend_Translate simplified and shortened in code + * - disable Zend_Layout and Zend_View with initRawOutput() and $useRawOutput. * * MUtil_Html functionality provided: * - semi automatic MUtil_Html_Sequence initiation * - view script set to html-view.phtml when using html * - snippet usage for repeatably used snippets of html on a page * - * @author Matijs de Jong * @package MUtil * @subpackage Controller + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.0 */ abstract class MUtil_Controller_Action extends Zend_Controller_Action { @@ -94,13 +95,28 @@ /** * Set to true in child class for automatic creation of $this->html. * - * Otherwise call $this->initHtml() + * To initiate the use of $this->html from the code call $this->initHtml() * + * Overrules $useRawOutput. + * + * @see $useRawOutput * @var boolean $useHtmlView */ public $useHtmlView = false; /** + * Set to true in child class for automatic use of raw (e.g. echo) output only. + * + * Otherwise call $this->initRawOutput() to switch to raw echo output. + * + * Overruled in initialization if $useHtmlView is true. + * + * @see $useHtmlView + * @var boolean $useRawOutput + */ + public $useRawOutput = false; + + /** * A ssession based message store. * * Standard the flash messenger for storing messages @@ -232,6 +248,24 @@ } /** + * Disable the use of Zend_Layout + * + * @return Zend_Controller_Action (continuation pattern) + */ + public function disableLayout() + { + // Actually I would like a check if there is a + // layout instance in the first place. + $layout = Zend_Layout::getMvcInstance(); + if ($layout instanceof Zend_Layout) { + $layout->disableLayout(); + } + // Zend_Layout::resetMvcInstance(); + + return $this; + } + + /** * Returns a session based message store for adding messages to. * * @return Zend_Controller_Action_Helper_FlashMessenger @@ -318,6 +352,7 @@ if (null === $translate) { // Make sure there always is a translator $translate = new MUtil_Translate_Adapter_Potemkin(); + Zend_Registry::set('Zend_Translate', $translate); } $this->setTranslate($translate); @@ -348,6 +383,8 @@ if ($this->useHtmlView) { $this->initHtml(); + } elseif ($this->useRawOutput) { + $this->initRawOutput(); } } @@ -369,10 +406,30 @@ $this->view->setScriptPath(dirname(__FILE__)); $this->_helper->viewRenderer->setNoController(); $this->_helper->viewRenderer->setScriptAction('html-view'); + + $this->useHtmlView = true; + $this->useRawOutput = false; } } /** + * Intializes the raw (echo) output component. + * + * @return void + */ + public function initRawOutput() + { + // Disable layout ((if any) + $this->disableLayout(); + + // Set view rendering off + $this->_helper->viewRenderer->setNoRender(true); + + $this->useHtmlView = false; + $this->useRawOutput = true; + } + + /** * Stub for overruling default snippet loader initiation. */ protected function loadSnippetLoader() Modified: trunk/library/classes/MUtil/Controller/html-view.phtml =================================================================== --- trunk/library/classes/MUtil/Controller/html-view.phtml 2011-12-15 15:40:20 UTC (rev 359) +++ trunk/library/classes/MUtil/Controller/html-view.phtml 2011-12-15 15:54:19 UTC (rev 360) @@ -1 +1 @@ -<?php echo $this->html->render($this); ?> +<?php echo $this->html->render($this); ?> \ No newline at end of file Property changes on: trunk/library/classes/MUtil/Html/Code ___________________________________________________________________ Added: bugtraq:url + http://survey.erasmusmc.nl/support/mantis/view.php?id=%BUGID% Added: bugtraq:logregex + #(\d+) Added: trunk/library/classes/MUtil/Html/Code/DynamicAbstract.php =================================================================== --- trunk/library/classes/MUtil/Html/Code/DynamicAbstract.php (rev 0) +++ trunk/library/classes/MUtil/Html/Code/DynamicAbstract.php 2011-12-15 15:54:19 UTC (rev 360) @@ -0,0 +1,162 @@ +<?php + +/** + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * @package MUtil + * @subpackage Html + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ + */ + +/** + * + * + * @package MUtil + * @subpackage Html + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +abstract class MUtil_Html_Code_DynamicAbstract implements MUtil_Html_HtmlInterface +{ + /** + * Contains the content to output. Can be a mix of filenames and string content. + * + * @var array Numeric array of strings or MUtil_Html_HtmlInterface elements + */ + protected $_content = array(); + + /** + * The fields that must be replaced in the content before output. + * + * @var array Key => string array + */ + protected $_fields = array(); + + /** + * + * @var string The seperator used to join multiple content items together + */ + protected $_seperator = "\n"; + + /** + * Creates the object storing any values with a name as a field, unless + * there exists a set{Name} function. Other values are treated as content. + * + * @param mixed $args_array MUtil_Ra::args() parameters + */ + public function __construct($args_array = null) + { + $args = MUtil_Ra::args(func_get_args()); + + foreach ($args as $name => $value) { + if (is_integer($name)) { + $this->addContent($value); + } else { + $function = 'set' . ucfirst($name); + if (method_exists($this, $function)) { + $this->$function($value); + } else { + $this->setField($name, $value); + } + } + } + } + + /** + * Add a filename or some other content that can be rendered. + * + * @param mixed $content + */ + public function addContent($content) + { + $this->_content[] = $content; + } + + /** + * Renders the content + * + * @param Zend_View_Abstract $view + * @return string + */ + protected function getContentOutput(Zend_View_Abstract $view) + { + if (! $this->_content) { + return null; + } + + $output = array(); + + foreach ($this->_content as $content) { + if (! is_string($content)) { + $content = MUtil_Html::renderAny($view, $content); + } + + if ((false === strpos($content, "\n")) && file_exists($content)) { + $content = file_get_contents($content); + } + + $output[] = $content; + } + + if ($this->_fields) { + $output = str_replace(array_keys($this->_fields), $this->_fields, $output); + } + + return implode($this->_seperator, $output); + } + + /** + * Set a field to search and replace in the content. + * + * No markers are used. If you want to replace '{path}' with 'x', you + * must specificy the name '{path}', not 'path'. + * + * @param string $name Full name to replace. + * @param string $value The value placed. + * @return MUtil_Html_Link_LinkAbstract (continuation pattern) + */ + public function setField($name, $value) + { + $this->_fields[$name] = $value; + return $this; + } + + /** + * + * @param string $seperator + * @return MUtil_Html_Link_LinkAbstract (continuation pattern) + */ + public function setSeperator($seperator) + { + $this->_seperator = $seperator; + return $this; + } +} Added: trunk/library/classes/MUtil/Html/Code/JavaScript.php =================================================================== --- trunk/library/classes/MUtil/Html/Code/JavaScript.php (rev 0) +++ trunk/library/classes/MUtil/Html/Code/JavaScript.php 2011-12-15 15:54:19 UTC (rev 360) @@ -0,0 +1,102 @@ +<?php + +/** + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * @package MUtil + * @subpackage Html + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ + */ + +/** + * + * + * @package MUtil + * @subpackage Html + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class MUtil_Html_Code_JavaScript extends MUtil_Html_Code_DynamicAbstract +{ + protected $_inHeader = true; + + /** + * When true the output should be displayed in the result HEAD, + * otherwise in the BODY. + * + * @return boolean + */ + public function getInHeader() + { + if ($this->_inHeader instanceof MUtil_Lazy_LazyInterface) { + return (boolean) MUtil_Lazy::raise($this->_inHeader); + } else { + return (boolean) $this->_inHeader; + } + } + /** + * Renders the element into a html string + * + * The $view is used to correctly encode and escape the output + * + * @param Zend_View_Abstract $view + * @return string Correctly encoded and escaped html output + */ + public function render(Zend_View_Abstract $view) + { + $content = $this->getContentOutput($view); + + // Of course this setting makes little difference if you have optimized + // your JavaScript loading by putting all script tags at the end of + // your body. (Except that inlineScript is always loaded last.) + if ($this->getInHeader()) { + $scriptTag = $view->headScript(); + } else { + $scriptTag = $view->inlineScript(); + } + $scriptTag->appendScript($content); + + return ''; + } + + /** + * When true the result is displayed in the result HEAD, + * otherwise in the BODY. + * + * @param boolean $value + * @return MUtil_Html_Code_JavaScript (continuation pattern) + */ + public function setInHeader($value = true) + { + $this->_inHeader = $value; + return $this; + } +} Modified: trunk/library/classes/MUtil/Html/ProgressPanel.php =================================================================== --- trunk/library/classes/MUtil/Html/ProgressPanel.php 2011-12-15 15:40:20 UTC (rev 359) +++ trunk/library/classes/MUtil/Html/ProgressPanel.php 2011-12-15 15:54:19 UTC (rev 360) @@ -46,6 +46,8 @@ */ class MUtil_Html_ProgressPanel extends MUtil_Html_HtmlElement { + const CODE = "MUtil_Html_ProgressPanel_Code"; + /** * Usually no text is appended after an element, but for certain elements we choose * to add a "\n" newline character instead, to keep the output readable in source @@ -87,6 +89,28 @@ } /** + * Returns the JavaScript object associated with this object. + * + * WARNING: calling this object sets it's position in the order the + * objects are rendered. If you use MUtil_Lazy objects, make sure they + * have the correct value when rendering. + * + * @return MUtil_Html_Code_JavaScript + */ + public function getCode() + { + if (! $this->offsetExists(self::CODE)) { + $js = new MUtil_Html_Code_JavaScript(dirname(__FILE__) . '/ProgressPanel.js'); + // $js->setInHeader(false); + $js->setField('FUNCTION_PREFIX', __CLASS__); + + $this->offsetSet(self::CODE, $js); + } + + return $this->offsetGet(self::CODE); + } + + /** * Creates a 'div' progress panel * * @param mixed $arg_array A MUtil_Ra::args data collection. @@ -110,11 +134,9 @@ */ protected function renderElement(Zend_View_Abstract $view) { - $js = new MUtil_Html_Link_JavaScript(dirname(__FILE__) . '/ProgressPanel.js'); - $js->setField('FUNCTION_PREFIX', __CLASS__); + // Make sure the JS code is added + $this->getCode(); - $this->append($js); - return parent::renderElement($view); } } Modified: trunk/library/layouts/scripts/gems.phtml =================================================================== --- trunk/library/layouts/scripts/gems.phtml 2011-12-15 15:40:20 UTC (rev 359) +++ trunk/library/layouts/scripts/gems.phtml 2011-12-15 15:54:19 UTC (rev 360) @@ -50,6 +50,8 @@ ?></div> </div><?php echo MUtil_Echo::out(); + + // Scripts here for load optimization echo $this->headScript(); echo $this->inlineScript(); ?></body> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-15 15:40:27
|
Revision: 359 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=359&view=rev Author: matijsdejong Date: 2011-12-15 15:40:20 +0000 (Thu, 15 Dec 2011) Log Message: ----------- Added existing Zend documentation Added Paths: ----------- trunk/library/docs/ZendApplicationObject.doc Added: trunk/library/docs/ZendApplicationObject.doc =================================================================== (Binary files differ) Property changes on: trunk/library/docs/ZendApplicationObject.doc ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-15 15:12:13
|
Revision: 358 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=358&view=rev Author: mennodekker Date: 2011-12-15 15:12:03 +0000 (Thu, 15 Dec 2011) Log Message: ----------- BugFix: new user only has an id after saving Modified Paths: -------------- trunk/library/classes/Gems/Model/StaffModel.php Modified: trunk/library/classes/Gems/Model/StaffModel.php =================================================================== --- trunk/library/classes/Gems/Model/StaffModel.php 2011-12-15 14:04:32 UTC (rev 357) +++ trunk/library/classes/Gems/Model/StaffModel.php 2011-12-15 15:12:03 UTC (rev 358) @@ -131,8 +131,10 @@ if ($this->getChanged()<1) { $this->setChanged(1); } - //Now load the userclass and save the password - $user = $this->loader->getUserLoader()->getUserByStaffId($newValues['gsf_id_user']); + + //Now load the userclass and save the password use the $savedValues as for a new + //user we might not have the id in the $newValues + $user = $this->loader->getUserLoader()->getUserByStaffId($savedValues['gsf_id_user']); if ($user->canSetPassword()) { $user->setPassword($newValues['fld_password']); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-15 14:04:41
|
Revision: 357 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=357&view=rev Author: mennodekker Date: 2011-12-15 14:04:32 +0000 (Thu, 15 Dec 2011) Log Message: ----------- Allow userloader to report the available UserDefinitions so projects can extend and replace with or add their own (not used yet) Modified Paths: -------------- trunk/library/classes/Gems/User/UserLoader.php Modified: trunk/library/classes/Gems/User/UserLoader.php =================================================================== --- trunk/library/classes/Gems/User/UserLoader.php 2011-12-15 11:34:17 UTC (rev 356) +++ trunk/library/classes/Gems/User/UserLoader.php 2011-12-15 14:04:32 UTC (rev 357) @@ -1,5 +1,4 @@ <?php - /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -49,10 +48,11 @@ /** * User class constants */ - const USER_NOLOGIN = 'NoLogin'; - const USER_OLD_STAFF = 'OldStaffUser'; - const USER_PROJECT = 'ProjectUser'; - const USER_STAFF = 'StaffUser'; + const USER_NOLOGIN = 'NoLogin'; + const USER_OLD_STAFF = 'OldStaffUser'; + const USER_PROJECT = 'ProjectUser'; + const USER_RESPONDENT = 'RespondentUser'; + const USER_STAFF = 'StaffUser'; /** * Allows sub classes of Gems_Loader_LoaderAbstract to specify the subdirectory where to look for. @@ -86,6 +86,11 @@ protected $session; /** + * @var Zend_Translate_Adapter + */ + protected $translate; + + /** * There can be only one, current user that is. * * @var Gems_User_User @@ -126,6 +131,34 @@ } /** + * Get userclass / description array of available UserDefinitions for respondents + * + * @return array + */ + public function getAvailableRespondentDefinitions() + { + $definitions = array( + self::USER_RESPONDENT => $this->translate->_('Db storage') + ); + + return $definitions; + } + + /** + * Get userclass / description array of available UserDefinitions for staff + * + * @return array + */ + public function getAvailableStaffDefinitions() + { + $definitions = array( + self::USER_STAFF => $this->translate->_('Db storage') + ); + + return $definitions; + } + + /** * Get the currently loggin in user * * @return Gems_User_User This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-15 11:34:28
|
Revision: 356 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=356&view=rev Author: mennodekker Date: 2011-12-15 11:34:17 +0000 (Thu, 15 Dec 2011) Log Message: ----------- And the staffmodel ofcourse :) Added Paths: ----------- trunk/library/classes/Gems/Model/StaffModel.php Added: trunk/library/classes/Gems/Model/StaffModel.php =================================================================== --- trunk/library/classes/Gems/Model/StaffModel.php (rev 0) +++ trunk/library/classes/Gems/Model/StaffModel.php 2011-12-15 11:34:17 UTC (rev 356) @@ -0,0 +1,143 @@ +<?php +/** + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The staff model + * + * @package Gems + * @subpackage Model + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + */ + +/** + * Contains the staffModel + * + * Handles saving of the password to the right userclass + * + * @package Gems + * @subpackage Model + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class Gems_Model_StaffModel extends Gems_Model_JoinModel implements MUtil_Registry_TargetInterface +{ + /** + * @var Gems_Loader + */ + public $loader; + + public function __construct() + { + parent::__construct('staff', 'gems__staff', 'gsf'); + } + + /** + * Allows the loader to set resources. + * + * @param string $name Name of resource to set + * @param mixed $resource The resource. + * @return boolean True if $resource was OK + */ + public function answerRegistryRequest($name, $resource) + { + $this->$name = $resource; + + return true; + } + + /** + * Should be called after answering the request to allow the Target + * to check if all required registry values have been set correctly. + * + * @return boolean False if required are missing. + */ + public function checkRegistryRequestsAnswers() + { + return true; + } + + /** + * Filters the names that should not be requested. + * + * Can be overriden. + * + * @param string $name + * @return boolean + */ + protected function filterRequestNames($name) + { + return '_' !== $name[0]; + } + + /** + * Allows the loader to know the resources to set. + * + * Returns those object variables defined by the subclass but not at the level of this definition. + * + * Can be overruled. + * + * @return array of string names + */ + public function getRegistryRequests() + { + return array_filter(array_keys(get_object_vars($this)), array($this, 'filterRequestNames')); + } + + /** + * Save a single model item. + * + * Makes sure the password is saved too using the userclass + * + * @param array $newValues The values to store for a single model item. + * @param array $filter If the filter contains old key values these are used + * to decide on update versus insert. + * @param array $saveTables Optional array containing the table names to save, + * otherwise the tables set to save at model level will be saved. + * @return array The values as they are after saving (they may change). + */ + public function save(array $newValues, array $filter = null, array $saveTables = null) + { + //First perform a save + $savedValues = parent::save($newValues, $filter, $saveTables); + + //Now check if we need to set the password + if(isset($newValues['fld_password']) && !empty($newValues['fld_password'])) { + if ($this->getChanged()<1) { + $this->setChanged(1); + } + //Now load the userclass and save the password + $user = $this->loader->getUserLoader()->getUserByStaffId($newValues['gsf_id_user']); + if ($user->canSetPassword()) { + $user->setPassword($newValues['fld_password']); + } + } + + return $savedValues; + } +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |