r1219: By using a L_INVALID_ID constant, we can blow off loading the Localize module
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 1 Oct 2006 01:28:18 +0000 (01:28 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 1 Oct 2006 01:28:18 +0000 (01:28 +0000)
admin/permission.php
admin/product.php
attachment.php
editreport.php
includes/init.php
includes/language.php
showhistory.php
showreport.php
viewattachment.php
vote.php

index 4e22cb22f3f2aeae72c9ab0a920de2f593f2ca11..1d89b4a57c6a18c6d038fb7a0348823741b116fe 100755 (executable)
@@ -104,7 +104,7 @@ if ($_REQUEST['do'] == 'edit')
        
        if (!$usergroup OR !$product)
        {
-               $admin->error($lang->getlex('error_invalid_id'));
+               $admin->error(L_INVALID_ID);
        }
        
        $admin->page_start(_('Edit Permissions'));
index 117d036ce5c019a6c1233a525544a0dd68381216..67f9ae75680425158af9c8c9f2f29eff14db9c88 100755 (executable)
@@ -120,7 +120,7 @@ if ($_REQUEST['do'] == 'addversion')
                $product = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "product WHERE productid = " . $bugsys->in['productid']);
                if (!is_array($product))
                {
-                       $admin->error($lang->getlex('error_invalid_id'));
+                       $admin->error(L_INVALID_ID);
                }
        }
        else
@@ -165,7 +165,7 @@ if ($_REQUEST['do'] == 'editversion')
        $version = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "version WHERE versionid = " . $bugsys->input_clean('versionid', TYPE_UINT));
        if (!is_array($version))
        {
-               $admin->error($lang->getlex('error_invalid_id'));
+               $admin->error(L_INVALID_ID);
        }
        
        $admin->form_start('product.php', 'updateversion');
@@ -271,7 +271,7 @@ if ($_REQUEST['do'] == 'updateproduct')
        
        if (empty($bugsys->in['productid']))
        {
-               $admin->error($lang->getlex('error_invalid_id'));
+               $admin->error(L_INVALID_ID);
        }
        
        $db->query("UPDATE " . TABLE_PREFIX . "product SET title = '" . $bugsys->input_escape('title') . "', description = '" . $bugsys->input_escape('description') . "', displayorder = " . $bugsys->input_clean('displayorder', TYPE_UINT) . " WHERE productid = " . $bugsys->input_clean('productid', TYPE_UINT));
@@ -292,7 +292,7 @@ if ($_REQUEST['do'] == 'editproduct')
        $product = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "product WHERE productid = " . $bugsys->in['productid']);
        if (!is_array($product))
        {
-               $admin->error($lang->getlex('error_invalid_id'));
+               $admin->error(L_INVALID_ID);
        }
        
        $admin->form_start('product.php', 'updateproduct');
index 5d6dde9a4ab79f9e9223c2332133825c13167a6f..017141b075d93d7ebabb51a8788073d8d26b82c7 100755 (executable)
@@ -41,14 +41,14 @@ if (isset($bugsys->in['attachmentid']))
        $attachment = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "attachment WHERE attachmentid = " . $bugsys->input_clean('attachmentid', TYPE_UINT));
        if (!$attachment)
        {
-               $message->error($lang->getlex('error_invalid_id'));
+               $message->error(L_INVALID_ID);
        }
 }
 
 $bug = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid = " . (($attachment['attachmentid']) ? $attachment['bugid'] : $bugsys->input_clean('bugid', TYPE_UINT)));
 if (!$bug)
 {
-       $message->error($lang->getlex('error_invalid_id'));
+       $message->error(L_INVALID_ID);
 }
 
 if (!check_bug_permissions($bug))
index 6cd39be7957e189f1d435b69d2af57bbe9cd7aec..5e1423c771e9a40f5b469f5fa2c3ec7fcba42620 100644 (file)
@@ -44,7 +44,7 @@ $bug = $db->query_first("
 
 if (!$bug)
 {
-       $message->error($lang->getlex('error_invalid_id'));
+       $message->error(L_INVALID_ID);
 }
 
 if (!check_bug_permissions($bug))
index e190961382fb2239ec170b240ad17ec9c1b08b67..8dc96050bcba459ab709e8b26e7568f7c52db086 100755 (executable)
@@ -128,7 +128,6 @@ if (!$userinfo)
 
 // ###################################################################
 // initialize localization system
-$bugsys->load('localize', 'lang', true);
 
 require_once('./includes/language.php');
 
index 205792f443f225862eec4b43655e0c8a06487cb5..3d9af25447f86911c56c8d0829a463dcf43f681a 100644 (file)
@@ -36,7 +36,7 @@ if (!function_exists('gettext'))
 // ###################################################################
 // LEXICAL STRING CONSTANTS
 
-$lang->setlex('error_invalid_id', _('That is an invalid ID.'));
+define('L_INVALID_ID', _('That is an invalid ID.'));
 
 // ###################################################################
 // determines the user's language
index f404cf24be8d8efd8391228b19d3bf024c08707b..94b4b49e0e47dbeefdab83686289ab3293ebc340 100644 (file)
@@ -34,7 +34,7 @@ require_once('./includes/api_user.php');
 $bug = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid = " . $bugsys->input_clean('bugid', TYPE_UINT));
 if (!$bug)
 {
-       $message->error($lang->getlex('error_invalid_id'));
+       $message->error(L_INVALID_ID);
 }
 
 if (!check_bug_permissions($bug))
index 71e40a54f44a2776affc4f44553aedc021dd3813..11a1bb70f3f943b350422fceab2093e7b9ededff 100644 (file)
@@ -49,7 +49,7 @@ if (empty($bugid) OR $_REQUEST['do'] == 'quicksearch')
                }
                else
                {
-                       $error = $lang->getlex('error_invalid_id');
+                       $error = L_INVALID_ID;
                }
        }
        
@@ -81,7 +81,7 @@ $show['delete'] = can_perform('candeletedata', $bug['product']);
 
 if (!is_array($bug))
 {
-       $message->error($lang->getlex('error_invalid_id'));
+       $message->error(L_INVALID_ID);
 }
 
 if (!check_bug_permissions($bug))
index 70df0fca64605ece817772b02b47953bc2d20244..2d8fc0feb3fdec98cee04fc8dc4536e648cf6977 100755 (executable)
@@ -30,7 +30,7 @@ require_once('./global.php');
 $attachment = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "attachment WHERE attachmentid = " . $bugsys->input_clean('attachmentid', TYPE_UINT));
 if (!$attachment)
 {
-       $message->error($lang->getlex('error_invalid_id'));
+       $message->error(L_INVALID_ID);
 }
 
 $bug = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid = $attachment[bugid]");
index 610587296eea7b35d55bdc6065b1c94f6b9f368d..f58a295b467539a4759459dae8e72991b49f6dc8 100644 (file)
--- a/vote.php
+++ b/vote.php
@@ -29,7 +29,7 @@ require_once('./global.php');
 
 if (empty($_REQUEST['do']))
 {
-       $message->error($lang->getlex('error_invalid_id'));
+       $message->error(L_INVALID_ID);
 }
 
 // ###################################################################
@@ -51,7 +51,7 @@ if ($_REQUEST['do'] == 'vote')
        
        if (!$bug)
        {
-               $message->error($lang->getlex('error_invalid_id'));
+               $message->error(L_INVALID_ID);
        }
        
        if ($vote['uservote'])