Commit Graph

7064 Commits

Author SHA1 Message Date
mhthnz
1dcc6042b6 Initial work on #12419 2016-12-16 00:12:32 +03:00
SilverFire - Dmitry Naumenko
821ba54720 Reordered CHANGELOG 2016-12-15 22:41:02 +02:00
Alexander Makarov
3e03237713 Merge branch 'master' into query-filter-having 2016-12-15 18:04:05 +03:00
Elvira Sheina
bfba0aa711 Refactor validateAttribute method in UniqueValidator (#13202)
* Refactor validateAttribute method in UniqueValidator

Extract prepareParams and prepareQuery from validateAttribute,
so they can be tested separately.

* Added issue number to changelog

* Eliminated unneeded variable

* Renamed methods and parameters, update PHPDocs
2016-12-15 12:23:16 +01:00
Dmitry Naumenko
518be6b8ec Enhanced PHPDocs markup 2016-12-14 23:07:44 +02:00
Alexander Makarov
837b33767c Fixes #11697: Added filterHaving(), andFilterHaving() and orFilterHaving() to yii\db\Query
Signed-off-by: Alexander Makarov <sam@rmcreative.ru>
2016-12-14 23:58:04 +03:00
Konstantin Tsukur
e78a7fe20e Initial work on #11697 2016-12-14 23:57:02 +03:00
SilverFire - Dmitry Naumenko
88f2348ed5 Fixed ActiveRecord::unlinkAll() to respect onCondition()
Closes #12213
2016-12-14 22:51:21 +02:00
Sergey Makinen
da944aa9c0 Rebased "Revamps PageCache to store data in one entry (#10506)" (#12145) 2016-12-14 14:59:00 +03:00
SilverFire - Dmitry Naumenko
a132ee9a08 Fixed order or checks in IpValidator
Fixes #13198
2016-12-13 18:14:04 +02:00
Chris Harris
ae83dd0524 Fixes #13128: Fixed incorrect position of {pos} string in ColumnSchemaBuilder __toString 2016-12-11 23:36:35 +03:00
Dmitry Naumenko
75b98c6b7e Updated PHPDocs for Cache 2016-12-11 21:52:49 +02:00
SilverFire - Dmitry Naumenko
7d494c1915 Fixed unexpected form submit on validate() call
Fixed `validate()` method in `yii.activeForm.js` to prevent unexpected form submit
when `forceValidate` set to `true`

Closes #13105
2016-12-11 21:05:16 +02:00
Robert Korulczyk
8e0af24203 Fix protocol-relative URLs in Url::to() (#13156) (#13157)
* Fix protocol-relative URLs in `Url::to()`

* Use `isRelative()` in `Url::to()`
2016-12-11 20:39:21 +02:00
Zlakomanov Alexander
b8bf0d0c0c added hint into foreign keys query for oracle 11g optimisation
update oci tests
improved varible name

Closes #13122
2016-12-10 20:26:22 +02:00
Alexey Rogachev
d96363674c Added JS tests for yii.captcha.js (#12840), fixes #13159 (#13160)
* Added JS tests for yii.captcha.js (#12840), fixes #13159

* Sinon needs to be imported in similar fashion in other test files

* Added according line to CHANGELOG [skip ci]

* Update CHANGELOG.md

* Try to run tests with default timeout in Travis

* Added note about JS tests to the docs [skip ci]

* Simplified tests for multiple elements (init, destroy methods)
2016-12-10 14:42:28 +02:00
Alexey Rogachev
bd85b7ced2 Closes #6242: Access to validator in inline validation (#13027)
* Closes #6242: Access to validator in inline validation

* Updated PHPDoc according to PR review [skip ci]

* Imrpoved PHPDoc, updated guide info [skip ci]

* Fixes related with PR review

* Corrected CHANGELOG [skip ci]

* Update input-validation.md

added version info
2016-12-08 23:29:53 +01:00
Boudewijn Vahrmeijer
92eee10ae1 Change the name of method getQueryTableName and remove its $query argument (#12893)
* refactores getQueryTableName:
* replaces the $query argument with a $this implementation

* exposes getQueryTableName to be public instead of private. Fixes #12878

* added unit tests for exposed method

* updated changelog

* - methodname changed to 'getTableNameAndAlias'
- scope back to private
- added @internal tag to emphasize that the method is used purely for the internal workings of this piece of software.
- removed changelog (as the API has not changed)

* update tests
2016-12-08 21:22:18 +01:00
Carsten Brandt
65e4a28800 consistent behavior for Yii::$app->controller and ->action (#13167)
Fixed inconsistency, `Yii::$app->controller` is available
after handling the request since 2.0.10, this is now also the case for
`Yii::$app->controller->action`.

fixes #12795
2016-12-08 18:00:05 +01:00
Boudewijn Vahrmeijer
33c27bcf1e Update yii.php
fixes #13169
2016-12-08 16:56:39 +01:00
Nikola Kovacs
f5beaf3edf Make validator getClientOptions public
This allows implementing custom client-side validation
without extending every validator.

Fixes #11163
close #13145
2016-12-08 01:30:36 +01:00
sztyvny
6d005092ac Polish translations for field validation fix (#13153) [skip ci] 2016-12-07 15:06:09 +03:00
Carsten Brandt
48c806fe1c added unit test for DynamicModel::load()
issue #12116
2016-12-07 00:21:00 +01:00
Carsten Brandt
4735d4da6b Update DynamicModel.php
added note about limitations, i.e. no scenarios -> no safe attributes -> no load().
2016-12-07 00:08:08 +01:00
Alexey Rogachev
76e253e140 yii\validators\Validator - added separate methods for client-side validation options
Closes #11163
2016-12-05 22:33:49 +02:00
SilverFire - Dmitry Naumenko
25eafa560e Merge branch '11627-document-and-test-empty-listview' of git://github.com/mytskine/yii2 into mytskine-11627-document-and-test-empty-listview
Conflicts:
	framework/widgets/BaseListView.php
	tests/framework/widgets/ListViewTest.php
2016-12-05 22:19:02 +02:00
Boudewijn Vahrmeijer
7dac3ed1ca Kirkhansen 9053 add radio button column (#13126)
* Added the RadioButtonColumn class and updated the changelog.

* - several enhancements:
- unit tests added
- changelog fixed

* Update CHANGELOG.md

* small markdown fixes

* fix travis: custom ID
2016-12-05 13:58:11 +01:00
Robert Korulczyk
35998449eb Add yii\filters\HostControl::$fallbackHostInfo (#13117) 2016-12-03 08:25:39 +02:00
Carsten Brandt
7fead4f011 Merge pull request #12959 from yiisoft/bash-completion
Added bash completion file for ./yii commands
2016-12-03 01:25:06 +01:00
Carsten Brandt
187c44e43e implement suggestion for unknown command in console application
suggestion is based on two principles:

- first suggest commands the begin with the unknown name, to suggest
  commands after accidentally hitting enter
- second find similar commands by computing the levenshtein distance
  which is a measurement on how many changes need to be made to convert
  one string into another. This is perfect for finding typos.
2016-12-03 01:17:50 +01:00
Carsten Brandt
1d3495d84d Alternative implementation for Unknown command suggestions
alternative implementation for #12661, proof of concept, does not
include filtering by similarity yet.

issue #12659
2016-12-03 01:13:28 +01:00
SilverFire - Dmitry Naumenko
1454d3fa37 Updated CHANGELOG
fixed typo
2016-12-03 00:43:14 +01:00
SilverFire - Dmitry Naumenko
4454d05410 Added ZSH completion, moved scripts to a separate directory 2016-12-03 00:36:40 +01:00
Carsten Brandt
05b17ebb65 Added bash completion file for ./yii commands
This allows to auto-complete commands available by the `./yii`
executable on the bash by expanding the first argument with the TAB key.
E.g. Typing `./yii [TAB]` will list all commands. `./yii mig[TAB]` will
auto-complete to `./yii migrate` and tab after that will list all
migration sub-commands(actions).

fixes #475
2016-12-03 00:36:40 +01:00
Carsten Brandt
612afdbc66 Merge pull request #13111 from yiisoft/js-tests
Making JS tests ready to go into master.
2016-12-02 22:35:35 +01:00
Alexander Makarov
954c771fdb Code cleanup (#13113)
* Simplified code branching, named variable better

* More simple code cleanup

* More consistent line breaks before return statemetns
2016-12-03 00:15:53 +03:00
Boudewijn Vahrmeijer
9c0e94efea Update CHANGELOG.md
typo
2016-12-02 21:53:08 +01:00
Alexander Makarov
e1b0cb4343 Merge branch 'master' into aria-required-and-aria-invalid-input-attributes 2016-12-02 23:38:55 +03:00
Alexander Makarov
0b9feb28e5 More renaming, removed unnecessary code 2016-12-02 16:59:01 +03:00
SilverFire - Dmitry Naumenko
437825be70 Implemented Container::setDependencies(), Container::setDefinitions
Closes #11758
Closes #13029
2016-12-02 15:08:24 +02:00
Klimov Paul
c17766181f Added QueryInterface::emulateExecution()
Added `QueryInterface::emulateExecution()`, which allows preventing of
the actual query execution.
This allows to cancel `DataProvider` preventing search query execution
in case search model is invalid:

``` php
public function search($params)
    {
        $query = Item::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            $query->where('0=1');
            $query->emulateExecution(); // No SQL execution will be done
            return $dataProvider;
        }
```

This also fix unecessary query in case of `via()` usage. See #12390.

fixes #12390
fixes #6373
close #12708
2016-12-02 13:28:51 +01:00
Alexander Makarov
de4f518b94 More renaming 2016-12-02 14:38:44 +03:00
Alexander Makarov
edfbab4a6b More renaming and formatting fix 2016-12-02 14:37:13 +03:00
Alexander Makarov
dc294ba56f Renamed variables, changed logic of turning client updates on 2016-12-02 14:30:13 +03:00
Alexander Makarov
b25ebaa782 Fixed formatting 2016-12-02 13:11:34 +03:00
SilverFire - Dmitry Naumenko
9807b2e1a1 Follow-up to 65c2ade. Smarter fix of #13118 2016-12-02 10:09:08 +02:00
SilverFire - Dmitry Naumenko
65c2ade8ed Fixed handleAction() function in yii.js to handle attribute data-pjax=0 as disabled PJAX
Fixes #13118
2016-12-02 10:04:59 +02:00
Alexander Makarov
ed8acc8e03 #12399 adjustments 2016-12-02 01:44:57 +03:00
a.kompaniets
fb779e3ec6 Fixes #12399: Added ActiveField::addAriaAttributes property for aria-required and aria-invalid attributes rendering 2016-12-02 01:44:34 +03:00
SG5
1141fc81a7 Fixes #12735: Fixed yii\console\controllers\MigrateController creating multiple primary keys for field bigPrimaryKey:unsigned 2016-12-02 01:03:24 +03:00