Skip to content

Commit c3859c5

Browse files
author
pedro_morgan
committed
Removing innecessary double quotes - speed
1 parent aa17242 commit c3859c5

File tree

9 files changed

+76
-78
lines changed

9 files changed

+76
-78
lines changed

interface/lib/classes/listform.inc.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@ class listform {
4848
private $module;
4949
private $dateformat = 'd.m.Y';
5050

51-
public function loadListDef($file,$module = '')
51+
public function loadListDef($file, $module = '')
5252
{
5353
global $app,$conf;
54-
if(!is_file($file)) die("List-Definition: $file not found.");
54+
if(!is_file($file)){
55+
die("List-Definition: $file not found.");
56+
}
5557
require_once($file);
5658
$this->listDef = $liste;
5759
$this->module = $module;

interface/web/help/index.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
<p>&nbsp;</p>
1111
<p>&nbsp;</p>
1212
<p>&nbsp;</p>
13-
<p>&nbsp;
14-
</p>
13+
<p>&nbsp;</p>
1514
</div>
1615
</BODY>
1716
</HTML>
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
2-
$wb["recipient_id_txt"] = 'recipient_id';
3-
$wb["sender_id_txt"] = 'sender_id';
4-
$wb["subject_txt"] = 'subject';
5-
$wb["message_txt"] = 'message';
6-
$wb["tstamp_txt"] = 'tstamp';
7-
$wb["btn_save_txt"] = 'Save';
8-
$wb["btn_cancel_txt"] = 'Cancel';
2+
$wb['recipient_id_txt'] = 'recipient_id';
3+
$wb['sender_id_txt'] = 'sender_id';
4+
$wb['subject_txt'] = 'subject';
5+
$wb['message_txt'] = 'message';
6+
$wb['tstamp_txt'] = 'tstamp';
7+
$wb['btn_save_txt'] = 'Save';
8+
$wb['btn_cancel_txt'] = 'Cancel';
99
?>
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
2-
$wb["list_head_txt"] = 'support_message';
3-
$wb["sender_id_txt"] = 'sender_id';
4-
$wb["subject_txt"] = 'subject';
5-
$wb["page_txt"] = 'Page';
6-
$wb["page_of_txt"] = 'of';
7-
$wb["page_next_txt"] = 'Next';
8-
$wb["page_back_txt"] = 'Back';
9-
$wb["delete_txt"] = 'Delete';
10-
$wb["filter_txt"] = 'Filter';
2+
$wb['list_head_txt'] = 'support_message';
3+
$wb['sender_id_txt'] = 'sender_id';
4+
$wb['subject_txt'] = 'subject';
5+
$wb['page_txt'] = 'Page';
6+
$wb['page_of_txt'] = 'of';
7+
$wb['page_next_txt'] = 'Next';
8+
$wb['page_back_txt'] = 'Back';
9+
$wb['delete_txt'] = 'Delete';
10+
$wb['filter_txt'] = 'Filter';
1111
?>

interface/web/help/lib/module.conf.php

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,39 @@
11
<?php
22

33
//* Name of the module. The module name must match the name of the module directory. The module name may not contain spaces.
4-
$module["name"] = "help";
4+
$module['name'] = 'help';
55

66
//* Title of the module. The title is dispalayed in the top navigation.
7-
$module["title"] = "Help";
7+
$module['title'] = 'Help';
88

99
//* The template file of the module. This is always module.tpl.htm if you do not have any special requirements like a 3 column layout.
10-
$module["template"] = "module.tpl.htm";
10+
$module['template'] = 'module.tpl.htm';
1111

1212
//* The page that is displayed when the module is loaded. the path must is relative to the web directory
13-
$module["startpage"] = "help/index.php";
13+
$module['startpage'] = 'help/index.php';
1414

1515
//* The width of the tab. Normally you should leave this empty and let the browser define the width automatically.
16-
$module["tab_width"] = '';
16+
$module['tab_width'] = '';
1717

18-
/*
19-
------------------------------------------
20-
- Menu Definition
21-
------------------------------------------
22-
*/
18+
19+
//*** Menu Definition *****************************************
2320

2421
//* make sure that the items array is empty
2522
$items = array();
2623

27-
//* Add a menu item with the label "Send message"
24+
//* Add a menu item with the label 'Send message'
2825
$items[] = array( 'title' => 'Send message',
2926
'target' => 'content',
3027
'link' => 'help/support_message_edit.php');
3128

32-
//* Add a menu item with the label "View messages"
29+
//* Add a menu item with the label 'View messages'
3330
$items[] = array( 'title' => 'View messages',
3431
'target' => 'content',
3532
'link' => 'help/support_message_list.php');
3633

3734

3835
//* Add the menu items defined above to a menu section labeled 'Support'
39-
$module["nav"][] = array( 'title' => 'Support',
36+
$module['nav'][] = array( 'title' => 'Support',
4037
'open' => 1,
4138
'items' => $items);
4239

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
11
<?php
22

33
//* Name of the list
4-
$liste["name"] = "support_message";
4+
$liste['name'] = 'support_message';
55

66
//* Database table
7-
$liste["table"] = "support_message";
7+
$liste['table'] = 'support_message';
88

99
//* Index index field of the database table
10-
$liste["table_idx"] = "support_message_id";
10+
$liste['table_idx'] = 'support_message_id';
1111

1212
//* Search Field Prefix
13-
$liste["search_prefix"] = "search_";
13+
$liste['search_prefix'] = 'search_';
1414

1515
//* Records per page
16-
$liste["records_per_page"] = 15;
16+
$liste['records_per_page'] = 15;
1717

1818
//* Script File of the list
19-
$liste["file"] = "support_message_list.php";
19+
$liste['file'] = 'support_message_list.php';
2020

2121
//* Script file of the edit form
22-
$liste["edit_file"] = "support_message_edit.php";
22+
$liste['edit_file'] = 'support_message_edit.php';
2323

2424
//* Script File of the delete script
25-
$liste["delete_file"] = "support_message_del.php";
25+
$liste['delete_file'] = 'support_message_del.php';
2626

2727
//* Paging Template
28-
$liste["paging_tpl"] = "templates/paging.tpl.htm";
28+
$liste['paging_tpl'] = 'templates/paging.tpl.htm';
2929

3030
//* Enable auth
31-
$liste["auth"] = "yes";
31+
$liste['auth'] = 'yes';
3232

3333

3434
/*****************************************************
3535
* Search fields
3636
*****************************************************/
3737

38-
$liste["item"][] = array( 'field' => "sender_id",
39-
'datatype' => "VARCHAR",
40-
'formtype' => "SELECT",
41-
'op' => "=",
42-
'prefix' => "",
43-
'suffix' => "",
44-
'width' => "",
38+
$liste['item'][] = array( 'field' => 'sender_id',
39+
'datatype' => 'VARCHAR',
40+
'formtype' => 'SELECT',
41+
'op' => '=',
42+
'prefix' => '',
43+
'suffix' => '',
44+
'width' => '',
4545
'datasource'=> array ( 'type' => 'SQL',
4646
'querystring' => 'SELECT userid,username FROM sys_user WHERE {AUTHSQL} ORDER BY username',
4747
'keyfield' => 'userid',
4848
'valuefield' => 'username'
4949
),
50-
'value' => "");
51-
52-
$liste["item"][] = array( 'field' => "subject",
53-
'datatype' => "VARCHAR",
54-
'formtype' => "TEXT",
55-
'op' => "like",
56-
'prefix' => "%",
57-
'suffix' => "%",
58-
'width' => "",
59-
'value' => "");
50+
'value' => '');
51+
52+
$liste['item'][] = array( 'field' => 'subject',
53+
'datatype' => 'VARCHAR',
54+
'formtype' => 'TEXT',
55+
'op' => 'like',
56+
'prefix' => '%',
57+
'suffix' => '%',
58+
'width' => '',
59+
'value' => '');
6060

6161

6262
?>

interface/web/help/support_message_del.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@
3131

3232

3333
//* From and List definition files
34-
$list_def_file = "list/support_message.list.php";
35-
$tform_def_file = "form/support_message.tform.php";
34+
$list_def_file = 'list/support_message.list.php';
35+
$tform_def_file = 'form/support_message.tform.php';
3636

3737
//* Include the base libraries
3838
require_once('../../lib/config.inc.php');
3939
require_once('../../lib/app.inc.php');
4040

4141
// Check module permissions
42-
if(!stristr($_SESSION["s"]["user"]["modules"],'help')) {
43-
header("Location: ../index.php");
42+
if(!stristr($_SESSION['s']['user']['modules'], 'help')) {
43+
header('Location: ../index.php');
4444
exit;
4545
}
4646

4747
//* Load the form
48-
$app->uses("tform_actions");
48+
$app->uses('tform_actions');
4949
$app->tform_actions->onDelete();
5050

5151
?>

interface/web/help/support_message_edit.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php
22

33
//* Set the path to the form definition file.
4-
$tform_def_file = "form/support_message.tform.php";
4+
$tform_def_file = 'form/support_message.tform.php';
55

66
//* include the basic application and configuration files
77
require_once('../../lib/config.inc.php');
88
require_once('../../lib/app.inc.php');
99

1010
//* Checking module permissions
11-
if(!stristr($_SESSION["s"]["user"]["modules"],'help')) {
11+
if(!stristr($_SESSION['s']['user']['modules'],'help')) {
1212
header("Location: ../index.php");
1313
exit;
1414
}
@@ -21,28 +21,30 @@
2121
class page_action extends tform_actions {
2222

2323
//* Custom onSubmit Event handler
24-
function onSubmit() {
24+
function onSubmit()
25+
{
2526
global $app, $conf;
2627

2728
//* If the current user is not the admin user
28-
if($_SESSION["s"]["user"]["typ"] != 'admin') {
29+
if($_SESSION['s']['user']['typ'] != 'admin') {
2930
//* Set the admin as recipient
30-
$this->dataRecord["recipient_id"] = 1;
31+
$this->dataRecord['recipient_id'] = 1;
3132
}
3233

33-
// Set the sender_id field to the ID of the current user
34-
$this->dataRecord["sender_id"] = $_SESSION["s"]["user"]["userid"];
34+
//* Set the sender_id field to the ID of the current user
35+
$this->dataRecord['sender_id'] = $_SESSION['s']['user']['userid'];
3536

3637
//* call the onSubmit function of the parent class
3738
parent::onSubmit();
3839
}
3940

4041
//* Custom onShow Event handler
41-
function onShow() {
42+
function onShow()
43+
{
4244
global $app, $conf;
4345

4446
//* We do not want that messages get edited, so we switch to a
45-
// read only template if a existing message is loaded
47+
//* read only template if a existing message is loaded
4648
if($this->id > 0) {
4749
$app->tform->formDef['tabs']['message']['template'] = 'templates/support_message_view.htm';
4850
}
@@ -55,8 +57,6 @@ function onShow() {
5557
//* Create the new page object
5658
$page = new page_action();
5759

58-
59-
6060
//* Start the page rendering and action handling
6161
$page->onLoad();
6262

interface/web/help/support_message_list.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
$list_def_file = "list/support_message.list.php";
77

88
//* Check the module permissions
9-
if(!stristr($_SESSION["s"]["user"]["modules"],'help')) {
10-
header("Location: ../index.php");
9+
if(!stristr($_SESSION['s']['user']["modules"], 'help')) {
10+
header('Location: ../index.php');
1111
exit;
1212
}
1313

0 commit comments

Comments
 (0)