Commit Graph

38 Commits

Author SHA1 Message Date
ralf
9f3283033e fix PHP Warning: Undefined array key 2 2023-05-08 15:15:15 +02:00
ralf
49ac54b365 Revert "json requests now close the PHP session immediately again and reopen it, if there was an update to the session" as it breaks Collabora editing
This reverts commit fe4d0dbbe3.
2022-09-27 19:02:20 +02:00
ralf
fe4d0dbbe3 json requests now close the PHP session immediately again and reopen it, if there was an update to the session
this allows to run more PHP requests in parallel
2022-09-24 15:50:44 +02:00
Ralf Becker
981f6d853d also output file and line of exception for json requests 2021-10-11 11:25:56 +02:00
Ralf Becker
00f2c12771 fix not send logout for expired sessions for PHP 8
also change alert for exceptions to egw.message($msg, 'error')
2021-04-02 11:09:24 +02:00
Ralf Becker
7480e7e75f fix expired session gives client-side parse-error under PHP 8 2021-04-01 08:22:37 +02:00
Ralf Becker
d759e4b5a9 * Tracker: fix empty notification mail, if ticket was opened by following a link in notification mail 2020-11-21 18:55:39 +01:00
Ralf Becker
92bb06f724 * Calendar: send notifications/meeting requests after responding to user 2020-07-26 15:04:39 +02:00
Ralf Becker
7b30bb7b0d * Admin: optional session-action column in access-log and sessions
also no longer update access-log in session-class destructor, as it fails with skipping permanent logging for WebDAV and others
2019-12-14 13:09:22 +02:00
Hadi Nategh
e0fdcaa959 Call on logout event when any sort of logout happens 2019-10-18 14:17:27 +02:00
Ralf Becker
2f1333a116 return and show in browser JSON parsing errors maybe caused by network problems
server sends HTTP status "400 Bad Request" with JSON payload with "error" and "errno" attributes.
error is json_last_error_msg() prefixed with "JSON ".
Not yet implemented is resending the request (max. twice) for JSON parsing errors to try to work around network problems
2018-11-01 12:00:08 +01:00
Ralf Becker
61577b45b1 allow to process real JSON requests with Content-Type: application/json
so far we always send it encoded as form, which is still supported of cause
2018-08-15 13:11:55 +02:00
Ralf Becker
3bfbf26cfa use 16.1 Api\Exception\Redirect instead of old egw_exception_redirect not existing in default 16.1 install 2016-10-31 18:30:45 +01:00
Ralf Becker
4af0e7cb1c WIP EGroupware without phpgwapi&etemplate 2016-05-04 19:07:54 +00:00
Ralf Becker
429177686a make home a regular application, which can eg. disabled, incl. moving all services using "home" as appname to "api" and moved some other forgotten stuff from phpgwapi&etemplate to api 2016-05-01 09:57:48 +00:00
Ralf Becker
07a5224025 * Admin: clear cache after admin-cli.php commands, so they become active automatically
and allow to send json requests with basic auth credentials without an active session, used here to clear cache via webservice call, as we can NOT clear shared memmory cache of webserver from cli
2016-04-27 10:34:57 +00:00
Ralf Becker
52a7f2198a move egw_json_(request|response|push) to api 2016-03-20 13:02:55 +00:00
Ralf Becker
3453021a6d allow api as app like home for everyone, and implement calling of namespaced class-names from EGroupware namespace in index.php and json.php 2016-03-19 15:24:36 +00:00
Ralf Becker
5bfe4ba48b remove Exception from function signature of ajax_exception_handler, as php 7 throws Error not inherited from Exception, but Throwable does not exist in php < 7.0 2016-02-15 23:17:19 +00:00
Ralf Becker
7a0662b529 need to call egw_json_request::isJSONRequest(true), before throwing an exception (or calling egw_json_request::parseRequest()), otherwise exception is not shown on client as alert 2015-01-27 08:57:34 +00:00
Hadi Nategh
0c5eb74805 Revert the not wanted commit r49258 2014-10-30 15:33:00 +00:00
Hadi Nategh
063f034e20 Open customfields edit dialog as popupinc/class.customfields.inc.php 2014-10-30 15:23:09 +00:00
Ralf Becker
424b4c451c fix redirects in a popup and new egw_exception_redirect to be used in hooks/callbacks like for addressbook.edit to redirect to a different location 2014-10-15 14:55:08 +00:00
Ralf Becker
819edf5dec only log ajax requests which represent former GET requests or submits, to cut down updates to egw_access_log table 2014-09-10 18:38:48 +00:00
Ralf Becker
7044947083 fixed not working redirect to login, after changes in shutdown handling 2014-02-25 06:51:56 +00:00
Ralf Becker
7d90086ae4 fixed caching in a couple of places:
- user.php was not reloaded if (session-)preferences changed eg. language via select-box in login, because we used Expires header, but did not force a different url
- (user|config|images).php now has etag on url, to force reload by browser as we use an Expires header (changed images still need Admin >> clear cache to rebuild image cache)
- preferences are now loaded via a cachable GET request
2014-01-18 17:48:26 +00:00
Ralf Becker
38798b872d Force use of singleton: $response = egw_json_response::get(); not using it causes response being wrapped in an other response 2013-08-25 12:42:55 +00:00
Nathan Gray
4fc2691b6a Avoid double includes 2012-09-19 16:22:21 +00:00
Ralf Becker
516b977472 ability to queue ajax requests on the client and send them as a single ajax request every N ms to the server
a) instead of a single request like: new egw_json_request(menuaction, params).sendRequest(true, callback, context); 
b) you call: egw.jsonq(menuaction,params,callback,context)
The server callback is identical for both kinds of requests. All egw_json_response methods can be used and the callback is optional.
2011-09-13 17:27:02 +00:00
Ralf Becker
fe086b752b make sure egw_json_response object get instancated, so it's destructor get called and sends at least an empty response object, checkpoint dont like empty HTTP responses 2011-05-03 19:43:51 +00:00
Klaus Leithoff
aecfe9d768 disable dla_update for xajax felemimail call to refresh MessageList and FolderList periodically 2011-04-13 13:31:09 +00:00
Ralf Becker
6836518858 removed unnecessary refresh_table from update, as it makes problems with PostgreSQL 2011-03-14 17:50:22 +00:00
Andreas Stöckel
6558a861a1 Added error message if the json content got thrown away because there was javascript in it 2010-06-29 12:58:55 +00:00
Andreas Stöckel
d8983b6cd1 Added wrapper for xajax.addScriptCall(), added ?cd=10 to json.php response again 2010-06-11 11:41:12 +00:00
Andreas Stöckel
f5d08b580f Fixed problem with generation of numerical indices in _egw_json_getFormValue, using the new global parameter of egw_json_response.redirect in json.php 2010-06-11 10:22:49 +00:00
Ralf Becker
b672e1941b fixed wrong method name, had to be alert() not addAlert() 2010-06-08 09:34:49 +00:00
Ralf Becker
a3bb4afe1b documenting and adding exception and redirect handler to json handler 2010-06-01 18:54:31 +00:00
Andreas Stöckel
0c243b49a3 - Updated JS and PHP egw_json code
- Added array_stripslashes() to common_functions.inc.php
- Added json handler (json.php)
2010-06-01 14:20:55 +00:00