Commit Graph

1790 Commits

Author SHA1 Message Date
Johannes Meyer f0b5d8fd8e BadgeNavigationItemRenderer: Round counts to the neareset base
refs #3568
2019-07-03 11:29:37 +02:00
Johannes Meyer 6aa2cf69c7 HtmlPurifier: Enable cache directory
refs #3814
2019-06-27 14:41:13 +02:00
Johannes Meyer 74642d1cf7 FileCache: Add method to prepare sub directories
refs #3814
2019-06-25 16:18:26 +02:00
Johannes Meyer bd2060739e announcements: Transform markdown markup 2019-06-25 15:04:04 +02:00
Johannes Meyer 1ac5557187 lib: Introduce Markdown view helper
refs #3684
2019-06-25 15:01:35 +02:00
Johannes Meyer dd664aab98 Url: Trim all leading slashes from paths, not just the first
refs #3829
2019-06-25 09:18:15 +02:00
Eric Lippmann b9c2c45af1 CLI: Fix CSS path
CLI commands which require our LESS parser had no access to our CSS
because the public path was set to the path of the icingacli executable
which is most likely bin.
2019-06-04 09:43:39 +02:00
Johannes Meyer dcbb477d3a AnnouncementIniRepository: Also fetch column `start` in `findActive()` 2019-05-23 10:05:14 +02:00
Johannes Meyer 37df008d7f AnnouncementIniRepository: Don't transform retrieved timestamps to DateTime
refs #3414
2019-04-16 13:03:16 +02:00
Johannes Meyer 3fe810ecf9 Form: Properly preserve defaults from DateTimePicker elements
fixes #3612
2019-04-10 10:51:36 +02:00
Eric Lippmann 915c7b8fe5
Merge pull request #3504 from Icinga/fix/collapsible-sidebar-issues-3187
Fix collapsible sidebar issues
2019-03-21 09:09:27 +01:00
Jennifer Mourek b3b80fdc31 Make active first-level nav items better distinguishable 2019-03-20 11:07:39 +01:00
Jennifer Mourek 61b0d8aa90 Add icon with first letter of the li if there is no icon set else default to icon-circle 2019-03-20 11:07:39 +01:00
Eric Lippmann 9571d1059f Fix URLs in our image helper having multiple params 2019-01-25 09:20:55 +01:00
Johannes Meyer 4e6b936862 helpers/url: Properly escape image urls 2018-10-10 09:44:11 +02:00
Eric Lippmann 7d47875241 Introduce PdfexportHook 2018-07-18 14:22:18 +02:00
Johannes Meyer 84622bf27b Fix some XSS vulnerabilities
Only a real issue with <= IE9 as other browsers properly escape
urls prior transmission.

Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com>
2018-07-16 09:53:30 +02:00
Eric Lippmann 6cddd6beed
Merge pull request #3508 from Icinga/fix/filter-entries-are-deleted-when-pushing-enter-3454
FilterEditor: Add a hidden submit button to the start of the form's m…
2018-07-10 09:28:35 +02:00
Eric Lippmann 47405127d0 Add config to hide/show pplication state messages
refs #2835
2018-07-09 16:28:28 +02:00
Eric Lippmann d18d05ccee Introduce ApplicationStateHook
refs #2835
2018-07-09 16:28:25 +02:00
Johannes Meyer 6e6251604b FilterEditor: Add a hidden submit button to the start of the form's markup
When pushing enter our JS mimics what a browser would do. And that is
pushing the first submit button found in the form. Without this, that's
a delete button of the first logical junction. (the root condition)

fixes #3454
2018-07-06 10:41:49 +02:00
Eric Lippmann 189b519135
Merge pull request #3486 from Icinga/fix/request-parses-json-without-respecting-content-type-3484
Fix that Request parses json without respecting content type
2018-07-05 13:19:27 +02:00
Johannes Meyer 1f677e64f6 ActionController: Force HTTP redirects in method redirectHttp()
That's what its name implies, right? The counterpart is redirectXhr(),
which does still its job. redirectNow() on the other hand is for the
lazy people.
2018-07-04 14:44:03 +02:00
Johannes Meyer 8cbff87af1 Request: Parse the POST body only as JSON if it's really JSON
refs #3484
2018-07-04 11:09:11 +02:00
Johannes Meyer 842e5603a1 Request: Introduce method extractMediaType
refs #3484
2018-07-04 11:09:11 +02:00
Eric Lippmann 6f1d8668a0 Fix line exceeds 120 characters 2018-06-22 11:04:48 +02:00
Alexander A. Klimov ee60a8df99 Don't let AutoRefreshForm handle API requests
refs #2749
2018-06-22 11:03:07 +02:00
Alexander A. Klimov 235e75d054 Form: handle API requests as expected
refs #2749
2018-06-22 11:03:07 +02:00
Alexander A. Klimov 880a0a254f DateTimePicker: support *nix timestamps
refs #2749
2018-06-22 11:03:07 +02:00
Alexander A. Klimov a444b8adf5 Request: support JSON as POST data format
refs #2749
2018-06-22 11:03:07 +02:00
Alexander A. Klimov 906c1668a4 Split Json::encode() into Json::encode() and Json::sanitize()
refs #2635
2018-06-21 16:01:53 +02:00
Alexander A. Klimov 02b60633ff Auto-sanitize only in the monitoring module
refs #2635
2018-06-20 18:05:12 +02:00
Alexander A. Klimov 1a94a21263 Prefer Json::encode() over json_encode()
refs #2635
2018-06-20 18:05:11 +02:00
Eric Lippmann 96303f53f8
Merge pull request #3213 from Icinga/feature/drop-php-5-3-support
Drop PHP 5.3 support
2018-05-08 03:03:36 -04:00
Eric Lippmann 4bea67e756
Merge pull request #3315 from Icinga/bugfix/php-7-2-support-3185
Don't call session_start() after ini_set()
2018-05-07 05:44:52 -04:00
Alexander A. Klimov fc1f6e13ab Drop PHP 5.3 support 2018-05-07 11:36:54 +02:00
Johannes Meyer 71cb682832 Re-introduce class Icinga\Web\Menu
refs #2338
2018-04-30 10:24:57 +02:00
Johannes Meyer 1b15048636 Drop obsolete Icinga\Web\Menu classes
refs #2338
2018-04-27 14:28:20 +02:00
Johannes Meyer 571b34c8cd Drop obsolete class Icinga\Web\Menu\BadgeMenuItemRenderer
refs #2338
2018-04-27 14:11:03 +02:00
Johannes Meyer 059088c089 Drop obsolete class Icinga\Web\Menu\SummaryMenuItemRenderer
refs #2338
2018-04-27 14:10:35 +02:00
Johannes Meyer d71982e333 Drop obsolete class Icinga\Web\Menu\PermittedMenuItemFilter
refs #2338
2018-04-27 14:10:00 +02:00
Johannes Meyer 1c4ebda037 Drop obsolete class Icinga\Web\MenuRenderer
refs #2338
2018-04-27 14:04:49 +02:00
Alexander A. Klimov 1280137eae Merge branch 'bugfix/form-number-inclusive-range' 2018-04-12 14:32:38 +02:00
Alexander A. Klimov 5cf51a70c8 Numeric input: validate inclusive ranges 2018-04-12 14:25:10 +02:00
Johannes Meyer 5f24fffe7d
Merge pull request #3412 from Icinga/bugfix/filter-editor-expand-upon-auto-refresh-2964
Preserve collapsed FilterEditor subtrees across auto-refreshes
2018-04-06 14:55:19 +02:00
Alexander A. Klimov 41b105136d Preserve collapsed FilterEditor subtrees across auto-refreshes
refs #2964
2018-04-06 13:54:51 +02:00
Johannes Meyer 72f0e809ae Pane: Add setter for $name
refs #2901
2018-04-06 11:08:20 +02:00
Alexander A. Klimov b5dde96746 FilterEditor: save changes on element addition
refs #2900
2018-04-04 12:20:52 +02:00
Alexander A. Klimov dadd2c80f6 Don't call session_start() after ini_set()
refs #3185
2018-01-24 17:38:20 +01:00
Alexander A. Klimov 72ec132f25 Correct interfaces to conform to PHP 7.2+ 2018-01-24 11:50:10 +01:00
Johannes Meyer e59fa13786 Announcements: Render HTML in announcment messages
refs #2641
2018-01-19 16:12:53 +01:00
Johannes Meyer 3b9d8697ed Introduce class Icinga\Web\Helper\HtmlPurifier
refs #2641
2018-01-19 16:12:53 +01:00
lippserd 362a5b1721
Merge pull request #3271 from Icinga/bugfix/fix-internalurlvalidator
InternalUrlValidator: prevent circumvention by URLs on the same VHost
2018-01-18 09:58:32 +01:00
Alexander A. Klimov 5f441f3ad1 Don't fail to render the whole dashboard in case of a broken dashlet 2018-01-17 13:48:14 +01:00
Alexander A. Klimov c2f74d49cb InternalUrlValidator: prevent circumvention by URLs on the same VHost 2018-01-16 15:40:08 +01:00
lippserd 705f3a49d9
Merge pull request #3180 from Icinga/feature/url-static-self
Url: prefer static over self
2018-01-16 10:52:25 +01:00
Alexander A. Klimov a1709a0670 Fix unneccessary log message
refs #3189
2017-12-19 15:58:25 +01:00
Alexander A. Klimov 788272fad7 PhpSession: conform to PHP 7.1
refs #3208
2017-12-13 13:38:51 +01:00
Alexander A. Klimov 810c02a41f Url: prefer static over self 2017-12-04 10:48:52 +01:00
Alexander A. Klimov 6409bdc074 Implement persistent "Show more" spoilers 2017-11-27 14:18:42 +01:00
Eric Lippmann b6b87796ed Menu: Link to the navigation dashboard if menu entry has children but no URL 2017-11-21 22:55:45 +01:00
Eric Lippmann e7ca817e81 Make Navigation::findItem() public
We need this method public for the navigation dashbaord.
2017-11-21 22:55:45 +01:00
Eric Lippmann 21dbe4ec47 Only render icons of root navigation items
The upcoming navigation dashboard creates its links from the menu items in configuration.php.
Now, we encourage users to specify icons for second-level menu items but do not want render them in our menu.
2017-11-21 22:55:45 +01:00
Eric Lippmann 3660606ca1 Allow to set a description for navigation items
We will introduce a navigation dashboard for root menu items which do not a have a URL but children.
2017-11-21 22:55:45 +01:00
lippserd df1e7683c8
Merge pull request #3041 from Icinga/feature/auto-detaching-dom-elements-3039
Implement auto-detaching DOM elements
2017-11-21 16:48:59 +01:00
Markus Frosch 2493cb8d63 Fix incorrect uses of translation around sprintf 2017-11-21 15:47:46 +01:00
Alexander A. Klimov c7ffb41b02 Implement togglable flyover
refs #3024
2017-11-21 14:05:12 +01:00
Alexander A. Klimov b000c1ae4a Implement auto-detaching DOM elements
refs #3039
2017-11-21 13:17:55 +01:00
Alexander A. Klimov 71fe12393d Persist X-Icinga-WindowId across auto-refreshes 2017-11-21 11:30:36 +01:00
Alexander A. Klimov bdcb6389d8 Add user preference for default number of items per page
refs #2859

Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com>
2017-11-15 16:56:43 +01:00
Eric Lippmann 73a6750489 Make phpcs and PhpStorm happy w/ intentional switch, case fall-throughs
Unfortunately, PhpStorm does not regonise PSR2 fall-through comments.
On the other hand, phpcs does not support the @noinspection phpdoc comment (/**).
The fix is a mix of PSR2 comments and @noinspection tags in code comments.
2017-11-08 10:25:28 +01:00
Markus Frosch c3ef50978a style: Fix minor styleguide issues for PHPCS 2017-11-08 10:06:45 +01:00
Eric Lippmann 1f5f610b04 Add newlines to AnnouncementIniRepository.php 2017-11-07 14:48:46 +01:00
Eric Lippmann 5ec14bdb9d Remove inheritdoc tags in AnnouncementIniRepository.php 2017-11-07 12:50:30 +01:00
Johannes Meyer 2e1bac81ff Form: Create the form as part of method `setDefaults'
We don't care anymore about the BC in Zend version 1.12.7.
Hence we'll happily override setDefaults now. Yay!

refs #2998
2017-10-23 15:10:50 +02:00
Johannes Meyer d348d95e5e Revert "Form: Don't prevent disabled elements from getting overwritten.."
This reverts commit eb343009bb.

refs #2998
2017-10-23 15:10:37 +02:00
Alexander A. Klimov c22efa4519 UrlValidator: translate error message 2017-10-20 14:27:33 +02:00
Alexander A. Klimov f70fc6e98d Fix not working SomeType[string] in code docs
refs #2980
2017-09-29 12:08:14 +02:00
lippserd 46014558e6 Merge pull request #2946 from Icinga/bugfix/enhance-code-autocompletion-in-ides-2945
Enhance code autocompletion in IDEs
2017-09-08 15:45:25 +02:00
lippserd ade0744701 Merge pull request #2923 from Icinga/bugfix/is-not-a-valid-number
Form/Element/Number: The field should be valid when empty
2017-09-08 15:32:48 +02:00
Alexander A. Klimov 356e194612 Enhance code autocompletion in IDEs
refs #2945
2017-09-07 11:22:46 +02:00
Johannes Meyer beb3326631 StyleSheet/JavaScript: Also include Cache-Control when answering with a 304
Without Cache-Control, the browser may invalidate its cached file and we're
serving the file again on the next request.

refs #2917
2017-08-22 09:33:28 +02:00
Johannes Meyer 6702ccb2a7 FileCache: Ignore compression suffix when checking cache made of multiple files
refs #2917
2017-08-22 09:31:56 +02:00
Johannes Meyer 7b7bfb5a5d FileCache: Use the correct variable when checking a file's modification time
refs #2917
2017-08-22 08:38:13 +02:00
Markus Frosch 1d06d4e3c4 Form/Element/Number: The field should be valid when empty 2017-08-17 13:20:51 +02:00
Johannes Meyer eb343009bb Form: Don't prevent disabled elements from getting overwritten..
..if someone just utilizes populate() programatically.

refs #2509
2017-07-13 13:53:48 +02:00
Johannes Meyer ed5ba14df2 Form: Register form notifications as custom error messages for API requests
I'd have liked to fix how we transmit validation messages in such cases,
but for compatibilty reasons this has to suffice..
2017-07-13 13:00:24 +02:00
Johannes Meyer 96c96df636 Form: Don't transmit duplicate error messages
Zend_Form::getMessages() already returns custom error messages,
if there are any
2017-07-13 12:59:23 +02:00
Johannes Meyer b93dc06f5b ActionController: Let the repsonse itself set its headers
The only header that is now set by the ActionController is X-Icinga-Title,
all others are delegated to Icinga\Web\Response.
2017-07-13 12:56:03 +02:00
Johannes Meyer 0d52bb421f ActionController: Don't re-enable the layout when just setting XHR layout
In case someone doesn't want the layout, we should not force it, especially
not for XHR requests.
2017-07-12 16:54:52 +02:00
Eric Lippmann c0d82fa2cc Rephrase autosumbit tooltips
fixes #1507
2017-07-04 13:59:02 +02:00
Eric Lippmann 53091384cd Remove unused attributes from the date time picker element 2017-07-04 10:32:30 +02:00
Eric Lippmann a5990d4de8 Add date and time form elements 2017-07-03 15:03:26 +02:00
Johannes Meyer f6166b3ab6 ActionController: Allow to control which inline view script to use
This also affects that rerendering the layout does only have any effect
in case of XHR requests and is not overwritten anymore in this case.
Since this property was previously private, this should not break anything.
2017-06-28 11:14:01 +02:00
Johannes Meyer 22223acf1d Controllers: Make all private properties protected
Controllers are neither library stuff nor any vital part that need to be
protected from too adventurous module developers.
2017-06-28 09:51:28 +02:00
Johannes Meyer 8ee6e763a6 ActionController: Ensure to utilize the response to redirect and exit 2017-06-19 09:11:12 +02:00
Johannes Meyer df04c0f837 ActionController: Introduce constant DEFAULT_TITLE
Controllers are now allowed to fully customize the page title.
2017-06-09 11:13:37 +02:00
Johannes Meyer 8a890a4a82 ActionController: Allow controllers to customize the login route 2017-05-19 08:39:11 +02:00
Noah Hilverling b0221c5e13 Form: Preserve default if element has attribute 'disabled'
fixes #2509
2017-02-14 10:18:56 +01:00
Alexander A. Klimov 96f0a8c24e FilterEditor: escape values correctly
refs #12330
2017-02-09 17:50:49 +01:00
Johannes Meyer 181e2ef05c Swag: Fix swag (aka a whole bunch of code style issues..) 2017-01-27 14:48:59 +01:00
Michael Friedrich 08a82daea3 Update to icinga.com
refs #2687
2017-01-18 12:04:43 +01:00
Johannes Meyer 0716f87852 Update german translation 2016-12-13 13:57:27 +01:00
Eric Lippmann a78ac6dfab Hide announcements when they have expired
refs #11198
2016-12-13 11:04:56 +01:00
Eric Lippmann 626afbd5ec Merge branch 'bugfix/always-use-the-jquery-find-method-w/-node-context-10704'
fixes #10704
2016-12-08 17:15:02 +01:00
Eric Lippmann 0e69ce4544 Remove obsolete class dropdown from the close-container-control 2016-12-08 16:55:33 +01:00
Eric Lippmann fed0fc9608 Merge branch 'feature/fold-and-unfold-filter-by-click-12634'
resolves #12634
2016-12-08 14:30:55 +01:00
Eric Lippmann 5661dfa63c Harden import of vendor JavaSript libs
fixes #12328
2016-12-08 10:40:22 +01:00
Eric Lippmann b3bc1b6f81 Let the SummaryNavigationItemRenderer show the worst state
fixes #11185
2016-12-08 10:40:22 +01:00
Alexander A. Klimov 8c2b6ae665 Conform to coding guidelines
refs #12634
2016-12-07 18:33:26 +01:00
Alexander A. Klimov 69c8ed471b FilterEditor: add possibility to fold and unfold filter by click
refs #12634

Signed-off-by: Alexander A. Klimov <alexander.klimov@icinga.com>
2016-12-07 18:26:45 +01:00
Alexander A. Klimov 4205eb4cc9 nl2br helper: convert also raw newlines 2016-12-05 13:33:11 +01:00
Eric Lippmann e549c44247 Don't show exception when no announcement has been created
refs #11198
2016-11-29 16:32:30 +01:00
Eric Lippmann 39c7451664 Implement announcements
refs #11198
2016-11-29 15:24:34 +01:00
Eric Lippmann a9461ada54 Only render a menu item when it's not empty
A menu item is not empty when it either has children or a defined URL.
2016-11-28 14:56:17 +01:00
Eric Lippmann 3d6e804ff3 Merge branch 'feature/include-check-if-chosen-locale-is-available-11820'
resolves #11820
2016-11-17 11:23:49 +01:00
Eric Lippmann 95cbb61987 Add parameter markAsError to Form::warning() and Form::error()
refs #11820
2016-11-17 11:21:58 +01:00
Johannes Meyer e75bfbc197 Response: Add ;charset=UTF-8 to the default content type
resolves #13117
2016-11-15 13:30:16 +01:00
Johannes Meyer 0ef81a2e0b Response: Use a constant for the default content type
There is already setHeader() to adjust this dynamically.

refs #12161
2016-11-09 11:38:04 +01:00
Eric Lippmann 2b060d9bd4 Challenge API requests only if the controller requires auth
fixes #12580
2016-11-07 10:40:38 +01:00
Johannes Meyer d207dcbd03 Url: Throw ProgrammingError when trying to use Url::from* on the CLI
refs #7051
2016-10-28 11:47:45 +02:00
Noah Hilverling e4324605bc Merge branch 'bugfix/username-and-password-not-being-passed-in-navigation-item-urls-12133'
fixes #12133
2016-10-20 09:30:54 +02:00
Noah Hilverling 1ff3149636 Url: Add basePath to urlString if url is external or has a username
refs #12133
2016-10-19 09:41:03 +02:00
Noah Hilverling 2fd1a957a8 Url: Add basePath to baseUrl in method getBaseUrl
refs #12133
2016-10-19 09:40:08 +02:00
Noah Hilverling 13827c79e4 Url: Improve documentation of method setHost
refs #12133
2016-10-19 09:35:40 +02:00
Alexander A. Klimov 00880710ed Navigation::fromArray(): pass $name only as string to addItem()
fixes #12923
2016-10-18 18:06:51 +02:00
Noah Hilverling 3b6b0b8d4b Url: Build full urlString instead of path if username is set
refs #12133
2016-10-18 16:19:24 +02:00
Noah Hilverling a952a400ca Url: Add username and password to method getBaseUrl
refs #12133
2016-10-18 16:16:13 +02:00
Noah Hilverling 9fcc39e0ba Url: Add use of method setBasePath in method setBaseUrl
refs #12133
2016-10-18 16:15:14 +02:00
Noah Hilverling 08719b0522 Url: Do not try to set attributes in method fromPath if not needed
refs #12133
2016-10-18 16:13:37 +02:00
Noah Hilverling b4aca4737b Url: Cut of "/" and spaces at the end of basePath in setBasePath
refs #12133
2016-10-18 16:08:34 +02:00
Noah Hilverling 1c55351460 Url: Remove "/" in front of path if the url has a user parameter
refs #12133
2016-10-18 16:07:13 +02:00
Noah Hilverling dda7311226 Url: Improve documentation
refs #12133
2016-10-18 16:03:31 +02:00
Noah Hilverling 4e64c02078 Url: Remove attribute baseUrl
refs #12133
2016-10-18 16:01:23 +02:00
Noah Hilverling 4dd9c05882 Url: Return basePath in method getBaseUrl if url is internal
refs #12133
2016-10-18 12:57:02 +02:00
Noah Hilverling f6f90822d6 Url: Set basePath correctly in methods fromRequest and fromPath
refs #12133
2016-10-18 12:57:02 +02:00
Noah Hilverling 888ac98007 Response: Improve documentation for method getHeader
refs #12161
2016-10-18 11:07:24 +02:00
Noah Hilverling e5c736aab4 Response: Use method getHeader to check if Content-Type is set already
refs #12161
2016-10-18 10:13:58 +02:00
Noah Hilverling f95c789353 Response: Add method getHeader
refs #12161
2016-10-18 09:58:33 +02:00
Noah Hilverling c927c32442 Response: Only set header Content-Type in method prepare if not already set
refs #12161
2016-10-17 16:34:07 +02:00
Noah Hilverling 703561f874 JsonResponse: Set content type at initialization and not at sendHeaders
refs #12161
2016-10-17 16:33:51 +02:00
Noah Hilverling c3276d4341 Response: Remove empty line after method getContentType
refs #12161
2016-10-17 16:03:33 +02:00
Noah Hilverling 2439460371 Url: Fix incorrect line indentation in method getAbsoluteUrl
refs #12133
2016-10-17 10:16:03 +02:00
Noah Hilverling 4df9696ed9 StyleSheet: Modify send method to use setContentType of Response class
refs #12161
2016-10-17 08:29:51 +02:00
Noah Hilverling af5c578adf Response: Set header Content-Type for every response by default
refs #12161
2016-10-14 16:16:13 +02:00
Noah Hilverling 7cf6b860b5 Response: Add contentType attribute
refs #12161
2016-10-14 16:12:47 +02:00
Noah Hilverling 9439dfa8f3 Url: Fix path handling for internal urls
refs #12133
2016-10-14 15:05:34 +02:00
Noah Hilverling ef359aa686 Url: Improve documentation
refs #12133
2016-10-14 15:04:03 +02:00
Noah Hilverling 3e2f3c8467 Url: Add basePath attribute
refs #12133
2016-10-14 15:01:03 +02:00
Jennifer Mourek 0cd2d98f71 StyleSheet: Don't try to load the icinga default theme
refs #12660
2016-10-14 13:24:17 +02:00
Jennifer Mourek 8294471253 Revert "LessCompiler: Remove error message when switching to Icinga theme"
This reverts commit 2e24833d7c.
2016-10-14 09:39:24 +02:00
Jennifer Mourek 2e24833d7c LessCompiler: Remove error message when switching to Icinga theme
fixes #12660
2016-10-14 08:06:05 +02:00
Noah Hilverling f557b89aea Url: Add support for username and password
fixes #12133
2016-10-13 11:01:39 +02:00
Noah Hilverling c868789472 Url: Add alternative attributes for baseUrl
refs #12133
2016-10-13 11:01:10 +02:00
Alexander A. Klimov 8bc7d47a62 Merge branch 'bugfix/preserve-http-response-code-in-rest-error-responses-12583'
fixes #12583
2016-10-11 10:46:20 +02:00
Alexander A. Klimov bf3cfda209 Response: rename setMetaDataFrom() to copyMetaDataFrom()
refs #12583
2016-10-11 10:45:15 +02:00
Eric Lippmann c83659eff7 Sometimes you just herp the derp so hard it herpderps 2016-09-29 16:19:41 +02:00
Alexander A. Klimov 4d16656100 Preserve status code and headers in JSON responses
refs #12583
2016-09-27 13:26:20 +02:00
Johannes Meyer 5b875f3749 JsonResponse: Allow to output the "data" key in case of an error
As stated by the JSend specification this key is optional for error responses.
2016-09-21 15:58:59 +02:00
Alexander A. Klimov c8b1693fdc Fix Controller::assertPermission() allowing everything for unauthenticated requests
fixes #12108
2016-09-12 08:18:36 +02:00
Eric Lippmann ef7be98e0c Simplify InternalUrlValidator::isValid()
refs #11920
2016-09-09 15:22:24 +02:00
Eric Lippmann 1f980f92f2 Optimize imports in InternalUrlValidator
refs #11920
2016-09-09 15:21:06 +02:00
Alexander A. Klimov fa113e023b dashboard/new-dashlet: don't allow external URLs
refs #11920
2016-08-31 15:11:55 +02:00
Eric Lippmann 42991b0756 Ensure correct URL for the refresh container button
Shifted params no longer appear in the URL which is retrieved from the request object.
We now use Url::fromRequest() instead.
2016-07-13 10:24:30 +02:00
Johannes Meyer 4774db16ef View: Add methods setHelperFunction and dropHelperFunction 2016-07-11 09:08:43 +02:00
Eric Lippmann 97451dae86 Merge branch 'bugfix/remove-large-add-to-menu-tab-11850'
fixes #11850
2016-06-02 17:57:51 +02:00
hailthemelody@rm-laptop04 188703cf95 fix various typos
Signed-off-by: Johannes Meyer <johannes.meyer@netways.de>
2016-06-02 08:24:05 +02:00
Alexander A. Klimov 50037d8ec9 Tabs: fix wrong parameter for array_splice()
refs #11850
2016-05-31 14:47:25 +02:00
Alexander A. Klimov 2179c3aaef FilterEditor: check for a hidden form field instead of the submit button 2016-04-27 15:05:25 +02:00
Alexander A. Klimov 6def061742 FilterEditor: correct submit button name 2016-04-27 12:49:40 +02:00
Alexander A. Klimov 281e6e8163 Revert "Revert "FilterEditor::handleRequest(): don't apply a filter's changes if the 'Apply' button hasn't been pressed""
This reverts commit 45a6259b4c.
2016-04-27 12:46:48 +02:00
Alexander A. Klimov 45a6259b4c Revert "FilterEditor::handleRequest(): don't apply a filter's changes if the 'Apply' button hasn't been pressed"
This reverts commit 61a04e7ba1.
2016-04-27 12:10:46 +02:00
Marius Hein 6607af61e1 Set dashboard active if it is not disabled 2016-04-26 13:50:02 +02:00
Alexander A. Klimov eecd15ee68 NavigationItem: fall back to the default renderer if an error occurrs
fixes #10486
2016-04-25 15:26:08 +02:00
Alexander A. Klimov 242cdab754 DateTimePicker: implement getFormat()
refs #10847
2016-04-18 17:19:57 +02:00
Alexander A. Klimov 61a04e7ba1 FilterEditor::handleRequest(): don't apply a filter's changes if the 'Apply' button hasn't been pressed
fixes #10848
2016-04-18 15:15:41 +02:00
Eric Lippmann be7263ebfa Fix that only one default dashboard could be removed
fixes #11078
2016-04-13 12:27:25 +02:00
Eric Lippmann 7dbcd27c3c Remove superfluous whitespace 2016-04-13 11:04:54 +02:00
Eric Lippmann 9082a5204e Fix tab order of refresh and close container controls 2016-04-13 11:04:23 +02:00
Florian Strohmaier 0a9c0925cb CSS: Add space before the autosubmit info in forms 2016-04-07 12:46:13 +02:00
Eric Lippmann c7aec8ae64 Respect module stylesheets again when generating the ETag
fixes #11465
2016-03-29 11:39:41 +02:00
Markus Frosch 88d973ac39 Restrict access to application log with 'application/log' permission
fixes #11279
2016-03-02 20:47:37 +01:00
Eric Lippmann 9c5dfc5207 Merge branch 'bugfix/benchmark-not-always-rendered-10856'
fixes #10856
2016-02-27 22:49:44 +01:00
Eric Lippmann 03d7f3a1f4 Ensure trailing slash if cookie path is detected automatically
Seems like IE (8, 9, ?) has problems w/o the trailing slash and additional directories on the server that start w/ the path.

refs #11187
2016-02-27 22:42:32 +01:00
Eric Lippmann 5f43ac8f26 Fix path, secure flag and domain of session cookies
refs #11187
2016-02-27 22:24:01 +01:00
Eric Lippmann 5f642879c7 Respect cookie domain config in Cookie.php
refs #11187
2016-02-27 22:19:37 +01:00
Eric Lippmann 7cef06f981 Disable benchmark only if the layout is disabled
Benchmark should be disabled if the response is not HTML. This is most likely the case when the layout is disabled.
If Web 2 or Zend sends JSON for example, the layout is disabled.

The follwing code inside an action disables the layout (and view):
$this->_helper->layout()->disableLayout();

The following code inside an action disables the action's view script:
$this->_helper->viewRenderer->setNoRender(true);

Note that an action's view script is also disabled via setNoRender() when rendering another view script via
render() or renderScript().

Another appraoch is to check the content-type. If explicitly set to not HTML, disable benchmark:

$renderBenchmark = true;
$response = $this->getResponse();
$headers = $response->getHeaders();
foreach ($headers as $header) {
    if (strtolower($header['name']) === 'content-type'
        && stristr($header['value'], 'text/html') === false
    ) {
        $renderBenchmark = false;
        break;
    }
}
if ($renderBenchmark) {
    $layout->benchmark = $this->renderBenchmark();
}

Maybe we should also provide a action method for disabling benchmark, regardless of the user's setting.

refs #10856
2016-02-27 20:14:02 +01:00
Eric Lippmann bf7d082576 Fix PHPDoc of Url::addFilter() 2016-02-27 16:25:04 +01:00
Alexander A. Klimov 5b0730574d Simplify Url::addFilter()
This changes the rendered resulting Url from x&(y&z) to x&y&z.

refs #10778
2016-02-27 16:23:09 +01:00
Eric Lippmann 8433bf1fc1 Don't hide the filter editor from the view if the view is compact
refs #10778
2016-02-27 15:57:00 +01:00
Eric Lippmann d8b14cb772 Control whether a filter editor should be rendered via setVisible()
We (may) have situations where a controller or view has to access the filter editor being created via Controller::setupFilterControl().
This is impossible if the view is compact because the filterEditor will be unset. This change introduces FilterEditor::setVisible() for
giving the responsibility of rendering to the filter editor. Controller::setupFilterControl() will be adapted accordingly.

refs #10778
2016-02-27 15:51:13 +01:00
Alexander A. Klimov b7bdf2e8d4 Implement UrlValidator 2016-02-23 16:34:18 +01:00
Johannes Meyer c7443924bd NavigationItemRenderer: Ignore target for '#' urls
fixes #11197
2016-02-22 11:13:23 +01:00
Alexander A. Klimov 9ef78e6856 Fix double escape of `&' in navigation items
fixes #11190
2016-02-19 15:38:34 +01:00
Alexander A. Klimov 41a8c75a4f FilterEditor: always escape filter embedded in HTML 2016-02-19 15:22:10 +01:00
Alexander A. Klimov a83ab2c7cb Escape URLs of navigation items while rendering them
fixes #11091
2016-02-18 15:01:21 +01:00
Thomas Gelf 97b5800f32 LessCompiler: fix #layout usage in module CSS 2016-02-17 18:26:07 +01:00
Alexander A. Klimov c5281935c6 Regenerate a session ID only if the session exists
refs #11151
2016-02-15 11:14:37 +01:00
Alexander A. Klimov 474803fee4 Change all license headers to only reflect a file's year of creation
refs #11000
2016-02-08 15:41:00 +01:00
Eric Lippmann 7fd575080e PHP7: Rename String to StringHelper
refs #10251
2016-01-27 16:46:55 +01:00