BUG Adjustment for standardization of code SOLVED
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -34,7 +34,8 @@ try {
|
||||
|
||||
$libraryName = $libraryO->info ['name'];
|
||||
$libraryDescription = trim ( str_replace ( "*", "", implode ( " ", $libraryO->info ['description'] ) ) );
|
||||
$libraryIcon = isset ( $libraryO->info ['icon'] ) && ($libraryO->info ['icon'] != "") ? $libraryO->info ['icon'] : "/images/browse.gif";
|
||||
$libraryIcon = isset ( $libraryO->info ['icon'] ) && ($libraryO->info ['icon'] != "")
|
||||
? $libraryO->info ['icon'] : "/images/browse.gif";
|
||||
$aDataTrigger = $_GET;
|
||||
|
||||
$sProUid = $aDataTrigger ['PRO_UID'];
|
||||
@@ -47,18 +48,22 @@ try {
|
||||
$methodDescription = trim ( str_replace ( "*", "", implode ( " ", $methodObject->info ['description'] ) ) );
|
||||
$methodReturn = $methodObject->info ['return'];
|
||||
$methodParameters = array_keys ( $methodObject->params );
|
||||
$methodLink = isset ( $methodObject->info ['link'] ) && ($methodObject->info ['link'] != "") ? $methodObject->info ['link'] : "";
|
||||
$methodLink = isset ( $methodObject->info ['link'] ) && ($methodObject->info ['link'] != "")
|
||||
? $methodObject->info ['link'] : "";
|
||||
|
||||
$methodreturnA = explode ( "|", $methodReturn );
|
||||
|
||||
$bReturnValue = true;
|
||||
$displayMode = 'display:block';
|
||||
$methodreturnDescription = (trim(strtoupper($methodreturnA [3])) == strtoupper(G::LoadTranslation ( 'ID_NONE')) )? G::LoadTranslation ( 'ID_NOT_REQUIRED') : $methodreturnA [3];
|
||||
$methodreturnDescription = (trim(strtoupper($methodreturnA [3])) == strtoupper(G::LoadTranslation ( 'ID_NONE')) )
|
||||
? G::LoadTranslation ( 'ID_NOT_REQUIRED') : $methodreturnA [3];
|
||||
$methodReturnLabel = isset ( $methodreturnA [3] ) ? $methodreturnDescription : $methodReturn;
|
||||
if ( (isset($methodreturnA[0]) && isset($methodreturnA[1])) && (trim(strtoupper($methodreturnA[0]) ) != strtoupper(G::LoadTranslation ( 'ID_NONE')) ) ) {
|
||||
$methodReturnLabelRequired = (trim( $methodreturnA[1] ) != "" )? G::LoadTranslation ( "ID_REQUIRED_FIELD" ) : $methodreturnA[1];
|
||||
if ( (isset($methodreturnA[0]) && isset($methodreturnA[1]))
|
||||
&& (trim(strtoupper($methodreturnA[0]) ) != strtoupper(G::LoadTranslation ( 'ID_NONE')) ) ) {
|
||||
$methodReturnLabelRequired = (trim( $methodreturnA[1] ) != "" )
|
||||
? G::LoadTranslation ( "ID_REQUIRED_FIELD" ) : $methodreturnA[1];
|
||||
$methodReturnLabel .= "<br>" . trim( $methodReturnLabelRequired ) . " | " . trim($methodreturnA[0]);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$bReturnValue = false;
|
||||
$displayMode = 'display:none';
|
||||
}
|
||||
@@ -107,7 +112,7 @@ try {
|
||||
if (count ( $aParametersFun ) > 0) {
|
||||
$template->newBlock ( 'paremetersTriggersGroup' );
|
||||
$template->assign ( 'PARAMETERS_LABEL', G::LoadTranslation ( 'ID_PARAMETERS' ) );
|
||||
foreach ( $aParametersFun as $k => $v ) {
|
||||
foreach ($aParametersFun as $k => $v) {
|
||||
if ($v != '') {
|
||||
$aParametersFunA = explode ( "|", $v );
|
||||
$paramType = $aParametersFunA [0];
|
||||
@@ -118,18 +123,28 @@ try {
|
||||
$paramDefaultValue = isset ( $paramDefinitionA [1] ) ? $paramDefinitionA [1] : "";
|
||||
$paramLabel = isset ( $aParametersFunA [2] ) ? $aParametersFunA [2] : $paramName;
|
||||
$paramDescription = isset ( $aParametersFunA [3] ) ? $aParametersFunA [3] : "";
|
||||
$sPMfunction .= ($nrows != 2) ? ', "' . trim ( str_replace ( "$", "", $paramName ) ) . '"' : '"' . trim ( str_replace ( "$", "", $paramName ) . '"' );
|
||||
$sPMfunction .= ($nrows != 2)
|
||||
? ', "' . trim ( str_replace ( "$", "", $paramName ) ) . '"'
|
||||
: '"' . trim ( str_replace ( "$", "", $paramName ) . '"' );
|
||||
|
||||
$template->newBlock ( 'paremetersTriggers' );
|
||||
$template->assign ( 'LABEL_PARAMETER', $paramLabel );
|
||||
$template->assign ( 'OPT_PARAMETER', trim ( str_replace ( "$", "", $paramName ) ) );
|
||||
$sNameTag = 'form.' . trim ( str_replace ( "$", "", $paramName ) ) . '.name';
|
||||
$sNameTag = trim ( $sNameTag );
|
||||
$template->assign ( 'SNAMETAG', $sNameTag );
|
||||
$tri_Button = "<input type='button' name='INSERT_VARIABLE' value='@@' onclick='showDynaformsFormVars($sNameTag , \"../controls/varsAjax\" , \"$sProUid\" , \"@@\");return;' >";
|
||||
$tri_Button = "<input type='button' name='INSERT_VARIABLE' value='@@' "
|
||||
. "onclick='showDynaformsFormVars($sNameTag , \"../controls/varsAjax\" , "
|
||||
. " \"$sProUid\" , \"@@\");return;' >";
|
||||
|
||||
$template->assign ( 'ADD_TRI_VARIABLE', $tri_Button );
|
||||
$template->assign ( 'ADD_TRI_VALUE', str_replace ( "'", "", str_replace ( '"', '', $paramDefaultValue ) ) );
|
||||
$template->assign ( 'ADD_TRI_VALUE',
|
||||
str_replace ( "'", "", str_replace ( '"', '', $paramDefaultValue ) ) );
|
||||
|
||||
$fieldDescription = ($paramDescription!="")?$paramDescription . "<br>":"";
|
||||
$fieldDescription .= $paramDefaultValue != "" ? $paramDefaultValue . " | " . $paramType : G::LoadTranslation ( "ID_REQUIRED_FIELD" ) . " | " . $paramType;
|
||||
$fieldDescription .= $paramDefaultValue != ""
|
||||
? $paramDefaultValue . " | " . $paramType
|
||||
: G::LoadTranslation ( "ID_REQUIRED_FIELD" ) . " | " . $paramType;
|
||||
$template->assign ( 'ADD_TRI_DESCRIPTION', $fieldDescription );
|
||||
$nrows ++;
|
||||
}
|
||||
@@ -145,5 +160,5 @@ try {
|
||||
} catch ( Exception $oException ) {
|
||||
die ( $oException->getMessage () );
|
||||
}
|
||||
unset ( $_SESSION ['PROCESS'] );
|
||||
?>
|
||||
unset ($_SESSION ['PROCESS']);
|
||||
|
||||
@@ -33,7 +33,8 @@ try {
|
||||
|
||||
$libraryName = $libraryO->info ['name'];
|
||||
$libraryDescription = trim ( str_replace ( "*", "", implode ( " ", $libraryO->info ['description'] ) ) );
|
||||
$libraryIcon = isset ( $libraryO->info ['icon'] ) && ($libraryO->info ['icon'] != "") ? $libraryO->info ['icon'] : "/images/browse.gif";
|
||||
$libraryIcon = isset ( $libraryO->info ['icon'] ) && ($libraryO->info ['icon'] != "")
|
||||
? $libraryO->info ['icon'] : "/images/browse.gif";
|
||||
$aDataTrigger = $_GET;
|
||||
|
||||
$sProUid = $aDataTrigger ['PRO_UID'];
|
||||
@@ -46,18 +47,21 @@ try {
|
||||
$methodDescription = trim ( str_replace ( "*", "", implode ( " ", $methodObject->info ['description'] ) ) );
|
||||
$methodReturn = $methodObject->info ['return'];
|
||||
$methodParameters = array_keys ( $methodObject->params );
|
||||
$methodLink = isset ( $methodObject->info ['link'] ) && ($methodObject->info ['link'] != "") ? $methodObject->info ['link'] : "";
|
||||
$methodLink = isset ( $methodObject->info ['link'] ) && ($methodObject->info ['link'] != "")
|
||||
? $methodObject->info ['link'] : "";
|
||||
$methodreturnA = explode ( "|", $methodReturn );
|
||||
|
||||
$bReturnValue = true;
|
||||
$displayMode = 'display:block';
|
||||
$methodreturnDescription = (trim(strtoupper($methodreturnA [3])) == strtoupper(G::LoadTranslation ( 'ID_NONE')) )? G::LoadTranslation ( 'ID_NOT_REQUIRED') : $methodreturnA [3];
|
||||
$methodreturnDescription = (trim(strtoupper($methodreturnA [3])) == strtoupper(G::LoadTranslation ( 'ID_NONE')) )
|
||||
? G::LoadTranslation ( 'ID_NOT_REQUIRED') : $methodreturnA [3];
|
||||
$methodReturnLabel = isset ( $methodreturnA [3] ) ? $methodreturnDescription : $methodReturn;
|
||||
if ( (isset($methodreturnA[0]) && isset($methodreturnA[1])) && (trim(strtoupper($methodreturnA[0]) ) != strtoupper(G::LoadTranslation ( 'ID_NONE')) ) ) {
|
||||
$methodReturnLabelRequired = (trim( $methodreturnA[1] ) != "" )? G::LoadTranslation ( "ID_REQUIRED_FIELD" ) : $methodreturnA[1];
|
||||
if ( (isset($methodreturnA[0]) && isset($methodreturnA[1]))
|
||||
&& (trim(strtoupper($methodreturnA[0]) ) != strtoupper(G::LoadTranslation ( 'ID_NONE')) ) ) {
|
||||
$methodReturnLabelRequired = (trim( $methodreturnA[1] ) != "" )
|
||||
? G::LoadTranslation ( "ID_REQUIRED_FIELD" ) : $methodreturnA[1];
|
||||
$methodReturnLabel .= "<br>" . trim( $methodReturnLabelRequired ) . " | " . trim($methodreturnA[0]);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$bReturnValue = false;
|
||||
$displayMode = 'display:none';
|
||||
}
|
||||
@@ -110,7 +114,7 @@ try {
|
||||
if (count ( $aParametersFun ) > 0) {
|
||||
$template->newBlock ( 'paremetersTriggersGroup' );
|
||||
$template->assign ( 'PARAMETERS_LABEL', G::LoadTranslation ( 'ID_PARAMETERS' ) );
|
||||
foreach ( $aParametersFun as $k => $v ) {
|
||||
foreach ($aParametersFun as $k => $v) {
|
||||
if ($v != '') {
|
||||
$aParametersFunA = explode ( "|", $v );
|
||||
$paramType = $aParametersFunA [0];
|
||||
@@ -121,20 +125,30 @@ try {
|
||||
$paramDefaultValue = isset ( $paramDefinitionA [1] ) ? $paramDefinitionA [1] : "";
|
||||
$paramLabel = isset ( $aParametersFunA [2] ) ? $aParametersFunA [2] : $paramName;
|
||||
$paramDescription = isset ( $aParametersFunA [3] ) ? $aParametersFunA [3] : "";
|
||||
$sPMfunction .= ($nrows != 2) ? ', "' . trim ( str_replace ( "$", "", $paramName ) ) . '"' : '"' . trim ( str_replace ( "$", "", $paramName ) . '"' );
|
||||
$sPMfunction .= ($nrows != 2)
|
||||
? ', "' . trim ( str_replace ( "$", "", $paramName ) ) . '"'
|
||||
: '"' . trim ( str_replace ( "$", "", $paramName ) . '"' );
|
||||
|
||||
$template->newBlock ( 'paremetersTriggers' );
|
||||
$template->assign ( 'LABEL_PARAMETER', $paramLabel );
|
||||
$template->assign ( 'OPT_PARAMETER', trim ( str_replace ( "$", "", $paramName ) ) );
|
||||
$sNameTag = 'form.' . trim ( str_replace ( "$", "", $paramName ) ) . '.name';
|
||||
$sNameTag = trim ( $sNameTag );
|
||||
$template->assign ( 'SNAMETAG', $sNameTag );
|
||||
$tri_Button = "<input type='button' name='INSERT_VARIABLE' value='@@' onclick='showDynaformsFormVars($sNameTag , \"../controls/varsAjax\" , \"$sProUid\" , \"@@\");return;' >";
|
||||
$tri_Button = "<input type='button' name='INSERT_VARIABLE' value='@@' "
|
||||
. "onclick='showDynaformsFormVars($sNameTag , \"../controls/varsAjax\" , "
|
||||
. " \"$sProUid\" , \"@@\");return;' >";
|
||||
|
||||
$template->assign ( 'ADD_TRI_VARIABLE', $tri_Button );
|
||||
// $template->assign ( 'ADD_TRI_VALUE', str_replace ( "'", "", str_replace ( '"', '', $paramDefaultValue ) ) );
|
||||
// $template->assign ( 'ADD_TRI_VALUE', str_replace ( "'", "",
|
||||
// str_replace ( '"', '', $paramDefaultValue ) ) );
|
||||
$paramValue = $_GET[trim( str_replace( "$", "", $paramName ) )];
|
||||
$template->assign ( 'ADD_TRI_VALUE', str_replace("\'", "'", $paramValue) );
|
||||
$fieldDescription = ($paramDescription!="")?$paramDescription . "<br>":"";
|
||||
$fieldDescription .= $paramDefaultValue != "" ? $paramDefaultValue . " | " . $paramType : G::LoadTranslation ( "ID_REQUIRED_FIELD" ) . " | " . $paramType;
|
||||
$fieldDescription .= $paramDefaultValue != ""
|
||||
? $paramDefaultValue . " | " . $paramType
|
||||
: G::LoadTranslation ( "ID_REQUIRED_FIELD" ) . " | " . $paramType;
|
||||
|
||||
$template->assign ( 'ADD_TRI_DESCRIPTION', $fieldDescription );
|
||||
$nrows ++;
|
||||
}
|
||||
@@ -151,4 +165,4 @@ try {
|
||||
die ( $oException->getMessage () );
|
||||
}
|
||||
unset ( $_SESSION ['PROCESS'] );
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user