Skip to content

Commit

Permalink
Fixed a bug where display of block types were inconsistent (bug #583).
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Jan 2, 2017
1 parent 5a0f87f commit 39625a8
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 9 deletions.
7 changes: 6 additions & 1 deletion language/english.php
Expand Up @@ -876,7 +876,12 @@
'autotag_desc_block' => '[block:name class:block-autotag] - Displays a block. Class not required. Class specifies the css class and will wrap the block in a div. The class block-autotag will always be included with the div.',
'position' => 'Position',
'cache_time' => 'Cache Time',
'cache_time_desc' => 'This block will be cached for no longer than this many seconds. If 0 caching is disabled. If -1 cached until block is edited again. (3600 = 1 hour, 86400 = 1 day)'
'cache_time_desc' => 'This block will be cached for no longer than this many seconds. If 0 caching is disabled. If -1 cached until block is edited again. (3600 = 1 hour, 86400 = 1 day)',
'block_type_gldefault' => 'System',
'block_type_normal' => 'Normal',
'block_type_phpblock' => 'PHP',
'block_type_portal' => 'Portal',
'block_type_dynamic' => 'Dynamic'
);

###############################################################################
Expand Down
7 changes: 6 additions & 1 deletion language/english_utf-8.php
Expand Up @@ -876,7 +876,12 @@
'autotag_desc_block' => '[block:name class:block-autotag] - Displays a block. Class not required. Class specifies the css class and will wrap the block in a div. The class block-autotag will always be included with the div.',
'position' => 'Position',
'cache_time' => 'Cache Time',
'cache_time_desc' => 'This block will be cached for no longer than this many seconds. If 0 caching is disabled. If -1 cached until block is edited again. (3600 = 1 hour, 86400 = 1 day)'
'cache_time_desc' => 'This block will be cached for no longer than this many seconds. If 0 caching is disabled. If -1 cached until block is edited again. (3600 = 1 hour, 86400 = 1 day)',
'block_type_gldefault' => 'System',
'block_type_normal' => 'Normal',
'block_type_phpblock' => 'PHP',
'block_type_portal' => 'Portal',
'block_type_dynamic' => 'Dynamic'
);

###############################################################################
Expand Down
13 changes: 9 additions & 4 deletions language/japanese_utf-8.php
Expand Up @@ -813,8 +813,8 @@
2 => 'このブロックを編集する権限がありません。',
3 => 'ブロックの編集',
4 => 'フィードの読み込みでエラーが発生しました。(error.logを参照してください。)',
5 => 'Yes',
6 => 'No',
5 => 'はい',
6 => 'いいえ',
7 => 'すべて',
8 => 'ブロックのセキュリティレベル',
9 => '順序',
Expand Down Expand Up @@ -879,9 +879,14 @@
68 => 'このポータルブロックのフィードは長すぎて表示できません。ブロック設定画面でブロックに表示する記事の最大数を設定するか、コンフィギュレーションで標準の最大数を設定してください。',
69 => 'プラグイン名',
'autotag_desc_block' => '[block:name class:block-autotag] - Displays a block. Class not required. Class specifies the css class and will wrap the block in a div. The class block-autotag will always be included with the div.',
'position' => 'Position',
'position' => '位置',
'cache_time' => 'キャッシュ期間',
'cache_time_desc' => 'このブロックは指定された秒数の間キャッシュされます。0 を指定するとキャッシュしません。(3600 = 1時間、86400 = 1日)'
'cache_time_desc' => 'このブロックは指定された秒数の間キャッシュされます。0 を指定するとキャッシュしません。(3600 = 1時間、86400 = 1日)',
'block_type_gldefault' => 'システム',
'block_type_normal' => 'ノーマル',
'block_type_phpblock' => 'PHP',
'block_type_portal' => 'ポータル',
'block_type_dynamic' => 'ダイナミック'
);

###############################################################################
Expand Down
6 changes: 3 additions & 3 deletions public_html/admin/block.php
Expand Up @@ -486,7 +486,8 @@ function editblock($bid = '')
/**
* Display two lists of blocks, separated by left and right
*
* @return string HTML for the two lists
* @param int $position
* @return string HTML for the two lists
*/
function listblocks($position = BLOCK_ALL_POSITIONS)
{
Expand All @@ -509,8 +510,7 @@ function listblocks($position = BLOCK_ALL_POSITIONS)
),
);

$retval .= COM_startBlock($LANG21[19], '',
COM_getBlockTemplate('_admin_block', 'header'));
$retval .= COM_startBlock($LANG21[19], '', COM_getBlockTemplate('_admin_block', 'header'));
$retval .= ADMIN_createMenu(
$menu_arr,
$LANG21[25],
Expand Down
16 changes: 16 additions & 0 deletions system/lib-admin.php
Expand Up @@ -768,6 +768,14 @@ function ADMIN_getListField_blocks($fieldName, $fieldValue, $A, $icon_arr, $toke
$retval = TOPIC_getTopicAdminColumn('block', $A['bid']);
break;

case 'type':
if (in_array($fieldValue, array('gldefault', 'normal', 'phpblock', 'portal', 'dynamic'))) {
$retval = $LANG21['block_type_' . $fieldValue];
} else {
$retval = $fieldValue;
}
break;

default:
$retval = $fieldValue;
break;
Expand Down Expand Up @@ -845,6 +853,14 @@ function ADMIN_getListField_dynamicblocks($fieldName, $fieldValue, $A, $icon_arr

break;

case 'type':
if (in_array($fieldValue, array('gldefault', 'normal', 'phpblock', 'portal', 'dynamic'))) {
$retval = $LANG21['block_type_' . $fieldValue];
} else {
$retval = $fieldValue;
}
break;

default:
$retval = $fieldValue;
break;
Expand Down

0 comments on commit 39625a8

Please sign in to comment.