Moving features folders, enabling the ActionsByEmail rest api endpoints

This commit is contained in:
Gustavo Cruz
2015-02-19 17:54:54 -04:00
parent 382d1a57a9
commit c7a7736edf
75 changed files with 607 additions and 43 deletions

View File

@@ -38,7 +38,7 @@ class Installer extends Controller
public function index ($httpData)
{
if ((strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') && (file_exists($this->path_shared . 'partner.info'))){
if ((strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') && (file_exists($this->path_shared . 'partner.info'))) {
$this->includeExtJS( 'installer/stopInstall');
$this->setView( 'installer/mainStopInstall' );
G::RenderPage( 'publish', 'extJs' );
@@ -776,12 +776,14 @@ class Installer extends Controller
$this->mysqlFileQuery( PATH_RBAC_HOME . 'engine/data/mysql/schema.sql' );
$this->mysqlFileQuery( PATH_RBAC_HOME . 'engine/data/mysql/insert.sql' );
$query = sprintf( "USE %s;", $wf_workpace );
$this->mysqlQuery( $query );
$this->mysqlFileQuery( PATH_HOME . 'engine/data/mysql/schema.sql' );
$this->mysqlFileQuery( PATH_HOME . 'engine/data/mysql/insert.sql' );
$this->createMysqlFeatures();
if (defined('PARTNER_FLAG') || isset($_REQUEST['PARTNER_FLAG'])) {
$this->setPartner();
//$this->setConfiguration();
@@ -1624,5 +1626,31 @@ class Installer extends Controller
}
}
}
public function createMysqlFeatures()
{
foreach ($this->getFeatureList() as $feature) {
$this->mysqlFileQuery( $feature->path . '/data/schema.sql' );
$this->mysqlFileQuery( $feature->path . '/data/insert.sql' );
}
}
public function getFeatureList()
{
$invalidFolders = array('ViewContainers');
$featuresFolders = glob(PATH_FEATURES.'/*', GLOB_ONLYDIR);
$features = array();
foreach ($featuresFolders as $directory) {
$feature = new stdClass();
if (in_array($directory, $invalidFolders)) {
continue;
}
$feature->path = PATH_FEATURES . PATH_SEP . $directory;
$feature->name = $directory;
$features[] = $feature;
}
return $features;
}
}