From 1e2dacf8379534f97dfebb9c459cc54b96162498 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Fri, 18 Aug 2006 03:24:52 +0000 Subject: [PATCH] r1070: Changing "colour" to "color" internally --- admin/status.php | 4 ++-- admin/user.php | 6 +++--- docs/schema_changes.sql | 2 ++ docs/template_changes.txt | 14 +++++++------- explain.php | 4 ++-- favorite.php | 4 ++-- includes/api_user.php | 2 +- includes/functions.php | 2 +- index.php | 4 ++-- install/install.php | 2 +- register.php | 2 +- search.php | 4 ++-- showhistory.php | 4 ++-- templates/explain_product.tpl | 2 +- templates/history_bit.tpl | 2 +- templates/stylevars.txt | 4 ++-- templates/trackerhome_bits.tpl | 2 +- templates/userctrl.tpl | 18 +++++++++--------- userctrl.php | 4 ++-- 19 files changed, 44 insertions(+), 42 deletions(-) diff --git a/admin/status.php b/admin/status.php index c70452e..de78958 100755 --- a/admin/status.php +++ b/admin/status.php @@ -153,8 +153,8 @@ if ($_REQUEST['do'] == 'modify') while ($status = $db->fetch_array($statuses)) { - $colourblock = '
'; - $admin->row_text("$colourblock$status[displayorder]: $status[status]", "(statusid: $status[statusid]) [" . _('Edit') . "] [" . _('Delete') . "]"); + $colorblock = '
'; + $admin->row_text("$colorblock$status[displayorder]: $status[status]", "(statusid: $status[statusid]) [" . _('Edit') . "] [" . _('Delete') . "]"); } $db->free_result($statuses); diff --git a/admin/user.php b/admin/user.php index e15aa15..052f501 100644 --- a/admin/user.php +++ b/admin/user.php @@ -84,7 +84,7 @@ if ($_POST['do'] == 'insert') $user->set('displayname', $bugsys->in['displayname']); $user->set('email', $bugsys->in['email']); $user->set('showemail', $bugsys->in['showemail']); - $user->set('showcolours', $bugsys->in['showcolours']); + $user->set('showcolors', $bugsys->in['showcolors']); $user->set('usergroupid', $bugsys->in['usergroupid']); $user->set('languageid', $bugsys->in['languageid']); $user->set('timezone', $bugsys->in['timezone']); @@ -119,7 +119,7 @@ if ($_POST['do'] == 'update') $user->set('displayname', $bugsys->in['displayname']); $user->set('email', $bugsys->in['email']); $user->set('showemail', $bugsys->in['showemail']); - $user->set('showcolours', $bugsys->in['showcolours']); + $user->set('showcolors', $bugsys->in['showcolors']); $user->set('usergroupid', $bugsys->in['usergroupid']); $user->set('languageid', $bugsys->in['languageid']); $user->set('timezone', $bugsys->in['timezone']); @@ -192,7 +192,7 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add') $admin->row_list(_('Usergroup'), 'usergroupid'); $admin->row_yesno(_('Show Email Publicly'), 'showemail', $user->objdata['showemail']); - $admin->row_yesno(_('Show Status Colors on Bug Listings'), 'showcolours', $user->objdata['showcolours']); + $admin->row_yesno(_('Show Status Colors on Bug Listings'), 'showcolors', $user->objdata['showcolors']); foreach ($bugsys->datastore['language'] AS $language) { diff --git a/docs/schema_changes.sql b/docs/schema_changes.sql index 57bcd43..96a5372 100644 --- a/docs/schema_changes.sql +++ b/docs/schema_changes.sql @@ -7,3 +7,5 @@ ALTER TABLE language DROP filename; ALTER TABLE language CHANGE languagecode langcode VARCHAR(5) NOT NULL; ALTER TABLE favourite RENAME favorite; + +ALTER TABLE user CHANGE showcolours showcolors BOOL NULL; diff --git a/docs/template_changes.txt b/docs/template_changes.txt index a6cf0b6..8103eb5 100644 --- a/docs/template_changes.txt +++ b/docs/template_changes.txt @@ -162,14 +162,14 @@ Index: templates/userctrl.tpl +
+ + -+ ++ + -+ ++ + -+ ++ + + -+ ++ + + + @@ -179,7 +179,7 @@ Index: templates/userctrl.tpl + + + -+ ++ + + + @@ -197,7 +197,7 @@ Index: templates/userctrl.tpl + + + -+ ++ + + + @@ -215,7 +215,7 @@ Index: templates/userctrl.tpl + + + -+ ++ + + + diff --git a/explain.php b/explain.php index 7728f7f..805fca4 100644 --- a/explain.php +++ b/explain.php @@ -71,7 +71,7 @@ if ($_REQUEST['do'] == 'products') { $left = $product['title']; $right = $product['description']; - $trextra = ' style="background-color: ' . $stylevar['alt_colour'] . '"'; + $trextra = ' style="background-color: ' . $stylevar['alt_color'] . '"'; eval('$productlist .= "' . $template->fetch('explain_row') . '";'); foreach ($components["$product[productid]"] AS $component) @@ -117,7 +117,7 @@ if ($_REQUEST['do'] == 'autoactions') { $left = _('Add Comment'); $right = $autoaction['comment']; - $trextra = ' style="background-color: ' . $stylevar['alt_colour'] . '"'; + $trextra = ' style="background-color: ' . $stylevar['alt_color'] . '"'; eval('$autoactions .= "' . $template->fetch('explain_row') . '";'); } diff --git a/favorite.php b/favorite.php index a110f83..d5b6b3b 100644 --- a/favorite.php +++ b/favorite.php @@ -75,8 +75,8 @@ if ($_REQUEST['do'] == 'manage') ); while ($bug = $db->fetch_array($favorites)) { - $funct->exec_swap_bg($stylevar['alt_colour'], ''); - $bug['bgcolour'] = ($bugsys->userinfo['showcolours'] ? $bugsys->datastore['status']["$bug[status]"]['color'] : $funct->bgcolour); + $funct->exec_swap_bg($stylevar['alt_color'], ''); + $bug['bgcolor'] = ($bugsys->userinfo['showcolors'] ? $bugsys->datastore['status']["$bug[status]"]['color'] : $funct->bgcolour); $bug['product'] = $bugsys->datastore['product']["$bug[product]"]['title']; $bug['version'] = $bugsys->datastore['version']["$bug[version]"]['version']; $bug['status'] = $bugsys->datastore['status']["$bug[status]"]['status']; diff --git a/includes/api_user.php b/includes/api_user.php index 37bc38d..56ac03a 100644 --- a/includes/api_user.php +++ b/includes/api_user.php @@ -49,7 +49,7 @@ class UserAPI extends API 'salt' => array(TYPE_STR, REQ_SET), 'authkey' => array(TYPE_STR, REQ_SET), 'showemail' => array(TYPE_BOOL, REQ_NO), - 'showcolours' => array(TYPE_BOOL, REQ_NO), + 'showcolors' => array(TYPE_BOOL, REQ_NO), 'languageid' => array(TYPE_UINT, REQ_NO), 'timezone' => array(TYPE_INT, REQ_NO), 'usedst' => array(TYPE_BOOL, REQ_NO), diff --git a/includes/functions.php b/includes/functions.php index c389bd7..437fd64 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -502,7 +502,7 @@ function fetch_guest_user() 'userid' => 0, 'email' => '', 'displayname' => '', - 'showcolours' => 1, + 'showcolors' => 1, 'permissions' => $bugsys->datastore['usergroup'][1]['permissions'], 'displaytitle' => $bugsys->datastore['usergroup'][1]['displaytitle'], ); diff --git a/index.php b/index.php index 8188c3f..7c7efa6 100644 --- a/index.php +++ b/index.php @@ -59,8 +59,8 @@ $bugs_fetch = $db->query($sort->fetch_sql_query(null, $pagination->fetch_limit($ while ($bug = $db->fetch_array($bugs_fetch)) { - $funct->exec_swap_bg($stylevar['alt_colour'], ''); - $bug['bgcolour'] = ($bugsys->userinfo['showcolours'] ? $bugsys->datastore['status']["$bug[status]"]['color'] : $funct->bgcolour); + $funct->exec_swap_bg($stylevar['alt_color'], ''); + $bug['bgcolor'] = ($bugsys->userinfo['showcolors'] ? $bugsys->datastore['status']["$bug[status]"]['color'] : $funct->bgcolour); $bug['product'] = $bugsys->datastore['product']["$bug[product]"]['title']; $bug['version'] = $bugsys->datastore['version']["$bug[version]"]['version']; $bug['status'] = $bugsys->datastore['status']["$bug[status]"]['status']; diff --git a/install/install.php b/install/install.php index 4c872b0..e61ab0d 100644 --- a/install/install.php +++ b/install/install.php @@ -193,7 +193,7 @@ if ($bugsys->in['mark'] == 6) $user->set('email', $bugsys->in['email']); $user->set('displayname', $bugsys->in['displayname']); $user->set('password', $bugsys->in['password']); - $user->set('showcolours', 1); + $user->set('showcolors', 1); $user->set('usergroupid', 6, true, false); // don't verify because we haven't cached usergroups yet $user->insert(); } diff --git a/register.php b/register.php index adfc313..25f7821 100755 --- a/register.php +++ b/register.php @@ -82,7 +82,7 @@ if ($_POST['do'] == 'insert') $user->set('displayname', $bugsys->in['displayname']); $user->set('password', $bugsys->in['password']); $user->set('showemail', $bugsys->in['showemail']); - $user->set('showcolours', 1); + $user->set('showcolors', 1); $user->set('languageid', $bugsys->in['languageid']); $user->set('usergroupid', $usergroupid); $user->insert(); diff --git a/search.php b/search.php index d8a3315..0cff883 100644 --- a/search.php +++ b/search.php @@ -389,8 +389,8 @@ if ($_REQUEST['do'] == 'results') $search = $db->query("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid IN ($search[ids]) $search[orderby] LIMIT " . $pagination->fetch_limit($pagination->page - 1) . ", " . $pagination->perpage); while ($bug = $db->fetch_array($search)) { - $funct->exec_swap_bg($stylevar['alt_colour'], ''); - $bug['bgcolour'] = ($bugsys->userinfo['showcolours'] ? $bugsys->datastore['status']["$bug[status]"]['color'] : $funct->bgcolour); + $funct->exec_swap_bg($stylevar['alt_color'], ''); + $bug['bgcolor'] = ($bugsys->userinfo['showcolors'] ? $bugsys->datastore['status']["$bug[status]"]['color'] : $funct->bgcolour); $bug['product'] = $bugsys->datastore['product']["$bug[product]"]['title']; $bug['version'] = $bugsys->datastore['version']["$bug[version]"]['version']; $bug['status'] = $bugsys->datastore['status']["$bug[status]"]['status']; diff --git a/showhistory.php b/showhistory.php index 9bf9534..83e1555 100644 --- a/showhistory.php +++ b/showhistory.php @@ -102,8 +102,8 @@ foreach ($logs AS $dateline => $logitems) continue; } - $funct->exec_swap_bg('', $stylevar['alt_colour']); - $bgcolour = $funct->bgcolour; + $funct->exec_swap_bg('', $stylevar['alt_color']); + $bgcolor = $funct->bgcolour; if (preg_match('#^(comment|attachment)\.(.*)#', $log['field'], $matches)) { diff --git a/templates/explain_product.tpl b/templates/explain_product.tpl index 4d6fddc..6393fba 100644 --- a/templates/explain_product.tpl +++ b/templates/explain_product.tpl @@ -16,7 +16,7 @@ $header - + $globalversions diff --git a/templates/history_bit.tpl b/templates/history_bit.tpl index c9df925..816c877 100644 --- a/templates/history_bit.tpl +++ b/templates/history_bit.tpl @@ -1,4 +1,4 @@ -; background-color: $bgcolour"> +; background-color: $bgcolor"> diff --git a/templates/stylevars.txt b/templates/stylevars.txt index 77c081d..4432f8a 100644 --- a/templates/stylevars.txt +++ b/templates/stylevars.txt @@ -46,8 +46,8 @@ padding: 2; normal-width: 100%; alternate-width: 45%; -/* alternate background colour used when status colours aren't displayed */ -alt-colour: #BFCCCF; +/* alternate background color used when status colors aren't displayed */ +alt-color: #BFCCCF; /*=====================================================================*\ || ################################################################### diff --git a/templates/trackerhome_bits.tpl b/templates/trackerhome_bits.tpl index 19111e9..58de037 100644 --- a/templates/trackerhome_bits.tpl +++ b/templates/trackerhome_bits.tpl @@ -1,6 +1,6 @@ - style="background-color: $bug[bgcolour]; font-style: italic"> + style="background-color: $bug[bgcolor]; font-style: italic">
{@"Reporter"}{@"Reporter"}{@"Assignee"}{@"Favourite"}{@"Favourite"}{@"Voter"}{@"Commenter"}{@"Commenter"}
{@"New bug is added"}
{@"I am made the assignee"}
{@"'Duplicates' field is changed"}
{@"A new attachment is added"}
{@"Global Versions"}
{@"These versions are avaliable for every product, component, and version."}
$log[user]  $log[date]  $log[field]$bug[bugid] diff --git a/templates/userctrl.tpl b/templates/userctrl.tpl index 674a0ca..b3c4202 100644 --- a/templates/userctrl.tpl +++ b/templates/userctrl.tpl @@ -42,8 +42,8 @@ $header
{@"Show Status Colors on Bug Listings"} - checked="checked" /> {@"Yes"} - checked="checked" /> {@"No"} + checked="checked" /> {@"Yes"} + checked="checked" /> {@"No"}
@@ -115,14 +115,14 @@ $header - + - + - + - + @@ -132,7 +132,7 @@ $header - + @@ -150,7 +150,7 @@ $header - + @@ -168,7 +168,7 @@ $header - + diff --git a/userctrl.php b/userctrl.php index 016eba6..4882084 100644 --- a/userctrl.php +++ b/userctrl.php @@ -110,7 +110,7 @@ if ($_POST['do'] == 'update') $userapi->set('displayname', $bugsys->in['displayname']); $userapi->set('showemail', $bugsys->in['showemail']); - $userapi->set('showcolours', $bugsys->in['showcolours']); + $userapi->set('showcolors', $bugsys->in['showcolors']); $userapi->set('languageid', $bugsys->in['languageid']); $userapi->set('timezone', $bugsys->in['timezone']); $userapi->set('usedst', $bugsys->in['usedst']); @@ -122,7 +122,7 @@ if ($_POST['do'] == 'update') // copy fields $userinfo['displayname'] = $bugsys->in['displayname']; $userinfo['showemail'] = $bugsys->in['showemail']; - $userinfo['showcolours'] = $bugsys->in['showcolours']; + $userinfo['showcolors'] = $bugsys->in['showcolors']; $userinfo['languageid'] = $bugsys->in['languageid']; $userinfo['timezone'] = $bugsys->in['timezone']; $userinfo['usedst'] = $bugsys->in['usedst']; -- 2.43.5
 {@"Reporter"}{@"Reporter"} {@"Assignee"}{@"Favorite"}{@"Favorite"} {@"Voter"}{@"Commenter"}{@"Commenter"}
{@"New bug is added"}
{@"Status or resolution changes"}
{@"A new comment is added"}
{@"Any other field changes"}