From c3859c5257d42fd60185518609df52dfd65518b3 Mon Sep 17 00:00:00 2001
From: pedro_morgan <pedro_morgan@ispconfig3>
Date: Tue, 21 Aug 2007 15:02:42 -0400
Subject: [PATCH] Removing innecessary double quotes - speed
---
interface/web/help/support_message_edit.php | 22 +++---
interface/web/help/index.php | 3
interface/web/help/lib/module.conf.php | 23 +++----
interface/web/help/lib/lang/en_support_message.lng | 14 ++--
interface/web/help/lib/lang/en_support_message_list.lng | 18 +++---
interface/web/help/support_message_list.php | 4
interface/lib/classes/listform.inc.php | 6 +
interface/web/help/list/support_message.list.php | 52 ++++++++--------
interface/web/help/support_message_del.php | 10 +-
9 files changed, 75 insertions(+), 77 deletions(-)
diff --git a/interface/lib/classes/listform.inc.php b/interface/lib/classes/listform.inc.php
index ce7b220..7362fb1 100644
--- a/interface/lib/classes/listform.inc.php
+++ b/interface/lib/classes/listform.inc.php
@@ -48,10 +48,12 @@
private $module;
private $dateformat = 'd.m.Y';
- public function loadListDef($file,$module = '')
+ public function loadListDef($file, $module = '')
{
global $app,$conf;
- if(!is_file($file)) die("List-Definition: $file not found.");
+ if(!is_file($file)){
+ die("List-Definition: $file not found.");
+ }
require_once($file);
$this->listDef = $liste;
$this->module = $module;
diff --git a/interface/web/help/index.php b/interface/web/help/index.php
index ce49d76..93204bc 100644
--- a/interface/web/help/index.php
+++ b/interface/web/help/index.php
@@ -10,8 +10,7 @@
<p> </p>
<p> </p>
<p> </p>
- <p>
- </p>
+ <p> </p>
</div>
</BODY>
</HTML>
\ No newline at end of file
diff --git a/interface/web/help/lib/lang/en_support_message.lng b/interface/web/help/lib/lang/en_support_message.lng
index be03ebd..1f9aff1 100644
--- a/interface/web/help/lib/lang/en_support_message.lng
+++ b/interface/web/help/lib/lang/en_support_message.lng
@@ -1,9 +1,9 @@
<?php
-$wb["recipient_id_txt"] = 'recipient_id';
-$wb["sender_id_txt"] = 'sender_id';
-$wb["subject_txt"] = 'subject';
-$wb["message_txt"] = 'message';
-$wb["tstamp_txt"] = 'tstamp';
-$wb["btn_save_txt"] = 'Save';
-$wb["btn_cancel_txt"] = 'Cancel';
+$wb['recipient_id_txt'] = 'recipient_id';
+$wb['sender_id_txt'] = 'sender_id';
+$wb['subject_txt'] = 'subject';
+$wb['message_txt'] = 'message';
+$wb['tstamp_txt'] = 'tstamp';
+$wb['btn_save_txt'] = 'Save';
+$wb['btn_cancel_txt'] = 'Cancel';
?>
\ No newline at end of file
diff --git a/interface/web/help/lib/lang/en_support_message_list.lng b/interface/web/help/lib/lang/en_support_message_list.lng
index 73a1fda..ce62580 100644
--- a/interface/web/help/lib/lang/en_support_message_list.lng
+++ b/interface/web/help/lib/lang/en_support_message_list.lng
@@ -1,11 +1,11 @@
<?php
-$wb["list_head_txt"] = 'support_message';
-$wb["sender_id_txt"] = 'sender_id';
-$wb["subject_txt"] = 'subject';
-$wb["page_txt"] = 'Page';
-$wb["page_of_txt"] = 'of';
-$wb["page_next_txt"] = 'Next';
-$wb["page_back_txt"] = 'Back';
-$wb["delete_txt"] = 'Delete';
-$wb["filter_txt"] = 'Filter';
+$wb['list_head_txt'] = 'support_message';
+$wb['sender_id_txt'] = 'sender_id';
+$wb['subject_txt'] = 'subject';
+$wb['page_txt'] = 'Page';
+$wb['page_of_txt'] = 'of';
+$wb['page_next_txt'] = 'Next';
+$wb['page_back_txt'] = 'Back';
+$wb['delete_txt'] = 'Delete';
+$wb['filter_txt'] = 'Filter';
?>
\ No newline at end of file
diff --git a/interface/web/help/lib/module.conf.php b/interface/web/help/lib/module.conf.php
index c6cdfd7..36696ff 100644
--- a/interface/web/help/lib/module.conf.php
+++ b/interface/web/help/lib/module.conf.php
@@ -1,42 +1,39 @@
<?php
//* Name of the module. The module name must match the name of the module directory. The module name may not contain spaces.
-$module["name"] = "help";
+$module['name'] = 'help';
//* Title of the module. The title is dispalayed in the top navigation.
-$module["title"] = "Help";
+$module['title'] = 'Help';
//* 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.
-$module["template"] = "module.tpl.htm";
+$module['template'] = 'module.tpl.htm';
//* The page that is displayed when the module is loaded. the path must is relative to the web directory
-$module["startpage"] = "help/index.php";
+$module['startpage'] = 'help/index.php';
//* The width of the tab. Normally you should leave this empty and let the browser define the width automatically.
-$module["tab_width"] = '';
+$module['tab_width'] = '';
-/*
-------------------------------------------
-- Menu Definition
-------------------------------------------
-*/
+
+//*** Menu Definition *****************************************
//* make sure that the items array is empty
$items = array();
-//* Add a menu item with the label "Send message"
+//* Add a menu item with the label 'Send message'
$items[] = array( 'title' => 'Send message',
'target' => 'content',
'link' => 'help/support_message_edit.php');
-//* Add a menu item with the label "View messages"
+//* Add a menu item with the label 'View messages'
$items[] = array( 'title' => 'View messages',
'target' => 'content',
'link' => 'help/support_message_list.php');
//* Add the menu items defined above to a menu section labeled 'Support'
-$module["nav"][] = array( 'title' => 'Support',
+$module['nav'][] = array( 'title' => 'Support',
'open' => 1,
'items' => $items);
diff --git a/interface/web/help/list/support_message.list.php b/interface/web/help/list/support_message.list.php
index 368076d..1f2f8e3 100644
--- a/interface/web/help/list/support_message.list.php
+++ b/interface/web/help/list/support_message.list.php
@@ -1,62 +1,62 @@
<?php
//* Name of the list
-$liste["name"] = "support_message";
+$liste['name'] = 'support_message';
//* Database table
-$liste["table"] = "support_message";
+$liste['table'] = 'support_message';
//* Index index field of the database table
-$liste["table_idx"] = "support_message_id";
+$liste['table_idx'] = 'support_message_id';
//* Search Field Prefix
-$liste["search_prefix"] = "search_";
+$liste['search_prefix'] = 'search_';
//* Records per page
-$liste["records_per_page"] = 15;
+$liste['records_per_page'] = 15;
//* Script File of the list
-$liste["file"] = "support_message_list.php";
+$liste['file'] = 'support_message_list.php';
//* Script file of the edit form
-$liste["edit_file"] = "support_message_edit.php";
+$liste['edit_file'] = 'support_message_edit.php';
//* Script File of the delete script
-$liste["delete_file"] = "support_message_del.php";
+$liste['delete_file'] = 'support_message_del.php';
//* Paging Template
-$liste["paging_tpl"] = "templates/paging.tpl.htm";
+$liste['paging_tpl'] = 'templates/paging.tpl.htm';
//* Enable auth
-$liste["auth"] = "yes";
+$liste['auth'] = 'yes';
/*****************************************************
* Search fields
*****************************************************/
-$liste["item"][] = array( 'field' => "sender_id",
- 'datatype' => "VARCHAR",
- 'formtype' => "SELECT",
- 'op' => "=",
- 'prefix' => "",
- 'suffix' => "",
- 'width' => "",
+$liste['item'][] = array( 'field' => 'sender_id',
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'SELECT',
+ 'op' => '=',
+ 'prefix' => '',
+ 'suffix' => '',
+ 'width' => '',
'datasource'=> array ( 'type' => 'SQL',
'querystring' => 'SELECT userid,username FROM sys_user WHERE {AUTHSQL} ORDER BY username',
'keyfield' => 'userid',
'valuefield' => 'username'
),
- 'value' => "");
+ 'value' => '');
-$liste["item"][] = array( 'field' => "subject",
- 'datatype' => "VARCHAR",
- 'formtype' => "TEXT",
- 'op' => "like",
- 'prefix' => "%",
- 'suffix' => "%",
- 'width' => "",
- 'value' => "");
+$liste['item'][] = array( 'field' => 'subject',
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'op' => 'like',
+ 'prefix' => '%',
+ 'suffix' => '%',
+ 'width' => '',
+ 'value' => '');
?>
\ No newline at end of file
diff --git a/interface/web/help/support_message_del.php b/interface/web/help/support_message_del.php
index 1ef035e..721197c 100644
--- a/interface/web/help/support_message_del.php
+++ b/interface/web/help/support_message_del.php
@@ -31,21 +31,21 @@
//* From and List definition files
-$list_def_file = "list/support_message.list.php";
-$tform_def_file = "form/support_message.tform.php";
+$list_def_file = 'list/support_message.list.php';
+$tform_def_file = 'form/support_message.tform.php';
//* Include the base libraries
require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
// Check module permissions
-if(!stristr($_SESSION["s"]["user"]["modules"],'help')) {
- header("Location: ../index.php");
+if(!stristr($_SESSION['s']['user']['modules'], 'help')) {
+ header('Location: ../index.php');
exit;
}
//* Load the form
-$app->uses("tform_actions");
+$app->uses('tform_actions');
$app->tform_actions->onDelete();
?>
\ No newline at end of file
diff --git a/interface/web/help/support_message_edit.php b/interface/web/help/support_message_edit.php
index f97bb88..a36b5db 100644
--- a/interface/web/help/support_message_edit.php
+++ b/interface/web/help/support_message_edit.php
@@ -1,14 +1,14 @@
<?php
//* Set the path to the form definition file.
-$tform_def_file = "form/support_message.tform.php";
+$tform_def_file = 'form/support_message.tform.php';
//* include the basic application and configuration files
require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
//* Checking module permissions
-if(!stristr($_SESSION["s"]["user"]["modules"],'help')) {
+if(!stristr($_SESSION['s']['user']['modules'],'help')) {
header("Location: ../index.php");
exit;
}
@@ -21,28 +21,30 @@
class page_action extends tform_actions {
//* Custom onSubmit Event handler
- function onSubmit() {
+ function onSubmit()
+ {
global $app, $conf;
//* If the current user is not the admin user
- if($_SESSION["s"]["user"]["typ"] != 'admin') {
+ if($_SESSION['s']['user']['typ'] != 'admin') {
//* Set the admin as recipient
- $this->dataRecord["recipient_id"] = 1;
+ $this->dataRecord['recipient_id'] = 1;
}
- // Set the sender_id field to the ID of the current user
- $this->dataRecord["sender_id"] = $_SESSION["s"]["user"]["userid"];
+ //* Set the sender_id field to the ID of the current user
+ $this->dataRecord['sender_id'] = $_SESSION['s']['user']['userid'];
//* call the onSubmit function of the parent class
parent::onSubmit();
}
//* Custom onShow Event handler
- function onShow() {
+ function onShow()
+ {
global $app, $conf;
//* We do not want that messages get edited, so we switch to a
- // read only template if a existing message is loaded
+ //* read only template if a existing message is loaded
if($this->id > 0) {
$app->tform->formDef['tabs']['message']['template'] = 'templates/support_message_view.htm';
}
@@ -54,8 +56,6 @@
//* Create the new page object
$page = new page_action();
-
-
//* Start the page rendering and action handling
$page->onLoad();
diff --git a/interface/web/help/support_message_list.php b/interface/web/help/support_message_list.php
index 5fc45e5..ce990e4 100644
--- a/interface/web/help/support_message_list.php
+++ b/interface/web/help/support_message_list.php
@@ -6,8 +6,8 @@
$list_def_file = "list/support_message.list.php";
//* Check the module permissions
-if(!stristr($_SESSION["s"]["user"]["modules"],'help')) {
- header("Location: ../index.php");
+if(!stristr($_SESSION['s']['user']["modules"], 'help')) {
+ header('Location: ../index.php');
exit;
}
--
Gitblit v1.9.1