diff --git a/.gitignore b/.gitignore index 30362bf99..a4deef11b 100755 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -bproject +nbproject/* workflow/engine/config/paths_installed.php gulliver/thirdparty/html2ps_pdf/cache workflow/engine/content/languages/translations.environments diff --git a/Rakefile b/Rakefile index 6794d1e2e..8c314a6fc 100644 --- a/Rakefile +++ b/Rakefile @@ -192,7 +192,7 @@ def buildPmdynaform(homeDir, targetDir, mode) template += s end - htmlTemplates=["cases_Step_Pmdynaform.html","cases_Step_Pmdynaform_Preview.html","cases_Step_Pmdynaform_View.html"] + htmlTemplates=["pmdynaform.html"] htmlTemplates.each do |htmlTemplate| FileUtils.cp("#{Dir.pwd}/workflow/engine/templates/cases/#{htmlTemplate}", "#{pmdynaformDir}/build/#{htmlTemplate}") diff --git a/framework/src/Maveriks/Extension/Restler/UploadFormat.php b/framework/src/Maveriks/Extension/Restler/UploadFormat.php index feb03b9e1..be0e01655 100644 --- a/framework/src/Maveriks/Extension/Restler/UploadFormat.php +++ b/framework/src/Maveriks/Extension/Restler/UploadFormat.php @@ -20,16 +20,7 @@ class UploadFormat extends Format * * @var array */ - public static $allowedMimeTypes = array( - 'image/jpeg', - 'image/png', - 'image/png', - 'application/octet-stream', - 'text/plain', - 'text/xml', - 'text/html', - 'text/css' - ); + public static $allowedMimeTypes = array(); /** * use it to restrict uploads based on file size * set it to 0 to allow all sizes @@ -40,7 +31,7 @@ class UploadFormat extends Format * * @var int */ - public static $maximumFileSize = 1048576; + public static $maximumFileSize = 0; /** * Your own validation function for validating each uploaded file * it can return false or throw an exception for invalid file diff --git a/framework/src/Maveriks/WebApplication.php b/framework/src/Maveriks/WebApplication.php index 20f718b77..7a9359708 100644 --- a/framework/src/Maveriks/WebApplication.php +++ b/framework/src/Maveriks/WebApplication.php @@ -296,6 +296,11 @@ class WebApplication list($host, $port) = strpos(DB_HOST, ':') !== false ? explode(':', DB_HOST) : array(DB_HOST, ''); $port = empty($port) ? '' : ";port=$port"; Services\OAuth2\Server::setDatabaseSource(DB_USER, DB_PASS, DB_ADAPTER.":host=$host;dbname=".DB_NAME.$port); + if (DB_NAME != DB_RBAC_NAME) { //it's PM < 3 + list($host, $port) = strpos(DB_RBAC_HOST, ':') !== false ? explode(':', DB_RBAC_HOST) : array(DB_RBAC_HOST, ''); + $port = empty($port) ? '' : ";port=$port"; + Services\OAuth2\Server::setDatabaseSourceRBAC(DB_RBAC_USER, DB_RBAC_PASS, DB_ADAPTER.":host=$host;dbname=".DB_RBAC_NAME.$port); + } // Setting default OAuth Client id, for local PM Web Designer Services\OAuth2\Server::setPmClientId($pmOauthClientId); diff --git a/gulliver/js/codemirror/addon/hint/php-hint.js b/gulliver/js/codemirror/addon/hint/php-hint.js index 9723cb250..320dfe2a8 100644 --- a/gulliver/js/codemirror/addon/hint/php-hint.js +++ b/gulliver/js/codemirror/addon/hint/php-hint.js @@ -24,7 +24,7 @@ var sToken = token.string.trim(); if ( sToken == "(") { - token = tprop = getToken(editor, Pos(cur.line, tprop.start)); + token = tprop = getToken(editor, Pos(cur.line, tprop.start)); return {list: getCompletions(token.string, keywords, options), from: Pos(cur.line, token.start), to: Pos(cur.line, token.end + 1)}; @@ -244,22 +244,22 @@ } arrayFunction = arrayFunctions[functionName]; - + if (arrayFunction != undefined) { forEach( arrayFunction, yesAdd); } else { if (functionName.trim() == "") { - forEach (phpKeywords, yesAdd); - forEach (keywords, yesAdd); + forEach (phpKeywords, yesAdd); + forEach (keywords, yesAdd); } else if (functionName == "=") { - forEach (phpPMFunctions, yesAdd); + forEach (phpPMFunctions, yesAdd); } else { - for (index = 0; index < phpKeywords.length; index++) { - if ( phpKeywords[index].indexOf(functionName) == 0 ) { - found.push(phpKeywords[index]); - } - } - forEach(keywords, maybeAdd); + for (index = 0; index < phpKeywords.length; index++) { + if ( phpKeywords[index].indexOf(functionName) == 0 ) { + found.push(phpKeywords[index]); + } + } + forEach(keywords, maybeAdd); } } return found; diff --git a/gulliver/system/class.dvEditor.php b/gulliver/system/class.dvEditor.php index af447c5ab..1068c8347 100755 --- a/gulliver/system/class.dvEditor.php +++ b/gulliver/system/class.dvEditor.php @@ -55,7 +55,7 @@ class XmlForm_Field_HTML extends XmlForm_Field * @return string * */ - public function render ($value, $owner = null) + public function render($value = null, $owner = null) { $value = ($value == '') ? '
' : $value; $html = "
"; diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index 7ae0529e3..e406ac3d2 100755 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -713,7 +713,7 @@ class G * @param string $strClass * @return void */ - public function LoadThirdParty ($sPath, $sFile) + public static function LoadThirdParty($sPath, $sFile) { $classfile = PATH_THIRDPARTY . $sPath . '/' . $sFile . ((substr( $sFile, 0, - 4 ) !== '.php') ? '.php' : ''); return require_once ($classfile); @@ -3330,7 +3330,7 @@ class G * * @return boolean true or false */ - public function isHttpRequest() + public static function isHttpRequest() { if (isset($_SERVER['SERVER_SOFTWARE']) && strpos(strtolower($_SERVER['SERVER_SOFTWARE']), 'apache') !== false) { return true; @@ -5647,3 +5647,4 @@ function __ ($msgID, $lang = SYS_LANG, $data = null) { return G::LoadTranslation( $msgID, $lang, $data ); } + diff --git a/gulliver/system/class.xmlMenu.php b/gulliver/system/class.xmlMenu.php index bde2c516c..c6745e98a 100755 --- a/gulliver/system/class.xmlMenu.php +++ b/gulliver/system/class.xmlMenu.php @@ -76,7 +76,7 @@ class XmlForm_Field_XmlMenu extends XmlForm_Field * * @return object $out */ - public function render ($value) + public function render($value = null, $paramDummy2 = null) { $this->xmlMenu = new xmlMenu( $this->xmlfile, $this->home ); $this->xmlMenu->setValues( $value ); @@ -97,7 +97,7 @@ class XmlForm_Field_XmlMenu extends XmlForm_Field * * @return none */ - public function renderGrid ($value) + public function renderGrid($value = null, $paramDummy2 = null, $paramDummy3 = null, $paramDummy4 = null) { return $this->render( $value ); } diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php index 93458d03b..29e7d0966 100755 --- a/gulliver/system/class.xmlform.php +++ b/gulliver/system/class.xmlform.php @@ -394,7 +394,7 @@ class XmlForm_Field * @param string value * @return string */ - public function render ($value = null) + public function render($value = null, $paramDummy2 = null) { //this is an unknown field type. return $this->htmlentities( $value != '' ? $value : $this->name, ENT_COMPAT, 'utf-8' ); @@ -934,7 +934,7 @@ class XmlForm_Field_Title extends XmlForm_Field * @param string value * @return string */ - public function render ($value = null, &$owner = null) + public function render($value = null, $owner = null) { $this->label = G::replaceDataField( $this->label, $owner->values ); return 'name . ']\' name=\'form[' . $this->name . ']\' ' . $this->NSFieldType() . ' >' . $this->htmlentities( $this->label ) . ''; @@ -970,7 +970,7 @@ class XmlForm_Field_Subtitle extends XmlForm_Field * @param string value * @return string */ - public function render ($value = null) + public function render($value = null, $paramDummy2 = null) { return 'name . ']\' name=\'form[' . $this->name . ']\' ' . $this->NSFieldType() . ' >' . $this->htmlentities( $this->label ) . ''; } @@ -1012,7 +1012,7 @@ class XmlForm_Field_SimpleText extends XmlForm_Field * @param string value * @return string */ - public function render ($value = null, &$owner = null) + public function render($value = null, $owner = null) { if (($this->pmconnection != '') && ($this->pmfield != '') && $value == null) { $value = $this->getPMTableValue( $owner ); @@ -1040,7 +1040,7 @@ class XmlForm_Field_SimpleText extends XmlForm_Field * @param string owner * @return string */ - public function renderGrid ($values = array(), $owner = null) + public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null) { $result = array (); $r = 1; @@ -1204,7 +1204,7 @@ class XmlForm_Field_Text extends XmlForm_Field_SimpleText * @param string owner * @return string */ - public function renderGrid ($values = array(), $owner = null) + public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null) { $result = $aux = array (); $r = 1; @@ -1257,7 +1257,7 @@ class XmlForm_Field_Text extends XmlForm_Field_SimpleText return $result; } - public function renderTable ($values = '', $owner = null) + public function renderTable($values = "", $owner = null, $paramDummy3 = null) { $result = $this->htmlentities( $values, ENT_COMPAT, 'utf-8' ); return $result; @@ -1716,7 +1716,7 @@ class XmlForm_Field_Suggest extends XmlForm_Field_SimpleText //by neyek * @param string owner * @return string */ - public function renderGrid ($values = array(), $owner = null) + public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null) { $aResult = array(); $r = 1; @@ -1735,7 +1735,7 @@ class XmlForm_Field_Suggest extends XmlForm_Field_SimpleText //by neyek * @param $owner * @return $result */ - public function renderTable ($values = '', $owner = null) + public function renderTable($values = "", $owner = null, $paramDummy3 = null) { $result = $this->htmlentities( $values, ENT_COMPAT, 'utf-8' ); return $result; @@ -1812,10 +1812,8 @@ class XmlForm_Field_Caption extends XmlForm_Field * @param $owner * @return true */ - public function validateValue ($value, &$owner) + public function validateValue($value) { - /*$this->executeSQL( $owner ); - return isset($value) && ( array_key_exists( $value , $this->options ) );*/ return true; } @@ -1897,7 +1895,7 @@ class XmlForm_Field_Password extends XmlForm_Field * @param string value * @return string */ - public function render ($value = null) + public function render($value = null, $paramDummy2 = null) { if ($this->autocomplete === '1') { $this->autocomplete = "on"; @@ -2013,7 +2011,7 @@ class XmlForm_Field_Textarea extends XmlForm_Field * @param string owner * @return string */ - public function renderGrid ($values = array(), $owner = null) + public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null) { $this->gridFieldType = 'textarea'; @@ -2176,7 +2174,7 @@ class XmlForm_Field_Currency extends XmlForm_Field_SimpleText * @param string owner * @return string */ - public function renderGrid ($values = array(), $owner = null) + public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null) { $result = array (); $r = 1; @@ -2242,7 +2240,7 @@ class XmlForm_Field_CaptionCurrency extends XmlForm_Field * @param string value * @return string */ - public function render ($value = null) + public function render($value = null, $paramDummy2 = null) { return '$ ' . $this->htmlentities( $value, ENT_COMPAT, 'utf-8' ); } @@ -2323,7 +2321,7 @@ class XmlForm_Field_Percentage extends XmlForm_Field_SimpleText return $html; } - public function renderGrid ($values = array(), $owner = null) + public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null) { $result = array (); $r = 1; @@ -2381,7 +2379,7 @@ class XmlForm_Field_Percentage extends XmlForm_Field_SimpleText class XmlForm_Field_CaptionPercentage extends XmlForm_Field { - public function render ($value = null) + public function render($value = null, $paramDummy2 = null) { return $this->htmlentities( $value, ENT_COMPAT, 'utf-8' ); } @@ -2575,7 +2573,7 @@ class XmlForm_Field_Date2 extends XmlForm_Field_SimpleText * @param $onlyValue * @return */ - public function renderGrid ($values = null, $owner = null, $onlyValue = false) + public function renderGrid($values = null, $owner = null, $onlyValue = false, $paramDummy4 = null) { $result = array (); $r = 1; @@ -2658,7 +2656,7 @@ class XmlForm_Field_Date2 extends XmlForm_Field_SimpleText class XmlForm_Field_DateView extends XmlForm_Field { - public function render ($value = null) + public function render($value = null, $paramDummy2 = null) { return $this->htmlentities( $value, ENT_COMPAT, 'utf-8' ); } @@ -2741,7 +2739,7 @@ class XmlForm_Field_YesNo extends XmlForm_Field * @param $owner * @return */ - public function renderGrid ($values = array(), $owner = null) + public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null) { $this->gridFieldType = 'yesno'; $result = array (); @@ -2888,7 +2886,7 @@ class XmlForm_Field_Link extends XmlForm_Field * @param $owner * @return */ - public function renderGrid($value = array(), $label = array(), $owner = null) + public function renderGrid($value = array(), $label = array(), $owner = null, $paramDummy4 = null) { $arrayResult = array(); $row = 1; @@ -2914,7 +2912,7 @@ class XmlForm_Field_Link extends XmlForm_Field * @param $owner * @return */ - public function renderTable ($value = null, $owner = null) + public function renderTable($value = null, $owner = null, $paramDummy3 = null) { $onclick = $this->htmlentities( G::replaceDataField( $this->onclick, $owner->values ), ENT_QUOTES, 'utf-8' ); $link = $this->htmlentities( G::replaceDataField( $this->link, $owner->values ), ENT_QUOTES, 'utf-8' ); @@ -3053,7 +3051,7 @@ class XmlForm_Field_File extends XmlForm_Field return $html; } - public function renderGrid ($value = array(), $owner = null, $therow = -1) + public function renderGrid($value = array(), $owner = null, $therow = -1, $paramDummy4 = null) { $arrayResult = array (); $r = 1; @@ -3142,7 +3140,7 @@ class XmlForm_Field_Checkboxpt extends XmlForm_Field * @param $owner * @return result */ - public function renderGrid ($values = array(), $owner = null) + public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null) { $result = array (); $r = 1; @@ -3238,7 +3236,7 @@ class XmlForm_Field_Checkbox extends XmlForm_Field * @param $owner * @return result */ - public function renderGrid ($values = array(), $owner = null) + public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null) { $this->gridFieldType = 'checkbox'; $result = array (); @@ -3286,7 +3284,7 @@ class XmlForm_Field_Checkbox2 extends XmlForm_Field { public $required = false; - public function render ($value = null) + public function render($value = null, $paramDummy2 = null) { return '' . $this->label . ''; } @@ -3461,7 +3459,7 @@ class XmlForm_Field_Hidden extends XmlForm_Field * @param $owner * @return result */ - public function renderGrid ($values = null, $owner = null) + public function renderGrid($values = null, $owner = null, $paramDummy3 = null, $paramDummy4 = null) { $result = array (); $r = 1; @@ -3480,7 +3478,7 @@ class XmlForm_Field_Hidden extends XmlForm_Field * @param $owner * @return result */ - public function renderTable ($value = '', $owner = null) + public function renderTable($value = "", $owner = null, $paramDummy3 = null) { return ''; } @@ -3509,10 +3507,8 @@ class XmlForm_Field_Dropdown extends XmlForm_Field public $renderMode = ''; public $selectedValue = ''; - public function validateValue ($value, &$owner) + public function validateValue($value) { - /*$this->executeSQL( $owner ); - return isset($value) && ( array_key_exists( $value , $this->options ) );*/ return true; } @@ -3827,7 +3823,7 @@ class XmlForm_Field_Listbox extends XmlForm_Field * @param $owner * @return result */ - public function renderGrid ($value = null, $owner = null) + public function renderGrid($value = null, $owner = null, $paramDummy3 = null, $paramDummy4 = null) { return $this->render( $value, $owner ); } @@ -4046,7 +4042,7 @@ class XmlForm_Field_CheckGroupView extends XmlForm_Field * @param string value * @return string */ - public function render ($value = null) + public function render($value = null, $paramDummy2 = null) { $html = ''; foreach ($this->option as $optionName => $option) { @@ -4125,7 +4121,7 @@ class XmlForm_Field_Grid extends XmlForm_Field * @return