Completed
Push — master ( 58f496...a833c2 )
by Adam
18:52
created
modules/Contacts/metadata/listviewdefs.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -42,61 +42,61 @@  discard block
 block discarded – undo
42 42
 
43 43
 
44 44
 $listViewDefs['Contacts'] = array(
45
-	'NAME' => array(
46
-		'width' => '20%', 		
47
-		'label' => 'LBL_LIST_NAME', 
48
-		'link' => true,
45
+    'NAME' => array(
46
+        'width' => '20%', 		
47
+        'label' => 'LBL_LIST_NAME', 
48
+        'link' => true,
49 49
         'contextMenu' => array('objectType' => 'sugarPerson', 
50
-                               'metaData' => array('contact_id' => '{$ID}', 
51
-                                                   'module' => 'Contacts',
52
-                                                   'return_action' => 'ListView', 
53
-                                                   'contact_name' => '{$FULL_NAME}', 
54
-                                                   'parent_id' => '{$ACCOUNT_ID}',
55
-                                                   'parent_name' => '{$ACCOUNT_NAME}',
56
-                                                   'return_module' => 'Contacts', 
57
-                                                   'return_action' => 'ListView', 
58
-                                                   'parent_type' => 'Account', 
59
-                                                   'notes_parent_type' => 'Account')
60
-                              ),
61
-		'orderBy' => 'name',
50
+                                'metaData' => array('contact_id' => '{$ID}', 
51
+                                                    'module' => 'Contacts',
52
+                                                    'return_action' => 'ListView', 
53
+                                                    'contact_name' => '{$FULL_NAME}', 
54
+                                                    'parent_id' => '{$ACCOUNT_ID}',
55
+                                                    'parent_name' => '{$ACCOUNT_NAME}',
56
+                                                    'return_module' => 'Contacts', 
57
+                                                    'return_action' => 'ListView', 
58
+                                                    'parent_type' => 'Account', 
59
+                                                    'notes_parent_type' => 'Account')
60
+                                ),
61
+        'orderBy' => 'name',
62 62
         'default' => true,
63 63
         'related_fields' => array('first_name', 'last_name', 'salutation', 'account_name', 'account_id'),
64
-		), 
65
-	'TITLE' => array(
66
-		'width' => '15%', 
67
-		'label' => 'LBL_LIST_TITLE',
64
+        ), 
65
+    'TITLE' => array(
66
+        'width' => '15%', 
67
+        'label' => 'LBL_LIST_TITLE',
68 68
         'default' => true), 
69
-	'ACCOUNT_NAME' => array(
70
-		'width' => '34%', 
71
-		'label' => 'LBL_LIST_ACCOUNT_NAME', 
72
-		'module' => 'Accounts',
73
-		'id' => 'ACCOUNT_ID',
74
-		'link' => true,
69
+    'ACCOUNT_NAME' => array(
70
+        'width' => '34%', 
71
+        'label' => 'LBL_LIST_ACCOUNT_NAME', 
72
+        'module' => 'Accounts',
73
+        'id' => 'ACCOUNT_ID',
74
+        'link' => true,
75 75
         'contextMenu' => array('objectType' => 'sugarAccount', 
76
-                               'metaData' => array('return_module' => 'Contacts', 
77
-                                                   'return_action' => 'ListView', 
78
-                                                   'module' => 'Accounts',
79
-                                                   'return_action' => 'ListView', 
80
-                                                   'parent_id' => '{$ACCOUNT_ID}', 
81
-                                                   'parent_name' => '{$ACCOUNT_NAME}', 
82
-                                                   'account_id' => '{$ACCOUNT_ID}', 
83
-                                                   'account_name' => '{$ACCOUNT_NAME}'),
84
-                              ),
76
+                                'metaData' => array('return_module' => 'Contacts', 
77
+                                                    'return_action' => 'ListView', 
78
+                                                    'module' => 'Accounts',
79
+                                                    'return_action' => 'ListView', 
80
+                                                    'parent_id' => '{$ACCOUNT_ID}', 
81
+                                                    'parent_name' => '{$ACCOUNT_NAME}', 
82
+                                                    'account_id' => '{$ACCOUNT_ID}', 
83
+                                                    'account_name' => '{$ACCOUNT_NAME}'),
84
+                                ),
85 85
         'default' => true,
86 86
         'sortable'=> true,
87 87
         'ACLTag' => 'ACCOUNT',
88 88
         'related_fields' => array('account_id')),
89
-	'EMAIL1' => array(
90
-		'width' => '15%', 
91
-		'label' => 'LBL_LIST_EMAIL_ADDRESS',
92
-		'sortable' => false,
93
-		'link' => true,
94
-		'customCode' => '{$EMAIL1_LINK}{$EMAIL1}</a>',
89
+    'EMAIL1' => array(
90
+        'width' => '15%', 
91
+        'label' => 'LBL_LIST_EMAIL_ADDRESS',
92
+        'sortable' => false,
93
+        'link' => true,
94
+        'customCode' => '{$EMAIL1_LINK}{$EMAIL1}</a>',
95 95
         'default' => true
96
-		),  
97
-	'PHONE_WORK' => array(
98
-		'width' => '15%', 
99
-		'label' => 'LBL_OFFICE_PHONE',
96
+        ),  
97
+    'PHONE_WORK' => array(
98
+        'width' => '15%', 
99
+        'label' => 'LBL_OFFICE_PHONE',
100 100
         'default' => true),
101 101
     'DEPARTMENT' => array(
102 102
         'width' => '10', 
@@ -177,6 +177,6 @@  discard block
 block discarded – undo
177 177
     'DATE_ENTERED' => array(
178 178
         'width' => '10', 
179 179
         'label' => 'LBL_DATE_ENTERED',
180
-		'default' => true)       
180
+        'default' => true)       
181 181
 );
182 182
 ?>
Please login to merge, or discard this patch.
modules/Contacts/views/view.detail.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -44,27 +44,27 @@
 block discarded – undo
44 44
 
45 45
 class ContactsViewDetail extends ViewDetail
46 46
 {
47
- 	/**
48
- 	 * @see SugarView::display()
49
-	 *
50
- 	 * We are overridding the display method to manipulate the portal information.
51
- 	 * If portal is not enabled then don't show the portal fields.
52
- 	 */
53
-	public function display(){
54
-		global $sugar_config;
47
+        /**
48
+         * @see SugarView::display()
49
+         *
50
+         * We are overridding the display method to manipulate the portal information.
51
+         * If portal is not enabled then don't show the portal fields.
52
+         */
53
+    public function display(){
54
+        global $sugar_config;
55 55
 
56
-		$aop_portal_enabled = !empty($sugar_config['aop']['enable_portal']) && !empty($sugar_config['aop']['enable_aop']);
56
+        $aop_portal_enabled = !empty($sugar_config['aop']['enable_portal']) && !empty($sugar_config['aop']['enable_aop']);
57 57
 
58
-		$this->ss->assign("AOP_PORTAL_ENABLED", $aop_portal_enabled);
58
+        $this->ss->assign("AOP_PORTAL_ENABLED", $aop_portal_enabled);
59 59
 
60
-		require_once('modules/AOS_PDF_Templates/formLetter.php');
61
-		formLetter::DVPopupHtml('Contacts');
60
+        require_once('modules/AOS_PDF_Templates/formLetter.php');
61
+        formLetter::DVPopupHtml('Contacts');
62 62
 
63
-		$admin = new Administration();
64
-		$admin->retrieveSettings();
65
-		if(isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
66
-			$this->ss->assign("PORTAL_ENABLED", true);
67
-		}
68
-		parent::display();
69
-	}
63
+        $admin = new Administration();
64
+        $admin->retrieveSettings();
65
+        if(isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
66
+            $this->ss->assign("PORTAL_ENABLED", true);
67
+        }
68
+        parent::display();
69
+    }
70 70
 }
Please login to merge, or discard this patch.
modules/Contacts/views/view.quickcreate.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -46,17 +46,17 @@
 block discarded – undo
46 46
 {
47 47
     public function preDisplay() 
48 48
     {
49
-    	parent::preDisplay();
50
-    	if($this->_isDCForm) {
51
-    		//XXX TODO 20110329 Frank Steegmans: Hack to make quick create fields populate when used through the DC menu
52
-    		//          NOTE HOWEVER that sqs_objects form fields are not properly populated because of some other hacks
53
-    		//          resulting in none of the fields properly populating when selecting an account
54
-    		if(!empty($this->bean->phone_office))$_REQUEST['phone_work'] = $this->bean->phone_office;
55
-    		if(!empty($this->bean->billing_address_street))$_REQUEST['primary_address_street'] = $this->bean->billing_address_street;
56
-    		if(!empty($this->bean->billing_address_city))$_REQUEST['primary_address_city'] = $this->bean->billing_address_city;
57
-    		if(!empty($this->bean->billing_address_state))$_REQUEST['primary_address_state'] = $this->bean->billing_address_state;
58
-    		if(!empty($this->bean->billing_address_country))$_REQUEST['primary_address_country'] = $this->bean->billing_address_country;
59
-    		if(!empty($this->bean->billing_address_postalcode))$_REQUEST['primary_address_postalcode'] = $this->bean->billing_address_postalcode;
60
-	   	}
49
+        parent::preDisplay();
50
+        if($this->_isDCForm) {
51
+            //XXX TODO 20110329 Frank Steegmans: Hack to make quick create fields populate when used through the DC menu
52
+            //          NOTE HOWEVER that sqs_objects form fields are not properly populated because of some other hacks
53
+            //          resulting in none of the fields properly populating when selecting an account
54
+            if(!empty($this->bean->phone_office))$_REQUEST['phone_work'] = $this->bean->phone_office;
55
+            if(!empty($this->bean->billing_address_street))$_REQUEST['primary_address_street'] = $this->bean->billing_address_street;
56
+            if(!empty($this->bean->billing_address_city))$_REQUEST['primary_address_city'] = $this->bean->billing_address_city;
57
+            if(!empty($this->bean->billing_address_state))$_REQUEST['primary_address_state'] = $this->bean->billing_address_state;
58
+            if(!empty($this->bean->billing_address_country))$_REQUEST['primary_address_country'] = $this->bean->billing_address_country;
59
+            if(!empty($this->bean->billing_address_postalcode))$_REQUEST['primary_address_postalcode'] = $this->bean->billing_address_postalcode;
60
+            }
61 61
     }    
62 62
 }
63 63
\ No newline at end of file
Please login to merge, or discard this patch.
modules/Contacts/views/view.validportalusername.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -54,17 +54,17 @@  discard block
 block discarded – undo
54 54
 
55 55
 class ContactsViewValidPortalUsername extends SugarView 
56 56
 {
57
- 	/**
58
-     * @see SugarView::process()
59
-     */
57
+        /**
58
+         * @see SugarView::process()
59
+         */
60 60
     public function process() 
61
- 	{
62
-		$this->display();
63
- 	}
61
+        {
62
+        $this->display();
63
+        }
64 64
 
65
- 	/**
66
-     * @see SugarView::display()
67
-     */
65
+        /**
66
+         * @see SugarView::display()
67
+         */
68 68
     public function display()
69 69
     {
70 70
         if (!empty($_REQUEST['portal_name'])) {
@@ -76,6 +76,6 @@  discard block
 block discarded – undo
76 76
             echo $total;
77 77
         }
78 78
         else
79
-           echo '0';
80
- 	}	
79
+            echo '0';
80
+        }	
81 81
 }
82 82
\ No newline at end of file
Please login to merge, or discard this patch.
modules/Contacts/ContactOpportunityRelationshipEdit.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 }
63 63
 
64 64
 if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
65
-	$focus->id = "";
65
+    $focus->id = "";
66 66
 }
67 67
 
68 68
 // Prepopulate either side of the relationship if passed in.
Please login to merge, or discard this patch.
modules/AOS_PDF_Templates/formLetterPdf.php 1 patch
Indentation   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -26,17 +26,17 @@  discard block
 block discarded – undo
26 26
 
27 27
 //ini_set('display_errors', '1');
28 28
 
29
-	require_once('modules/AOS_PDF_Templates/PDF_Lib/mpdf.php');
30
-	require_once('modules/AOS_PDF_Templates/templateParser.php');
31
-	require_once('modules/AOS_PDF_Templates/AOS_PDF_Templates.php');
29
+    require_once('modules/AOS_PDF_Templates/PDF_Lib/mpdf.php');
30
+    require_once('modules/AOS_PDF_Templates/templateParser.php');
31
+    require_once('modules/AOS_PDF_Templates/AOS_PDF_Templates.php');
32 32
 	
33
-	global $sugar_config;
33
+    global $sugar_config;
34 34
 
35 35
     $module_type = $_REQUEST['module'];
36
-	$module_type_create = rtrim($module_type,'s');
37
-	$module_type_low = strtolower($module_type);
36
+    $module_type_create = rtrim($module_type,'s');
37
+    $module_type_low = strtolower($module_type);
38 38
 	
39
-	$module = new $module_type_create();
39
+    $module = new $module_type_create();
40 40
 
41 41
     $recordIds = array();
42 42
 
@@ -59,101 +59,101 @@  discard block
 block discarded – undo
59 59
     }
60 60
 
61 61
 	
62
-	$template = new AOS_PDF_Templates();
63
-	$template->retrieve($_REQUEST['templateID']);
62
+    $template = new AOS_PDF_Templates();
63
+    $template->retrieve($_REQUEST['templateID']);
64 64
 	
65
-	$pdf=new mPDF('en','A4','','DejaVuSansCondensed',$template->margin_left,$template->margin_right,$template->margin_top,$template->margin_bottom,$template->margin_header,$template->margin_footer);
65
+    $pdf=new mPDF('en','A4','','DejaVuSansCondensed',$template->margin_left,$template->margin_right,$template->margin_top,$template->margin_bottom,$template->margin_header,$template->margin_footer);
66 66
 	
67
-	foreach ($recordIds as $recordId) {
68
-		$module->retrieve($recordId);
69
-		$pdf_history=new mPDF('en','A4','','DejaVuSansCondensed',$template->margin_left,$template->margin_right,$template->margin_top,$template->margin_bottom,$template->margin_header,$template->margin_footer);
67
+    foreach ($recordIds as $recordId) {
68
+        $module->retrieve($recordId);
69
+        $pdf_history=new mPDF('en','A4','','DejaVuSansCondensed',$template->margin_left,$template->margin_right,$template->margin_top,$template->margin_bottom,$template->margin_header,$template->margin_footer);
70 70
 
71
-		$object_arr = array();
72
-		$object_arr[$module_type] = $module->id;
71
+        $object_arr = array();
72
+        $object_arr[$module_type] = $module->id;
73 73
 	
74
-		if($module_type === 'Contacts')
75
-		{
76
-			$object_arr['Accounts'] = $module->account_id;
77
-		}
74
+        if($module_type === 'Contacts')
75
+        {
76
+            $object_arr['Accounts'] = $module->account_id;
77
+        }
78 78
 	
79
-		$search = array ('@<script[^>]*?>.*?</script>@si', 		// Strip out javascript
80
-						'@<[\/\!]*?[^<>]*?>@si',		// Strip out HTML tags
81
-						'@([\r\n])[\s]+@',			// Strip out white space
82
-						'@&(quot|#34);@i',			// Replace HTML entities
83
-						'@&(amp|#38);@i',
84
-						'@&(lt|#60);@i',
85
-						'@&(gt|#62);@i',
86
-						'@&(nbsp|#160);@i',
87
-						'@&(iexcl|#161);@i',
88
-						'@<address[^>]*?>@si'
89
-		);
79
+        $search = array ('@<script[^>]*?>.*?</script>@si', 		// Strip out javascript
80
+                        '@<[\/\!]*?[^<>]*?>@si',		// Strip out HTML tags
81
+                        '@([\r\n])[\s]+@',			// Strip out white space
82
+                        '@&(quot|#34);@i',			// Replace HTML entities
83
+                        '@&(amp|#38);@i',
84
+                        '@&(lt|#60);@i',
85
+                        '@&(gt|#62);@i',
86
+                        '@&(nbsp|#160);@i',
87
+                        '@&(iexcl|#161);@i',
88
+                        '@<address[^>]*?>@si'
89
+        );
90 90
 
91
-		$replace = array ('',
92
-						 '',
93
-						 '\1',
94
-						 '"',
95
-						 '&',
96
-						 '<',
97
-						 '>',
98
-						 ' ',
99
-						 chr(161),
100
-						 '<br>'
101
-			);
91
+        $replace = array ('',
92
+                            '',
93
+                            '\1',
94
+                            '"',
95
+                            '&',
96
+                            '<',
97
+                            '>',
98
+                            ' ',
99
+                            chr(161),
100
+                            '<br>'
101
+            );
102 102
 	
103
-		$text = preg_replace($search, $replace, $template->description);
104
-		$text = preg_replace_callback('/\{DATE\s+(.*?)\}/', 
105
-			function ($matches) { return date($matches[1]); },
106
-			$text );
107
-		$header = preg_replace($search, $replace, $template->pdfheader);
108
-		$footer = preg_replace($search, $replace, $template->pdffooter);
103
+        $text = preg_replace($search, $replace, $template->description);
104
+        $text = preg_replace_callback('/\{DATE\s+(.*?)\}/', 
105
+            function ($matches) { return date($matches[1]); },
106
+            $text );
107
+        $header = preg_replace($search, $replace, $template->pdfheader);
108
+        $footer = preg_replace($search, $replace, $template->pdffooter);
109 109
 	
110
-		$converted = templateParser::parse_template($text, $object_arr);
111
-		$header = templateParser::parse_template($header, $object_arr);
112
-		$footer = templateParser::parse_template($footer, $object_arr);
110
+        $converted = templateParser::parse_template($text, $object_arr);
111
+        $header = templateParser::parse_template($header, $object_arr);
112
+        $footer = templateParser::parse_template($footer, $object_arr);
113 113
 	
114
-		$printable = str_replace("\n","<br />",$converted);
114
+        $printable = str_replace("\n","<br />",$converted);
115 115
 
116
-		$file_name = str_replace(" ","_",$template->name).".pdf";
116
+        $file_name = str_replace(" ","_",$template->name).".pdf";
117 117
 	
118
-		ob_clean();
119
-		try{
120
-			$note = new Note();
121
-			$note->modified_user_id = $current_user->id;
122
-			$note->created_by = $current_user->id;
123
-			$note->name = $file_name;
124
-			$note->parent_type = $module_type;
125
-			$note->parent_id = $module->id;
126
-			$note->file_mime_type = 'application/pdf';
127
-			$note->filename = $file_name;
128
-			if($module_type == 'Contacts')
129
-			{
130
-				$note->contact_id = $module->id;
131
-				$note->parent_type = 'Accounts';
132
-				$note->parent_id = $module->account_id;
133
-			}
134
-			$note->save();
118
+        ob_clean();
119
+        try{
120
+            $note = new Note();
121
+            $note->modified_user_id = $current_user->id;
122
+            $note->created_by = $current_user->id;
123
+            $note->name = $file_name;
124
+            $note->parent_type = $module_type;
125
+            $note->parent_id = $module->id;
126
+            $note->file_mime_type = 'application/pdf';
127
+            $note->filename = $file_name;
128
+            if($module_type == 'Contacts')
129
+            {
130
+                $note->contact_id = $module->id;
131
+                $note->parent_type = 'Accounts';
132
+                $note->parent_id = $module->account_id;
133
+            }
134
+            $note->save();
135 135
 		
136
-			$fp = fopen($sugar_config['upload_dir'].'nfile.pdf','wb');
137
-			fclose($fp);
136
+            $fp = fopen($sugar_config['upload_dir'].'nfile.pdf','wb');
137
+            fclose($fp);
138 138
 		
139
-			$pdf_history->setAutoFont();
140
-			$pdf_history->SetHTMLHeader($header);
141
-			$pdf_history->SetHTMLFooter($footer);
142
-			$pdf_history->writeHTML($printable);
143
-			$pdf_history->Output($sugar_config['upload_dir'].'nfile.pdf','F');
139
+            $pdf_history->setAutoFont();
140
+            $pdf_history->SetHTMLHeader($header);
141
+            $pdf_history->SetHTMLFooter($footer);
142
+            $pdf_history->writeHTML($printable);
143
+            $pdf_history->Output($sugar_config['upload_dir'].'nfile.pdf','F');
144 144
 		
145
-			$pdf->AddPage();
146
-			$pdf->setAutoFont();
147
-			$pdf->SetHTMLHeader($header);
148
-			$pdf->SetHTMLFooter($footer);
149
-			$pdf->writeHTML($printable);
145
+            $pdf->AddPage();
146
+            $pdf->setAutoFont();
147
+            $pdf->SetHTMLHeader($header);
148
+            $pdf->SetHTMLFooter($footer);
149
+            $pdf->writeHTML($printable);
150 150
 		
151
-			rename($sugar_config['upload_dir'].'nfile.pdf',$sugar_config['upload_dir'].$note->id);
151
+            rename($sugar_config['upload_dir'].'nfile.pdf',$sugar_config['upload_dir'].$note->id);
152 152
 		
153
-		}catch(mPDF_exception $e){ 
154
-			echo $e;
155
-		}
156
-	}
153
+        }catch(mPDF_exception $e){ 
154
+            echo $e;
155
+        }
156
+    }
157 157
 	
158
-	$pdf->Output($file_name, "D");
158
+    $pdf->Output($file_name, "D");
159 159
 ?>
Please login to merge, or discard this patch.
modules/ACLActions/actiondefs.override.php 1 patch
Indentation   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -35,103 +35,103 @@
 block discarded – undo
35 35
  * "Powered by SugarCRM".
36 36
  ********************************************************************************/
37 37
 
38
- if(!defined('ACL_ALLOW_NONE')){   
39
- 	define('ACL_ALLOW_ADMIN_DEV', 100);
40
- 	define('ACL_ALLOW_ADMIN', 99);
41
- 	define('ACL_ALLOW_ALL', 90);                        
42
- 	define('ACL_ALLOW_ENABLED', 89);
43
- 	/* BEGIN - SECURITY GROUPS */ 
44
- 	define('ACL_ALLOW_GROUP', 80); //securitygroup
45
- 	/* END - SECURITY GROUPS */ 
46
- 	define('ACL_ALLOW_OWNER', 75);
47
- 	define('ACL_ALLOW_NORMAL', 1);
48
- 	define('ACL_ALLOW_DEFAULT', 0);
49
- 	define('ACL_ALLOW_DISABLED', -98);
50
- 	define('ACL_ALLOW_NONE', -99);
51
- 	define('ACL_ALLOW_DEV', 95);
52
- }
53
- /**
54
-  * $GLOBALS['ACLActionAccessLevels
55
-  * these are rendering descriptions for Access Levels giving information such as the label, color, and text color to use when rendering the access level
56
-  */
57
- $GLOBALS['ACLActionAccessLevels'] = array(
58
- 	ACL_ALLOW_ALL=>array('color'=>'#008000', 'label'=>'LBL_ACCESS_ALL', 'text_color'=>'white'),
59
- 	ACL_ALLOW_OWNER=>array('color'=>'#6F6800', 'label'=>'LBL_ACCESS_OWNER', 'text_color'=>'white'),
60
- 	ACL_ALLOW_NONE=>array('color'=>'#FF0000', 'label'=>'LBL_ACCESS_NONE', 'text_color'=>'white'),
61
- 	ACL_ALLOW_ENABLED=>array('color'=>'#008000', 'label'=>'LBL_ACCESS_ENABLED', 'text_color'=>'white'),
62
- 	ACL_ALLOW_DISABLED=>array('color'=>'#FF0000', 'label'=>'LBL_ACCESS_DISABLED', 'text_color'=>'white'),
63
- 	ACL_ALLOW_ADMIN=>array('color'=>'#0000FF', 'label'=>'LBL_ACCESS_ADMIN', 'text_color'=>'white'),
64
- 	ACL_ALLOW_NORMAL=>array('color'=>'#008000', 'label'=>'LBL_ACCESS_NORMAL', 'text_color'=>'white'),
65
- 	ACL_ALLOW_DEFAULT=>array('color'=>'#008000', 'label'=>'LBL_ACCESS_DEFAULT', 'text_color'=>'white'),
66
- 	ACL_ALLOW_DEV=>array('color'=>'#0000FF', 'label'=>'LBL_ACCESS_DEV', 'text_color'=>'white'),
67
- 	ACL_ALLOW_ADMIN_DEV=>array('color'=>'#0000FF', 'label'=>'LBL_ACCESS_ADMIN_DEV', 'text_color'=>'white'),
68
- 	/* BEGIN - SECURITY GROUPS */ 
69
- 	ACL_ALLOW_GROUP=>array('color'=>'#0000A0', 'label'=>'LBL_ACCESS_GROUP', 'text_color'=>'white'), //securitygroup
70
- 	/* END - SECURITY GROUPS */ 
71
- 	);
38
+    if(!defined('ACL_ALLOW_NONE')){   
39
+        define('ACL_ALLOW_ADMIN_DEV', 100);
40
+        define('ACL_ALLOW_ADMIN', 99);
41
+        define('ACL_ALLOW_ALL', 90);                        
42
+        define('ACL_ALLOW_ENABLED', 89);
43
+        /* BEGIN - SECURITY GROUPS */ 
44
+        define('ACL_ALLOW_GROUP', 80); //securitygroup
45
+        /* END - SECURITY GROUPS */ 
46
+        define('ACL_ALLOW_OWNER', 75);
47
+        define('ACL_ALLOW_NORMAL', 1);
48
+        define('ACL_ALLOW_DEFAULT', 0);
49
+        define('ACL_ALLOW_DISABLED', -98);
50
+        define('ACL_ALLOW_NONE', -99);
51
+        define('ACL_ALLOW_DEV', 95);
52
+    }
53
+    /**
54
+     * $GLOBALS['ACLActionAccessLevels
55
+     * these are rendering descriptions for Access Levels giving information such as the label, color, and text color to use when rendering the access level
56
+     */
57
+    $GLOBALS['ACLActionAccessLevels'] = array(
58
+        ACL_ALLOW_ALL=>array('color'=>'#008000', 'label'=>'LBL_ACCESS_ALL', 'text_color'=>'white'),
59
+        ACL_ALLOW_OWNER=>array('color'=>'#6F6800', 'label'=>'LBL_ACCESS_OWNER', 'text_color'=>'white'),
60
+        ACL_ALLOW_NONE=>array('color'=>'#FF0000', 'label'=>'LBL_ACCESS_NONE', 'text_color'=>'white'),
61
+        ACL_ALLOW_ENABLED=>array('color'=>'#008000', 'label'=>'LBL_ACCESS_ENABLED', 'text_color'=>'white'),
62
+        ACL_ALLOW_DISABLED=>array('color'=>'#FF0000', 'label'=>'LBL_ACCESS_DISABLED', 'text_color'=>'white'),
63
+        ACL_ALLOW_ADMIN=>array('color'=>'#0000FF', 'label'=>'LBL_ACCESS_ADMIN', 'text_color'=>'white'),
64
+        ACL_ALLOW_NORMAL=>array('color'=>'#008000', 'label'=>'LBL_ACCESS_NORMAL', 'text_color'=>'white'),
65
+        ACL_ALLOW_DEFAULT=>array('color'=>'#008000', 'label'=>'LBL_ACCESS_DEFAULT', 'text_color'=>'white'),
66
+        ACL_ALLOW_DEV=>array('color'=>'#0000FF', 'label'=>'LBL_ACCESS_DEV', 'text_color'=>'white'),
67
+        ACL_ALLOW_ADMIN_DEV=>array('color'=>'#0000FF', 'label'=>'LBL_ACCESS_ADMIN_DEV', 'text_color'=>'white'),
68
+        /* BEGIN - SECURITY GROUPS */ 
69
+        ACL_ALLOW_GROUP=>array('color'=>'#0000A0', 'label'=>'LBL_ACCESS_GROUP', 'text_color'=>'white'), //securitygroup
70
+        /* END - SECURITY GROUPS */ 
71
+        );
72 72
 /**
73
- * $GLOBALS['ACLActions
74
- * These are the actions for a given type. It includes the ACCESS Levels for that action and the label for that action. Every an object of the category (e.g. module) is added all associated actions are added for that object
75
- */
73
+         * $GLOBALS['ACLActions
74
+         * These are the actions for a given type. It includes the ACCESS Levels for that action and the label for that action. Every an object of the category (e.g. module) is added all associated actions are added for that object
75
+         */
76 76
 /* BEGIN - SECURITY GROUPS */ 
77 77
 $GLOBALS['ACLActions'] = array(
78
-	'module'=>array('actions'=>
79
-						array(
80
-						'access'=>
81
-								array(
82
-									'aclaccess'=>array(ACL_ALLOW_ENABLED,ACL_ALLOW_DEFAULT, ACL_ALLOW_DISABLED),
83
-									'label'=>'LBL_ACTION_ACCESS',
84
-									'default'=>ACL_ALLOW_ENABLED,
85
-								),
78
+    'module'=>array('actions'=>
79
+                        array(
80
+                        'access'=>
81
+                                array(
82
+                                    'aclaccess'=>array(ACL_ALLOW_ENABLED,ACL_ALLOW_DEFAULT, ACL_ALLOW_DISABLED),
83
+                                    'label'=>'LBL_ACTION_ACCESS',
84
+                                    'default'=>ACL_ALLOW_ENABLED,
85
+                                ),
86 86
 							
87
-						'view'=>
88
-								array(
89
-									'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_GROUP,ACL_ALLOW_OWNER,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
90
-									'label'=>'LBL_ACTION_VIEW',
91
-									'default'=>ACL_ALLOW_ALL,
92
-								),
87
+                        'view'=>
88
+                                array(
89
+                                    'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_GROUP,ACL_ALLOW_OWNER,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
90
+                                    'label'=>'LBL_ACTION_VIEW',
91
+                                    'default'=>ACL_ALLOW_ALL,
92
+                                ),
93 93
 					
94
-						'list'=>
95
-								array(
96
-									'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_GROUP,ACL_ALLOW_OWNER,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
97
-									'label'=>'LBL_ACTION_LIST',
98
-									'default'=>ACL_ALLOW_ALL,
99
-								),
100
-						'edit'=>
101
-								array(
102
-									'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_GROUP,ACL_ALLOW_OWNER,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
103
-									'label'=>'LBL_ACTION_EDIT',
104
-									'default'=>ACL_ALLOW_ALL,
94
+                        'list'=>
95
+                                array(
96
+                                    'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_GROUP,ACL_ALLOW_OWNER,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
97
+                                    'label'=>'LBL_ACTION_LIST',
98
+                                    'default'=>ACL_ALLOW_ALL,
99
+                                ),
100
+                        'edit'=>
101
+                                array(
102
+                                    'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_GROUP,ACL_ALLOW_OWNER,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
103
+                                    'label'=>'LBL_ACTION_EDIT',
104
+                                    'default'=>ACL_ALLOW_ALL,
105 105
 									
106
-								),
107
-						'delete'=>
108
-							array(
109
-									'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_GROUP,ACL_ALLOW_OWNER,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
110
-									'label'=>'LBL_ACTION_DELETE',
111
-									'default'=>ACL_ALLOW_ALL,
106
+                                ),
107
+                        'delete'=>
108
+                            array(
109
+                                    'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_GROUP,ACL_ALLOW_OWNER,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
110
+                                    'label'=>'LBL_ACTION_DELETE',
111
+                                    'default'=>ACL_ALLOW_ALL,
112 112
 									
113
-								),
114
-						'import'=>
115
-							array(
116
-									'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
117
-									'label'=>'LBL_ACTION_IMPORT',
118
-									'default'=>ACL_ALLOW_ALL,
119
-								),
120
-						'export'=>
121
-							array(
122
-									'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_GROUP,ACL_ALLOW_OWNER,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
123
-									'label'=>'LBL_ACTION_EXPORT',
124
-									'default'=>ACL_ALLOW_ALL,
125
-								),
113
+                                ),
114
+                        'import'=>
115
+                            array(
116
+                                    'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
117
+                                    'label'=>'LBL_ACTION_IMPORT',
118
+                                    'default'=>ACL_ALLOW_ALL,
119
+                                ),
120
+                        'export'=>
121
+                            array(
122
+                                    'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_GROUP,ACL_ALLOW_OWNER,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
123
+                                    'label'=>'LBL_ACTION_EXPORT',
124
+                                    'default'=>ACL_ALLOW_ALL,
125
+                                ),
126 126
                         'massupdate'=>
127
-							array(
128
-									'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
129
-									'label'=>'LBL_ACTION_MASSUPDATE',
130
-									'default'=>ACL_ALLOW_ALL,
131
-								),
127
+                            array(
128
+                                    'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
129
+                                    'label'=>'LBL_ACTION_MASSUPDATE',
130
+                                    'default'=>ACL_ALLOW_ALL,
131
+                                ),
132 132
 						
133 133
 					
134
-				),),
134
+                ),),
135 135
 );
136 136
 /* END - SECURITY GROUPS */ 
137 137
 
Please login to merge, or discard this patch.
modules/ACLActions/vardefs.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -42,34 +42,34 @@  discard block
 block discarded – undo
42 42
 
43 43
 
44 44
 $dictionary['ACLAction'] = array('table' => 'acl_actions', 'comment' => 'Determine the allowable actions available to users'
45
-                               ,'fields' => array (
46
-  'id' =>
47
-  array (
45
+                                ,'fields' => array (
46
+    'id' =>
47
+    array (
48 48
     'name' => 'id',
49 49
     'vname' => 'LBL_ID',
50 50
     'required'=>true,
51 51
     'type' => 'id',
52 52
     'reportable'=>false,
53 53
     'comment' => 'Unique identifier'
54
-  ),
55
-   'date_entered' =>
56
-  array (
54
+    ),
55
+    'date_entered' =>
56
+    array (
57 57
     'name' => 'date_entered',
58 58
     'vname' => 'LBL_DATE_ENTERED',
59 59
     'type' => 'datetime',
60 60
     'required'=>true,
61 61
     'comment' => 'Date record created'
62
-  ),
63
-  'date_modified' =>
64
-  array (
62
+    ),
63
+    'date_modified' =>
64
+    array (
65 65
     'name' => 'date_modified',
66 66
     'vname' => 'LBL_DATE_MODIFIED',
67 67
     'type' => 'datetime',
68 68
     'required'=>true,
69 69
     'comment' => 'Date record last modified'
70
-  ),
70
+    ),
71 71
     'modified_user_id' =>
72
-  array (
72
+    array (
73 73
     'name' => 'modified_user_id',
74 74
     'rname' => 'user_name',
75 75
     'id_name' => 'modified_user_id',
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
     'len' => 36,
83 83
     'reportable'=>true,
84 84
     'comment' => 'User who last modified record'
85
-  ),
85
+    ),
86 86
     'created_by' =>
87
-  array (
87
+    array (
88 88
     'name' => 'created_by',
89 89
     'rname' => 'user_name',
90 90
     'id_name' => 'created_by',
@@ -95,63 +95,63 @@  discard block
 block discarded – undo
95 95
     'dbType' => 'id',
96 96
     'len' => 36,
97 97
     'comment' => 'User ID who created record'
98
-  ),
99
-   'name' =>
100
-  array (
98
+    ),
99
+    'name' =>
100
+    array (
101 101
     'name' => 'name',
102 102
     'type' => 'varchar',
103 103
     'vname' => 'LBL_NAME',
104 104
     'len' => 150,
105 105
     'comment' => 'Name of the allowable action (view, list, delete, edit)'
106
-  ),
107
-   'category' =>
108
-  array (
106
+    ),
107
+    'category' =>
108
+    array (
109 109
     'name' => 'category',
110 110
     'vname' => 'LBL_CATEGORY',
111 111
     'type' => 'varchar',
112
-	'len' =>100,
112
+    'len' =>100,
113 113
     'reportable'=>true,
114 114
     'comment' => 'Category of the allowable action (usually the name of a module)'
115
-  ),
115
+    ),
116 116
     'acltype' =>
117
-  array (
117
+    array (
118 118
     'name' => 'acltype',
119 119
     'vname' => 'LBL_TYPE',
120 120
     'type' => 'varchar',
121
-	'len' =>100,
121
+    'len' =>100,
122 122
     'reportable'=>true,
123 123
     'comment' => 'Specifier for Category, usually "module"'
124
-  ),
125
-  'aclaccess' =>
126
-  array (
124
+    ),
125
+    'aclaccess' =>
126
+    array (
127 127
     'name' => 'aclaccess',
128 128
     'vname' => 'LBL_ACCESS',
129 129
     'type' => 'int',
130 130
     'len'=>3,
131 131
     'reportable'=>true,
132 132
     'comment' => 'Number specifying access priority; highest access "wins"'
133
-  ),
134
-  'deleted' =>
135
-  array (
133
+    ),
134
+    'deleted' =>
135
+    array (
136 136
     'name' => 'deleted',
137 137
     'vname' => 'LBL_DELETED',
138 138
     'type' => 'bool',
139 139
     'reportable'=>false,
140 140
     'comment' => 'Record deletion indicator'
141
-  ),
142
-  'roles' =>
143
-  array (
144
-  	'name' => 'roles',
141
+    ),
142
+    'roles' =>
143
+    array (
144
+        'name' => 'roles',
145 145
     'type' => 'link',
146 146
     'relationship' => 'acl_roles_actions',
147 147
     'source'=>'non-db',
148
-	'vname'=>'LBL_USERS',
149
-  ),
148
+    'vname'=>'LBL_USERS',
149
+    ),
150 150
 ),
151 151
 'indices' => array (
152
-       array('name' =>'aclactionid', 'type' =>'primary', 'fields'=>array('id')),
153
-       array('name' =>'idx_aclaction_id_del', 'type' =>'index', 'fields'=>array('id', 'deleted')),
154
-       array('name' =>'idx_category_name', 'type' =>'index', 'fields'=>array('category', 'name')),                                                   )
152
+        array('name' =>'aclactionid', 'type' =>'primary', 'fields'=>array('id')),
153
+        array('name' =>'idx_aclaction_id_del', 'type' =>'index', 'fields'=>array('id', 'deleted')),
154
+        array('name' =>'idx_category_name', 'type' =>'index', 'fields'=>array('category', 'name')),                                                   )
155 155
 
156 156
                             );
157 157
 ?>
158 158
\ No newline at end of file
Please login to merge, or discard this patch.
modules/ACLActions/Menu.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@
 block discarded – undo
40 40
 
41 41
 global $mod_strings;
42 42
 $module_menu = Array(
43
-	Array("index.php?module=ACLRoles&action=index", $mod_strings['LIST_ROLES'],"Roles"),
44
-	Array("index.php?module=ACLRoles&action=ListUsers", $mod_strings['LIST_ROLES_BY_USER'],"Roles"),
43
+    Array("index.php?module=ACLRoles&action=index", $mod_strings['LIST_ROLES'],"Roles"),
44
+    Array("index.php?module=ACLRoles&action=ListUsers", $mod_strings['LIST_ROLES_BY_USER'],"Roles"),
45 45
 	
46
-	);
46
+    );
47 47
 ?>
48 48
\ No newline at end of file
Please login to merge, or discard this patch.