|
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 ...
[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(__F...
[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)$...
[truncated message content] |
|
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';
|