camel case
This commit is contained in:
committed by
David Callizaya
parent
45547cc385
commit
71d0a39659
5
storage/logs/processmaker-2017-08-14.log
Normal file
5
storage/logs/processmaker-2017-08-14.log
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[2017-08-14 19:51:02] production.ERROR: exception 'pakeException' with message 'Task "create-plugin" is not defined.' in /home/ronald/Projets/html/3.2.2/thirdparty/pake/pakeApp.class.php:167
|
||||||
|
Stack trace:
|
||||||
|
#0 /home/ronald/Projets/html/3.2.2/gulliver/bin/gulliver.php(39): pakeApp->run(NULL, NULL, false)
|
||||||
|
#1 /home/ronald/Projets/html/3.2-current/gulliver/bin/gulliver(64): include('/home/ronald/Pr...')
|
||||||
|
#2 {main}
|
||||||
@@ -124,15 +124,15 @@ class PluginRegistry
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Unregister the plugin in the class
|
* Unregister the plugin in the class
|
||||||
* @param string $Namespace Name Plugin
|
* @param string $namespace Name Plugin
|
||||||
* @return PluginDetail
|
* @return PluginDetail
|
||||||
*/
|
*/
|
||||||
public function unregisterPlugin($Namespace)
|
public function unregisterPlugin($namespace)
|
||||||
{
|
{
|
||||||
$detail = null;
|
$detail = null;
|
||||||
if (isset($this->_aPluginDetails[$Namespace])) {
|
if (isset($this->_aPluginDetails[$namespace])) {
|
||||||
$detail = $this->_aPluginDetails[$Namespace];
|
$detail = $this->_aPluginDetails[$namespace];
|
||||||
unset($this->_aPluginDetails[$Namespace]);
|
unset($this->_aPluginDetails[$namespace]);
|
||||||
}
|
}
|
||||||
return $detail;
|
return $detail;
|
||||||
}
|
}
|
||||||
@@ -1378,15 +1378,15 @@ class PluginRegistry
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the plugin attributes in all workspaces
|
* Update the plugin attributes in all workspaces
|
||||||
* @param string $Workspace Name workspace
|
* @param string $workspace Name workspace
|
||||||
* @param string $Namespace Name of Plugin
|
* @param string $namespace Name of Plugin
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function updatePluginAttributesInAllWorkspaces($Workspace, $Namespace)
|
public function updatePluginAttributesInAllWorkspaces($workspace, $namespace)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
//Set variables
|
//Set variables
|
||||||
$pluginFileName = $Namespace . ".php";
|
$pluginFileName = $namespace . ".php";
|
||||||
|
|
||||||
//Verify data
|
//Verify data
|
||||||
if (!file_exists(PATH_PLUGINS . $pluginFileName)) {
|
if (!file_exists(PATH_PLUGINS . $pluginFileName)) {
|
||||||
@@ -1395,15 +1395,15 @@ class PluginRegistry
|
|||||||
|
|
||||||
//remove old data plugin
|
//remove old data plugin
|
||||||
$pmPluginRegistry = PluginRegistry::loadSingleton();
|
$pmPluginRegistry = PluginRegistry::loadSingleton();
|
||||||
$pluginDetails = $pmPluginRegistry->unregisterPlugin($Namespace);
|
$pluginDetails = $pmPluginRegistry->unregisterPlugin($namespace);
|
||||||
|
|
||||||
//Load plugin attributes
|
//Load plugin attributes
|
||||||
require_once(PATH_PLUGINS . $pluginFileName);
|
require_once(PATH_PLUGINS . $pluginFileName);
|
||||||
|
|
||||||
if (is_array($pluginDetails->getWorkspaces()) && !in_array($Workspace, $pluginDetails->getWorkspaces())) {
|
if (is_array($pluginDetails->getWorkspaces()) && !in_array($workspace, $pluginDetails->getWorkspaces())) {
|
||||||
$pmPluginRegistry->disablePlugin($Namespace);
|
$pmPluginRegistry->disablePlugin($namespace);
|
||||||
}
|
}
|
||||||
$pmPluginRegistry->savePlugin($Namespace);
|
$pmPluginRegistry->savePlugin($namespace);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,17 +10,17 @@ use Propel;
|
|||||||
*/
|
*/
|
||||||
class Cnn
|
class Cnn
|
||||||
{
|
{
|
||||||
private $DBFile;
|
private $dbFile;
|
||||||
private $Workspace;
|
private $workspace;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Establishes connection for the workspace
|
* Establishes connection for the workspace
|
||||||
* @param string $Workspace Name workspace
|
* @param string $workspace Name workspace
|
||||||
*/
|
*/
|
||||||
public static function connect($Workspace)
|
public static function connect($workspace)
|
||||||
{
|
{
|
||||||
$cnn = new static();
|
$cnn = new static();
|
||||||
$cnn->Workspace = $Workspace;
|
$cnn->workspace = $workspace;
|
||||||
Propel::initConfiguration($cnn->buildParams());
|
Propel::initConfiguration($cnn->buildParams());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,8 +42,8 @@ class Cnn
|
|||||||
*/
|
*/
|
||||||
private function readFileDBWorkspace()
|
private function readFileDBWorkspace()
|
||||||
{
|
{
|
||||||
if (file_exists(PATH_DB . $this->Workspace . PATH_SEP . 'db.php')) {
|
if (file_exists(PATH_DB . $this->workspace . PATH_SEP . 'db.php')) {
|
||||||
$this->DBFile = file_get_contents(PATH_DB . $this->Workspace . PATH_SEP . 'db.php');
|
$this->dbFile = file_get_contents(PATH_DB . $this->workspace . PATH_SEP . 'db.php');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -58,7 +58,7 @@ class Cnn
|
|||||||
$phpCode = preg_replace(
|
$phpCode = preg_replace(
|
||||||
'/define\s*\(\s*[\x22\x27](.*)[\x22\x27]\s*,\s*(\x22.*\x22|\x27.*\x27)\s*\)\s*;/i',
|
'/define\s*\(\s*[\x22\x27](.*)[\x22\x27]\s*,\s*(\x22.*\x22|\x27.*\x27)\s*\)\s*;/i',
|
||||||
'$$1 = $2;',
|
'$$1 = $2;',
|
||||||
$this->DBFile
|
$this->dbFile
|
||||||
);
|
);
|
||||||
$phpCode = str_replace(['<?php', '<?', '?>'], '', $phpCode);
|
$phpCode = str_replace(['<?php', '<?', '?>'], '', $phpCode);
|
||||||
|
|
||||||
@@ -102,21 +102,21 @@ class Cnn
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the DSN string to be used by PROPEL
|
* Builds the DSN string to be used by PROPEL
|
||||||
* @param string $Adapter
|
* @param string $adapter
|
||||||
* @param string $Host
|
* @param string $host
|
||||||
* @param string $Name
|
* @param string $name
|
||||||
* @param string $User
|
* @param string $user
|
||||||
* @param string $Pass
|
* @param string $pass
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function buildDsnString($Adapter, $Host, $Name, $User, $Pass)
|
private function buildDsnString($adapter, $host, $name, $user, $pass)
|
||||||
{
|
{
|
||||||
$Dsn = $Adapter . "://" . $User . ":" . $Pass . "@" . $Host . "/" . $Name;
|
$dns = $adapter . "://" . $user . ":" . $pass . "@" . $host . "/" . $name;
|
||||||
switch ($Adapter) {
|
switch ($adapter) {
|
||||||
case 'mysql':
|
case 'mysql':
|
||||||
$Dsn .= '?encoding=utf8';
|
$dns .= '?encoding=utf8';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return $Dsn;
|
return $dns;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user