reset system apps

This commit is contained in:
zotlabs 2018-12-29 14:40:10 -08:00
parent a0fae60363
commit ff4b1331db
2 changed files with 26 additions and 1 deletions

25
Zotlabs/Update/_1225.php Normal file
View file

@ -0,0 +1,25 @@
<?php
namespace Zotlabs\Update;
use Zotlabs\Lib\Apps;
class _1225 {
function run() {
q("delete from app where app_channel = 0");
$apps = Apps::get_system_apps(false);
if($apps) {
foreach($apps as $app) {
$app['uid'] = 0;
$app['guid'] = hash('whirlpool',$app['name']);
$app['system'] = 1;
self::app_install(0,$app);
}
}
return UPDATE_SUCCESS;
}
}

View file

@ -35,7 +35,7 @@ require_once('include/items.php');
define ( 'STD_VERSION', '2.1' );
define ( 'ZOT_REVISION', '6.0' );
define ( 'DB_UPDATE_VERSION', 1224 );
define ( 'DB_UPDATE_VERSION', 1225 );
define ( 'PROJECT_BASE', __DIR__ );