diff --git a/include/QueryGenerator/QueryGenerator.php b/include/QueryGenerator/QueryGenerator.php index 1386a82c595e325a40b08a6c7569569dc1bab9e3..a573ac9abaa2b0b050f34f4c319f664fcb10d7a8 100644 --- a/include/QueryGenerator/QueryGenerator.php +++ b/include/QueryGenerator/QueryGenerator.php @@ -333,7 +333,7 @@ class QueryGenerator { } } $this->endGroup(); - $groupConditionGlue = $groupcolumns['condition']; + $groupConditionGlue = isset($groupcolumns['condition']) ? $groupcolumns['condition'] : ''; if(!empty($groupConditionGlue)) $this->addConditionGlue($groupConditionGlue); } @@ -1209,7 +1209,7 @@ class QueryGenerator { public function addUserSearchConditions($input) { global $log,$default_charset; - if($input['searchtype']=='advance') { + if(isset($input['searchtype']) && $input['searchtype']=='advance') { $json = new Zend_Json(); $advft_criteria = $_REQUEST['advft_criteria']; @@ -1256,7 +1256,7 @@ class QueryGenerator { } } $this->endGroup(); - } elseif($input['type']=='dbrd') { + } elseif(isset($input['type']) && $input['type']=='dbrd') { if($this->conditionInstanceCount > 0) { $this->startGroup(self::$AND); } else { @@ -1300,7 +1300,7 @@ class QueryGenerator { if(isset($input['search_text']) && $input['search_text']!="") { // search other characters like "|, ?, ?" by jagi $value = $input['search_text']; - $stringConvert = function_exists(iconv) ? @iconv("UTF-8",$default_charset,$value) + $stringConvert = function_exists('iconv') ? @iconv("UTF-8",$default_charset,$value) : $value; if(!$this->isStringType($type)) { $value=trim($stringConvert); diff --git a/include/Webservices/WebserviceField.php b/include/Webservices/WebserviceField.php index e62ec10ce0fdc423944ee45981eab3654eed493d..9b852d2d51cbc1033ec8c70956c4810367be0230 100644 --- a/include/Webservices/WebserviceField.php +++ b/include/Webservices/WebserviceField.php @@ -58,7 +58,7 @@ class WebserviceField{ $this->presence = $row['presence']; $this->typeOfData = $typeOfData; $typeOfData = explode("~",$typeOfData); - $this->mandatory = ($typeOfData[1] == 'M')? true: false; + $this->mandatory = isset($typeOfData[1]) && $typeOfData[1] == 'M' ? true: false; if($this->uitype == 4){ $this->mandatory = false; } diff --git a/include/database/PearDatabase.php b/include/database/PearDatabase.php index e564f01544ac093cbdedf6923b0dfa0940c088cb..766e9fb80a888fb150dd9236773df3dedaf7d28b 100644 --- a/include/database/PearDatabase.php +++ b/include/database/PearDatabase.php @@ -296,7 +296,7 @@ class PearDatabase{ $this->executeSetNamesUTF8SQL(); $sql_start_time = microtime(true); - $result = & $this->database->Execute($sql); + $result = $this->database->Execute($sql); $this->logSqlTiming($sql_start_time, microtime(true), $sql); $this->lastmysqlrow = -1; diff --git a/modules/Reports/Reports.php b/modules/Reports/Reports.php index d2e2a3380a413693338a393b134b384299247431..326abfefa31feaa56d3409321de5466f75430f85 100644 --- a/modules/Reports/Reports.php +++ b/modules/Reports/Reports.php @@ -114,6 +114,7 @@ class Reports extends CRMEntity{ function Reports($reportid="") { global $adb,$current_user,$theme,$mod_strings; + $current_user_parent_role_seq = ''; $this->initListOfModules(); if($reportid != "") { @@ -465,6 +466,7 @@ class Reports extends CRMEntity{ function sgetRptsforFldr($rpt_fldr_id, $paramsList=false) { $srptdetails=""; + $current_user_parent_role_seq = ''; global $adb; global $log; global $mod_strings,$current_user; @@ -488,6 +490,7 @@ class Reports extends CRMEntity{ $userGroups = new GetUserGroups(); $userGroups->getAllUserGroups($current_user->id); $user_groups = $userGroups->user_groups; + $user_group_query = ''; if(!empty($user_groups) && $is_admin==false){ $user_group_query = " (shareid IN (".generateQuestionMarks($user_groups).") AND setype='groups') OR"; array_push($params, $user_groups); diff --git a/modules/Reports/models/Folder.php b/modules/Reports/models/Folder.php index 2265a3912f037ad7903a8a11ed2baa673096a758..77427cce00a0ef564b7144b646355240c59fada2 100644 --- a/modules/Reports/models/Folder.php +++ b/modules/Reports/models/Folder.php @@ -95,6 +95,7 @@ class Reports_Folder_Model extends Vtiger_Base_Model { $reportsList = $reportClassInstance->sgetRptsforFldr($fldrId, $paramsList); if(!$fldrId){ + $reportsCount = 0; foreach ($reportsList as $reportId => $reports) { $reportsCount += count($reports); } @@ -105,7 +106,8 @@ class Reports_Folder_Model extends Vtiger_Base_Model { $pageLimit = $pagingModel->getPageLimit(); if($reportsCount > $pageLimit){ if(!$fldrId){ - $lastKey = end(array_keys($reportsList)); + $arrayKeys = array_keys($reportsList); + $lastKey = end($arrayKeys); array_pop($reportsList[$lastKey]); }else{ array_pop($reportsList); diff --git a/modules/Reports/models/ListView.php b/modules/Reports/models/ListView.php index dad030db247c39d9785e64326988cf619f77cfac..9212965ee64ec08f6bebc30adb38ebaba433a9bd 100644 --- a/modules/Reports/models/ListView.php +++ b/modules/Reports/models/ListView.php @@ -17,7 +17,7 @@ class Reports_ListView_Model extends Vtiger_ListView_Model { * Function to get the list of listview links for the module * @return <Array> - Associate array of Link Type to List of Vtiger_Link_Model instances */ - public function getListViewLinks() { + public function getListViewLinks($linkParams = null) { $currentUserModel = Users_Record_Model::getCurrentUserModel(); $privileges = Users_Privileges_Model::getCurrentUserPrivilegesModel(); $basicLinks = array(); @@ -70,7 +70,7 @@ class Reports_ListView_Model extends Vtiger_ListView_Model { * @param <Array> $linkParams * @return <Array> - Associative array of Link type to List of Vtiger_Link_Model instances for Mass Actions */ - public function getListViewMassActions() { + public function getListViewMassActions($linkParams = null) { $currentUserModel = Users_Privileges_Model::getCurrentUserPrivilegesModel(); $massActionLinks = array(); diff --git a/modules/Reports/models/Record.php b/modules/Reports/models/Record.php index 0891a801e5e9ec7e09f05beceaa0581bc092f3a9..3d5619bcc71af73d51294f621666a4dcbb6f9088 100644 --- a/modules/Reports/models/Record.php +++ b/modules/Reports/models/Record.php @@ -121,7 +121,7 @@ class Reports_Record_Model extends Vtiger_Record_Model { * @param <String> $module * @return <Reports_Record_Model> */ - public static function getInstanceById($recordId) { + public static function getInstanceById($recordId, $module = NULL) { $db = PearDatabase::getInstance(); $self = new self(); diff --git a/modules/Vtiger/uitypes/Url.php b/modules/Vtiger/uitypes/Url.php index 8d0beebd0849d9a9c1aa608929c04054c343985a..6be39bc8912c4aa124cbd91fb7b7a9e22c2d6afa 100644 --- a/modules/Vtiger/uitypes/Url.php +++ b/modules/Vtiger/uitypes/Url.php @@ -18,7 +18,7 @@ class Vtiger_Url_UIType extends Vtiger_Base_UIType { return 'uitypes/Url.tpl'; } - public function getDisplayValue($value) { + public function getDisplayValue($value, $record = false, $recordInstance = false) { $matchPattern = "^[\w]+:\/\/^"; preg_match($matchPattern, $value, $matches); if(!empty ($matches[0])) {