Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
b9287abf
Commit
b9287abf
authored
Mar 17, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fixes.
parent
c3ce904a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
Application.php
framework/base/Application.php
+4
-0
ActiveRecord.php
framework/db/ActiveRecord.php
+3
-0
No files found.
framework/base/Application.php
View file @
b9287abf
...
...
@@ -124,6 +124,10 @@ abstract class Application extends Module
* 'name' => 'extension name',
* 'version' => 'version number',
* 'bootstrap' => 'BootstrapClassName',
* 'alias' => [
* '@alias1' => 'to/path1',
* '@alias2' => 'to/path2',
* ],
* ]
* ~~~
*/
...
...
framework/db/ActiveRecord.php
View file @
b9287abf
...
...
@@ -8,6 +8,7 @@
namespace
yii\db
;
use
Yii
;
use
yii\base\InvalidConfigException
;
use
yii\helpers\Inflector
;
use
yii\helpers\StringHelper
;
...
...
@@ -376,6 +377,7 @@ class ActiveRecord extends BaseActiveRecord
public
function
insert
(
$runValidation
=
true
,
$attributes
=
null
)
{
if
(
$runValidation
&&
!
$this
->
validate
(
$attributes
))
{
Yii
::
info
(
'Model not inserted due to validation error.'
,
__METHOD__
);
return
false
;
}
$db
=
static
::
getDb
();
...
...
@@ -493,6 +495,7 @@ class ActiveRecord extends BaseActiveRecord
public
function
update
(
$runValidation
=
true
,
$attributes
=
null
)
{
if
(
$runValidation
&&
!
$this
->
validate
(
$attributes
))
{
Yii
::
info
(
'Model not updated due to validation error.'
,
__METHOD__
);
return
false
;
}
$db
=
static
::
getDb
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment