mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 11:05:46 +02:00
IMPR: Show available space on server test
This commit is contained in:
parent
146231c127
commit
e6f658f8d0
@ -140,7 +140,7 @@ class SaveAllButton implements GridField_HTMLProvider, GridField_ActionProvider
|
|||||||
$list->each(function ($item) {
|
$list->each(function ($item) {
|
||||||
if ($item->hasExtension('Versioned')) {
|
if ($item->hasExtension('Versioned')) {
|
||||||
$item->writeToStage('Stage');
|
$item->writeToStage('Stage');
|
||||||
$item->publish('Stage', 'Live');
|
$item->copyVersionToStage('Stage', 'Live');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,10 @@ class TestServer extends BuildTask
|
|||||||
|
|
||||||
|
|
||||||
if (is_writable(TEMP_FOLDER)) {
|
if (is_writable(TEMP_FOLDER)) {
|
||||||
echo self::success('TMP (cache) dir <b>'.TEMP_FOLDER.'</b> dir is writable.');
|
echo self::success(
|
||||||
|
'TMP (cache) dir <b>'.TEMP_FOLDER.'</b> dir is writable.'
|
||||||
|
.'Available space: '.self::formatBytes(disk_free_space(TEMP_FOLDER))
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
echo self::error('TMP (cache) dir <b>'.TEMP_FOLDER.'</b> dir is no writable!');
|
echo self::error('TMP (cache) dir <b>'.TEMP_FOLDER.'</b> dir is no writable!');
|
||||||
}
|
}
|
||||||
@ -75,7 +78,10 @@ class TestServer extends BuildTask
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_writable(ASSETS_DIR)) {
|
if (is_writable(ASSETS_DIR)) {
|
||||||
echo self::success('Assets dir <b>'.ASSETS_DIR.'</b> dir is writable.');
|
echo self::success(
|
||||||
|
'Assets dir <b>'.ASSETS_DIR.'</b> dir is writable.'
|
||||||
|
.'Available space: '.self::formatBytes(disk_free_space(ASSETS_DIR))
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
echo self::error('Assets dir <b>'.ASSETS_DIR.'</b> dir is no writable!');
|
echo self::error('Assets dir <b>'.ASSETS_DIR.'</b> dir is no writable!');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user