appllying changes to the new IDE
Esse commit está contido em:
+24
-1
@@ -1,2 +1,25 @@
|
|||||||
<?php
|
<?php
|
||||||
header('location: ../docs/ide');
|
header('Content-type: text/html; charset=utf-8');
|
||||||
|
?><!DOCTAYPE HTML>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>Mind3rd IDE</title>
|
||||||
|
|
||||||
|
<link type='text/css' rel='stylesheet' href='styles/reset.css' />
|
||||||
|
<link type='text/css' rel='stylesheet' href='styles/default.css' />
|
||||||
|
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
|
||||||
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
if (typeof jQuery == 'undefined')
|
||||||
|
{
|
||||||
|
document.write(unescape("%3Cscript src='scripts/jquery/jquery.js' type='text/javascript'%3E%3C/script%3E"));
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<script src='scripts/default.js'></script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -22,4 +22,5 @@
|
|||||||
default :
|
default :
|
||||||
$_REQ['data']= null;
|
$_REQ['data']= null;
|
||||||
}
|
}
|
||||||
|
|
||||||
include('mind3rd/API/utils/utils.php');
|
include('mind3rd/API/utils/utils.php');
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is part of TheWebMind 3rd generation.
|
||||||
|
*
|
||||||
|
* @author Felipe Nascimento de Moura <felipenmoura@gmail.com>
|
||||||
|
* @license licenses/mind3rd.license
|
||||||
|
*/
|
||||||
|
namespace API;
|
||||||
|
/**
|
||||||
|
* This is a facade to help you getting generic data.
|
||||||
|
* This class offers you a bunch of "shortcuts" to many different data or results.
|
||||||
|
*
|
||||||
|
* @author felipe
|
||||||
|
*/
|
||||||
|
class Get{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a list of installed plugins.
|
||||||
|
*
|
||||||
|
* @param boolean $echoes If the plugins list should be sent to the output
|
||||||
|
* @return Array
|
||||||
|
*/
|
||||||
|
public static function plugins($echoes=false)
|
||||||
|
{
|
||||||
|
return \MindPlugin::listPlugins($echoes);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets an array with all the installed lobes.
|
||||||
|
* @return Array
|
||||||
|
*/
|
||||||
|
public static function lobes()
|
||||||
|
{
|
||||||
|
return \Lobe\Neuron::listLobes();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all the information about the current project.
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function projectData()
|
||||||
|
{
|
||||||
|
$dt= \Mind::$currentProject;
|
||||||
|
return $dt;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a list of identified tables for the current project.
|
||||||
|
* @return Array
|
||||||
|
*/
|
||||||
|
public static function tables()
|
||||||
|
{
|
||||||
|
return \Analyst::getUniverse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an array with all the DDL codes for the current project.
|
||||||
|
* @return Array
|
||||||
|
*/
|
||||||
|
public static function DDL()
|
||||||
|
{
|
||||||
|
$dbDriver= \Mind::$currentProject['database_drive'];
|
||||||
|
\DQB\QueryFactory::setUp($dbDriver);
|
||||||
|
return \DQB\QueryFactory::getCompleteQuery(false, true, 'array');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Returns an array with all the DDL codes for the current project.
|
||||||
|
* This method returns each DDL comand as a decorated command, containing HTML tags.
|
||||||
|
* @return Array
|
||||||
|
*/
|
||||||
|
public static function DecoratedDDL()
|
||||||
|
{
|
||||||
|
$dbDriver= \Mind::$currentProject['database_drive'];
|
||||||
|
\DQB\QueryFactory::setUp($dbDriver);
|
||||||
|
return \DQB\QueryFactory::getCompleteQuery(true, false, 'array');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the currently opened project or false if none.
|
||||||
|
*
|
||||||
|
* @return \MindProject|false
|
||||||
|
*/
|
||||||
|
public static function currentProject()
|
||||||
|
{
|
||||||
|
return \Mind::$project? \Mind::$project:
|
||||||
|
false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets an array with all the source code, for the current project.
|
||||||
|
* @return Array
|
||||||
|
*/
|
||||||
|
public static function source()
|
||||||
|
{
|
||||||
|
return \API\Project::source();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the list of currently instaled idioms.
|
||||||
|
* @return Array
|
||||||
|
*/
|
||||||
|
public static function idioms()
|
||||||
|
{
|
||||||
|
return \Mind::getIdiomsList();
|
||||||
|
}
|
||||||
|
}
|
||||||
+11
-5
@@ -20,26 +20,32 @@
|
|||||||
}
|
}
|
||||||
if(!isset($_REQ['data']))
|
if(!isset($_REQ['data']))
|
||||||
$_REQ['data']= Array();
|
$_REQ['data']= Array();
|
||||||
|
|
||||||
foreach($_POST as $k=>$value)
|
foreach($_POST as $k=>$value)
|
||||||
{
|
{
|
||||||
$_REQ['data'][$k]= preg_replace("/['\"\\\.\/]/", '', $value);
|
$_REQ['data'][$k]= preg_replace("/['\"\\\.\/]/", '', $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_SESSION['currentProject']))
|
if(isset($_SESSION['currentProject']) && $_SESSION['currentProject'])
|
||||||
{
|
{
|
||||||
$p= Array();
|
$p= Array();
|
||||||
$p['pk_project']= $_SESSION['currentProject'];
|
$p['pk_project']= $_SESSION['currentProject'];
|
||||||
$p['name']= $_SESSION['currentProjectName'];
|
$p['name']= $_SESSION['currentProjectName'];
|
||||||
Mind::openProject($p);
|
Mind::openProject($p);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($app))
|
if(isset($app))
|
||||||
{
|
{
|
||||||
if(!isset($_REQ['data']) || !isset($_REQ['data']['program']))
|
if(!isset($_REQ['data']) || !isset($_REQ['data']['program']))
|
||||||
{
|
{
|
||||||
Mind::write('programRequired');
|
if($_MIND->defaults['use_default_ide'] != false){
|
||||||
return false;
|
header('Location: '.$_MIND->defaults['use_default_ide']);
|
||||||
|
exit;
|
||||||
|
}else{
|
||||||
|
Mind::write('programRequired');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
$program= $app->findCommand($_REQ['data']['program']);
|
$program= $app->findCommand($_REQ['data']['program']);
|
||||||
$program= $program->getFileName();
|
$program= $program->getFileName();
|
||||||
|
|||||||
@@ -46,11 +46,12 @@
|
|||||||
}
|
}
|
||||||
$d->close();
|
$d->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// building the application
|
// building the application
|
||||||
define('SYSTEM_NAME', 'mind');
|
define('SYSTEM_NAME', 'mind');
|
||||||
$app= new Symfony\Component\Console\Application(SYSTEM_NAME);
|
$app= new Symfony\Component\Console\Application(SYSTEM_NAME);
|
||||||
|
|
||||||
// defining the programs/commands to be used
|
// defining the programs/commands to be used
|
||||||
$programs= Array();
|
$programs= Array();
|
||||||
$d = dir(_MINDSRC_.'/mind3rd/API/programs');
|
$d = dir(_MINDSRC_.'/mind3rd/API/programs');
|
||||||
@@ -66,6 +67,7 @@
|
|||||||
$d->close();
|
$d->close();
|
||||||
$app->addCommands($programs);
|
$app->addCommands($programs);
|
||||||
\MIND::$programs= $programs;
|
\MIND::$programs= $programs;
|
||||||
|
|
||||||
// starting the application
|
// starting the application
|
||||||
if($_REQ['env']=='shell'){
|
if($_REQ['env']=='shell'){
|
||||||
include(_MINDSRC_.'/mind3rd/API/shell.php');
|
include(_MINDSRC_.'/mind3rd/API/shell.php');
|
||||||
|
|||||||
externo
+3
-1
@@ -43,4 +43,6 @@ fk_prefix="fk_"
|
|||||||
counter_col="counter"
|
counter_col="counter"
|
||||||
; Varchar and Char properties should have mandatorily a size, if none is passed,
|
; Varchar and Char properties should have mandatorily a size, if none is passed,
|
||||||
; the following value will be used as size
|
; the following value will be used as size
|
||||||
default_character_length=255
|
default_character_length=255
|
||||||
|
; should it open an IDE when HTTP requests come with no program param?
|
||||||
|
use_default_ide=ide/
|
||||||
Referência em uma Nova Issue
Bloquear um usuário