From: <luc...@us...> - 2014-10-26 20:00:39
|
Revision: 12820 http://sourceforge.net/p/xoops/svn/12820 Author: luciorota Date: 2014-10-26 20:00:31 +0000 (Sun, 26 Oct 2014) Log Message: ----------- remove unused files Removed Paths: ------------- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/bg.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/bookmarks/ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/bulb-grey.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/bulb-yell.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/del3.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/edit3.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/index.html XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/left_both.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/menu/ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.xcf XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/right_both.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/xoopsmicrobutton.gif XoopsModules/xhttperror/branches/luciorota/xhttperror/class/breadcrumb.php XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/CHANGELOG.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/INSTALL.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/LANGUAGES.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/LANG_DIFF.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/LICENSE.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/README1st.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/SMARTY_DIFF.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/UPGRADE.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/index.html XoopsModules/xhttperror/branches/luciorota/xhttperror/error.php XoopsModules/xhttperror/branches/luciorota/xhttperror/include/config.php XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/xhttperror_common_breadcrumb.tpl XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/xhttperror_index.tpl Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/bg.png =================================================================== (Binary files differ) Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/bulb-grey.png =================================================================== (Binary files differ) Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/bulb-yell.png =================================================================== (Binary files differ) Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/del3.png =================================================================== (Binary files differ) Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/edit3.png =================================================================== (Binary files differ) Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/index.html =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/index.html 2014-10-22 22:51:01 UTC (rev 12819) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/index.html 2014-10-26 20:00:31 UTC (rev 12820) @@ -1 +0,0 @@ - <script>history.go(-1);</script> \ No newline at end of file Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/left_both.png =================================================================== (Binary files differ) Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.png =================================================================== (Binary files differ) Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.xcf =================================================================== (Binary files differ) Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/right_both.png =================================================================== (Binary files differ) Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/xoopsmicrobutton.gif =================================================================== (Binary files differ) Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/class/breadcrumb.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/breadcrumb.php 2014-10-22 22:51:01 UTC (rev 12819) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/breadcrumb.php 2014-10-26 20:00:31 UTC (rev 12820) @@ -1,79 +0,0 @@ -<?php -/* - You may not change or alter any portion of this comment or credits - of supporting developers from this source code or any supporting source code - which is considered copyrighted (c) material of the original comment or credit authors. - - 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. - */ -/** - * XhttperrorBreadcrumb Class - * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @author Lucio Rota <luc...@gm...> - * @package Xhttperror - * @since 1.01 - * @version $Id:$ - * - * Example: - * $breadcrumb = new XhttperrorBreadcrumb(); - * $breadcrumb->addLink( 'bread 1', 'index1.php' ); - * $breadcrumb->addLink( 'bread 2', '' ); - * $breadcrumb->addLink( 'bread 3', 'index3.php' ); - * echo $breadcrumb->render(); - */ -defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); - -/** - * Class XhttperrorBreadcrumb - */ -class XhttperrorBreadcrumb -{ - var $dirname; - var $_bread = array(); - - /** - * - */ - function __construct() - { - $this->dirname = basename(dirname(dirname(__FILE__))); - } - - /** - * Add link to breadcrumb - * - * @param string $title - * @param string $link - */ - function addLink( $title='', $link='' ) - { - $this->_bread[] = array( - 'link' => $link, - 'title' => $title - ); - } - - /** - * Render Xhttperror BreadCrumb - * - */ - function render() - { - if ( !isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme']) ) { - include_once $GLOBALS['xoops']->path( "/class/theme.php" ); - $GLOBALS['xoTheme'] = new xos_opal_Theme(); - } - - require_once $GLOBALS['xoops']->path('class/template.php'); - $breadcrumbTpl = new XoopsTpl(); - $breadcrumbTpl->assign('breadcrumb', $this->_bread); - $html = $breadcrumbTpl->fetch("db:" . $this->dirname . "_common_breadcrumb.tpl"); - unset($breadcrumbTpl); - - return $html; - } -} Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/CHANGELOG.txt =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/CHANGELOG.txt 2014-10-22 22:51:01 UTC (rev 12819) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/CHANGELOG.txt 2014-10-26 20:00:31 UTC (rev 12820) @@ -1,13 +0,0 @@ -xHttpError History - -Key: -+ Added feature. -- Removed. -! Bug fix. -o General comment. - - -version 1.00 (Released: 2012/08/06) -=================================== - -o First public release. Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/INSTALL.txt =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/INSTALL.txt 2014-10-22 22:51:01 UTC (rev 12819) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/INSTALL.txt 2014-10-26 20:00:31 UTC (rev 12820) @@ -1,41 +0,0 @@ -Installing this module - -1) Installing on web site: - ======================= - - Via FTP: - ======== - Most people will want to use this method... - - 1.1) Unarchive the module archive on your computer using your favourite - archive utility (such as WinRAR - http://www.rarlabs.com/rar_archiver.htm). - 1.2) Upload the folder module's folder (do not rename it, or change the case!) - and its contents to the "modules" folder on your web site using your FTP - client. - 1.3) Go to section 2.1. - - - Via SSH/Shell: - ============== - If your ISP provides you with SSH access, you can use this method. More - experienced Linux/FreeBSD users may find it quicker. - - 1.1) Download the module archive (or upload from your computer) to - somewhere on your web site. You can do this easily using "wget" - e.g., wget http://www.urltoarchive.com/filename.tar.gz - 1.2) Go to the XOOPS module directory, e.g., "cd /path/to/xoops/modules" - 1.3) Extract the archive, if you downloaded the *.tar.gz version, - this can be done by "tar zxvf articles_archivename.tar.gz". If you - have the *.zip archive, use "unzip articles_archivename.zip". - 1.4) Delete the archive if you no longer need it, to save web space. - 1.5) Go to section 2.1. - -2) Installing into the XOOPS system: - ================================= - - 2.1) Report in to your XOOPS web site as an administrator, and navigate to the - modules admin area ("system admin -> modules"). Scroll to the lower - section of the page where the modules that are not installed are listed. - 2.2) Click on the "Install" icon for the module's listing and follow the - instructions. - 2.3) Click on the module's icon in the left to go to its admin area. Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/LANGUAGES.txt =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/LANGUAGES.txt 2014-10-22 22:51:01 UTC (rev 12819) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/LANGUAGES.txt 2014-10-26 20:00:31 UTC (rev 12820) @@ -1,24 +0,0 @@ -LANGUAGES.txt - -I have allowed for this module to be localised - or to be translated to -your local language. This basically means that all captions, text and titles -can easily be translated and displayed in your language. - -The default language for the this module is English as that is my primary -language and the default for XOOPS itself. And unfortunately, while I know a -little French, I am generally useless at learning foreign languages... - -If you wish to translate this module to your language, please first of all: - - 1) Check to see if it's already been done (and maybe just needs updating?). - 2) Make sure you have the latest version. - 3) Consider obtaining the latest development version... - 4) Bear in mind that the files may change constantly during its development. - -To translate this module to your language, go to the "languages" folder, copy -the folder called "english" (along with any files it contains) and rename it to -the name of your language. Make sure that you use the English version of its -name and, don't use capital letters and don't use any spaces. - -Edit the files contained within your new language files - it should (in theory) -be fairly obvious as to what you need to change. Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/LANG_DIFF.txt =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/LANG_DIFF.txt 2014-10-22 22:51:01 UTC (rev 12819) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/LANG_DIFF.txt 2014-10-26 20:00:31 UTC (rev 12820) @@ -1,5 +0,0 @@ -Module Name : xHttpError -Module developer : Rota Lucio luc...@gm... - -version 1.00 -============ Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/LICENSE.txt =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/LICENSE.txt 2014-10-22 22:51:01 UTC (rev 12819) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/LICENSE.txt 2014-10-26 20:00:31 UTC (rev 12820) @@ -1,674 +0,0 @@ - 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>. Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/README1st.txt =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/README1st.txt 2014-10-22 22:51:01 UTC (rev 12819) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/README1st.txt 2014-10-26 20:00:31 UTC (rev 12820) @@ -1,11 +0,0 @@ -Install, update and various other documentation can be found in the "docs" -folder/directory. - -.:IMPORTANT:. -Distribution files marked "beta" (they will have "beta" in the filename!) are -still in testing and should only be used on production sites with caution. - -Please see the text file docs/UPDATE.txt for more information on updating -xHttpError and if you need to run an update script. If you are installing -xHttpError for the first time, or re-installing afresh, you need not worry -about this. Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/SMARTY_DIFF.txt =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/SMARTY_DIFF.txt 2014-10-22 22:51:01 UTC (rev 12819) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/SMARTY_DIFF.txt 2014-10-26 20:00:31 UTC (rev 12820) @@ -1,3 +0,0 @@ -Module Name : xHttpError -Module developer : Lucio Rota luc...@gm... - Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/UPGRADE.txt =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/UPGRADE.txt 2014-10-22 22:51:01 UTC (rev 12819) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/UPGRADE.txt 2014-10-26 20:00:31 UTC (rev 12820) @@ -1,15 +0,0 @@ -Module Name : xHttpError -Module developer : Lucio Rota luc...@gm... - - -Upgrade Instructions -1. Backup your database, customized templates and module files before - upgrading. - -2. Upload all files in this package to XOOPS_ROOT_URL/modules/[module dirname]/, - overwriting the existing files. - -3. Report in to your site as administrator. - -4. Update the module using the XOOPS module administration panel at - 'System Admin -> Modules'. Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/index.html =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/index.html 2014-10-22 22:51:01 UTC (rev 12819) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/index.html 2014-10-26 20:00:31 UTC (rev 12820) @@ -1 +0,0 @@ - <script>history.go(-1);</script> \ No newline at end of file Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/error.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/error.php 2014-10-22 22:51:01 UTC (rev 12819) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/error.php 2014-10-26 20:00:31 UTC (rev 12820) @@ -1,201 +0,0 @@ -<?php -ob_start(); -@set_time_limit(5); -@ini_set('memory_limit', '64M'); -@ini_set('display_errors', 'Off'); -error_reporting(0); - -function print_error_page() { - $statusReason = array( - 100 => 'Continue', - 101 => 'Switching Protocols', - 102 => 'Processing', - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - 207 => 'Multi-Status', - 226 => 'IM Used', - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 306 => 'Reserved', - 307 => 'Temporary Redirect', - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Timeout', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Long', - 415 => 'Unsupported Media Type', - 416 => 'Requested Range Not Satisfiable', - 417 => 'Expectation Failed', - 422 => 'Unprocessable Entity', - 423 => 'Locked', - 424 => 'Failed Dependency', - 426 => 'Upgrade Required', - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported', - 506 => 'Variant Also Negotiates', - 507 => 'Insufficient Storage', - 510 => 'Not Extended' - ); - - $statusMessage = array( - 400 => "Your browser sent a request that this server could not understand.", - 401 => "This server could not verify that you are authorized to access the document requested.", - 402 => 'The server encountered an internal error or misconfiguration and was unable to complete your request.', - 403 => "You don't have permission to access %U% on this server.", - 404 => "We couldn't find <acronym title='%U%'>that uri</acronym> on our server, though it's most certainly not your fault.", - 405 => "The requested method is not allowed for the URL %U%.", - 406 => "An appropriate representation of the requested resource %U% could not be found on this server.", - 407 => "An appropriate representation of the requested resource %U% could not be found on this server.", - 408 => "Server timeout waiting for the HTTP request from the client.", - 409 => 'The server encountered an internal error or misconfiguration and was unable to complete your request.', - 410 => "The requested resource %U% is no longer available on this server and there is no forwarding address. Please remove all references to this resource.", - 411 => "A request of the requested method GET requires a valid Content-length.", - 412 => "The precondition on the request for the URL %U% evaluated to false.", - 413 => "The requested resource %U% does not allow request data with GET requests, or the amount of data provided in the request exceeds the capacity limit.", - 414 => "The requested URL's length exceeds the capacity limit for this server.", - 415 => "The supplied request data is not in a format acceptable for processing by this resource.", - 416 => 'Requested Range Not Satisfiable', - 417 => "The expectation given in the Expect request-header field could not be met by this server. The client sent <code>Expect:</code>", - 422 => "The server understands the media type of the request entity, but was unable to process the contained instructions.", - 423 => "The requested resource is currently locked. The lock must be released or proper identification given before the method can be applied.", - 424 => "The method could not be performed on the resource because the requested action depended on another action and that other action failed.", - 425 => 'The server encountered an internal error or misconfiguration and was unable to complete your request.', - 426 => "The requested resource can only be retrieved using SSL. Either upgrade your client, or try requesting the page using https://", - 500 => 'The server encountered an internal error or misconfiguration and was unable to complete your request.', - 501 => "This type of request method to %U% is not supported.", - 502 => "The proxy server received an invalid response from an upstream server.", - 503 => "The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.", - 504 => "The proxy server did not receive a timely response from the upstream server.", - 505 => 'The server encountered an internal error or misconfiguration and was unable to complete your request.', - 506 => "A variant for the requested resource <code>%U%</code> is itself a negotiable resource. This indicates a configuration error.", - 507 => "The method could not be performed. There is insufficient free space left in your storage allocation.", - 510 => "A mandatory extension policy in the request is not accepted by the server for this resource." - ); - - // Get the Status Code - if (isset($_SERVER['REDIRECT_STATUS']) && ($_SERVER['REDIRECT_STATUS'] != 200)) - $statusCode = $_SERVER['REDIRECT_STATUS']; - elseif (isset($_SERVER['REDIRECT_REDIRECT_STATUS']) && ($_SERVER['REDIRECT_REDIRECT_STATUS'] != 200)) - $statusCode = $_SERVER['REDIRECT_REDIRECT_STATUS']; - $statusCode = (!isset($_GET['error']) ? 404 : $_GET['error']); - - $statusCode = abs(intval($statusCode)); - - // Redirect to server home if called directly or if status is under 400 - if ( ( (isset($_SERVER['REDIRECT_STATUS']) && $_SERVER['REDIRECT_STATUS'] == 200) && (floor($statusCode / 100) == 3) ) - || (!isset($_GET['error']) && $_SERVER['REDIRECT_STATUS'] == 200) ) { - @header("Location: http://{$_SERVER['SERVER_NAME']}",1,302); - die(); - } - - // Check range of code or issue 500 - if (($statusCode < 200) || ($statusCode > 599)) $statusCode = 500; - - // Check for valid protocols or else issue 505 - if (!in_array($_SERVER["SERVER_PROTOCOL"], array('HTTP/1.0','HTTP/1.1','HTTP/0.9'))) - $statusCode = 505; - - // Get the status reason - $reason = (isset($statusReason[$statusCode]) ? $statusReason[$statusCode] : ''); - - // Get the status message - $message = (isset($statusMessage[$statusCode]) ? str_replace('%U%', htmlspecialchars(strip_tags(stripslashes($_SERVER['REQUEST_URI']))), $statusMessage[$statusCode]) : 'Error'); - - // issue optimized headers (optimized for your server) - @header("{$_SERVER['SERVER_PROTOCOL']} {$statusCode} {$reason}", 1, $statusCode); - if( @php_sapi_name() != 'cgi-fcgi' ) - @header("Status: {$statusCode} {$reason}", 1, $statusCode); - - // A very small footprint for certain types of 4xx class errors and all 5xx class errors - if (in_array($statusCode, array(400, 403, 405)) || (floor($statusCode / 100) == 5)) { - @header("Connection: close", 1); - if ($statusCode == 405) - @header('Allow: GET,HEAD,POST,OPTIONS', 1, 405); - } - - echo "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html>"; - echo "<head>\n<title>{$statusCode} {$reason}</title>\n<h1>{$reason}</h1>\n<p>{$message}<br />\n</p>\n"; -} - -function askapache_global_debug() { - # http://www.php.net/manual/en/function.array-walk.php#100681 - global $_GET, $_POST, $_ENV, $_SERVER; - $g = array('_ENV','_SERVER','_GET','_POST'); - array_walk_recursive($g, create_function('$n','global $$n;if( !!$$n&&ob_start()&&(print "[ $"."$n ]\n")&&array_walk($$n, - create_function(\'$v,$k\', \'echo "[$k] => $v\n";\'))) echo "<"."p"."r"."e>".htmlspecialchars(ob_get_clean())."<"."/"."pr"."e>";') ); -} - -print_error_page(); -//if($_SERVER['REMOTE_ADDR']=='youripaddress')askapache_global_debug(); -echo "</body>\n</html>"; -echo ob_get_clean(); -exit; - -/* -### -# ErrorDocument: In the event of a problem or error, what the server will return to the client. URLs -# can begin with a / for local web-paths (relative to DocumentRoot), or be a full URL which the client -# can resolve. Alternatively, a message can be displayed. If a malformed request is detected, normal -# request processing will be immediately halted and the internal error message returned. -# -# Prior to version 2.0, messages were indicated by prefixing them with a -# single unmatched double quote character. -# -# The special value d... [truncated message content] |
From: <luc...@us...> - 2014-10-26 20:03:46
|
Revision: 12821 http://sourceforge.net/p/xoops/svn/12821 Author: luciorota Date: 2014-10-26 20:03:41 +0000 (Sun, 26 Oct 2014) Log Message: ----------- add new files standardize module fixed bug when reporting eror Modified Paths: -------------- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/about.php XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/admin_footer.php XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/admin_header.php XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/error.php XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/index.php XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/menu.php XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/report.php XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/css/style.css XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/js/script.js XoopsModules/xhttperror/branches/luciorota/xhttperror/class/error.php XoopsModules/xhttperror/branches/luciorota/xhttperror/class/index.html XoopsModules/xhttperror/branches/luciorota/xhttperror/class/report.php XoopsModules/xhttperror/branches/luciorota/xhttperror/class/request.php XoopsModules/xhttperror/branches/luciorota/xhttperror/class/xhttperror.php XoopsModules/xhttperror/branches/luciorota/xhttperror/header.php XoopsModules/xhttperror/branches/luciorota/xhttperror/include/common.php XoopsModules/xhttperror/branches/luciorota/xhttperror/include/constants.php XoopsModules/xhttperror/branches/luciorota/xhttperror/include/functions.php XoopsModules/xhttperror/branches/luciorota/xhttperror/include/oninstall.php XoopsModules/xhttperror/branches/luciorota/xhttperror/include/onuninstall.php XoopsModules/xhttperror/branches/luciorota/xhttperror/include/onupdate.php XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/admin.php XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/help/help.html XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/main.php XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/modinfo.php XoopsModules/xhttperror/branches/luciorota/xhttperror/sql/mysql.sql XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/admin/xhttperror_admin_errors_list.tpl XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/admin/xhttperror_admin_reports_list.tpl XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php Added Paths: ----------- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/16x16/ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/16x16/index.html XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/error.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/house.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/index.html XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/information.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report_error.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/index.html XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/index.html XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.xcf XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/xoopsmicrobutton.gif XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/index.html XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/install.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/lang_diff.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/languages.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/license.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/readme1st.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/smarty_diff.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/upgrade.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/error.php XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/common.php XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/help/extra_info.html XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/xhttperror_error.tpl Removed Paths: ------------- XoopsModules/xhttperror/branches/luciorota/xhttperror/index.php Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/about.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/about.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/about.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -8,8 +8,19 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ +/** + * xhttperror module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) + * @package xhttperror + * @since 1.00 + * @author Xoops Development Team + * @version svn:$id$ + */ -include_once dirname(__FILE__) . '/admin_header.php'; +$currentFile = basename(__FILE__); +include_once __DIR__ . '/admin_header.php'; xoops_cp_header(); @@ -18,4 +29,4 @@ echo $aboutAdmin->addNavigation('about.php'); echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); -include 'admin_footer.php'; +include __DIR__ . '/admin_footer.php'; Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/admin_footer.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/admin_footer.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/admin_footer.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -8,6 +8,16 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ +/** + * Xhttperror module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) + * @package xhttperror + * @since 1.00 + * @author Xoops Development Team + * @version svn:$id$ + */ echo "<div class='adminfooter'>\n"; echo " <div style='text-align: center;'>\n"; Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/admin_header.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/admin_header.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/admin_header.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -8,9 +8,19 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ +/** + * xhttperror module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) + * @package xhttperror + * @since 1.00 + * @author Xoops Development Team + * @version svn:$id$ + */ -include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; -include_once dirname(dirname(__FILE__)) . '/include/common.php'; +include_once dirname(dirname(dirname(__DIR__))) . '/mainfile.php'; +include_once dirname(__DIR__) . '/include/common.php'; // Include xoops admin header include_once XOOPS_ROOT_PATH . '/include/cp_header.php'; @@ -26,86 +36,6 @@ xoops_loadLanguage('main', $xhttperror->getModule()->dirname()); if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { - include_once(XOOPS_ROOT_PATH . '/class/template.php'); + include_once XOOPS_ROOT_PATH . '/class/template.php'; $xoopsTpl = new XoopsTpl(); } -/* - - - - - - - - - - - - -// Include xoops admin header -include_once XOOPS_ROOT_PATH . '/include/cp_header.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/class/tree.php'; -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; -xoops_load ('XoopsUserUtility'); - -$module_handler =& xoops_gethandler('module'); -$xoopsModule = & $module_handler->getByDirname($dirname); -$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); -$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); -$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); -$pathImageModule = XOOPS_URL . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/images'; - -// Include module functions -include_once XOOPS_ROOT_PATH . "/modules/{$dirname}/include/config.php"; -include_once XOOPS_ROOT_PATH . "/modules/{$dirname}/include/functions.php"; - - - -// Check and load moduleadmin classes -$pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin'); -$globalLanguage = $GLOBALS['xoopsConfig']['language']; -if ( file_exists($pathDir . '/language/' . $globalLanguage . '/main.php')){ - include_once $pathDir . '/language/' . $globalLanguage . '/main.php'; -} else { - include_once $pathDir . '/language/english/main.php'; -} -if ( file_exists($pathDir . '/moduleadmin.php')){ - include_once $pathDir . '/moduleadmin.php'; - //return true; -} else { - xoops_cp_header(); - echo xoops_error(_AM_XADDRESSES_NOFRAMEWORKS); - xoops_cp_footer(); - //return false; -} - -$myts =& MyTextSanitizer::getInstance(); - -// Get user groups -$groupPermHandler =& xoops_gethandler('groupperm'); -if ($xoopsUser) { - $moduleperm_handler =& xoops_gethandler('groupperm'); - if (!$moduleperm_handler->checkRight('module_admin', $xoopsModule->getVar( 'mid' ), $xoopsUser->getGroups())) { - redirect_header(XOOPS_URL, 1, _NOPERM); - exit(); - } -} else { - redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); - exit(); -} - -if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { - include_once(XOOPS_ROOT_PATH."/class/template.php"); - $xoopsTpl = new XoopsTpl(); -} - -$xoopsTpl->assign('pathImageIcon', $pathImageIcon); -$xoopsTpl->assign('pathImageAdmin', $pathImageAdmin); -//xoops_cp_header(); - -//Load module languages -xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); -xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); -xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); -*/ \ No newline at end of file Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/error.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/error.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/error.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -1,142 +1,151 @@ -<?php -/** - * **************************************************************************** - * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) - * **************************************************************************** - * XHTTPERROR - MODULE FOR XOOPS - * Copyright (c) 2007 - 2012 - * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting - * source code which is considered copyrighted (c) material of the - * original comment or credit authors. - * - * 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. - * --------------------------------------------------------------------------- - * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * @license GNU General Public License v3.0 - * @package xhttperror - * @author Rota Lucio ( luc...@gm... ) - * - * $Rev$: Revision of last commit - * $Author$: Author of last commit - * $Date$: Date of last commit - * **************************************************************************** - */ - -$currentFile = basename(__FILE__); -include 'admin_header.php'; - -$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : (isset($_REQUEST['error_id']) ? "edit_error" : 'list_errors'); -switch($op ) { - default: - case 'list_errors' : - // render start here - xoops_cp_header(); - // render submenu - $modcreate_admin = new ModuleAdmin(); - echo $modcreate_admin->addNavigation('errors.php'); - $modcreate_admin->addItemButton(_AM_XHTTPERROR_ERROR_ADD, '' . $currentFile . '?op=edit_error', 'add'); - echo $modcreate_admin->renderButton(); - - $errorCount = $xhttperror->getHandler('error')->getCount(); - if($errorCount > 0) { - $criteria = new CriteriaCompo(); - $criteria->setSort('error_statuscode'); - $criteria->setOrder('ASC'); - $errorObjs = $xhttperror->getHandler('error')->getObjects($criteria, true, false); - - $GLOBALS['xoopsTpl']->assign('errors', $errorObjs); - $GLOBALS['xoopsTpl']->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML() ); - $GLOBALS['xoopsTpl']->display("db:{$xhttperror->getModule()->dirname()}_admin_errors_list.tpl"); - } else { - echo _AM_XHTTPERROR_ERROR_NOERRORS; - } - - include "admin_footer.php"; - break; - - case 'edit_error' : - case 'new_error' : - // render start here - xoops_cp_header(); - // render submenu - $modcreate_admin = new ModuleAdmin(); - echo $modcreate_admin->addNavigation('errors.php'); - $modcreate_admin->addItemButton(_AM_XHTTPERROR_ERROR_LIST, '' . $currentFile . '?op=list_errors', 'list'); - echo $modcreate_admin->renderButton(); - - if (isset($_REQUEST['error_id'])) { - $errorObj = $xhttperror->getHandler('error')->get($_REQUEST['error_id']); - } else { - $errorObj = $xhttperror->getHandler('error')->create(); - - } - $form = $errorObj->getForm(); - $form->display(); - - include "admin_footer.php"; - break; - - case 'save_error' : - if (!$GLOBALS['xoopsSecurity']->check()) { - redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); - } - if ( isset($_REQUEST['error_id']) ) { - $errorObj = $xhttperror->getHandler('error')->get($_REQUEST['error_id']); - } else { - $errorObj = $xhttperror->getHandler('error')->create(); - } - // Check statuscode - if ( isset($_REQUEST['error_statuscode']) ) { - $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('error_statuscode', $_REQUEST['error_statuscode'])); - if ($xhttperror->getHandler('error')->getCount($criteria) > 0) { - redirect_header($currentFile, 3, _AM_XHTTPERROR_STATUSCODE_EXISTS ); - } else { - $errorObj->setVar('error_statuscode', $_REQUEST['error_statuscode']); - } - } - $errorObj->setVar('error_title', $_REQUEST['error_title']); - $errorObj->setVar('error_text', $_REQUEST['error_text']); - $errorObj->setVar('error_text_html', $_REQUEST['error_text_html']); - $errorObj->setVar('error_text_smiley', $_REQUEST['error_text_smiley']); - $errorObj->setVar('error_text_breaks', $_REQUEST['error_text_breaks']); - $errorObj->setVar('error_showme', $_REQUEST['error_showme']); - $errorObj->setVar('error_redirect', $_REQUEST['error_redirect']); - $errorObj->setVar('error_redirect_time', (int)$_REQUEST['error_redirect_time']); - /* IN PROGRESS - $errorObj->setVar('error_redirect_message', (int)$_REQUEST['error_redirect_message']); - */ - $errorObj->setVar('error_redirect_uri', $_REQUEST['error_redirect_uri']); - - if ( $xhttperror->getHandler('error')->insert($errorObj) ) { - redirect_header($currentFile, 3, _AM_XHTTPERROR_SAVEDSUCCESS ); - } else { - redirect_header($currentFile, 3, _AM_XHTTPERROR_NOTSAVED ); - } - break; - - case 'delete_error' : - $errorObj = $xhttperror->getHandler('error')->get($_REQUEST['error_id']); - if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { - if (!$GLOBALS['xoopsSecurity']->check()) { - redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); - } - if ($xhttperror->getHandler('error')->delete($errorObj)) { - redirect_header($currentFile, 3, _AM_XHTTPERROR_DELETEDSUCCESS); - } else { - echo $errorObj->getHtmlErrors(); - } - } else { - // render start here - xoops_cp_header(); - xoops_confirm(array('ok' => 1, 'error_id' => $_REQUEST['error_id'], 'op' => 'delete_error'), $_SERVER['REQUEST_URI'], sprintf(_AM_XHTTPERROR_ERROR_RUSUREDEL, $errorObj->getVar('error_title'))); - xoops_cp_footer(); - } - break; -} +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + 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. + */ +/** + * xhttperror module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) + * @package xhttperror + * @since 1.00 + * @author Xoops Development Team + * @version svn:$id$ + */ + +$currentFile = basename(__FILE__); +include_once __DIR__ . '/admin_header.php'; + +$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : (isset($_REQUEST['error_id']) ? 'edit_error' : 'list_errors'); +switch($op ) { + default: + case 'list_errors': + // render start here + xoops_cp_header(); + // render submenu + $modcreate_admin = new ModuleAdmin(); + echo $modcreate_admin->addNavigation($currentFile); + $modcreate_admin->addItemButton(_CO_XHTTPERROR_BUTTON_ERROR_ADD, '' . $currentFile . '?op=edit_error', 'add'); + echo $modcreate_admin->renderButton(); + // + $errorCount = $xhttperror->getHandler('error')->getCount(); + if($errorCount > 0) { + $criteria = new CriteriaCompo(); + $criteria->setSort('error_statuscode'); + $criteria->setOrder('ASC'); + $errors = $xhttperror->getHandler('error')->getObjects($criteria, true, false); // as array + $GLOBALS['xoopsTpl']->assign('errors', $errors); + $GLOBALS['xoopsTpl']->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML() ); + $GLOBALS['xoopsTpl']->display("db:{$xhttperror->getModule()->dirname()}_admin_errors_list.tpl"); + } else { + echo _CO_XHTTPERROR_WARNING_NOERRORS; + } + include __DIR__ . '/admin_footer.php'; + break; + + case 'edit_error': + case 'new_error': + // render start here + xoops_cp_header(); + // render submenu + $modcreate_admin = new ModuleAdmin(); + echo $modcreate_admin->addNavigation($currentFile); + $modcreate_admin->addItemButton(_CO_XHTTPERROR_BUTTON_ERRORS_LIST, '' . $currentFile . '?op=list_errors', 'list'); + echo $modcreate_admin->renderButton(); + // + $error_id = XhttperrorRequest::getInt('error_id', 0); + $errorObj = $xhttperror->getHandler('error')->get($error_id); + if (!$errorObj) { + // ERROR + redirect_header($currentFile, 3, _CO_XHTTPERROR_ERROR_NOERROR); + exit(); + } + $form = $errorObj->getForm(); + $form->display(); + // + include __DIR__ . '/admin_footer.php'; + break; + + case 'save_error': + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + } + $error_id = XhttperrorRequest::getInt('error_id', 0, 'POST'); + $isNewError = ($error_id == 0) ? true : false; + $errorObj = $module_skeleton->getHandler('error')->get($error_id); + // Check statuscode + if (isset($_REQUEST['error_statuscode'])) { + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('error_statuscode', $_REQUEST['error_statuscode'])); + if ($xhttperror->getHandler('error')->getCount($criteria) > 0) { + redirect_header($currentFile, 3, _AM_XHTTPERROR_STATUSCODE_EXISTS); // IN PROGRESS + } else { + $errorObj->setVar('error_statuscode', $_REQUEST['error_statuscode']); + } + } + $error_title = XhttperrorRequest::getString('error_title', '', 'POST'); + $error_text = XhttperrorRequest::getString('error_text', '', 'POST'); + $error_text_html = XhttperrorRequest::getString('error_text_html', '', 'POST'); + // + $errorObj->setVar('error_title', $error_title); + $errorObj->setVar('error_text', $error_text); + $errorObj->setVar('error_text_html', $error_text_html); + $errorObj->setVar('error_text_smiley', $_REQUEST['error_text_smiley']); + $errorObj->setVar('error_text_breaks', $_REQUEST['error_text_breaks']); + $errorObj->setVar('error_showme', $_REQUEST['error_showme']); + $errorObj->setVar('error_redirect', $_REQUEST['error_redirect']); + $errorObj->setVar('error_redirect_time', (int) $_REQUEST['error_redirect_time']); + /* IN PROGRESS + $errorObj->setVar('error_redirect_message', (int)$_REQUEST['error_redirect_message']); + */ + $errorObj->setVar('error_redirect_uri', $_REQUEST['error_redirect_uri']); + if ($xhttperror->getHandler('error')->insert($errorObj)) { + redirect_header($currentFile, 3, _CO_XHTTPERROR_ERROR_STORED); + } else { + // ERROR + xoops_cp_header(); + echo $errorObj->getHtmlErrors(); + xoops_cp_footer(); + exit(); + } + break; + + case 'delete_error': + $error_id = XhttperrorRequest::getInt('error_id', 0); + $errorObj = $xhttperror->getHandler('error')->get($error_id); + if (!$errorObj) { + // ERROR + redirect_header($currentFile, 3, _CO_XHTTPERROR_ERROR_NOERROR); + exit(); + } + if (XhttperrorRequest::getBool('ok', false, 'POST') == true) { + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + } + if ($xhttperror->getHandler('error')->delete($errorObj)) { + redirect_header($currentFile, 3, _CO_XHTTPERROR_ERROR_DELETED); + } else { + // ERROR + xoops_cp_header(); + echo $errorObj->getHtmlErrors(); + xoops_cp_footer(); + exit(); + } + } else { + xoops_cp_header(); + xoops_confirm( + array('ok' => true, 'op' => 'delete_error', 'error_id' => $error_id), + $_SERVER['REQUEST_URI'], + _CO_XHTTPERROR_ERROR_DELETE_AREUSURE, + _DELETE + ); + xoops_cp_footer(); + } + break; +} Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/index.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/index.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/index.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -9,18 +9,18 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ /** - * Module_skeleton module + * xhttperror module * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) - * @package module_skeleton + * @package xhttperror * @since 1.00 * @author Xoops Development Team * @version svn:$id$ */ $currentFile = basename(__FILE__); -include_once dirname(__FILE__) . '/admin_header.php'; +include_once __DIR__ . '/admin_header.php'; define('_RED', '#FF0000'); // Red define('_GREEN', '#00AA00'); // Green @@ -35,9 +35,9 @@ $indexAdmin->addInfoBox(_AM_XHTTPERROR_INTRO); $indexAdmin->addInfoBoxLine(_AM_XHTTPERROR_INTRO, _AM_XHTTPERROR_INFO); if( file_exists(XOOPS_ROOT_PATH . "/.htaccess")) { - $htaccessCheck = _AM_XHTTPERROR_FILECHK . XOOPS_ROOT_PATH ."/.htaccess " . "<br />" . _AM_XHTTPERROR_FILEEXISTS; + $htaccessCheck = _AM_XHTTPERROR_FILECHK . XOOPS_ROOT_PATH . "/.htaccess " . "<br />" . _AM_XHTTPERROR_FILEEXISTS; } else { - $htaccessCheck = _AM_XHTTPERROR_FILECHK . XOOPS_ROOT_PATH ."/.htaccess " . "<br />" . _AM_XHTTPERROR_FILENOEXIST; + $htaccessCheck = _AM_XHTTPERROR_FILECHK . XOOPS_ROOT_PATH . "/.htaccess " . "<br />" . _AM_XHTTPERROR_FILENOEXIST; } $indexAdmin->addInfoBoxLine(_AM_XHTTPERROR_INTRO, $htaccessCheck); $indexAdmin->addInfoBoxLine(_AM_XHTTPERROR_INTRO, _AM_XHTTPERROR_ADDCODE); @@ -46,15 +46,15 @@ } else { // get errors $criteria = new CriteriaCompo(); - $errors = $xhttperror->getHandler('error')->getObjects($criteria); - foreach ($errors as $error) { - $msg_id = $error->getVar('error_id'); - $error_statuscode = $error->getVar('error_statuscode'); - $hmtl = "ErrorDocument " . $error_statuscode . " " . XOOPS_URL . "/modules/" . $xoopsModule->getVar('dirname') . "/index.php?error=" . $error_statuscode . ""; + $errorObjs = $xhttperror->getHandler('error')->getObjects($criteria); + foreach ($errorObjs as $errorObj) { + $error_id = $errorObj->getVar('error_id'); + $error_statuscode = $errorObj->getVar('error_statuscode'); + $hmtl = "ErrorDocument " . $error_statuscode . " " . XOOPS_URL . "/modules/" . $xoopsModule->getVar('dirname') . "/error.php?error=" . $error_statuscode . ""; $indexAdmin->addInfoBoxLine(_AM_XHTTPERROR_INTRO, $hmtl); } } -echo $indexAdmin->addNavigation('index.php'); +echo $indexAdmin->addNavigation($currentFile); echo $indexAdmin->renderIndex(); -include 'admin_footer.php'; +include __DIR__ . '/admin_footer.php'; Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/menu.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/menu.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/menu.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -13,7 +13,7 @@ * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) - * @package xhttperror + * @package xhttperror * @since 1.00 * @author Xoops Development Team * @version svn:$id$ Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/report.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/report.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/report.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -1,81 +1,93 @@ -<?php -/** - * **************************************************************************** - * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) - * **************************************************************************** - * XHTTPERROR - MODULE FOR XOOPS - * Copyright (c) 2007 - 2012 - * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting - * source code which is considered copyrighted (c) material of the - * original comment or credit authors. - * - * 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. - * --------------------------------------------------------------------------- - * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * @license GNU General Public License v3.0 - * @package xhttperror - * @author Rota Lucio ( luc...@gm... ) - * - * $Rev$: Revision of last commit - * $Author$: Author of last commit - * $Date$: Date of last commit - * **************************************************************************** - */ - -$currentFile = basename(__FILE__); -include 'admin_header.php'; - -$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : 'list_reports'; -switch($op ) { - default: - case 'list_reports' : - // render start here - xoops_cp_header(); - // render submenu - $modcreate_admin = new ModuleAdmin(); - echo $modcreate_admin->addNavigation('reports.php'); - - $reportCount = $xhttperror->getHandler('report')->getCount(); - if($reportCount > 0) { - $criteria = new CriteriaCompo(); - $criteria->setSort('report_date'); - $criteria->setOrder('ASC'); - $criteria->setLimit($xhttperror->getConfig('reports_perpage')); - $reportObjs = $xhttperror->getHandler('report')->getObjects($criteria, true, false); - foreach ($reportObjs as $key => $reportObj) { - $reportObjs[$key]['report_user'] = XoopsUserUtility::getUnameFromId($reportObj['report_uid'], false, true); - $reportObjs[$key]['report_date'] = formatTimeStamp($reportObj['report_date'], _DATESTRING); - } - $GLOBALS['xoopsTpl']->assign('reports', $reportObjs); - $GLOBALS['xoopsTpl']->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML() ); - $GLOBALS['xoopsTpl']->display("db:{$xhttperror->getModule()->dirname()}_admin_reports_list.html"); - } else { - echo _AM_XHTTPERROR_REPORT_NOREPORTS; - } - include "admin_footer.php"; - break; - case 'delete_report' : - $reportObj = $xhttperror->getHandler('report')->get($_REQUEST['report_id']); - if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { - if ( !$GLOBALS['xoopsSecurity']->check() ) { - redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); - } - if ( $xhttperror->getHandler('report')->delete($reportObj)) { - redirect_header($currentFile, 3, _AM_XHTTPERROR_DELETEDSUCCESS ); - } else { - echo $reportObj->getHtmlErrors(); - } - } else { - // render start here - xoops_cp_header(); - xoops_confirm(array('ok' => 1, 'report_id' => $_REQUEST['report_id'], 'op' => 'delete_report'), $_SERVER['REQUEST_URI'], sprintf(_AM_XHTTPERROR_REPORT_RUSUREDEL, $reportObj->getVar('report_id'))); - xoops_cp_footer(); - } - break; -} +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + 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. + */ +/** + * xhttperror module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) + * @package xhttperror + * @since 1.00 + * @author Xoops Development Team + * @version svn:$id$ + */ + +$currentFile = basename(__FILE__); +include_once __DIR__ . '/admin_header.php'; + +$op = XhttperrorRequest::getString('op', 'list_reports'); +switch($op) { + default: + case 'list_reports': + // render start here + xoops_cp_header(); + // render submenu + $modcreate_admin = new ModuleAdmin(); + echo $modcreate_admin->addNavigation($currentFile); + // + $reportCount = $xhttperror->getHandler('report')->getCount(); + if($reportCount > 0) { + $start = XhttperrorRequest::getInt('start', 0); + $criteria = new CriteriaCompo(); + $criteria->setSort('report_date'); + $criteria->setOrder('ASC'); + $criteria->setStart($start); + $criteria->setLimit($xhttperror->getConfig('reports_perpage')); + $reports = $xhttperror->getHandler('report')->getObjects($criteria, true, false); // as array + foreach ($reports as $key => $report) { + $report['report_owner_uname'] = XoopsUserUtility::getUnameFromId($report['report_uid']); + $report['report_date_formatted'] = XoopsLocal::formatTimestamp($report['report_date'], 'l'); + $GLOBALS['xoopsTpl']->append('reports', $report); + } + $GLOBALS['xoopsTpl']->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML()); + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $pagenav = new XoopsPageNav($reportCount, $xhttperror->getConfig('reports_perpage'), $start, 'start'); + $GLOBALS['xoopsTpl']->assign('reports_pagenav', $pagenav->renderNav()); + // + $GLOBALS['xoopsTpl']->display("db:{$xhttperror->getModule()->dirname()}_admin_reports_list.tpl"); + } else { + echo _CO_XHTTPERROR_WARNING_NOREPORTS; + } + include __DIR__ . '/admin_footer.php'; + break; + + case 'delete_report' : + $report_id = XhttperrorRequest::getInt('report_id', 0); + $reportObj = $xhttperror->getHandler('report')->get($report_id); + if (!$reportObj) { + // ERROR + redirect_header($currentFile, 3, _CO_XHTTPERROR_ERROR_NOREPORT); + exit(); + } + if (XhttperrorRequest::getBool('ok', false, 'POST') == true) { + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + } + if ($xhttperror->getHandler('report')->delete($reportObj)) { + redirect_header($currentFile, 3, _CO_XHTTPERROR_REPORT_DELETED); + } else { + // ERROR + xoops_cp_header(); + echo $reportObj->getHtmlErrors(); + xoops_cp_footer(); + exit(); + } + } else { + xoops_cp_header(); + xoops_confirm( + array('ok' => true, 'op' => 'delete_report', 'report_id' => $report_id), + $_SERVER['REQUEST_URI'], + _CO_XHTTPERROR_REPORT_DELETE_AREUSURE, + _DELETE + ); + xoops_cp_footer(); + } + break; +} Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/css/style.css =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/css/style.css 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/css/style.css 2014-10-26 20:03:41 UTC (rev 12821) @@ -1,36 +1 @@ -@charset "UTF-8"; -/** - * **************************************************************************** - * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) - * **************************************************************************** - * XHTTPERROR - MODULE FOR XOOPS - * Copyright (c) 2007 - 2012 - * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting - * source code which is considered copyrighted (c) material of the - * original comment or credit authors. - * - * 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. - * --------------------------------------------------------------------------- - * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * @license GPL see LICENSE - * @package xhttperror - * @author Rota Lucio ( luc...@gm... ) - * - * Version : 1.0 Mon 2012/07/23 14:17:52 : XOOPS Exp $ - * **************************************************************************** - */ - - -.box-header { - margin: 2px; - padding: 5px; - background-color: #ccc; - width: 100%; - height: 50px; -} +@charset "UTF-8"; Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/16x16/index.html =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/16x16/index.html (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/16x16/index.html 2014-10-26 20:03:41 UTC (rev 12821) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/error.png =================================================================== (Binary files differ) Index: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/error.png =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/error.png 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/error.png 2014-10-26 20:03:41 UTC (rev 12821) Property changes on: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/error.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/house.png =================================================================== (Binary files differ) Index: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/house.png =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/house.png 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/house.png 2014-10-26 20:03:41 UTC (rev 12821) Property changes on: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/house.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/index.html =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/index.html (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/index.html 2014-10-26 20:03:41 UTC (rev 12821) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/information.png =================================================================== (Binary files differ) Index: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/information.png =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/information.png 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/information.png 2014-10-26 20:03:41 UTC (rev 12821) Property changes on: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/information.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report.png =================================================================== (Binary files differ) Index: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report.png =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report.png 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report.png 2014-10-26 20:03:41 UTC (rev 12821) Property changes on: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report_error.png =================================================================== (Binary files differ) Index: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report_error.png =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report_error.png 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report_error.png 2014-10-26 20:03:41 UTC (rev 12821) Property changes on: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report_error.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/index.html =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/index.html (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/index.html 2014-10-26 20:03:41 UTC (rev 12821) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/index.html =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/index.html (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/index.html 2014-10-26 20:03:41 UTC (rev 12821) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.png =================================================================== (Binary files differ) Index: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.png =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.png 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.png 2014-10-26 20:03:41 UTC (rev 12821) Property changes on: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.xcf =================================================================== (Binary files differ) Index: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.xcf =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.xcf 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.xcf 2014-10-26 20:03:41 UTC (rev 12821) Property changes on: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.xcf ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/xoopsmicrobutton.gif =================================================================== (Binary files differ) Index: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/xoopsmicrobutton.gif =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/xoopsmicrobutton.gif 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/xoopsmicrobutton.gif 2014-10-26 20:03:41 UTC (rev 12821) Property changes on: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/xoopsmicrobutton.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/js/script.js =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/js/script.js 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/js/script.js 2014-10-26 20:03:41 UTC (rev 12821) @@ -1,34 +1 @@ - -/** - * **************************************************************************** - * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) - * **************************************************************************** - * XHTTPERROR - MODULE FOR XOOPS - * Copyright (c) 2007 - 2012 - * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting - * source code which is considered copyrighted (c) material of the - * original comment or credit authors. - * - * 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. - * --------------------------------------------------------------------------- - * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * @license GPL see LICENSE - * @package xhttperror - * @author Rota Lucio ( luc...@gm... ) - * - * Version : 1.0 Mon 2012/07/23 14:17:52 : XOOPS Exp $ - * **************************************************************************** - */ - -$(document).ready(function(){ - $( "button, input:button, input:submit, input:file, input:reset" ).css("color","inherit").button(); - $( ".check" ).css("color","#fff").button(); - $( ".radio" ).css("color","#fff").buttonset(); - $( ".toolbar" ).css("color","#000").buttonset(); -}); +// NOP Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/class/error.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/error.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/error.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -9,7 +9,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ /** - * Xhttperror module + * xhttperror module * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) @@ -18,12 +18,13 @@ * @author Xoops Development Team * @version svn:$id$ */ + defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); -include_once dirname(dirname(__FILE__)) . '/include/common.php'; +include_once dirname(__DIR__) . '/include/common.php'; -define('XHTTPERR_REDIRECT_NO', 0); -define('XHTTPERR_REDIRECT_URI', 1); -define('XHTTPERR_REDIRECT_PREVIOUS', 2); +define('_XHTTPERROR_REDIRECT_NO', 0); +define('_XHTTPERROR_REDIRECT_URI', 1); +define('_XHTTPERROR_REDIRECT_PREVIOUS', 2); /** * Class XhttperrorError @@ -53,7 +54,7 @@ $this->initVar('error_text_smiley', XOBJ_DTYPE_INT, true, false); // default: true $this->initVar('error_text_breaks', XOBJ_DTYPE_INT, false, false); // default: false $this->initVar("error_showme", XOBJ_DTYPE_INT, true, false); // default: true - $this->initVar("error_redirect", XOBJ_DTYPE_INT, XHTTPERR_REDIRECT_NO, false); // default: XHTTPERR_REDIRECT_NO + $this->initVar("error_redirect", XOBJ_DTYPE_INT, XHTTPERROR_REDIRECT_NO, false); // default: XHTTPERROR_REDIRECT_NO $this->initVar("error_redirect_time", XOBJ_DTYPE_INT, 3, false); // default: 3 seconds $this->initVar("error_redirect_message", XOBJ_DTYPE_TXTBOX, '', false); // IN PROGRESS $this->initVar("error_redirect_uri", XOBJ_DTYPE_URL, XOOPS_URL, false); // default XOOPS_URL @@ -66,7 +67,7 @@ if ($action === false) { $action = $_SERVER['REQUEST_URI']; } - $title = $this->isNew() ? sprintf(_AM_XHTTPERROR_ERROR_ADD) : sprintf(_AM_XHTTPERROR_ERROR_EDIT); + $title = $this->isNew() ? _CO_XHTTPERROR_BUTTON_ERROR_ADD : _CO_XHTTPERROR_BUTTON_ERROR_EDIT; // $form = new XoopsThemeForm($title, 'form_error', $action, 'post', true); $form->setExtra('enctype="multipart/form-data"'); @@ -112,9 +113,9 @@ $form->addElement(new XoopsFormLabel(_AM_XHTTPERROR_ERROR_REDIRECT_OPTIONS, '', '')); // error: error_reditrect $errorRedirect = new XoopsFormSelect (_AM_XHTTPERROR_ERROR_REDIRECT, 'error_redirect', $this->getVar('error_redirect'), 1, false); - $errorRedirect->addOption (XHTTPERR_REDIRECT_NO, _AM_XHTTPERROR_ERROR_REDIRECT_OPTION_NO); - $errorRedirect->addOption (XHTTPERR_REDIRECT_URI, _AM_XHTTPERROR_ERROR_REDIRECT_OPTION_URI); - $errorRedirect->addOption (XHTTPERR_REDIRECT_PREVIOUS, _AM_XHTTPERROR_ERROR_REDIRECT_OPTION_PREVIOUS); + $errorRedirect->addOption (XHTTPERROR_REDIRECT_NO, _AM_XHTTPERROR_ERROR_REDIRECT_OPTION_NO); + $errorRedirect->addOption (XHTTPERROR_REDIRECT_URI, _AM_XHTTPERROR_ERROR_REDIRECT_OPTION_URI); + $errorRedirect->addOption (XHTTPERROR_REDIRECT_PREVIOUS, _AM_XHTTPERROR_ERROR_REDIRECT_OPTION_PREVIOUS); //$errorRedirect = new XoopsFormRadioYN(, _YES, _NO); $errorRedirect->setDescription(_AM_XHTTPERROR_ERROR_REDIRECT_DESC); $form->addElement($errorRedirect); @@ -147,7 +148,7 @@ $form->addElement(new XoopsFormHidden('error_id', $this->getVar('error_id'))); } // form: button tray - $button_tray = new XoopsFormElementTray(_AM_XHTTPERROR_ACTION, '' ,''); + $button_tray = new XoopsFormElementTray(_CO_XHTTPERROR_ACTIONS, '' ,''); $button_tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); $button_tray->addElement(new XoopsFormButton('', 'reset', _RESET, 'reset')); $cancel_button = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/class/index.html =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/index.html 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/index.html 2014-10-26 20:03:41 UTC (rev 12821) @@ -1 +1 @@ - <script>history.go(-1);</script> \ No newline at end of file +<script>history.go(-1);</script> \ No newline at end of file Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/class/report.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/report.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/report.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -9,17 +9,18 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ /** - * Xhttperror module + * xhttperror module * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) - * @package module_skeleton + * @package xhttperror * @since 1.00 * @author Xoops Development Team * @version svn:$id$ */ + defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); -include_once dirname(dirname(__FILE__)) . '/include/common.php'; +include_once dirname(__DIR__) . '/include/common.php'; /** * Class XhttperrorReport Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/class/request.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/request.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/request.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -19,7 +19,7 @@ * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. * @package xhttperror - * @since 1.1 + * @since 1.01 * @author Lucio Rota <luc...@gm...> * @author trabis <lus...@gm...> * @version svn:$id$ Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/class/xhttperror.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/xhttperror.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/xhttperror.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -15,7 +15,7 @@ * @license http://www.fsf.org/copyleft/gpl.html GNU public license * @package Class * @subpackage Utils - * @since 1.1 + * @since 1.01 * @author Lucio Rota <luc...@gm...> * @author trabis <lus...@gm...> * @version $Id:$ Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt 2014-10-26 20:03:41 UTC (rev 12821) @@ -0,0 +1,17 @@ +xHttpError History + +Key: ++ Added feature. +- Removed. +! Bug fix. +o General comment. + +version 1.01 (Released: 2014/10/24) +=================================== +o Upgraded to Xoops 2.5.7 coding standard. +o Refactory all language definitions +! store wrong requested uri in reports (REDIRECT_URL, REDIRECT_QUERY_STRING) + +version 1.00 (Released: 2012/08/06) +=================================== +o First public release. Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/index.html =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/index.html (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/index.html 2014-10-26 20:03:41 UTC (rev 12821) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/install.txt =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/install.txt (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/install.txt 2014-10-26 20:03:41 UTC (rev 12821) @@ -0,0 +1,41 @@ +Installing this module + +1) Installing on web site: + ======================= + + Via FTP: + ======== + Most people will want to use this method... + + 1.1) Unarchive the module archive on your computer using your favourite + archive utility. + 1.2) Upload the folder module's folder (do not rename it, or change the case!) + and its contents to the "modules" folder on your web site using your FTP + client. + 1.3) Go to section 2.1. + + + Via SSH/Shell: + ============== + If your ISP provides you with SSH access, you can use this method. More + experienced Linux/FreeBSD users may find it quicker. + + 1.1) Download the module archive (or upload from your computer) to + somewhere on your web site. You can do this easily using "wget" + e.g., wget http://www.urltoarchive.com/filename.tar.gz + 1.2) Go to the XOOPS module directory, e.g., "cd /path/to/xoops/modules" + 1.3) Extract the archive, if you downloaded the *.tar.gz version, + this can be done by "tar zxvf articles_archivename.tar.gz". If you + have the *.zip archive, use "unzip articles_archivename.zip". + 1.4) Delete the archive if you no longer need it, to save web space. + 1.5) Go to section 2.1. + +2) Installing into the XOOPS system: + ================================= + + 2.1) Report in to your XOOPS web site as an administrator, and navigate to the + modules admin area ("system admin -> modules"). Scroll to the lower + section of the page where the modules that are not installed are listed. + 2.2) Click on the "Install" icon for the module's listing and follow the + instructions. + 2.3) Click on the module's icon in the left to go to its admin area. Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/lang_diff.txt =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/lang_diff.txt (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/lang_diff.txt 2014-10-2... [truncated message content] |
From: <luc...@us...> - 2014-11-03 18:36:57
|
Revision: 12829 http://sourceforge.net/p/xoops/svn/12829 Author: luciorota Date: 2014-11-03 18:36:48 +0000 (Mon, 03 Nov 2014) Log Message: ----------- rename error.php to index.php for compatibility in case of module upgrade Modified Paths: -------------- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/index.php XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/help/help.html XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php Added Paths: ----------- XoopsModules/xhttperror/branches/luciorota/xhttperror/index.php XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/xhttperror_index.tpl Removed Paths: ------------- XoopsModules/xhttperror/branches/luciorota/xhttperror/error.php XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/xhttperror_error.tpl Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/index.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/index.php 2014-10-31 07:13:53 UTC (rev 12828) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/index.php 2014-11-03 18:36:48 UTC (rev 12829) @@ -50,7 +50,7 @@ foreach ($errorObjs as $errorObj) { $error_id = $errorObj->getVar('error_id'); $error_statuscode = $errorObj->getVar('error_statuscode'); - $hmtl = "ErrorDocument " . $error_statuscode . " " . XOOPS_URL . "/modules/" . $xoopsModule->getVar('dirname') . "/error.php?error=" . $error_statuscode . ""; + $hmtl = "ErrorDocument " . $error_statuscode . " " . XOOPS_URL . "/modules/" . $xoopsModule->getVar('dirname') . "/index.php?error=" . $error_statuscode . ""; $indexAdmin->addInfoBoxLine(_AM_XHTTPERROR_INTRO, $hmtl); } } Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/error.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/error.php 2014-10-31 07:13:53 UTC (rev 12828) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/error.php 2014-11-03 18:36:48 UTC (rev 12829) @@ -1,103 +0,0 @@ -<?php -/* - You may not change or alter any portion of this comment or credits - of supporting developers from this source code or any supporting source code - which is considered copyrighted (c) material of the original comment or credit authors. - - 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. - */ -/** - * Xhttperror module - * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) - * @package xhttperror - * @since 1.00 - * @author Xoops Development Team - * @version svn:$id$ - */ - -$currentFile = basename(__FILE__); -include __DIR__ . '/header.php'; - -$myts = MyTextSanitizer::getInstance(); - -$xoopsOption['template_main'] = "{$xhttperror->getModule()->dirname()}_error.tpl"; -include_once XOOPS_ROOT_PATH . '/header.php'; - -$uid = (is_object($xoopsUser) && isset($xoopsUser)) ? $xoopsUser->uid() : 0; -$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS); - -if (!isset($_GET['error'])) { - $xoopsTpl->assign('message', "No error defined."); -} else { - // Save error info to database - // We may want to turn this off on busy sites. - if ($xhttperror->getConfig('error_reporting') == false) { - if (!(is_object($xoopsUser) && isset($xoopsUser)) || ($xoopsUser->isAdmin($xhttperror->getModule()->mid()) && $xhttperror->getConfig('ignore_admin') != true)) { - // create report - $serverVars = array(); - $serverVars['HTTP_REFERER'] = xoops_getenv('HTTP_REFERER'); - $serverVars['REMOTE_ADDR'] = xoops_getenv('REMOTE_ADDR'); - //$serverVars[''] = - $referer = xoops_getenv('HTTP_REFERER'); - $userAgent = xoops_getenv('HTTP_USER_AGENT'); - $remoteAddr = xoops_getenv('REMOTE_ADDR'); - $requestedUri = ''; - if (isset($_SERVER['REDIRECT_URL'])) { - $requestedUri .= $_SERVER['REDIRECT_URL']; - } - if (isset($_SERVER['REDIRECT_QUERY_STRING'])) { - $requestedUri .= '?' . $_SERVER['REDIRECT_QUERY_STRING']; - } - // create error object - $reportObj = $xhttperror->getHandler('report')->create(); - // - $reportObj->setVar('report_uid', $uid); - $reportObj->setVar('report_statuscode', $_GET['error']); - $reportObj->setVar('report_date', time()); - $reportObj->setVar('report_referer', $referer); - $reportObj->setVar('report_useragent', $userAgent); - $reportObj->setVar('report_remoteaddr', $remoteAddr); - $reportObj->setVar('report_requesteduri', $requestedUri); - // store error object - if($xhttperror->getHandler('report')->insert($reportObj)) { - // NOP - } else { - // ERROR - xoops_cp_header(); - echo $reportObj->getHtmlErrors(); - xoops_cp_footer(); - exit(); - } - } - } - $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('error_statuscode', $_GET['error'])); - $criteria->add(new Criteria('error_showme', true)); - if ($errorObjs = $xhttperror->getHandler('error')->getObjects($criteria)) { - $errorObj = $errorObjs[0]; - $id = $errorObj->getVar('error_id'); - $title = $myts->displayTarea($errorObj->getVar('error_title')); - //$text = $errorObj->getVar('error_text', 'n'); - // displayTarea ($text, $html=0, $smiley=1, $xcode=1, $image=1, $br=1) - $text = $myts->displayTarea($errorObj->getVar('error_text', 'n'), $errorObj->getVar('error_text_html'), $errorObj->getVar('error_text_smiley'), 1, 1, $errorObj->getVar('error_text_breaks')); - - // Add custom title to page title - "<{$xoops_pagetitle}>" - titleaspagetitle - if ($xhttperror->getConfig('title_as_page_title') == 1) { - $xoopsTpl->assign('xoops_pagetitle', $xhttperror->getModule()->getVar('name').' - '. $title); // module name - article title - } - if ($xhttperror->getConfig('title_as_page_title') == 2) { - $xoopsTpl->assign('xoops_pagetitle', $title.' - '. $xhttperror->getModule()->getVar('name')); // article title - module name - } - $xoopsTpl->assign('title', $title); - $xoopsTpl->assign('text', $text); - $xoopsTpl->assign('showsearch', true); // IN PROGRESS: True if show search form in error page - $xoopsTpl->assign('redirect', $errorObj->getVar('error_redirect')); - $xoopsTpl->assign('redirect_time', (int) $errorObj->getVar('error_redirect_time') * 1000); - $xoopsTpl->assign('redirect_uri', $errorObj->getVar('error_redirect_uri')); - } -} -include XOOPS_ROOT_PATH . '/footer.php'; Copied: XoopsModules/xhttperror/branches/luciorota/xhttperror/index.php (from rev 12821, XoopsModules/xhttperror/branches/luciorota/xhttperror/error.php) =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/index.php (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/index.php 2014-11-03 18:36:48 UTC (rev 12829) @@ -0,0 +1,103 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + 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. + */ +/** + * Xhttperror module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) + * @package xhttperror + * @since 1.00 + * @author Xoops Development Team + * @version svn:$id$ + */ + +$currentFile = basename(__FILE__); +include __DIR__ . '/header.php'; + +$myts = MyTextSanitizer::getInstance(); + +$xoopsOption['template_main'] = "{$xhttperror->getModule()->dirname()}_index.tpl"; +include_once XOOPS_ROOT_PATH . '/header.php'; + +$uid = (is_object($xoopsUser) && isset($xoopsUser)) ? $xoopsUser->uid() : 0; +$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS); + +if (!isset($_GET['error'])) { + $xoopsTpl->assign('message', "No error defined."); +} else { + // Save error info to database + // We may want to turn this off on busy sites. + if ($xhttperror->getConfig('error_reporting') == false) { + if (!(is_object($xoopsUser) && isset($xoopsUser)) || ($xoopsUser->isAdmin($xhttperror->getModule()->mid()) && $xhttperror->getConfig('ignore_admin') != true)) { + // create report + $serverVars = array(); + $serverVars['HTTP_REFERER'] = xoops_getenv('HTTP_REFERER'); + $serverVars['REMOTE_ADDR'] = xoops_getenv('REMOTE_ADDR'); + //$serverVars[''] = + $referer = xoops_getenv('HTTP_REFERER'); + $userAgent = xoops_getenv('HTTP_USER_AGENT'); + $remoteAddr = xoops_getenv('REMOTE_ADDR'); + $requestedUri = ''; + if (isset($_SERVER['REDIRECT_URL'])) { + $requestedUri .= $_SERVER['REDIRECT_URL']; + } + if (isset($_SERVER['REDIRECT_QUERY_STRING'])) { + $requestedUri .= '?' . $_SERVER['REDIRECT_QUERY_STRING']; + } + // create error object + $reportObj = $xhttperror->getHandler('report')->create(); + // + $reportObj->setVar('report_uid', $uid); + $reportObj->setVar('report_statuscode', $_GET['error']); + $reportObj->setVar('report_date', time()); + $reportObj->setVar('report_referer', $referer); + $reportObj->setVar('report_useragent', $userAgent); + $reportObj->setVar('report_remoteaddr', $remoteAddr); + $reportObj->setVar('report_requesteduri', $requestedUri); + // store error object + if($xhttperror->getHandler('report')->insert($reportObj)) { + // NOP + } else { + // ERROR + xoops_cp_header(); + echo $reportObj->getHtmlErrors(); + xoops_cp_footer(); + exit(); + } + } + } + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('error_statuscode', $_GET['error'])); + $criteria->add(new Criteria('error_showme', true)); + if ($errorObjs = $xhttperror->getHandler('error')->getObjects($criteria)) { + $errorObj = $errorObjs[0]; + $id = $errorObj->getVar('error_id'); + $title = $myts->displayTarea($errorObj->getVar('error_title')); + //$text = $errorObj->getVar('error_text', 'n'); + // displayTarea ($text, $html=0, $smiley=1, $xcode=1, $image=1, $br=1) + $text = $myts->displayTarea($errorObj->getVar('error_text', 'n'), $errorObj->getVar('error_text_html'), $errorObj->getVar('error_text_smiley'), 1, 1, $errorObj->getVar('error_text_breaks')); + + // Add custom title to page title - "<{$xoops_pagetitle}>" - titleaspagetitle + if ($xhttperror->getConfig('title_as_page_title') == 1) { + $xoopsTpl->assign('xoops_pagetitle', $xhttperror->getModule()->getVar('name').' - '. $title); // module name - article title + } + if ($xhttperror->getConfig('title_as_page_title') == 2) { + $xoopsTpl->assign('xoops_pagetitle', $title.' - '. $xhttperror->getModule()->getVar('name')); // article title - module name + } + $xoopsTpl->assign('title', $title); + $xoopsTpl->assign('text', $text); + $xoopsTpl->assign('showsearch', true); // IN PROGRESS: True if show search form in error page + $xoopsTpl->assign('redirect', $errorObj->getVar('error_redirect')); + $xoopsTpl->assign('redirect_time', (int) $errorObj->getVar('error_redirect_time') * 1000); + $xoopsTpl->assign('redirect_uri', $errorObj->getVar('error_redirect_uri')); + } +} +include XOOPS_ROOT_PATH . '/footer.php'; Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/help/help.html =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/help/help.html 2014-10-31 07:13:53 UTC (rev 12828) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/help/help.html 2014-11-03 18:36:48 UTC (rev 12829) @@ -8,13 +8,13 @@ <p>This module requires that the server supports <b>.htaccess</b> files (and that .htaccess files are allowed for your account), or some way for you to add custom error message redirects.</p> <p>You will need to manually add the following lines to the <b>.htaccess</b> file in your XOOPS root directory for the error codes to work.</p> <div class="xoopsCode"> - ErrorDocument 404 [xoops_url]/modules/xhttperror/error.php?error=404 + ErrorDocument 404 [xoops_url]/modules/xhttperror/index.php?error=404 <br /> - ErrorDocument 500 [xoops_url]/modules/xhttperror/error.php?error=500 + ErrorDocument 500 [xoops_url]/modules/xhttperror/index.php?error=500 <br /> - ErrorDocument 403 [xoops_url]/modules/xhttperror/error.php?error=403 + ErrorDocument 403 [xoops_url]/modules/xhttperror/index.php?error=403 <br /> - ErrorDocument 403 [xoops_url]/modules/xhttperror/error.php?error=[status code] + ErrorDocument 403 [xoops_url]/modules/xhttperror/index.php?error=[status code] </div> <p>Where [status_code] is the status code for server errors and [xoops_url] is the URL to your main XOOPS directory WITHOUT trailing slash (<{$xoops_url}>)</p> <br /> Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/xhttperror_error.tpl =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/xhttperror_error.tpl 2014-10-31 07:13:53 UTC (rev 12828) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/xhttperror_error.tpl 2014-11-03 18:36:48 UTC (rev 12829) @@ -1,46 +0,0 @@ -<{* -SMARTY VARS -$title text Error title -$text text/html Error description -$showsearch boolean True if show search form in error page -$redirect int $smarty.const.XHTTPERROR_REDIRECT_no: no redirect; - $smarty.const.XHTTPERROR_REDIRECT_URI: redirect tu url...; - $smarty.const.XHTTPERROR_REDIRECT_PREVIOUS: redirect to previous page; -$redirect_time int Milliseconds to redirect -$redirect_uri text Redirect to -*}> -<{if ($redirect == $smarty.const.XHTTPERROR_REDIRECT_URI)}> -<script type="text/JavaScript"> - <!-- - setTimeout("location.href = '<{$redirect_uri}>';", <{$redirect_time}>); - --> -</script> -<{/if}> -<{if ($redirect == $smarty.const.XHTTPERROR_REDIRECT_PREVIOUS)}> -<script type="text/JavaScript"> - <!-- - setTimeout("history.go(-1);", <{$redirect_time}>); - --> -</script> -<{/if}> - -<h1 style="text-align: center;"><{$title}></h1> - -<{$text}> - -<{if ($showsearch)}> -<!-- search --> -<br /> -<br /> -<br /> -<div align="center"> - <form method="get" action="/search.php"> - <div style="width: 50%;"> - <{$smarty.const._MA_XHTTPERROR_SEARCH}> - <input type="text" name="query" size="30" /> - <input type="hidden" name="action" value="results" /> - <input type="submit" value="Search" /> - </div> - </form> -</div> -<{/if}> Copied: XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/xhttperror_index.tpl (from rev 12821, XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/xhttperror_error.tpl) =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/xhttperror_index.tpl (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/xhttperror_index.tpl 2014-11-03 18:36:48 UTC (rev 12829) @@ -0,0 +1,46 @@ +<{* +SMARTY VARS +$title text Error title +$text text/html Error description +$showsearch boolean True if show search form in error page +$redirect int $smarty.const.XHTTPERROR_REDIRECT_no: no redirect; + $smarty.const.XHTTPERROR_REDIRECT_URI: redirect tu url...; + $smarty.const.XHTTPERROR_REDIRECT_PREVIOUS: redirect to previous page; +$redirect_time int Milliseconds to redirect +$redirect_uri text Redirect to +*}> +<{if ($redirect == $smarty.const.XHTTPERROR_REDIRECT_URI)}> +<script type="text/JavaScript"> + <!-- + setTimeout("location.href = '<{$redirect_uri}>';", <{$redirect_time}>); + --> +</script> +<{/if}> +<{if ($redirect == $smarty.const.XHTTPERROR_REDIRECT_PREVIOUS)}> +<script type="text/JavaScript"> + <!-- + setTimeout("history.go(-1);", <{$redirect_time}>); + --> +</script> +<{/if}> + +<h1 style="text-align: center;"><{$title}></h1> + +<{$text}> + +<{if ($showsearch)}> +<!-- search --> +<br /> +<br /> +<br /> +<div align="center"> + <form method="get" action="/search.php"> + <div style="width: 50%;"> + <{$smarty.const._MA_XHTTPERROR_SEARCH}> + <input type="text" name="query" size="30" /> + <input type="hidden" name="action" value="results" /> + <input type="submit" value="Search" /> + </div> + </form> +</div> +<{/if}> Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php 2014-10-31 07:13:53 UTC (rev 12828) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php 2014-11-03 18:36:48 UTC (rev 12829) @@ -113,7 +113,7 @@ // Templates $i = 0; ++$i; -$modversion['templates'][$i]['file'] = $modversion['dirname'] . '_error.tpl'; +$modversion['templates'][$i]['file'] = $modversion['dirname'] . '_index.tpl'; $modversion['templates'][$i]['description'] = ''; // Admin templates ++$i; |
From: <luc...@us...> - 2014-11-07 22:09:40
|
Revision: 12830 http://sourceforge.net/p/xoops/svn/12830 Author: luciorota Date: 2014-11-07 22:09:33 +0000 (Fri, 07 Nov 2014) Log Message: ----------- RC1 + delete multiple reports Modified Paths: -------------- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/error.php XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/report.php XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/common.php XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/admin/xhttperror_admin_errors_list.tpl XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/admin/xhttperror_admin_reports_list.tpl XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/error.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/error.php 2014-11-03 18:36:48 UTC (rev 12829) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/error.php 2014-11-07 22:09:33 UTC (rev 12830) @@ -78,7 +78,7 @@ } $error_id = XhttperrorRequest::getInt('error_id', 0, 'POST'); $isNewError = ($error_id == 0) ? true : false; - $errorObj = $module_skeleton->getHandler('error')->get($error_id); + $errorObj = $xhttperror->getHandler('error')->get($error_id); // Check statuscode if (isset($_REQUEST['error_statuscode'])) { $criteria = new CriteriaCompo(); Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/report.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/report.php 2014-11-03 18:36:48 UTC (rev 12829) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/report.php 2014-11-07 22:09:33 UTC (rev 12830) @@ -58,6 +58,38 @@ include __DIR__ . '/admin_footer.php'; break; + case 'apply_actions': + $action = XhttperrorRequest::getString('actions_action'); + $report_ids = XhttperrorRequest::getArray('report_ids', unserialize(XhttperrorRequest::getString('serialize_report_ids'))); + $reportCriteria = new Criteria('report_id', '(' . implode(',', $report_ids) . ')', 'IN'); + switch ($action) { + case 'delete_reports': + if (XhttperrorRequest::getBool('ok', false, 'POST') == true) { + // delete subscriber (subscr), subscriptions (catsubscrs) and mailinglist + if ($xhttperror->getHandler('report')->deleteAll($reportCriteria, true, true)) { + redirect_header($currentFile, 3, _CO_XHTTPERROR_ERRORS_DELETED); + } else { + // error + redirect_header($currentFile, 3, _CO_XHTTPERROR_ERROR_DELETEREPORTS); + exit(); + } + } else { + xoops_cp_header(); + xoops_confirm( + array('ok' => true, 'op' => 'apply_actions', 'actions_action' => $action, 'serialize_report_ids' => serialize($report_ids)), + $_SERVER['REQUEST_URI'], + _CO_XHTTPERROR_ERRORS_DELETE_AREUSURE, + _DELETE + ); + xoops_cp_footer(); + } + break; + default: + // NOP + break; + } + break; + case 'delete_report' : $report_id = XhttperrorRequest::getInt('report_id', 0); $reportObj = $xhttperror->getHandler('report')->get($report_id); Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt 2014-11-03 18:36:48 UTC (rev 12829) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt 2014-11-07 22:09:33 UTC (rev 12830) @@ -6,8 +6,9 @@ ! Bug fix. o General comment. -version 1.01 (Released: 2014/10/24) +version 1.01 (Released: 2014/11/07) =================================== ++ delete multiple reports. o Upgraded to Xoops 2.5.7 coding standard. o Refactory all language definitions ! store wrong requested uri in reports (REDIRECT_URL, REDIRECT_QUERY_STRING) Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/common.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/common.php 2014-11-03 18:36:48 UTC (rev 12829) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/common.php 2014-11-07 22:09:33 UTC (rev 12830) @@ -10,7 +10,9 @@ // define('_CO_XHTTPERROR_ERROR_STORED', "Error code saved"); define('_CO_XHTTPERROR_ERROR_DELETED', "Error code deleted"); +define('_CO_XHTTPERROR_ERRORS_DELETED', "Error code deleted"); define('_CO_XHTTPERROR_ERROR_DELETE_AREUSURE', "Warning: are you sure to delete this error code?"); +define('_CO_XHTTPERROR_ERRORS_DELETE_AREUSURE', "Warning: are you sure to delete this error codes?"); define('_CO_XHTTPERROR_REPORT_STORED', "Report saved"); define('_CO_XHTTPERROR_REPORT_DELETED', "Report deleted"); define('_CO_XHTTPERROR_REPORT_DELETE_AREUSURE', "Warning: are you sure to delete this report?"); @@ -21,6 +23,7 @@ // errors define('_CO_XHTTPERROR_ERROR_NOERROR', "Error: non-existent error code"); define('_CO_XHTTPERROR_ERROR_NOREPORT', "Error: non-existent report"); +define('_CO_XHTTPERROR_ERROR_DELETEREPORTS', "Error: reports not deleted"); @@ -30,6 +33,7 @@ define('_CO_XHTTPERROR_BUTTON_EDIT', "Edit"); define('_CO_XHTTPERROR_BUTTON_ADD', "Add"); define('_CO_XHTTPERROR_BUTTON_DELETE', "Delete"); +define('_CO_XHTTPERROR_BUTTON_DELETE_SELECTED', "Delete selected"); define('_CO_XHTTPERROR_BUTTON_FILTER', "Filter"); define('_CO_XHTTPERROR_BUTTON_SEARCH', "Search"); define('_CO_XHTTPERROR_BUTTON_REORDER', "Reorder"); Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/admin/xhttperror_admin_errors_list.tpl =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/admin/xhttperror_admin_errors_list.tpl 2014-11-03 18:36:48 UTC (rev 12829) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/admin/xhttperror_admin_errors_list.tpl 2014-11-07 22:09:33 UTC (rev 12830) @@ -27,7 +27,7 @@ <a href="error.php?op=delete_error&error_id=<{$error.error_id}>" title="<{$smarty.const._DELETE}>"><{$smarty.const._DELETE}></a> - <a href="../error.php?error=<{$error.error_statuscode}>" title="<{$smarty.const._CO_XHTTPERROR_BUTTON_TEST}>"><{$smarty.const._CO_XHTTPERROR_BUTTON_TEST}></a> + <a href="../index.php?error=<{$error.error_statuscode}>" title="<{$smarty.const._CO_XHTTPERROR_BUTTON_TEST}>"><{$smarty.const._CO_XHTTPERROR_BUTTON_TEST}></a> </td> </tr> <{/foreach}> Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/admin/xhttperror_admin_reports_list.tpl =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/admin/xhttperror_admin_reports_list.tpl 2014-11-03 18:36:48 UTC (rev 12829) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/admin/xhttperror_admin_reports_list.tpl 2014-11-07 22:09:33 UTC (rev 12830) @@ -1,9 +1,32 @@ +<script language='JavaScript'> + function toggle(source){ + checkboxes = document.getElementsByName('report_ids[]'); + for (var i = 0, n = checkboxes.length; i < n; i++) { + checkboxes[i].checked = source.checked; + } + togglers = document.getElementsByName('togglers[]'); + for (var i = 0, n = togglers.length; i < n; i++) { + togglers[i].checked = source.checked; + } + } +</script> +<script language='JavaScript'> + function check(source){ + checkboxes = document.getElementsByName('report_ids[]'); + for (var i = 0, n= checkboxes.length; i < n; i++) { + if (checkboxes[i].checked) return true; + } + return false; + } +</script> + <form action="report.php" method="post" id="reportform"> <table> <tr> - <th colspan="9"><{$smarty.const._CO_XHTTPERROR_REPORTS_LIST}></th> + <th colspan="10"><{$smarty.const._CO_XHTTPERROR_REPORTS_LIST}></th> </tr> <tr> + <th class='center'><input type='checkbox' name='togglers[]' title='<{$smarty.const._ALL}>' onClick='toggle(this);'></th> <th><{$smarty.const._AM_XHTTPERROR_REPORT_ID}></th> <th><{$smarty.const._AM_XHTTPERROR_REPORT_USER}></th> <th><{$smarty.const._AM_XHTTPERROR_REPORT_STATUSCODE}></th> @@ -16,6 +39,7 @@ </tr> <{foreach from=$reports item='report'}> <tr class="<{cycle values='odd, even'}>"> + <td class='center'><input type='checkbox' name='report_ids[]' value='<{$report.report_id}>'></td> <td><{$report.report_id}></td> <td><{$report.report_owner_uname}></td> <td><{$report.report_statuscode}></td> @@ -29,6 +53,25 @@ </td> </tr> <{/foreach}> + <tr> + <th class='center'><input type='checkbox' name='togglers[]' title='<{$smarty.const._ALL}>' onClick='toggle(this);'></th> + <th><{$smarty.const._AM_XHTTPERROR_REPORT_ID}></th> + <th><{$smarty.const._AM_XHTTPERROR_REPORT_USER}></th> + <th><{$smarty.const._AM_XHTTPERROR_REPORT_STATUSCODE}></th> + <th><{$smarty.const._AM_XHTTPERROR_REPORT_DATE}></th> + <th><{$smarty.const._AM_XHTTPERROR_REPORT_REFERER}></th> + <th><{$smarty.const._AM_XHTTPERROR_REPORT_USERAGENT}></th> + <th><{$smarty.const._AM_XHTTPERROR_REPORT_REMOTEADDR}></th> + <th><{$smarty.const._AM_XHTTPERROR_REPORT_REQUESTEDURI}></th> + <th><{$smarty.const._CO_XHTTPERROR_ACTIONS}></th> + </tr> + <tr> + <td colspan='10'> + <input id='actions_action' type='hidden' value='delete_reports' name='actions_action'> + <input id='actions_submit' class='formButton' type='submit' title='<{$smarty.const._CO_XHTTPERROR_BUTTON_DELETE_SELECTED}>' value='<{$smarty.const._CO_XHTTPERROR_BUTTON_DELETE_SELECTED}>' name='actions_submit'> + </td> +</tr> +<input id='actions_op' type='hidden' value='apply_actions' name='op'> </table> <{$reports_pagenav}> </form> Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php 2014-11-03 18:36:48 UTC (rev 12829) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php 2014-11-07 22:09:33 UTC (rev 12830) @@ -40,8 +40,8 @@ include_once XOOPS_ROOT_PATH . '/modules/' . $modversion['dirname'] . '/include/constants.php'; // About -$modversion['module_status'] = 'Beta'; -$modversion['release_date'] = '2014/10/24'; // YYYY/mm/dd +$modversion['module_status'] = 'RC1'; +$modversion['release_date'] = '2014/11/07'; // YYYY/mm/dd $modversion['module_website_url'] = 'http://www.xoops.org/'; $modversion['module_website_name'] = 'XOOPS'; $modversion['min_php'] = '5.3.7'; |
From: <luc...@us...> - 2014-11-26 21:38:39
|
Revision: 12874 http://sourceforge.net/p/xoops/svn/12874 Author: luciorota Date: 2014-11-26 21:38:33 +0000 (Wed, 26 Nov 2014) Log Message: ----------- Use native XoopsRequest Modified Paths: -------------- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/error.php XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/report.php XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/include/common.php XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php Removed Paths: ------------- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/request.php Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/error.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/error.php 2014-11-26 07:33:36 UTC (rev 12873) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/error.php 2014-11-26 21:38:33 UTC (rev 12874) @@ -59,7 +59,7 @@ $modcreate_admin->addItemButton(_CO_XHTTPERROR_BUTTON_ERRORS_LIST, '' . $currentFile . '?op=list_errors', 'list'); echo $modcreate_admin->renderButton(); // - $error_id = XhttperrorRequest::getInt('error_id', 0); + $error_id = XoopsRequest::getInt('error_id', 0); $errorObj = $xhttperror->getHandler('error')->get($error_id); if (!$errorObj) { // ERROR @@ -76,7 +76,7 @@ if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); } - $error_id = XhttperrorRequest::getInt('error_id', 0, 'POST'); + $error_id = XoopsRequest::getInt('error_id', 0, 'POST'); $isNewError = ($error_id == 0) ? true : false; $errorObj = $xhttperror->getHandler('error')->get($error_id); // Check statuscode @@ -89,9 +89,9 @@ $errorObj->setVar('error_statuscode', $_REQUEST['error_statuscode']); } } - $error_title = XhttperrorRequest::getString('error_title', '', 'POST'); - $error_text = XhttperrorRequest::getString('error_text', '', 'POST'); - $error_text_html = XhttperrorRequest::getString('error_text_html', '', 'POST'); + $error_title = XoopsRequest::getString('error_title', '', 'POST'); + $error_text = XoopsRequest::getString('error_text', '', 'POST'); + $error_text_html = XoopsRequest::getString('error_text_html', '', 'POST'); // $errorObj->setVar('error_title', $error_title); $errorObj->setVar('error_text', $error_text); @@ -117,14 +117,14 @@ break; case 'delete_error': - $error_id = XhttperrorRequest::getInt('error_id', 0); + $error_id = XoopsRequest::getInt('error_id', 0); $errorObj = $xhttperror->getHandler('error')->get($error_id); if (!$errorObj) { // ERROR redirect_header($currentFile, 3, _CO_XHTTPERROR_ERROR_NOERROR); exit(); } - if (XhttperrorRequest::getBool('ok', false, 'POST') == true) { + if (XoopsRequest::getBool('ok', false, 'POST') == true) { if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); } Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/report.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/report.php 2014-11-26 07:33:36 UTC (rev 12873) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/report.php 2014-11-26 21:38:33 UTC (rev 12874) @@ -22,7 +22,7 @@ $currentFile = basename(__FILE__); include_once __DIR__ . '/admin_header.php'; -$op = XhttperrorRequest::getString('op', 'list_reports'); +$op = XoopsRequest::getString('op', 'list_reports'); switch($op) { default: case 'list_reports': @@ -34,7 +34,7 @@ // $reportCount = $xhttperror->getHandler('report')->getCount(); if($reportCount > 0) { - $start = XhttperrorRequest::getInt('start', 0); + $start = XoopsRequest::getInt('start', 0); $criteria = new CriteriaCompo(); $criteria->setSort('report_date'); $criteria->setOrder('ASC'); @@ -59,12 +59,12 @@ break; case 'apply_actions': - $action = XhttperrorRequest::getString('actions_action'); - $report_ids = XhttperrorRequest::getArray('report_ids', unserialize(XhttperrorRequest::getString('serialize_report_ids'))); + $action = XoopsRequest::getString('actions_action'); + $report_ids = XoopsRequest::getArray('report_ids', unserialize(XoopsRequest::getString('serialize_report_ids'))); $reportCriteria = new Criteria('report_id', '(' . implode(',', $report_ids) . ')', 'IN'); switch ($action) { case 'delete_reports': - if (XhttperrorRequest::getBool('ok', false, 'POST') == true) { + if (XoopsRequest::getBool('ok', false, 'POST') == true) { // delete subscriber (subscr), subscriptions (catsubscrs) and mailinglist if ($xhttperror->getHandler('report')->deleteAll($reportCriteria, true, true)) { redirect_header($currentFile, 3, _CO_XHTTPERROR_ERRORS_DELETED); @@ -91,14 +91,14 @@ break; case 'delete_report' : - $report_id = XhttperrorRequest::getInt('report_id', 0); + $report_id = XoopsRequest::getInt('report_id', 0); $reportObj = $xhttperror->getHandler('report')->get($report_id); if (!$reportObj) { // ERROR redirect_header($currentFile, 3, _CO_XHTTPERROR_ERROR_NOREPORT); exit(); } - if (XhttperrorRequest::getBool('ok', false, 'POST') == true) { + if (XoopsRequest::getBool('ok', false, 'POST') == true) { if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); } Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/class/request.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/request.php 2014-11-26 07:33:36 UTC (rev 12873) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/request.php 2014-11-26 21:38:33 UTC (rev 12874) @@ -1,1015 +0,0 @@ -<?php -/* - You may not change or alter any portion of this comment or credits - of supporting developers from this source code or any supporting source code - which is considered copyrighted (c) material of the original comment or credit authors. - - 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. - */ -/** - * xhttperrorRequestRequest class - * - * @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. - * @license GNU/GPL, see LICENSE.php - * Joomla! is free software. This version may have been modified pursuant - * to the GNU General Public License, and as distributed it includes or - * is derivative of works licensed under the GNU General Public License or - * other free or open source software licenses. - * See COPYRIGHT.php for copyright notices and details. - * @package xhttperror - * @since 1.01 - * @author Lucio Rota <luc...@gm...> - * @author trabis <lus...@gm...> - * @version svn:$id$ - */ - -/** - * Set the available masks for cleaning variables - */ -define('XHTTPERROR_REQUEST_NOTRIM', 1); -define('XHTTPERROR_REQUEST_ALLOWRAW', 2); -define('XHTTPERROR_REQUEST_ALLOWHTML', 4); - -/** - * xhttperrorRequest Class - * This class serves to provide a common interface to access - * request variables. This includes $_POST, $_GET, and naturally $_REQUEST. Variables - * can be passed through an input filter to avoid injection or returned raw. - */ -class xhttperrorRequest -{ - - /** - * Gets the request method - * - * @return string - */ - static function getMethod() - { - $method = strtoupper($_SERVER['REQUEST_METHOD']); - - return $method; - } - - /** - * Fetches and returns a given variable. - * The default behaviour is fetching variables depending on the - * current request method: GET and HEAD will result in returning - * an entry from $_GET, POST and PUT will result in returning an - * entry from $_POST. - * You can force the source by setting the $hash parameter: - * post $_POST - * get $_GET - * files $_FILES - * cookie $_COOKIE - * env $_ENV - * server $_SERVER - * method via current $_SERVER['REQUEST_METHOD'] - * default $_REQUEST - * - * @static - * - * @param string $name Variable name - * @param string $default Default value if the variable does not exist - * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD) - * @param string $type Return type for the variable, for valid values see {@link JFilterInput::clean()} - * @param int $mask Filter mask for the variable - * - * @return mixed Requested variable - */ - static function getVar($name, $default = null, $hash = 'default', $type = 'none', $mask = 0) - { - // Ensure hash and type are uppercase - $hash = strtoupper($hash); - if ($hash === 'METHOD') { - $hash = strtoupper($_SERVER['REQUEST_METHOD']); - } - $type = strtoupper($type); - // Get the input hash - switch ($hash) { - case 'GET' : - $input = &$_GET; - break; - case 'POST' : - $input = &$_POST; - break; - case 'FILES' : - $input = &$_FILES; - break; - case 'COOKIE' : - $input = &$_COOKIE; - break; - case 'ENV' : - $input = &$_ENV; - break; - case 'SERVER' : - $input = &$_SERVER; - break; - default: - $input = &$_REQUEST; - $hash = 'REQUEST'; - break; - } - if (isset($input[$name]) && $input[$name] !== null) { - // Get the variable from the input hash and clean it - $var = xhttperrorRequest::_cleanVar($input[$name], $mask, $type); - // Handle magic quotes compatability - if (get_magic_quotes_gpc() && ($var != $default) && ($hash != 'FILES')) { - $var = xhttperrorRequest::_stripSlashesRecursive($var); - } - } elseif ($default !== null) { - // Clean the default value - $var = xhttperrorRequest::_cleanVar($default, $mask, $type); - } else { - $var = $default; - } - - return $var; - } - - /** - * Fetches and returns a given filtered variable. The integer - * filter will allow only digits to be returned. This is currently - * only a proxy function for getVar(). - * See getVar() for more in-depth documentation on the parameters. - * - * @static - * - * @param string $name Variable name - * @param int $default Default value if the variable does not exist - * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD) - * - * @return integer Requested variable - */ - static function getInt($name, $default = 0, $hash = 'default') - { - return xhttperrorRequest::getVar($name, $default, $hash, 'int'); - } - - /** - * Fetches and returns a given filtered variable. The float - * filter only allows digits and periods. This is currently - * only a proxy function for getVar(). - * See getVar() for more in-depth documentation on the parameters. - * - * @static - * - * @param string $name Variable name - * @param float $default Default value if the variable does not exist - * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD) - * - * @return float Requested variable - */ - static function getFloat($name, $default = 0.0, $hash = 'default') - { - return xhttperrorRequest::getVar($name, $default, $hash, 'float'); - } - - /** - * Fetches and returns a given filtered variable. The bool - * filter will only return true/false bool values. This is - * currently only a proxy function for getVar(). - * See getVar() for more in-depth documentation on the parameters. - * - * @static - * - * @param string $name Variable name - * @param bool $default Default value if the variable does not exist - * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD) - * - * @return bool Requested variable - */ - static function getBool($name, $default = false, $hash = 'default') - { - return xhttperrorRequest::getVar($name, $default, $hash, 'bool'); - } - - /** - * Fetches and returns a given filtered variable. The word - * filter only allows the characters [A-Za-z_]. This is currently - * only a proxy function for getVar(). - * See getVar() for more in-depth documentation on the parameters. - * - * @static - * - * @param string $name Variable name - * @param string $default Default value if the variable does not exist - * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD) - * - * @return string Requested variable - */ - static function getWord($name, $default = '', $hash = 'default') - { - return xhttperrorRequest::getVar($name, $default, $hash, 'word'); - } - - /** - * Fetches and returns a given filtered variable. The cmd - * filter only allows the characters [A-Za-z0-9.-_]. This is - * currently only a proxy function for getVar(). - * See getVar() for more in-depth documentation on the parameters. - * - * @static - * - * @param string $name Variable name - * @param string $default Default value if the variable does not exist - * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD) - * - * @return string Requested variable - */ - static function getCmd($name, $default = '', $hash = 'default') - { - return xhttperrorRequest::getVar($name, $default, $hash, 'cmd'); - } - - /** - * Fetches and returns a given filtered variable. The string - * filter deletes 'bad' HTML code, if not overridden by the mask. - * This is currently only a proxy function for getVar(). - * See getVar() for more in-depth documentation on the parameters. - * - * @static - * - * @param string $name Variable name - * @param string $default Default value if the variable does not exist - * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD) - * @param int $mask Filter mask for the variable - * - * @return string Requested variable - */ - static function getString($name, $default = '', $hash = 'default', $mask = 0) - { - // Cast to string, in case JREQUEST_ALLOWRAW was specified for mask - return (string)xhttperrorRequest::getVar($name, $default, $hash, 'string', $mask); - } - - /** - * @param $name - * @param array $default - * @param string $hash - * - * @return mixed - */ - static function getArray($name, $default = array(), $hash = 'default') - { - return xhttperrorRequest::getVar($name, $default, $hash, 'array'); - } - - /** - * @param $name - * @param string $default - * @param string $hash - * - * @return string - */ - static function getText($name, $default = '', $hash = 'default') - { - return (string)xhttperrorRequest::getVar($name, $default, $hash, 'string', PUBLISHER_REQUEST_ALLOWRAW); - } - - /** - * Set a variabe in on of the request variables - * - * @access public - * - * @param string $name Name - * @param string $value Value - * @param string $hash Hash - * @param boolean $overwrite Boolean - * - * @return string Previous value - */ - static function setVar($name, $value = null, $hash = 'method', $overwrite = true) - { - //If overwrite is true, makes sure the variable hasn't been set yet - if (!$overwrite && array_key_exists($name, $_REQUEST)) { - return $_REQUEST[$name]; - } - // Get the request hash value - $hash = strtoupper($hash); - if ($hash === 'METHOD') { - $hash = strtoupper($_SERVER['REQUEST_METHOD']); - } - $previous = array_key_exists($name, $_REQUEST) ? $_REQUEST[$name] : null; - switch ($hash) { - case 'GET' : - $_GET[$name] = $value; - $_REQUEST[$name] = $value; - break; - case 'POST' : - $_POST[$name] = $value; - $_REQUEST[$name] = $value; - break; - case 'COOKIE' : - $_COOKIE[$name] = $value; - $_REQUEST[$name] = $value; - break; - case 'FILES' : - $_FILES[$name] = $value; - break; - case 'ENV' : - $_ENV['name'] = $value; - break; - case 'SERVER' : - $_SERVER['name'] = $value; - break; - } - - return $previous; - } - - /** - * Fetches and returns a request array. - * The default behaviour is fetching variables depending on the - * current request method: GET and HEAD will result in returning - * $_GET, POST and PUT will result in returning $_POST. - * You can force the source by setting the $hash parameter: - * post $_POST - * get $_GET - * files $_FILES - * cookie $_COOKIE - * env $_ENV - * server $_SERVER - * method via current $_SERVER['REQUEST_METHOD'] - * default $_REQUEST - * - * @static - * - * @param string $hash to get (POST, GET, FILES, METHOD) - * @param int $mask Filter mask for the variable - * - * @return mixed Request hash - */ - static function get($hash = 'default', $mask = 0) - { - $hash = strtoupper($hash); - if ($hash === 'METHOD') { - $hash = strtoupper($_SERVER['REQUEST_METHOD']); - } - switch ($hash) { - case 'GET' : - $input = $_GET; - break; - case 'POST' : - $input = $_POST; - break; - case 'FILES' : - $input = $_FILES; - break; - case 'COOKIE' : - $input = $_COOKIE; - break; - case 'ENV' : - $input = &$_ENV; - break; - case 'SERVER' : - $input = &$_SERVER; - break; - default: - $input = $_REQUEST; - break; - } - $result = xhttperrorRequest::_cleanVar($input, $mask); - // Handle magic quotes compatability - if (get_magic_quotes_gpc() && ($hash != 'FILES')) { - $result = xhttperrorRequest::_stripSlashesRecursive($result); - } - - return $result; - } - - /** - * Sets a request variable - * - * @param array $array An associative array of key-value pairs - * @param string $hash The request variable to set (POST, GET, FILES, METHOD) - * @param boolean $overwrite If true and an existing key is found, the value is overwritten, otherwise it is ingored - */ - static function set($array, $hash = 'default', $overwrite = true) - { - foreach ($array as $key => $value) { - xhttperrorRequest::setVar($key, $value, $hash, $overwrite); - } - } - - /** - * Cleans the request from script injection. - * - * @static - * @return void - */ - static function clean() - { - xhttperrorRequest::_cleanArray($_FILES); - xhttperrorRequest::_cleanArray($_ENV); - xhttperrorRequest::_cleanArray($_GET); - xhttperrorRequest::_cleanArray($_POST); - xhttperrorRequest::_cleanArray($_COOKIE); - xhttperrorRequest::_cleanArray($_SERVER); - if (isset($_SESSION)) { - xhttperrorRequest::_cleanArray($_SESSION); - } - $REQUEST = $_REQUEST; - $GET = $_GET; - $POST = $_POST; - $COOKIE = $_COOKIE; - $FILES = $_FILES; - $ENV = $_ENV; - $SERVER = $_SERVER; - if (isset ($_SESSION)) { - $SESSION = $_SESSION; - } - foreach ($GLOBALS as $key => $value) { - if ($key != 'GLOBALS') { - unset($GLOBALS[$key]); - } - } - $_REQUEST = $REQUEST; - $_GET = $GET; - $_POST = $POST; - $_COOKIE = $COOKIE; - $_FILES = $FILES; - $_ENV = $ENV; - $_SERVER = $SERVER; - if (isset($SESSION)) { - $_SESSION = $SESSION; - } - } - - /** - * Adds an array to the GLOBALS array and checks that the GLOBALS variable is not being attacked - * - * @access protected - * - * @param array $array Array to clean - * @param boolean $globalise True if the array is to be added to the GLOBALS - */ - static function _cleanArray(&$array, $globalise = false) - { - static $banned = array('_files', '_env', '_get', '_post', '_cookie', '_server', '_session', 'globals'); - foreach ($array as $key => $value) { - // PHP GLOBALS injection bug - $failed = in_array(strtolower($key), $banned); - // PHP Zend_Hash_Del_Key_Or_Index bug - $failed |= is_numeric($key); - if ($failed) { - exit('Illegal variable <strong>' . implode('</strong> or <strong>', $banned) . '</strong> passed to script.'); - } - if ($globalise) { - $GLOBALS[$key] = $value; - } - } - } - - /** - * Clean up an input variable. - * - * @param mixed $var The input variable. - * @param int $mask Filter bit mask. 1=no trim: If this flag is cleared and the - * input is a string, the string will have leading and trailing whitespace - * trimmed. 2=allow_raw: If set, no more filtering is performed, higher bits - * are ignored. 4=allow_html: HTML is allowed, but passed through a safe - * HTML filter first. If set, no more filtering is performed. If no bits - * other than the 1 bit is set, a strict filter is applied. - * @param string $type The variable type {@see JFilterInput::clean()}. - * - * @return string - */ - static function _cleanVar($var, $mask = 0, $type = null) - { - // Static input filters for specific settings - static $noHtmlFilter = null; - static $safeHtmlFilter = null; - // If the no trim flag is not set, trim the variable - if (!($mask & 1) && is_string($var)) { - $var = trim($var); - } - // Now we handle input filtering - if ($mask & 2) { - // If the allow raw flag is set, do not modify the variable - } elseif ($mask & 4) { - // If the allow html flag is set, apply a safe html filter to the variable - if (is_null($safeHtmlFilter)) { - $safeHtmlFilter = xhttperror::getInstance(null, null, 1, 1); - } - $var = $safeHtmlFilter->clean($var, $type); - } else { - // Since no allow flags were set, we will apply the most strict filter to the variable - if (is_null($noHtmlFilter)) { - $noHtmlFilter = xhttperror::getInstance( /* $tags, $attr, $tag_method, $attr_method, $xss_auto */); - } - $var = $noHtmlFilter->clean($var, $type); - } - - return $var; - } - - /** - * Strips slashes recursively on an array - * - * @access protected - * - * @param array $value Array of (nested arrays of) strings - * - * @return array|string The input array with stripshlashes applied to it - */ - protected function _stripSlashesRecursive($value) - { - $value = is_array($value) ? array_map(array('xhttperrorRequest', '_stripSlashesRecursive'), $value) : stripslashes($value); - - return $value; - } -} - -/** - * xhttperrorInput is a class for filtering input from any data source - * Forked from the php input filter library by: Daniel Morris <da...@ro...> - * Original Contributors: Gianpaolo Racca, Ghislain Picard, Marco Wandschneider, Chris Tobin and Andrew Eddie. - * - * @author Louis Landry <lou...@jo...> - */ -class xhttperror -{ - var $tagsArray; // default = empty array - var $attrArray; // default = empty array - var $tagsMethod; // default = 0 - var $attrMethod; // default = 0 - var $xssAuto; // default = 1 - var $tagBlacklist - = array( - 'applet', - 'body', - 'bgsound', - 'base', - 'basefont', - 'embed', - 'frame', - 'frameset', - 'head', - 'html', - 'id', - 'iframe', - 'ilayer', - 'layer', - 'link', - 'meta', - 'name', - 'object', - 'script', - 'style', - 'title', - 'xml' - ); - var $attrBlacklist = array('action', 'background', 'codebase', 'dynsrc', 'lowsrc'); // also will strip ALL event handlers - - /** - * Constructor for inputFilter class. Only first parameter is required. - * - * @access protected - * - * @param array $tagsArray list of user-defined tags - * @param array $attrArray list of user-defined attributes - * @param int $tagsMethod WhiteList method = 0, BlackList method = 1 - * @param int $attrMethod WhiteList method = 0, BlackList method = 1 - * @param int $xssAuto Only auto clean essentials = 0, Allow clean blacklisted tags/attr = 1 - */ - public function __construct($tagsArray = array(), $attrArray = array(), $tagsMethod = 0, $attrMethod = 0, $xssAuto = 1) - { - // Make sure user defined arrays are in lowercase - $tagsArray = array_map('strtolower', (array)$tagsArray); - $attrArray = array_map('strtolower', (array)$attrArray); - // Assign member variables - $this->tagsArray = $tagsArray; - $this->attrArray = $attrArray; - $this->tagsMethod = $tagsMethod; - $this->attrMethod = $attrMethod; - $this->xssAuto = $xssAuto; - } - - /** - * Returns a reference to an input filter object, only creating it if it doesn't already exist. - * This method must be invoked as: - * <pre> $filter = & xhttperror::getInstance();</pre> - * - * @static - * - * @param array $tagsArray list of user-defined tags - * @param array $attrArray list of user-defined attributes - * @param int $tagsMethod WhiteList method = 0, BlackList method = 1 - * @param int $attrMethod WhiteList method = 0, BlackList method = 1 - * @param int $xssAuto Only auto clean essentials = 0, Allow clean blacklisted tags/attr = 1 - * - * @return object The xhttperror object. - * @since 1.5 - */ - public static function & getInstance($tagsArray = array(), $attrArray = array(), $tagsMethod = 0, $attrMethod = 0, $xssAuto = 1) - { - static $instances; - $sig = md5(serialize(array($tagsArray, $attrArray, $tagsMethod, $attrMethod, $xssAuto))); - if (!isset ($instances)) { - $instances = array(); - } - if (empty ($instances[$sig])) { - $instances[$sig] = new xhttperror($tagsArray, $attrArray, $tagsMethod, $attrMethod, $xssAuto); - } - - return $instances[$sig]; - } - - /** - * Method to be called by another php script. Processes for XSS and - * specified bad code. - * - * @access public - * - * @param mixed $source Input string/array-of-string to be 'cleaned' - * @param string $type Return type for the variable (INT, FLOAT, BOOLEAN, WORD, ALNUM, CMD, BASE64, STRING, ARRAY, PATH, NONE) - * - * @return mixed 'Cleaned' version of input parameter - * @static - */ - public function clean($source, $type = 'string') - { - // Handle the type constraint - switch (strtoupper($type)) { - case 'INT' : - case 'INTEGER' : - // Only use the first integer value - preg_match('/-?[0-9]+/', (string)$source, $matches); - $result = @ (int)$matches[0]; - break; - case 'FLOAT' : - case 'DOUBLE' : - // Only use the first floating point value - preg_match('/-?[0-9]+(\.[0-9]+)?/', (string)$source, $matches); - $result = @ (float)$matches[0]; - break; - case 'BOOL' : - case 'BOOLEAN' : - $result = (bool)$source; - break; - case 'WORD' : - $result = (string)preg_replace('/[^A-Z_]/i', '', $source); - break; - case 'ALNUM' : - $result = (string)preg_replace('/[^A-Z0-9]/i', '', $source); - break; - case 'CMD' : - $result = (string)preg_replace('/[^A-Z0-9_\.-]/i', '', $source); - $result = ltrim($result, '.'); - break; - case 'BASE64' : - $result = (string)preg_replace('/[^A-Z0-9\/+=]/i', '', $source); - break; - case 'STRING' : - // Check for static usage and assign $filter the proper variable - if (isset($this) && is_a($this, 'xhttperror')) { - $filter =& $this; - } else { - $filter = xhttperror::getInstance(); - } - $result = (string)$filter->_remove($filter->_decode((string)$source)); - break; - case 'ARRAY' : - // If $source is not an array - $result = (is_array($source)) ? (array)$source : array($source); - break; - case 'PATH' : - $pattern = '/^[A-Za-z0-9_-]+[A-Za-z0-9_\.-]*([\\\\\/][A-Za-z0-9_-]+[A-Za-z0-9_\.-]*)*$/'; - preg_match($pattern, (string)$source, $matches); - $result = @ (string)$matches[0]; - break; - case 'USERNAME' : - $result = (string)preg_replace('/[\x00-\x1F\x7F<>"\'%&]/', '', $source); - break; - default : - // Check for static usage and assign $filter the proper variable - if (is_object($this) && get_class($this) == 'xhttperror') { - $filter =& $this; - } else { - $filter = xhttperror::getInstance(); - } - // Are we dealing with an array? - if (is_array($source)) { - foreach ($source as $key => $value) { - // filter element for XSS and other 'bad' code etc. - if (is_string($value)) { - $source[$key] = $filter->_remove($filter->_decode($value)); - } - } - $result = $source; - } else { - // Or a string? - if (is_string($source) && !empty ($source)) { - // filter source for XSS and other 'bad' code etc. - $result = $filter->_remove($filter->_decode($source)); - } else { - // Not an array or string.. return the passed parameter - $result = $source; - } - } - break; - } - - return $result; - } - - /** - * Function to determine if contents of an attribute is safe - * - * @static - * - * @param array $attrSubSet A 2 element array for attributes name,value - * - * @return boolean True if bad code is detected - */ - public function checkAttribute($attrSubSet) - { - $attrSubSet[0] = strtolower($attrSubSet[0]); - $attrSubSet[1] = strtolower($attrSubSet[1]); - - return (((strpos($attrSubSet[1], 'expression') !== false) && ($attrSubSet[0]) == 'style') || (strpos($attrSubSet[1], 'javascript:') !== false) - || (strpos($attrSubSet[1], 'behaviour:') !== false) - || (strpos($attrSubSet[1], 'vbscript:') !== false) - || (strpos($attrSubSet[1], 'mocha:') !== false) - || (strpos($attrSubSet[1], 'livescript:') !== false)); - } - - /** - * Internal method to iteratively remove all unwanted tags and attributes - * - * @access protected - * - * @param string $source Input string to be 'cleaned' - * - * @return string 'Cleaned' version of input parameter - */ - protected function _remove($source) - { - $loopCounter = 0; - // Iteration provides nested tag protection - while ($source != $this->_cleanTags($source)) { - $source = $this->_cleanTags($source); - ++$loopCounter; - } - - return $source; - } - - /** - * Internal method to strip a string of certain tags - * - * @access protected - * - * @param string $source Input string to be 'cleaned' - * - * @return string 'Cleaned' version of input parameter - */ - protected function _cleanTags($source) - { - /* - * In the beginning we don't really have a tag, so everything is - * postTag - */ - $preTag = null; - $postTag = $source; - // Is there a tag? If so it will certainly start with a '<' - $tagOpen_start = strpos($source, '<'); - while ($tagOpen_start !== false) { - // Get some information about the tag we are processing - $preTag .= substr($postTag, 0, $tagOpen_start); - $postTag = substr($postTag, $tagOpen_start); - $fromTagOpen = substr($postTag, 1); - $tagOpen_end = strpos($fromTagOpen, '>'); - // Let's catch any non-terminated tags and skip over them - if ($tagOpen_end === false) { - $postTag = substr($postTag, $tagOpen_start + 1); - $tagOpen_start = strpos($postTag, '<'); - continue; - } - // Do we have a nested tag? - $tagOpen_nested = strpos($fromTagOpen, '<'); - if (($tagOpen_nested !== false) && ($tagOpen_nested < $tagOpen_end)) { - $preTag .= substr($postTag, 0, ($tagOpen_nested + 1)); - $postTag = substr($postTag, ($tagOpen_nested + 1)); - $tagOpen_start = strpos($postTag, '<'); - continue; - } - // Lets get some information about our tag and setup attribute pairs - $currentTag = substr($fromTagOpen, 0, $tagOpen_end); - $tagLength = strlen($currentTag); - $tagLeft = $currentTag; - $attrSet = array(); - $currentSpace = strpos($tagLeft, ' '); - // Are we an open tag or a close tag? - if (substr($currentTag, 0, 1) == '/') { - // Close Tag - $isCloseTag = true; - list ($tagName) = explode(' ', $currentTag); - $tagName = substr($tagName, 1); - } else { - // Open Tag - $isCloseTag = false; - list ($tagName) = explode(' ', $currentTag); - } - /* - * Exclude all "non-regular" tagnames - * OR no tagname - * OR remove if xssauto is on and tag is blacklisted - */ - if ((!preg_match("/^[a-z][a-z0-9]*$/i", $tagName)) || (!$tagName) - || ((in_array(strtolower($tagName), $this->tagBlacklist)) - && ($this->xssAuto)) - ) { - $postTag = substr($postTag, ($tagLength + 2)); - $tagOpen_start = strpos($postTag, '<'); - // Strip tag - continue; - } - /* - * Time to grab any attributes from the tag... need this section in - * case attributes have spaces in the values. - */ - while ($currentSpace !== false) { - $attr = ''; - $fromSpace = substr($tagLeft, ($currentSpace + 1)); - $nextSpace = strpos($fromSpace, ' '); - $openQuotes = strpos($fromSpace, '"'); - $closeQuotes = strpos(substr($fromSpace, ($openQuotes + 1)), '"') + $openQuotes + 1; - // Do we have an attribute to process? [check for equal sign] - if (strpos($fromSpace, '=') !== false) { - /* - * If the attribute value is wrapped in quotes we need to - * grab the substring from the closing quote, otherwise grab - * till the next space - */ - if (($openQuotes !== false) && (strpos(substr($fromSpace, ($openQuotes + 1)), '"') !== false)) { - $attr = substr($fromSpace, 0, ($closeQuotes + 1)); - } else { - $attr = substr($fromSpace, 0, $nextSpace); - } - } else { - /* - * No more equal signs so add any extra text in the tag into - * the attribute array [eg. checked] - */ - if ($fromSpace != '/') { - $attr = substr($fromSpace, 0, $nextSpace); - } - } - // Last Attribute Pair - if (!$attr && $fromSpace != '/') { - $attr = $fromSpace; - } - // Add attribute pair to the attribute array - $attrSet[] = $attr; - // Move search point and continue iteration - $tagLeft = substr($fromSpace, strlen($attr)); - $currentSpace = strpos($tagLeft, ' '); - } - // Is our tag in the user input array? - $tagFound = in_array(strtolower($tagName), $this->tagsArray); - // If the tag is allowed lets append it to the output string - if ((!$tagFound && $this->tagsMethod) || ($tagFound && !$this->tagsMethod)) { - // Reconstruct tag with allowed attributes - if (!$isCloseTag) { - // Open or Single tag - $attrSet = $this->_cleanAttributes($attrSet); - $preTag .= '<' . $tagName; - for ($i = 0; $i < count($attrSet); ++$i) { - $preTag .= ' ' . $attrSet[$i]; - } - // Reformat single tags to XHTML - if (strpos($fromTagOpen, '</' . $tagName)) { - $preTag .= '>'; - } else { - $preTag .= ' />'; - } - } else { - // Closing Tag - $preTag .= '</' . $tagName . '>'; - } - } - // Find next tag's start and continue iteration - $postTag = substr($postTag, ($tagLength + 2)); - $tagOpen_start = strpos($postTag, '<'); - } - // Append any code after the end of tags and return - if ($postTag != '<') { - $preTag .= $postTag; - } - - return $preTag; - } - - /** - * Internal method to strip a tag of certain attributes - * - * @access protected - * - * @param array $attrSet Array of attribute pairs to filter - * - * @return array Filtered array of attribute pairs - */ - protected function _cleanAttributes($attrSet) - { - // Initialize variables - $newSet = array(); - // Iterate through attribute pairs - for ($i = 0; $i < count($attrSet); ++$i) { - // Skip blank spaces - if (!$attrSet[$i]) { - continue; - } - // Split into name/value pairs - $attrSubSet = explode('=', trim($attrSet[$i]), 2); - list ($attrSubSet[0]) = explode(' ', $attrSubSet[0]); - /* - * Remove all "non-regular" attribute names - * AND blacklisted attributes - */ - if ((!preg_match('/[a-z]*$/i', $attrSubSet[0])) - || (($this->xssAuto) - && ((in_array(strtolower($attrSubSet[0]), $this->attrBlacklist)) - || (substr($attrSubSet[0], 0, 2) == 'on'))) - ) { - continue; - } - // XSS attribute value filtering - if ($attrSubSet[1]) { - // strips unicode, hex, etc - $attrSubSet[1] = str_replace('&#', '', $attrSubSet[1]); - // strip normal newline within attr value - $attrSubSet[1] = preg_replace('/[\n\r]/', '', $attrSubSet[1]); - // strip double quotes - $attrSubSet[1] = str_replace('"', '', $attrSubSet[1]); - // convert single quotes from either side to doubles (Single quotes shouldn't be used to pad attr value) - if ((substr($attrSubSet[1], 0, 1) == "'") && (substr($attrSubSet[1], (strlen($attrSubSet[1]) - 1), 1) == "'")) { - $attrSubSet[1] = substr($attrSubSet[1], 1, (strlen($attrSubSet[1]) - 2)); - } - // strip slashes - $attrSubSet[1] = stripslashes($attrSubSet[1]); - } - // Autostrip script tags - if (xhttperror::checkAttribute($attrSubSet)) { - continue; - } - // Is our attribute in the user input array? - $attrFound = in_array(strtolower($attrSubSet[0]), $this->attrArray); - // If the tag is allowed lets keep it - if ((!$attrFound && $this->attrMethod) || ($attrFound && !$this->attrMethod)) { - // Does the attribute have a value? - if ($attrSubSet[1]) { - $newSet[] = $attrSubSet[0] . '="' . $attrSubSet[1] . '"'; - } elseif ($attrSubSet[1] == "0") { - /* - * Special Case - * Is the value 0? - */ - $newSet[] = $attrSubSet[0] . '="0"'; - } else { - $newSet[] = $attrSubSet[0] . '="' . $attrSubSet[0] . '"'; - } - } - } - - return $newSet; - } - - /** - * Try to convert to plaintext - * - * @access protected - * - * @param string $source - * - * @return string Plaintext string - */ - protected function _decode($source) - { - // entity decode - $trans_tbl = get_html_translation_table(HTML_ENTITIES); - foreach ($trans_tbl as $k => $v) { - $ttr[$v] = utf8_encode($k); - } - $source = strtr($source, $ttr); - // convert decimal - //$source = preg_replace('/&#(\d+);/me', "chr(\\1)", $source); // decimal notation - //TODO swich to this once we have PHP 5.3 as minimum -// $source = preg_replace_callback('/&#(\d+);/m', function($m) {return chr($m[1]);}, $source); // decimal notation - $source = preg_replace_callback('/&#(\d+);/m', create_function('$matches', "return chr(\$matches[1]);"), $source); // decimal notation - // convert hex - //$source = preg_replace('/&#x([a-f0-9]+);/mei', "chr(0x\\1)", $source); // hex notation - //TODO swich to this once we have PHP 5.3 as minimum -// $source = preg_replace_callback('/&#x([a-f0-9]+);/mi', function($m) {return chr(hexdec($m[1]));}, $source); // hex notation - $source = preg_replace_callback( - '/&#x([a-f0-9]+);/mi', - create_function('$matches', "return chr('0x'.\$matches[1]);"), - $source - ); // hex notation - - return $source; - } -} Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt 2014-11-26 07:33:36 UTC (rev 12873) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt 2014-11-26 21:38:33 UTC (rev 12874) @@ -6,9 +6,10 @@ ! Bug fix. o General comment. -version 1.01 (Released: 2014/11/07) +version 1.01 (Released: 2014/11/26) =================================== + delete multiple reports. +o Use native XoopsRequest (mamba) o Upgraded to Xoops 2.5.7 coding standard. o Refactory all language definitions ! store wrong requested uri in reports (REDIRECT_URL, REDIRECT_QUERY_STRING) Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/include/common.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/include/common.php 2014-11-26 07:33:36 UTC (rev 12873) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/include/common.php 2014-11-26 21:38:33 UTC (rev 12874) @@ -37,7 +37,6 @@ include_once XHTTPERROR_ROOT_PATH . '/class/session.php'; // XhttperrorSession class include_once XHTTPERROR_ROOT_PATH . '/class/xhttperror.php'; // XhttperrorXhttperror class -include_once XHTTPERROR_ROOT_PATH . '/class/request.php'; // XhttperrorRequest class xoops_load('XoopsUserUtility'); xoops_load('XoopsLocal'); Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php 2014-11-26 07:33:36 UTC (rev 12873) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php 2014-11-26 21:38:33 UTC (rev 12874) @@ -41,11 +41,11 @@ // About $modversion['module_status'] = 'RC1'; -$modversion['release_date'] = '2014/11/07'; // YYYY/mm/dd +$modversion['release_date'] = '2014/11/26'; // YYYY/mm/dd $modversion['module_website_url'] = 'http://www.xoops.org/'; $modversion['module_website_name'] = 'XOOPS'; $modversion['min_php'] = '5.3.7'; -$modversion['min_xoops'] = '2.5.7'; +$modversion['min_xoops'] = '2.5.7.1'; $modversion['min_admin'] = '1.1'; $modversion['min_db'] = array( 'mysql' => '5.0.7', |
From: <luc...@us...> - 2015-02-03 22:11:14
|
Revision: 12963 http://sourceforge.net/p/xoops/svn/12963 Author: luciorota Date: 2015-02-03 22:11:05 +0000 (Tue, 03 Feb 2015) Log Message: ----------- changed directory structure xoops 2.5.7.1 compatible fixed bug in class/error.php Modified Paths: -------------- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/error.php XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/include/common.php XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php Added Paths: ----------- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/common/ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/common/session.php Removed Paths: ------------- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/session.php Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/class/common/session.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/common/session.php (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/common/session.php 2015-02-03 22:11:05 UTC (rev 12963) @@ -0,0 +1,111 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + 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. + */ +/** + * XhttperrorSession class + * + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Xhttperror + * @since 1.01 + * @author Lucio Rota <luc...@gm...> + * @author trabis <lus...@gm...> + * @author Harry Fuecks (PHP Anthology Volume II) + * @version $Id:$ + */ +defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); + +include_once dirname(dirname(__DIR__)) . '/include/common.php'; + +/** + * Class XhttperrorSession + */ +class XhttperrorSession +{ + /** + * Session constructor<br /> + * Starts the session with session_start() + * <strong>Note:</strong> that if the session has already started, + * session_start() does nothing + */ + protected function __construct() + { + @session_start(); + } + + /** + * Sets a session variable + * + * @param string $name name of variable + * @param mixed $value value of variable + * + * @return void + * @access public + */ + public function set($name, $value) + { + $_SESSION[$name] = $value; + } + + /** + * Fetches a session variable + * + * @param string $name name of variable + * + * @return mixed value of session variable + * @access public + */ + public function get($name) + { + if (isset($_SESSION[$name])) { + return $_SESSION[$name]; + } else { + return false; + } + } + + /** + * Deletes a session variable + * + * @param string $name name of variable + * + * @return void + * @access public + */ + public function del($name) + { + unset($_SESSION[$name]); + } + + /** + * Destroys the whole session + * + * @return void + * @access public + */ + public function destroy() + { + $_SESSION = array(); + session_destroy(); + } + + /** + * @return XhttperrorSession + */ + public static function &getInstance() + { + static $_sess; + if (!isset($_sess)) { + $_sess = new XhttperrorSession(); + } + + return $_sess; + } +} Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/class/error.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/error.php 2015-02-02 19:39:18 UTC (rev 12962) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/error.php 2015-02-03 22:11:05 UTC (rev 12963) @@ -22,9 +22,9 @@ defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); include_once dirname(__DIR__) . '/include/common.php'; -define('_XHTTPERROR_REDIRECT_NO', 0); -define('_XHTTPERROR_REDIRECT_URI', 1); -define('_XHTTPERROR_REDIRECT_PREVIOUS', 2); +define('XHTTPERROR_REDIRECT_NO', 0); +define('XHTTPERROR_REDIRECT_URI', 1); +define('XHTTPERROR_REDIRECT_PREVIOUS', 2); /** * Class XhttperrorError Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/class/session.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/session.php 2015-02-02 19:39:18 UTC (rev 12962) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/session.php 2015-02-03 22:11:05 UTC (rev 12963) @@ -1,111 +0,0 @@ -<?php -/* - You may not change or alter any portion of this comment or credits - of supporting developers from this source code or any supporting source code - which is considered copyrighted (c) material of the original comment or credit authors. - - 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. - */ -/** - * XhttperrorSession class - * - * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @package Xhttperror - * @since 1.01 - * @author Lucio Rota <luc...@gm...> - * @author trabis <lus...@gm...> - * @author Harry Fuecks (PHP Anthology Volume II) - * @version $Id:$ - */ -defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); - -include_once dirname(dirname(__FILE__)) . '/include/common.php'; - -/** - * Class XhttperrorSession - */ -class XhttperrorSession -{ - /** - * Session constructor<br /> - * Starts the session with session_start() - * <strong>Note:</strong> that if the session has already started, - * session_start() does nothing - */ - protected function __construct() - { - @session_start(); - } - - /** - * Sets a session variable - * - * @param string $name name of variable - * @param mixed $value value of variable - * - * @return void - * @access public - */ - public function set($name, $value) - { - $_SESSION[$name] = $value; - } - - /** - * Fetches a session variable - * - * @param string $name name of variable - * - * @return mixed value of session variable - * @access public - */ - public function get($name) - { - if (isset($_SESSION[$name])) { - return $_SESSION[$name]; - } else { - return false; - } - } - - /** - * Deletes a session variable - * - * @param string $name name of variable - * - * @return void - * @access public - */ - public function del($name) - { - unset($_SESSION[$name]); - } - - /** - * Destroys the whole session - * - * @return void - * @access public - */ - public function destroy() - { - $_SESSION = array(); - session_destroy(); - } - - /** - * @return XhttperrorSession - */ - public static function &getInstance() - { - static $_sess; - if (!isset($_sess)) { - $_sess = new XhttperrorSession(); - } - - return $_sess; - } -} Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt 2015-02-02 19:39:18 UTC (rev 12962) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt 2015-02-03 22:11:05 UTC (rev 12963) @@ -6,11 +6,9 @@ ! Bug fix. o General comment. -version 1.01 (Released: 2014/11/26) +version 1.01 (Released: 2015/02/03) =================================== -+ delete multiple reports. -o Use native XoopsRequest (mamba) -o Upgraded to Xoops 2.5.7 coding standard. +o Upgraded to Xoops 2.5.7.1 coding standard. o Refactory all language definitions ! store wrong requested uri in reports (REDIRECT_URL, REDIRECT_QUERY_STRING) Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/include/common.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/include/common.php 2015-02-02 19:39:18 UTC (rev 12962) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/include/common.php 2015-02-03 22:11:05 UTC (rev 12963) @@ -21,6 +21,20 @@ defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); +// common Xoops stuff +xoops_load('XoopsRequest'); +xoops_load('XoopsUserUtility'); +xoops_load('XoopsLocal'); + +// MyTextSanitizer object +$myts = MyTextSanitizer::getInstance(); + +// Load Xoops handlers +$module_handler = xoops_gethandler('module'); +$member_handler = xoops_gethandler('member'); +$notification_handler = xoops_gethandler('notification'); +$groupperm_handler = xoops_gethandler('groupperm'); + // This must contain the name of the folder in which reside Xhttperror define("XHTTPERROR_DIRNAME", basename(dirname(dirname(__FILE__)))); define("XHTTPERROR_URL", XOOPS_URL . '/modules/' . XHTTPERROR_DIRNAME); @@ -35,14 +49,9 @@ include_once XHTTPERROR_ROOT_PATH . '/include/functions.php'; include_once XHTTPERROR_ROOT_PATH . '/include/constants.php'; -include_once XHTTPERROR_ROOT_PATH . '/class/session.php'; // XhttperrorSession class include_once XHTTPERROR_ROOT_PATH . '/class/xhttperror.php'; // XhttperrorXhttperror class +include_once XHTTPERROR_ROOT_PATH . '/class/common/session.php'; // XhttperrorSession class -xoops_load('XoopsUserUtility'); -xoops_load('XoopsLocal'); -// MyTextSanitizer object -$myts = MyTextSanitizer::getInstance(); - $debug = false; $xhttperror = XhttperrorXhttperror::getInstance($debug); @@ -54,9 +63,3 @@ // Find if the user is admin of the module $xhttperror_isAdmin = xhttperror_userIsAdmin(); } - -// Load Xoops handlers -$module_handler = xoops_gethandler('module'); -$member_handler = xoops_gethandler('member'); -$notification_handler = xoops_gethandler('notification'); -$groupperm_handler = xoops_gethandler('groupperm'); Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php 2015-02-02 19:39:18 UTC (rev 12962) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php 2015-02-03 22:11:05 UTC (rev 12963) @@ -40,8 +40,8 @@ include_once XOOPS_ROOT_PATH . '/modules/' . $modversion['dirname'] . '/include/constants.php'; // About -$modversion['module_status'] = 'RC1'; -$modversion['release_date'] = '2014/11/26'; // YYYY/mm/dd +$modversion['module_status'] = 'Beta'; +$modversion['release_date'] = '2015/02/03'; // YYYY/mm/dd $modversion['module_website_url'] = 'http://www.xoops.org/'; $modversion['module_website_name'] = 'XOOPS'; $modversion['min_php'] = '5.3.7'; |