pedro_morgan
2007-08-21 c3859c5257d42fd60185518609df52dfd65518b3
Removing innecessary double quotes - speed
9 files modified
150 ■■■■ changed files
interface/lib/classes/listform.inc.php 4 ●●● patch | view | raw | blame | history
interface/web/help/index.php 3 ●●●● patch | view | raw | blame | history
interface/web/help/lib/lang/en_support_message.lng 14 ●●●● patch | view | raw | blame | history
interface/web/help/lib/lang/en_support_message_list.lng 18 ●●●● patch | view | raw | blame | history
interface/web/help/lib/module.conf.php 23 ●●●●● patch | view | raw | blame | history
interface/web/help/list/support_message.list.php 52 ●●●● patch | view | raw | blame | history
interface/web/help/support_message_del.php 10 ●●●● patch | view | raw | blame | history
interface/web/help/support_message_edit.php 22 ●●●● patch | view | raw | blame | history
interface/web/help/support_message_list.php 4 ●●●● patch | view | raw | blame | history
interface/lib/classes/listform.inc.php
@@ -51,7 +51,9 @@
    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;
interface/web/help/index.php
@@ -10,8 +10,7 @@
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;
            </p>
  <p>&nbsp;</p>
</div>
</BODY>
</HTML>
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';
?>
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';
?>
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);
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'        => '');
?>
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();
?>
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();
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;
}