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
|
||||
* @param string $Namespace Name Plugin
|
||||
* @param string $namespace Name Plugin
|
||||
* @return PluginDetail
|
||||
*/
|
||||
public function unregisterPlugin($Namespace)
|
||||
public function unregisterPlugin($namespace)
|
||||
{
|
||||
$detail = null;
|
||||
if (isset($this->_aPluginDetails[$Namespace])) {
|
||||
$detail = $this->_aPluginDetails[$Namespace];
|
||||
unset($this->_aPluginDetails[$Namespace]);
|
||||
if (isset($this->_aPluginDetails[$namespace])) {
|
||||
$detail = $this->_aPluginDetails[$namespace];
|
||||
unset($this->_aPluginDetails[$namespace]);
|
||||
}
|
||||
return $detail;
|
||||
}
|
||||
@@ -1378,15 +1378,15 @@ class PluginRegistry
|
||||
|
||||
/**
|
||||
* Update the plugin attributes in all workspaces
|
||||
* @param string $Workspace Name workspace
|
||||
* @param string $Namespace Name of Plugin
|
||||
* @param string $workspace Name workspace
|
||||
* @param string $namespace Name of Plugin
|
||||
* @throws Exception
|
||||
*/
|
||||
public function updatePluginAttributesInAllWorkspaces($Workspace, $Namespace)
|
||||
public function updatePluginAttributesInAllWorkspaces($workspace, $namespace)
|
||||
{
|
||||
try {
|
||||
//Set variables
|
||||
$pluginFileName = $Namespace . ".php";
|
||||
$pluginFileName = $namespace . ".php";
|
||||
|
||||
//Verify data
|
||||
if (!file_exists(PATH_PLUGINS . $pluginFileName)) {
|
||||
@@ -1395,15 +1395,15 @@ class PluginRegistry
|
||||
|
||||
//remove old data plugin
|
||||
$pmPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$pluginDetails = $pmPluginRegistry->unregisterPlugin($Namespace);
|
||||
$pluginDetails = $pmPluginRegistry->unregisterPlugin($namespace);
|
||||
|
||||
//Load plugin attributes
|
||||
require_once(PATH_PLUGINS . $pluginFileName);
|
||||
|
||||
if (is_array($pluginDetails->getWorkspaces()) && !in_array($Workspace, $pluginDetails->getWorkspaces())) {
|
||||
$pmPluginRegistry->disablePlugin($Namespace);
|
||||
if (is_array($pluginDetails->getWorkspaces()) && !in_array($workspace, $pluginDetails->getWorkspaces())) {
|
||||
$pmPluginRegistry->disablePlugin($namespace);
|
||||
}
|
||||
$pmPluginRegistry->savePlugin($Namespace);
|
||||
$pmPluginRegistry->savePlugin($namespace);
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
|
||||
@@ -10,17 +10,17 @@ use Propel;
|
||||
*/
|
||||
class Cnn
|
||||
{
|
||||
private $DBFile;
|
||||
private $Workspace;
|
||||
private $dbFile;
|
||||
private $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->Workspace = $Workspace;
|
||||
$cnn->workspace = $workspace;
|
||||
Propel::initConfiguration($cnn->buildParams());
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ class Cnn
|
||||
*/
|
||||
private function readFileDBWorkspace()
|
||||
{
|
||||
if (file_exists(PATH_DB . $this->Workspace . PATH_SEP . 'db.php')) {
|
||||
$this->DBFile = file_get_contents(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');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -58,7 +58,7 @@ class Cnn
|
||||
$phpCode = preg_replace(
|
||||
'/define\s*\(\s*[\x22\x27](.*)[\x22\x27]\s*,\s*(\x22.*\x22|\x27.*\x27)\s*\)\s*;/i',
|
||||
'$$1 = $2;',
|
||||
$this->DBFile
|
||||
$this->dbFile
|
||||
);
|
||||
$phpCode = str_replace(['<?php', '<?', '?>'], '', $phpCode);
|
||||
|
||||
@@ -102,21 +102,21 @@ class Cnn
|
||||
|
||||
/**
|
||||
* Builds the DSN string to be used by PROPEL
|
||||
* @param string $Adapter
|
||||
* @param string $Host
|
||||
* @param string $Name
|
||||
* @param string $User
|
||||
* @param string $Pass
|
||||
* @param string $adapter
|
||||
* @param string $host
|
||||
* @param string $name
|
||||
* @param string $user
|
||||
* @param string $pass
|
||||
* @return string
|
||||
*/
|
||||
private function buildDsnString($Adapter, $Host, $Name, $User, $Pass)
|
||||
private function buildDsnString($adapter, $host, $name, $user, $pass)
|
||||
{
|
||||
$Dsn = $Adapter . "://" . $User . ":" . $Pass . "@" . $Host . "/" . $Name;
|
||||
switch ($Adapter) {
|
||||
$dns = $adapter . "://" . $user . ":" . $pass . "@" . $host . "/" . $name;
|
||||
switch ($adapter) {
|
||||
case 'mysql':
|
||||
$Dsn .= '?encoding=utf8';
|
||||
$dns .= '?encoding=utf8';
|
||||
break;
|
||||
}
|
||||
return $Dsn;
|
||||
return $dns;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user