@@ -54,6 +54,9 @@ discard block |
||
| 54 | 54 | return $user; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | + /** |
|
| 58 | + * @param Vtiger_Request $request |
|
| 59 | + */ |
|
| 57 | 60 | protected function triggerCheckPermission($handler, $request) |
| 58 | 61 | { |
| 59 | 62 | $moduleName = $request->getModule(); |
@@ -73,6 +76,9 @@ discard block |
||
| 73 | 76 | throw new \Exception\NoPermitted('LBL_NOT_ACCESSIBLE'); |
| 74 | 77 | } |
| 75 | 78 | |
| 79 | + /** |
|
| 80 | + * @param Vtiger_Request $request |
|
| 81 | + */ |
|
| 76 | 82 | protected function triggerPreProcess($handler, $request) |
| 77 | 83 | { |
| 78 | 84 | if ($request->isAjax()) { |
@@ -82,6 +88,9 @@ discard block |
||
| 82 | 88 | $handler->preProcess($request); |
| 83 | 89 | } |
| 84 | 90 | |
| 91 | + /** |
|
| 92 | + * @param Vtiger_Request $request |
|
| 93 | + */ |
|
| 85 | 94 | protected function triggerPostProcess($handler, $request) |
| 86 | 95 | { |
| 87 | 96 | if ($request->isAjax()) { |
@@ -59,6 +59,8 @@ |
||
| 59 | 59 | * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. |
| 60 | 60 | * All Rights Reserved. |
| 61 | 61 | * Contributor(s): ______________________________________.. |
| 62 | + * @param string $item_id |
|
| 63 | + * @param string $item_summary |
|
| 62 | 64 | */ |
| 63 | 65 | public function track_view($user_id, $current_module, $item_id, $item_summary) |
| 64 | 66 | { |
@@ -80,8 +80,9 @@ |
||
| 80 | 80 | $fieldlists = explode(',', $fieldsname); |
| 81 | 81 | $fl = []; |
| 82 | 82 | foreach ($fieldlists as $w => $c) { |
| 83 | - if (count($fl)) |
|
| 84 | - $fl[] = "' '"; |
|
| 83 | + if (count($fl)) { |
|
| 84 | + $fl[] = "' '"; |
|
| 85 | + } |
|
| 85 | 86 | $fl[] = $c; |
| 86 | 87 | } |
| 87 | 88 | $fieldsname = $adb->concat($fl); |
@@ -48,6 +48,9 @@ |
||
| 48 | 48 | return $row; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | + /** |
|
| 52 | + * @param boolean $t |
|
| 53 | + */ |
|
| 51 | 54 | public static function sanitizeData($newRow, $meta, $t = null) |
| 52 | 55 | { |
| 53 | 56 | |
@@ -24,8 +24,9 @@ discard block |
||
| 24 | 24 | $fieldColumnMapping = $meta->getFieldColumnMapping(); |
| 25 | 25 | $columnFieldMapping = array_flip($fieldColumnMapping); |
| 26 | 26 | foreach ($row as $col => $val) { |
| 27 | - if (array_key_exists($col, $columnFieldMapping)) |
|
| 28 | - $newRow[$columnFieldMapping[$col]] = $val; |
|
| 27 | + if (array_key_exists($col, $columnFieldMapping)) { |
|
| 28 | + $newRow[$columnFieldMapping[$col]] = $val; |
|
| 29 | + } |
|
| 29 | 30 | } |
| 30 | 31 | $newRow = DataTransform::sanitizeData($newRow, $meta, true); |
| 31 | 32 | return $newRow; |
@@ -149,8 +150,9 @@ discard block |
||
| 149 | 150 | $allFields = $meta->getFieldColumnMapping(); |
| 150 | 151 | $newRow = []; |
| 151 | 152 | foreach ($allFields as $field => $col) { |
| 152 | - if (isset($row[$field])) |
|
| 153 | - $newRow[$field] = $row[$field]; |
|
| 153 | + if (isset($row[$field])) { |
|
| 154 | + $newRow[$field] = $row[$field]; |
|
| 155 | + } |
|
| 154 | 156 | } |
| 155 | 157 | if (isset($row[$recordString])) { |
| 156 | 158 | $newRow[$recordString] = $row[$recordString]; |
@@ -10,6 +10,9 @@ |
||
| 10 | 10 | |
| 11 | 11 | require_once("include/Webservices/QueryParser.php"); |
| 12 | 12 | |
| 13 | +/** |
|
| 14 | + * @param string $q |
|
| 15 | + */ |
|
| 13 | 16 | function vtws_query($q, $user) |
| 14 | 17 | { |
| 15 | 18 | |
@@ -21,8 +21,9 @@ |
||
| 21 | 21 | // Cache the instance for re-use |
| 22 | 22 | $moduleRegex = "/[fF][rR][Oo][Mm]\s+([^\s;]+)/"; |
| 23 | 23 | $moduleName = ''; |
| 24 | - if (preg_match($moduleRegex, $q, $m)) |
|
| 25 | - $moduleName = trim($m[1]); |
|
| 24 | + if (preg_match($moduleRegex, $q, $m)) { |
|
| 25 | + $moduleName = trim($m[1]); |
|
| 26 | + } |
|
| 26 | 27 | |
| 27 | 28 | if (!isset($vtws_create_cache[$moduleName]['webserviceobject'])) { |
| 28 | 29 | $webserviceObject = VtigerWebserviceObject::fromQuery($adb, $q); |
@@ -12,6 +12,9 @@ |
||
| 12 | 12 | include_once 'include/Webservices/Query.php'; |
| 13 | 13 | include_once 'include/Webservices/RelatedTypes.php'; |
| 14 | 14 | |
| 15 | +/** |
|
| 16 | + * @param string $query |
|
| 17 | + */ |
|
| 15 | 18 | function vtws_query_related($query, $id, $relatedLabel, $user, $filterClause = null) |
| 16 | 19 | { |
| 17 | 20 | |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | if (!empty($filterClause)) { |
| 72 | 72 | $query .= " " . $filterClause; |
| 73 | 73 | } |
| 74 | - $query.=";"; |
|
| 74 | + $query .= ";"; |
|
| 75 | 75 | $relatedRecords = vtws_query($query, $user); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -112,6 +112,9 @@ discard block |
||
| 112 | 112 | return HTTP_Session::id(); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | + /** |
|
| 116 | + * @param string $var_name |
|
| 117 | + */ |
|
| 115 | 118 | public function set($var_name, $var_value) |
| 116 | 119 | { |
| 117 | 120 | //TODO test setRef and getRef combination |
@@ -119,6 +122,9 @@ discard block |
||
| 119 | 122 | HTTP_Session::set($var_name, $var_value); |
| 120 | 123 | } |
| 121 | 124 | |
| 125 | + /** |
|
| 126 | + * @param string $name |
|
| 127 | + */ |
|
| 122 | 128 | public function get($name) |
| 123 | 129 | { |
| 124 | 130 | //echo "<br> getting for: ",$name," :value: ",HTTP_Session::get($name); |
@@ -148,6 +148,9 @@ |
||
| 148 | 148 | return false; |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | + /** |
|
| 152 | + * @param string $id |
|
| 153 | + */ |
|
| 151 | 154 | public function retrieve($id) |
| 152 | 155 | { |
| 153 | 156 | |
@@ -270,8 +270,7 @@ |
||
| 270 | 270 | foreach ($moduleFields as $fieldName => $webserviceField) { |
| 271 | 271 | array_push($fields, $this->getDescribeFieldArray($webserviceField)); |
| 272 | 272 | } |
| 273 | - $label = ($app_strings[$this->meta->getObectIndexColumn()]) ? $app_strings[$this->meta->getObectIndexColumn()] : |
|
| 274 | - $this->meta->getObectIndexColumn(); |
|
| 273 | + $label = ($app_strings[$this->meta->getObectIndexColumn()]) ? $app_strings[$this->meta->getObectIndexColumn()] : $this->meta->getObectIndexColumn(); |
|
| 275 | 274 | $this->moduleFields = $fields; |
| 276 | 275 | } |
| 277 | 276 | return $this->moduleFields; |
@@ -15,6 +15,9 @@ |
||
| 15 | 15 | protected static $fieldTypeMapping = []; |
| 16 | 16 | protected static $referenceTypeMapping = []; |
| 17 | 17 | |
| 18 | + /** |
|
| 19 | + * @param PearDatabase $adb |
|
| 20 | + */ |
|
| 18 | 21 | public function __construct($tableName, $webserviceObject, $adb, $user) |
| 19 | 22 | { |
| 20 | 23 | parent::__construct($webserviceObject, $user); |
@@ -5,6 +5,9 @@ discard block |
||
| 5 | 5 | $in_started = false; |
| 6 | 6 | $count = false; |
| 7 | 7 | |
| 8 | +/** |
|
| 9 | + * @param integer $count |
|
| 10 | + */ |
|
| 8 | 11 | function incrementN($lexer, $count) |
| 9 | 12 | { |
| 10 | 13 | $i = 0; |
@@ -160,6 +163,9 @@ discard block |
||
| 160 | 163 | } |
| 161 | 164 | } |
| 162 | 165 | |
| 166 | +/** |
|
| 167 | + * @param VTQL_Lexer $lexer |
|
| 168 | + */ |
|
| 163 | 169 | function handleend($lexer, $val) |
| 164 | 170 | { |
| 165 | 171 | return VTQL_Parser::SEMICOLON; |
@@ -179,6 +185,9 @@ discard block |
||
| 179 | 185 | public $mandatory; |
| 180 | 186 | public $current_state; |
| 181 | 187 | |
| 188 | + /** |
|
| 189 | + * @param string $data |
|
| 190 | + */ |
|
| 182 | 191 | public function __construct($data) |
| 183 | 192 | { |
| 184 | 193 | $this->index = 0; |