Skip to content
Snippets Groups Projects
Commit 02508128 authored by Apparao G's avatar Apparao G
Browse files

Merged with Master

parents ef2e0061 1d74909b
No related branches found
No related tags found
No related merge requests found
...@@ -99,7 +99,7 @@ class Calendar_TaskManagement_View extends Vtiger_Index_View { ...@@ -99,7 +99,7 @@ class Calendar_TaskManagement_View extends Vtiger_Index_View {
if (!$request->get('colors')) { if (!$request->get('colors')) {
$colors = array(); $colors = array();
foreach ($priorities as $priority => $value) { foreach ($priorities as $priority => $value) {
$colors[$key] = $this->getColors($priority,$field->getName()); $colors[$priority] = $this->getColors($priority, $field->getName());
} }
} else { } else {
$colors = $request->get('colors'); $colors = $request->get('colors');
...@@ -107,14 +107,14 @@ class Calendar_TaskManagement_View extends Vtiger_Index_View { ...@@ -107,14 +107,14 @@ class Calendar_TaskManagement_View extends Vtiger_Index_View {
return $colors; return $colors;
} }
public function getColors($priority,$fieldname){ public function getColors($priority, $fieldname){
$db=PearDatabase::getInstance(); $db=PearDatabase::getInstance();
if(isset($priorities)){ if(isset($priority)){
$tableName = "vtiger_$fieldname"; $tableName = "vtiger_$fieldname";
$result=$db->pquery("SELECT color FROM $tableName WHERE $fieldname=?",array($priority)); $result=$db->pquery("SELECT color FROM $tableName WHERE $fieldname=?",array($priority));
$no_of_row=$db->num_rows($result); $no_of_row=$db->num_rows($result);
for($i=0;$i<$no_of_row;$i++){ for($i=0;$i<$no_of_row;$i++){
$color = $db->query_result($result,$i,'color'); $color = $db->query_result($result, $i, 'color');
} }
} }
if($color=='#ffffff' || empty($color)) { if($color=='#ffffff' || empty($color)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment