first commit
This commit is contained in:
29
autoload/admin/controls/class.Update.php
Normal file
29
autoload/admin/controls/class.Update.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user