29 lines
718 B
PHP
29 lines
718 B
PHP
<?php
|
|
namespace admin\controls;
|
|
|
|
class Update
|
|
{
|
|
public static function update()
|
|
{
|
|
if ( !\admin\factory\Update::update() )
|
|
\S::alert( 'W trakcie aktualizacji systemu wystąpił błąd. Proszę spróbować ponownie.' );
|
|
else
|
|
\S::set_message( 'Aktualizacja przebiegła pomyślnie.' );
|
|
|
|
header( 'Location: /admin/update/main_view/' );
|
|
exit;
|
|
}
|
|
|
|
public static function updateAll()
|
|
{
|
|
$response['status'] = \admin\factory\Update::update();
|
|
$response['version'] = number_format( \S::get('version_current') + 0.001, 3, '.', '' );
|
|
echo json_encode( $response );
|
|
exit;
|
|
}
|
|
|
|
public static function main_view()
|
|
{
|
|
return \admin\view\Update::main_view();
|
|
}
|
|
} |