Skip to content

Commit

Permalink
Updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Shevchuk authored and Anton Shevchuk committed Oct 3, 2018
1 parent 8120a8c commit 00848f5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion application/models/Media/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function __construct($media, $file)
*/
public function moveToDir($directory)
{
$uploadPath = Config::getModuleData('media', 'upload_path');
$uploadPath = Config::get('module.media', 'upload_path');

if (empty($uploadPath)) {
throw new ConfigException('Upload path is not configured');
Expand Down
2 changes: 1 addition & 1 deletion application/modules/media/views/grid.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if (!$grid) {
<hr style="display: block; clear: both"/>
<div class="card-deck">
<?php foreach ($grid->getData() as $row) : ?>
<div class="card mb-3" style="min-width: 240px; max-width: 240px">
<div class="card mb-3">
<a href="<?= $this->baseUrl($row['file']) ?>" data-ajax-preview>
<img class="card-img-top" src="<?= $this->baseUrl($row['thumb']) ?>" alt="<?= esc($row['title']) ?>">
</a>
Expand Down
11 changes: 11 additions & 0 deletions public/css/media.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,15 @@
max-height: 480px;
overflow-y: scroll;
border: 2px dashed rgba(0, 0, 0, 0.1);
}

.card-deck .card {
min-width: 240px;
max-width: 240px
}

.card-deck .card-img-top {
/*display: block;
min-width: 196px;
max-width: 196px*/
}
4 changes: 2 additions & 2 deletions tests/unit/modules/media/controllers/CrudTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static function tearDownAfterClass()
self::getApp();
{
Db::delete('media')->where('userId = ?', 1)->execute();
$path = Config::getModuleData('media', 'upload_path').'/1';
$path = Config::get('module.media', 'upload_path').'/1';
Tools\Cleaner::delete($path);
}
self::resetApp();
Expand All @@ -67,7 +67,7 @@ public static function tearDownAfterClass()
public function testUploadFile()
{
// get path from config
$path = Config::getData('temp', 'path');
$path = Config::get('temp', 'path');
if (empty($path)) {
throw new Exception('Temporary path is not configured');
}
Expand Down

0 comments on commit 00848f5

Please sign in to comment.