Commit c3859c52 authored by pedro_morgan's avatar pedro_morgan
Browse files

Removing innecessary double quotes - speed

parent aa17242f
......@@ -48,10 +48,12 @@ class listform {
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;
......
......@@ -10,8 +10,7 @@
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;
</p>
<p>&nbsp;</p>
</div>
</BODY>
</HTML>
\ No newline at end of file
<?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
<?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
<?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);
......
<?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' => "");
$liste["item"][] = array( 'field' => "subject",
'datatype' => "VARCHAR",
'formtype' => "TEXT",
'op' => "like",
'prefix' => "%",
'suffix' => "%",
'width' => "",
'value' => "");
'value' => '');
$liste['item'][] = array( 'field' => 'subject',
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'op' => 'like',
'prefix' => '%',
'suffix' => '%',
'width' => '',
'value' => '');
?>
\ No newline at end of file
......@@ -31,21 +31,21 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//* 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
<?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 @@ $app->load('tform_actions');
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';
}
......@@ -55,8 +57,6 @@ class page_action extends tform_actions {
//* Create the new page object
$page = new page_action();
//* Start the page rendering and action handling
$page->onLoad();
......
......@@ -6,8 +6,8 @@ require_once('../../lib/app.inc.php');
$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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment