Merged in ronald-quentaprocessmaker/processmaker/HOR-1726 (pull request #4829)
Hor 1726
This commit is contained in:
@@ -135,6 +135,12 @@ class workspaceTools
|
||||
$this->migrateContent($workSpace, $lang);
|
||||
$stop = microtime(true);
|
||||
CLI::logging("<*> Optimizing content data took " . ($stop - $start) . " seconds.\n");
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Clean access and refresh tokens...\n");
|
||||
$this->cleanTokens($workSpace);
|
||||
$stop = microtime(true);
|
||||
CLI::logging("<*> Clean access and refresh tokens took " . ($stop - $start) . " seconds.\n");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3221,6 +3227,19 @@ class workspaceTools
|
||||
}
|
||||
}
|
||||
|
||||
public function cleanTokens($workspace, $lang = SYS_LANG)
|
||||
{
|
||||
$this->initPropel(true);
|
||||
$oCriteria = new Criteria();
|
||||
$oCriteria->add(OauthAccessTokensPeer::ACCESS_TOKEN, 0, Criteria::NOT_EQUAL);
|
||||
$accessToken = OauthAccessTokensPeer::doDelete($oCriteria);
|
||||
CLI::logging("|--> Clean data in table " . OauthAccessTokensPeer::TABLE_NAME . " rows ".$accessToken."\n");
|
||||
$oCriteria = new Criteria();
|
||||
$oCriteria->add(OauthRefreshTokensPeer::REFRESH_TOKEN, 0, Criteria::NOT_EQUAL);
|
||||
$refreshToken = OauthRefreshTokensPeer::doDelete($oCriteria);
|
||||
CLI::logging("|--> Clean data in table " . OauthRefreshTokensPeer::TABLE_NAME . " rows ".$refreshToken."\n");
|
||||
}
|
||||
|
||||
public function migrateIteeToDummytask($workspaceName){
|
||||
$this->initPropel(true);
|
||||
if (!defined("SYS_SYS")) {
|
||||
|
||||
Reference in New Issue
Block a user