Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskonsite-архив-перенесен
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Korolev
taskonsite-архив-перенесен
Commits
e65ad2ef
Commit
e65ad2ef
authored
Feb 10, 2016
by
Олег Гиммельшпах
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
799012a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
common/modules/blog/views/post-admin/_form.php
common/modules/blog/views/post-admin/_form.php
+1
-1
console/migrations/m160210_061532_fix_file_columns.php
console/migrations/m160210_061532_fix_file_columns.php
+22
-0
No files found.
common/modules/blog/views/post-admin/_form.php
View file @
e65ad2ef
...
@@ -31,7 +31,7 @@ use common\modules\blog\models\Post;
...
@@ -31,7 +31,7 @@ use common\modules\blog\models\Post;
<?php
if
(
$model
->
preview
)
<?php
if
(
$model
->
preview
)
{
{
echo
Html
::
img
(
\Yii
::
$app
->
params
[
'frontUrl'
]
.
'/uploads/blog/'
.
$model
->
preview
);
echo
Html
::
img
(
\Yii
::
$app
->
params
[
'frontUrl'
]
.
$model
->
preview
);
}
?>
}
?>
<?=
$form
->
field
(
$model
,
'file'
)
->
fileInput
()
?>
<?=
$form
->
field
(
$model
,
'file'
)
->
fileInput
()
?>
...
...
console/migrations/m160210_061532_fix_file_columns.php
0 → 100644
View file @
e65ad2ef
<?php
use
yii\db\Schema
;
use
yii\db\Migration
;
class
m160210_061532_fix_file_columns
extends
Migration
{
// Use safeUp/safeDown to run migration code within a transaction
public
function
safeUp
()
{
$this
->
alterColumn
(
'posts'
,
'preview'
,
Schema
::
TYPE_STRING
.
'(100) DEFAULT NULL'
);
$this
->
alterColumn
(
'co_content'
,
'preview'
,
Schema
::
TYPE_STRING
.
'(100) DEFAULT NULL'
);
$this
->
alterColumn
(
'reviews'
,
'photo'
,
Schema
::
TYPE_STRING
.
'(100) DEFAULT NULL'
);
}
public
function
safeDown
()
{
$this
->
alterColumn
(
'posts'
,
'preview'
,
Schema
::
TYPE_STRING
.
'(60) DEFAULT NULL'
);
$this
->
alterColumn
(
'co_content'
,
'preview'
,
Schema
::
TYPE_STRING
.
'(50) DEFAULT NULL'
);
$this
->
alterColumn
(
'reviews'
,
'photo'
,
Schema
::
TYPE_STRING
.
'(50) DEFAULT NULL'
);
}
}
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