Commit Graph

3742 Commits

Author SHA1 Message Date
Luke Towers 8df92f4ba1 Merge branch 'develop' of https://github.com/octobercms/october into develop 2018-04-05 22:10:59 -06:00
Luke Towers 5cbadd447a Fix typo in 97e156d43d 2018-04-05 22:10:43 -06:00
Samuel Georges 2164c07616 Preserve multi field types with trigger use
Refs #3195
Refs #2861
Refs https://github.com/daftspunk/oc-test-plugin/pull/41
2018-04-06 10:58:56 +10:00
Samuel Georges 97e156d43d Tidy up logic from #3465, move helper functions out 2018-04-04 14:35:29 +10:00
Pierre-André Vullioud cc082d0510 Return empty from Backend::dateTime instead of current date (#3246)
This changes Backend::dateTime to return an empty string instead of the current date when dealing with a null date. It should only affect the date field preview instance. Credit to @pvullioud
2018-03-30 10:06:47 -06:00
Luke Towers df5b2afc06
Re-add Backend facade 2018-03-24 09:19:30 -06:00
Arthur Kushman c78b3ef786 Code formatting changes (#3363)
Code formatting improvements submitted by @arthurkushman.
2018-03-22 10:55:13 -06:00
MartynasJanu 13dadaa667 Set trigger targets arbitrary levels above current form context (#3465)
Fixes #3260. Enables setting the target field for the trigger API to a form context an arbitrary number of levels above the current field by prepending the field name with `^` for each level to go up. For instance, if you had a field [allow_pictures] in the base form and a [records] repeater with [image] fields, and you set the target field for the trigger on [image] to [^allow_pictures] then it would work properly instead of looking for an [allow_pictures] field on the [records] field. Credit to @MartynasJanu. Documented in edc78b584b
2018-03-21 23:25:18 -06:00
Sergey Karavay 4a2e959fb8 Fixed Russian map for "щ" and added Belarusian map (#3463)
Credit to @GinoPane
2018-03-21 11:22:59 -06:00
Luke Towers 23a504d9d5
Allow settings models and controllers to be defined in one definition
This change allows both settings models and custom settings controllers to be registered in one definition by preventing overwriting of the provided `url` when present. This enables the use case of extending the base \System\Controllers\Settings controller to implement custom functionality on your settings controller while retaining the majority of the default functionality enabled through the use of a SettingsModel.
2018-03-20 13:40:14 -06:00
Mohamed Ali Behiry e3635b80e7 Added partial Arabic translation (#3296)
Credit to @mabehiry
2018-03-20 13:20:09 -06:00
Raja Khoury d977ba54b5 Fixes S3 media items in bucket root folders (#3461)
FIxes #3445. Credit to @rajakhoury
2018-03-20 10:57:13 -06:00
Miro Rauhala 610452078d Update Finnish translations (#3460)
Credit to @mirorauhala
2018-03-19 15:36:53 -06:00
Mateusz Charytoniuk 318e9d7e76 Import CSV rows one at a time (#3450)
Credit @mcharytoniuk.

While importing over 250k records ImportModel kept running into various problems. One of them was too big memory usage - `ImportModel` loaded the complete file upfront (`$reader->fetchAll()`). Simple one-line change to `$reader->fetch()` makes `ImportModel` import CSV file row-by-row and returning an iterator which limits memory usage and allows data to be imported. This change optimizes memory usage and allows much simpler importing of larger files.
2018-03-14 12:53:18 -06:00
CaptainTF 7a6f1d3c85 Improved Simplified Chinese (zh-CN) translation (#3447)
Credit to @CaptainTF
2018-03-12 23:26:34 -06:00
Luke Towers 422a99770c
Attach uploaded files directly to parent if exists
If the parent of the file attachment relationship already exists, then attach the file directly to it in this request instead of going through deferred bindings. Will continue to attach files through deferred binding if the parent relation doesn't exist.
2018-03-09 23:47:16 -06:00
Luke Towers f056e8dcb2
Retrieve protected files using the defined file model
Adds support to retrieve protected files using the class they are defined to be using if that class differs from the default System\Models\File class. This makes it possible to use a custom class extending the base file model class that does output processing on the file data (for example, an EncryptedFile class that has to decrypt the file contents before they can be output to the browser).
2018-03-09 23:07:53 -06:00
Tobias Kündig 55d49cbf2b Cache the last visited page in the list widget (#3432)
Stores the last visited page of list widgets in the session to restore to on next page load. Does not apply when filters / searches are applied. Credit to @tobias-kuendig
2018-03-08 10:52:21 -06:00
Alexander Shapoval 13596c8629 Add Cache-Control header to combined assets (#3430)
Related: #2474
2018-03-06 08:31:37 -06:00
Luke Towers 2f55850ae9
Merge pull request #3379 from octobercms/ux-pluginmanagement
Fixes #2714, #2774.

Plugin Management UX Improvements
The plugin management screen has been improved to allow managing the status of plugins (updates disabled/enabled, plugin enabled/disabled) on the overview page and allow bulk management of plugins as well. Additionally, the Reset Plugin Data action has been added to the bulk action menu; this is essentially the same as calling `php artisan plugin:refresh Author.Plugin`, which reverses all the migrations for that plugin then reapplies them; effectively reseting the plugin's database data. Due to the destructive nature of this action it has been limited to only be available to Super Users and only when the site is in debug mode.

Thanks to @Teranode for his assistance on this.
2018-03-04 22:42:18 -06:00
Luke Towers 89f9c51f55 Make the Reset Plugin Data action available to only SuperUsers only when the site is in debug mode 2018-03-04 22:34:49 -06:00
interworks-morr 0206a6811f Improve cache reliability (#3421)
Reported and fixed by @interworks-morr: 
"Occasionally with certain IIS setups, the file will contain an out-of-date class name. This patch will verify the class name from the file before returning, and clear the cache if invalid."
2018-03-02 20:00:05 -06:00
Alexander Shapoval 7552464779 Updated Russian Translations (#3414)
Credit to @PopcornPHP
2018-02-25 21:25:12 -06:00
Luke Towers 3d18e5d466 Fixes #3412. Prevent users from being able to modify their own groups. 2018-02-23 13:41:11 -06:00
Ramin Firooz 8ba63dd428 Updated Farsi Translation (#3404)
Credit to @EleRam
2018-02-17 17:12:34 -06:00
Luke Towers bd9f88587f
Fix issues with MySQL utf8mb4 support
Fixes: https://github.com/octobercms/october/issues/1927. Related: https://github.com/laravel/framework/issues/17508. Issue occurs when database configuration related to full support for the utf8mb4 charset is incorrect; MySQL > 5.7 & MariaDB > 10.2 doesn't have this issue because they default to the correct configuration values; this fix solves the issue for older versions of MySQL and MariaDB without requiring database server configuration changes.

The root cause of the issue with the utf8mb4 encoding is that both InnoDB and MyISAM have too low of an index key prefix limit (767 bytes and 1000 bytes respectively) to properly store 255 4-byte characters; which would take 1024 bytes. See the docs on InnoDB limitations: https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html

In MySQL >= 5.7 & MariaDB >= 10.2 this limit has been bumped to 3076 bytes by the changing of the default value of the `innodb_large_prefix` configuration property (introduced in MySQL 5.5) to true; which is what bumps up the limit. In order to manually set that property to true on earlier versions, `innodb_file_format` must be set to `BARRACUDA` and `row_format` must be `DYNAMIC` or `COMPRESSED`. See http://mechanics.flite.com/blog/2014/07/29/using-innodb-large-prefix-to-avoid-error-1071/ for more information. 

This change fixes the issue by changing the default string length to 191 (total of 764 bytes, within the older size limit) when the MySQL database config is detected to be using the utf8mb4 charset.
2018-02-17 17:00:32 -06:00
Sajjad Servatjoo 708b1e3a75 Update Persian Language (#3396)
Credit to @sajjad-ser
2018-02-13 10:55:06 -06:00
Alex360hd 687f97f792 Remove loader background color (#3394)
Fixes #3393. Credit to @Alex360hd
2018-02-13 10:51:39 -06:00
Luke Towers 9840ff228f
Support absolute redirects in the formcontroller
Supports absolute redirects being used in the FormController behaviour.

If the form_config.yaml specifies 
```twig
create:
    redirect: https://api.example.com/oauth/authorize
```
Then the behaviour will now properly redirect the user to the URL provided where previously it would redirect to a url along the lines of `october.example.com/backend/https://api.example.com/oauth/authorize`. Relative backend redirect URLs are unchanged.
2018-02-06 14:42:24 -06:00
Luke Towers a916d99de4
Prevent indexing of backend login page
Refs: 77ae173c24
2018-02-02 15:00:49 -06:00
Luke Towers 77ae173c24
Prevent indexing of backend pages
Fixes #3380
2018-02-02 13:35:59 -06:00
Luke Towers 2f7cc96b6d
Improve status check
Only check for a writable themes directory if the Cms module is loaded.
2018-02-02 13:23:53 -06:00
Luke Towers fd47e455c0 Revised plugin mangement bulk action iconography 2018-02-02 00:25:57 -06:00
Luke Towers 9b66eb5c57 Improvements to frontend assets for plugin management 2018-02-01 20:52:47 -06:00
Luke Towers e64a280cee Simplified plugin management logic, switched default manage plugins switch state to positive; finalized for merging into develop 2018-02-01 20:40:04 -06:00
Luke Towers 61914666f8 Iconography and language improvements for bulk plugin management 2018-02-01 20:07:33 -06:00
Christian cc81ab25fa Preparing for Plugin Management UX (#3374)
Initial work on Plugin Management UX improvements by @Teranode for #2714
2018-02-01 18:16:31 -06:00
Matteo 678916854e Add config to enable Twig strict_variables (#3370)
Adds the cms.enableTwigStrictVariables config option to enable strict_variables in Twig for debugging purposes. See https://twig.symfony.com/doc/2.x/api.html#environment-options. Credit to @matteotrubini
2018-01-26 10:59:45 -06:00
Luke Towers 8cb57cf353
Add useRelationCount column property
Adds the `useRelationCount` property to tell the list controller to use the number of related records for the specified `relation` as the value for that column.
2018-01-25 16:54:06 -06:00
Samuel Georges 4eab0670c4 Proxy ConsoleSupportServiceProvider properly
Refs https://github.com/octobercms/october/pull/3353
Refs https://github.com/octobercms/october/issues/3321
Refs https://github.com/octobercms/october/pull/3328
Refs https://github.com/octobercms/october/issues/3359
2018-01-24 18:09:41 +11:00
Ramin Firooz 3c50849eb7 Update Persian Translation (#3367)
Credit to @EleRam
2018-01-21 09:35:02 -06:00
Samuel Georges 45f1714a03 Added key mode to taglist form widget
Alternative implementation #2958
Fixes #2958
2018-01-13 20:49:31 +11:00
Samuel Georges 6ff6ab2996 Convert strings to ::class 2018-01-13 14:40:44 +11:00
Arthur Kushman bbc33710c1 >= PHP7.0 refactoring (#3343)
* Fix loosly comparison to strict + argument types and return types for >=7.0
* Change hard-coded strings to ::class, 
* Fix unit-tests failures - some relative to 7.0 phpunit env deployment
* Fix exception string + format return types
* Change string representation of new classes in traceLog to ::class
Credit to @arthurkushman
2018-01-12 00:23:20 -06:00
Derrick Austin 74b3780ab5 Build Number Bugfix: Console Upgrade (#3357)
Credit to @austinderrick
2018-01-11 11:59:30 -06:00
Szabó Gergő 0256ebc966 Add role filter to administrators (#3350)
Credit to @gergo85
2018-01-10 10:18:19 -06:00
Jan Vince ce864cc8fb Catch Artisan::call exception (#3342)
This change will allow settings to be saved even when Exception is thrown in Artisan::call (eg. when putenv() function is disabled).
Fixes #3339. Related: #3280.
2018-01-08 08:29:43 -06:00
Flakerim Ismani 55ff460895 Added colorpicker column type (#3338)
Renders 30px by 30px square of the selected colour. `type: colorpicker` in the columns config. Credit to @flakerimi
2018-01-04 12:54:30 -06:00
tim0991 0783126249 Better check for default deletion redirect (#3324)
Adds a better check for the default redirect option.
2018-01-01 19:39:25 -06:00
pikanji 54ab6f080a Use cms.storage.uploads.disk instead of filesystem.default
Fixes #3332.
FileUpload widget uploads file to the disk specified by default in config/filesystem.php instead of storage.uploads.disk in config/cms.php, if we use System\Models\File following the instruction in here.
Although we can still create another class extending System\Models\File or October\Rain\Database\Attach\File and use it as the model for attachOne/Many relation, System\Models\File seems to be the one that responsible to look at storage.uploads.disk in config/cms.php, because the existing methods are using storage.uploads.*.
Credit to @pikanji
2018-01-01 17:04:47 -06:00