Commit Graph

50 Commits

Author SHA1 Message Date
489623972f route : allow to define a viewErrorClass and viewErrorMethod to catch the exceptions raised by the code. Simplfy the index.php :
$route->viewClass = '\views\ipsets';
  $route->viewErrorMethod = 'error';
  $ipsetsObj = new \controllers\ipsets ();
  $form = new \form ();
  $values = $form->values ();
  $errors = $ipsetsObj->verify ($values);
  $form->redirectIfErrors ($values, $errors, "/ipsets/add");
  $ipsetsObj->createSet ($values["setname"], $values["typename"]);
  $route->redirect ("/ipsets", "");


git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2696 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-04-14 19:05:57 +00:00
d35b61e290 route : if the module is not set, work as it is ""
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2695 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-04-14 18:35:22 +00:00
188ed7cd96 route : ratelimit the errors to not allow the hackers to brute force the backend
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2543 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-02-23 12:35:08 +00:00
92a0fd8634 route : Pass to renderer the information concerning the routing and the exception
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2516 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-02-22 08:33:23 +00:00
afb69d0487 route : require_once instead of require !
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2380 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-11-13 10:19:50 +00:00
d52e9432f4 route : when a 401 error is thrown, request the WWW-Authentication
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2377 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-10-25 14:48:21 +00:00
2fec89d95f route : route allow now to get the information from a return in the function of map and display it with the provided output type (json, html, xml, text).
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2374 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-10-23 12:24:51 +00:00
1726abd0a5 route : multi now return $this to be chainnable
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2373 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-10-23 09:23:58 +00:00
23bfc34f1a route : allow the routing to be chained : return $this each time
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2369 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-10-19 09:29:31 +00:00
144842b4da route : allow the 401 error code to be redirected to an external URL to authenticate the user
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2237 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-14 07:08:49 +00:00
8f9d404343 route : remove the automatic adding of the / to allow the redirect from word to word/ without error of loop
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2227 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-10 14:31:16 +00:00
0053e3eb1a route : redirect to myself : code 400
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2226 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-10 14:11:53 +00:00
bd45fb2566 route : add the 'multi' method to allow multiple methods to be applied to the same route and function
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2225 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-09 07:26:12 +00:00
35f2002e3f route : remove a obsolete comment
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2222 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-07 09:54:53 +00:00
ca9af5324e route : add a message to errors when the Exception code is 0 and converted to 500
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2221 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-07 09:46:30 +00:00
be7085fd68 route : catch the http errors from PHP (with error code 0) as "Internal Server Error" (error code 500)
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2220 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-07 09:39:06 +00:00
0077b21e43 route : the URL are decoded before providing the informations to map
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2210 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-05 11:49:22 +00:00
f5fb16ae57 route : allow prerouting informations to be added in map comparisons
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2205 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-06-16 12:08:45 +00:00
6fbea5dc56 route : the redirect can be done outside the site, with a warning
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2161 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-05-07 14:40:25 +00:00
3ea5fff993 Add support to baseURLresource used in the HTML page to the modules
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2154 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-05-07 13:10:07 +00:00
238a245071 Remove the CSRF debug log
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2124 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-04-30 13:39:44 +00:00
da8d0d9925 route : better relative support
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2084 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-04-28 09:07:31 +00:00
6bd4c44a15 route : remove debug
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2083 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-04-27 20:47:39 +00:00
f9a4e68e01 route : when a relative baseURL is empty, push "./" to be in the current directory
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2081 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-04-27 18:34:30 +00:00
dc8f2d13df route : relative OK when using redirect
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2080 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-04-27 17:26:45 +00:00
166fa33c7a route : base URL is now in complete relative !
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2078 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-04-27 17:03:05 +00:00
11106afc7c route : redirect is now OK without the complete URL
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2075 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-04-27 13:58:26 +00:00
1578a21a6b route : the baseURL is now relative by default. It allow the route module to work across a proxy
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2074 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-04-27 13:44:05 +00:00
ce1ecca5da route.php : Add support of URL matching with or without Slash
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2020 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-03-12 20:35:08 +00:00
83f2c6e980 route : Correct redirect when using modules
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1866 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-11-20 10:46:46 +00:00
8b86ff4059 route : Remove old and comment and unused function
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1853 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-24 11:26:44 +00:00
e6b0a396e4 route : Add an error management in all the cases of routing. It is possible to use an external error page too.
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1827 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-17 12:55:53 +00:00
41e8a4a876 route : Return to standard class : not not needed static
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1824 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-16 12:57:18 +00:00
3cd475a0d9 route : Add support to errors from the application
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1820 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-16 11:34:37 +00:00
75910359d9 route : Allow redirect from same URL to same URL if the method is changed
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1819 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-16 10:53:29 +00:00
ee8559b657 Add support to redirect permanently
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1790 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-09-03 12:23:28 +00:00
e17ec390a2 Better support of exceptions catch by routing. The HTML page is valid, with UTF-8 support and Noindexes for robots
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1671 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-08-07 09:24:22 +00:00
9fef934b71 Cosmetics : remove spaces at the end of lines and correct lines with more than 80 chars
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1643 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-08-01 07:11:14 +00:00
3a35351199 Remove the ports in baseURL if it is the standard port (80 for http, 443 for https)
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1577 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-07-27 09:29:02 +00:00
884da19d71 route : Correct support of SERVER_PORT
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1500 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-27 11:56:27 +00:00
fef26c83a6 Add ports in routing module
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1499 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-27 09:21:04 +00:00
40b9ac1015 Add port in URL to the routing module
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1498 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-27 09:18:17 +00:00
136790a988 route : BUG : Add server port in routing to be used in VPN
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1497 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-27 08:52:29 +00:00
5deed571ec Don't display an error if the headers are already sent
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1375 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-01 08:17:49 +00:00
9398370664 Catch the non catched exception in routes and display them in Internal server error
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1374 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-01 07:53:46 +00:00
4e34002ffe REGEX BUG : if a parameter is optionnal in the regex, don't show an error
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1263 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-03-26 20:33:14 +00:00
350aa1dea8 Add all the phpdocs to the domframework
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1246 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-03-24 19:44:34 +00:00
a50e28dc16 Adding _METHOD support to routing
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1210 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-02-27 15:36:49 +00:00
6ce3776d12 Add a new routing module with easier support. It understand the RESTful mode too with GET,PUT,POST,DELETE.
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1209 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-02-27 15:04:20 +00:00
96cf1c4010 First release of domframework
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1207 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-02-27 08:47:54 +00:00