Skip to content

Commit

Permalink
Merge branch 'feature/url-routing'
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Aug 29, 2016
2 parents 873aca9 + 6916689 commit 59651b1
Show file tree
Hide file tree
Showing 25 changed files with 1,781 additions and 292 deletions.
33 changes: 32 additions & 1 deletion language/english.php
Expand Up @@ -1360,6 +1360,32 @@
'value' => 'Value',
);

###############################################################################
# admin/router.php

$LANG_ROUTER = array(
1 => 'URL routing',
2 => 'Routing Manager',
3 => 'ID',
4 => 'method',
5 => 'rule',
6 => 'route',
7 => 'priority',
8 => 'Increase priority',
9 => 'Decrease priority',
10 => 'Edit routing',
11 => 'To modify or delete a route, click on the route\'s edit icon below. To create a new route, click on "Create New" above. When you use placeholders (@), you must define the same placeholders in a rule and its route.',
12 => 'Bad request method',
13 => 'Rule is a mandatory item.',
14 => 'Route is a mandatory item.',
15 => 'Placeholders (@) in a rule and those in a route must be the same.',
16 => 'Route must not start with "/index.php/".',
17 => 'Database error occurred.',
18 => '<strong>To enable URL routing, you have to enable URL rewrite in the Configuration.</strong>',
19 => '<strong>To enable URL routing, you have to enable URL routing in the Configuration.</strong>',
20 => '<ul><li>Placeholders (@) must be the same both in a rule and its route.</li><li>A placeholder starts with "@", followed by an alphabet, optionally followed by any length of alphabet or digit.</li><li>Placeholders are case-sensitive.</li></ul>',
);

###############################################################################
# confirmation and error messages

Expand Down Expand Up @@ -1476,6 +1502,9 @@
118 => 'Click to select a date',
119 => 'More..',
120 => 'Send this?',
121 => 'Saved a URL routing item.',
122 => 'Could not save a URL routing item.',
123 => 'Deleted a URL routing item.',
130 => 'Your language item has been successfully deleted.',
131 => 'Your language item has been successfully saved.',
140 => 'Deleted comment(s).',
Expand Down Expand Up @@ -2178,6 +2207,7 @@
'censorlist' => "Censor List",
'ip_lookup' => "IP Lookup",
'url_rewrite' => "Enable URL Rewrite",
'url_routing' => 'Enable URL routing',
'cdn_hosted' => "Use CDN-hosted copy of jQuery",
'meta_tags' => "Meta Tags",
'meta_description' => "Default Meta Description",
Expand Down Expand Up @@ -2400,7 +2430,8 @@
33 => array('Disabled' => 0, 'Enabled' => 1, 'Enabled (No Links)' => 2, 'Enabled (No Outbound Links)' => 3),
34 => array('grid' => 'grid', 'list' => 'list'),
35 => array('default' => 'default', 'Name (asc)' => 'NAME_ASC', 'Name (desc)' => 'NAME_DESC', 'Type (asc)' => 'TYPE_ASC', 'Type (desc)' => 'TYPE_DESC', 'Modified (asc)' => 'MODIFIED_ASC', 'Modified (desc)' => 'MODIFIED_DESC'),
36 => array('False' => 'false', 'Frontpage only' => 'frontpage', 'Frontpage and Topics' => 'frontpage_topics')
36 => array('False' => 'false', 'Frontpage only' => 'frontpage', 'Frontpage and Topics' => 'frontpage_topics'),
37 => array('Disabled' => 0, 'Enabled(with "index.php")' => 1, 'Enabled(without "index.php")' => 2),
);

################################################################################
Expand Down
29 changes: 29 additions & 0 deletions language/english_utf-8.php
Expand Up @@ -1351,6 +1351,31 @@
55 => 'Articles'
);

###############################################################################
# admin/router.php

$LANG_ROUTER = array(
1 => 'URL routing',
2 => 'Routing Manager',
3 => 'ID',
4 => 'method',
5 => 'rule',
6 => 'route',
7 => 'priority',
8 => 'Increase priority',
9 => 'Decrease priority',
10 => 'Edit routing',
11 => 'To modify or delete a route, click on the route\'s edit icon below. To create a new route, click on "Create New" above. When you use placeholders (@), you must define the same placeholders in a rule and its route.',
12 => 'Bad request method',
13 => 'Rule is a mandatory item.',
14 => 'Route is a mandatory item.',
15 => 'Placeholders (@) in a rule and those in a route must be the same.',
16 => 'Route must not start with "/index.php/".',
17 => 'Database error occurred.',
18 => '<strong>To enable URL routing, you have to enable URL rewrite.</strong>',
19 => '<ul><li>Placeholders (@) must be the same both in a rule and its route.</li><li>A placeholder starts with "@", followed by an alphabet, optionally followed by any length of alphabet or digit.</li><li>Placeholders are case-sensitive.</li></ul>',
);

###############################################################################
# confirmation and error messages

Expand Down Expand Up @@ -1467,6 +1492,9 @@
118 => 'Click to select a date',
119 => 'More..',
120 => 'Send this?',
121 => 'Saved a URL routing item.',
122 => 'Could not save a URL routing item.',
123 => 'Deleted a URL routing item.',
130 => 'Deleted comment(s).',
131 => 'Failed to delete a comment.',
132 => 'Approved comment(s).',
Expand Down Expand Up @@ -2176,6 +2204,7 @@
'censorlist' => "Censor List",
'ip_lookup' => "IP Lookup",
'url_rewrite' => "Enable URL Rewrite",
'url_routing' => 'Enable URL routing',
'cdn_hosted' => "Use CDN-hosted copy of jQuery",
'meta_tags' => "Meta Tags",
'meta_description' => "Default Meta Description",
Expand Down
33 changes: 32 additions & 1 deletion language/japanese_utf-8.php
Expand Up @@ -1362,6 +1362,32 @@
'value' => '値',
);

###############################################################################
# admin/router.php

$LANG_ROUTER = array(
1 => 'URLルーティング',
2 => 'ルーティング管理',
3 => 'ID',
4 => 'メソッド',
5 => 'ルール',
6 => 'ルート',
7 => '優先順位',
8 => '優先順位を上げる',
9 => '優先順位を下げる',
10 => 'ルーティングの編集',
11 => '<p>ルーティングの編集・削除は編集アイコンを、作成は上の「新規作成」をクリックしてください。優先順位の変更は、[↑][↓]をクリックしてください。</p>',
12 => 'リクエストメソッドが不正です。',
13 => 'ルールは必須項目です。',
14 => 'ルートは必須項目です。',
15 => 'ルールとルートで同じプレースホルダー(@)を定義しなければなりません。',
16 => 'ルートの先頭を "/index.php/" とすることはできません。',
17 => 'データベース操作でエラーが発生しました。',
18 => '<strong>URLルーティングを有効にするには、コンフィギュレーションでURLリライトを有効にしてください。</strong>',
19 => '<strong>URLルーティングを有効にするには、コンフィギュレーションでURLルーティングを有効にしてください。</strong>',
20 => '<ul><li>プレースホルダー(@)はルールとルートで同じものを定義してください。</li><li>プレースホルダーは@で始まり、1文字目は英字、2文字目以降は英数字を使えます。</li><li>プレースホルダーは大文字・小文字を区別します。</li></ul>',
);

###############################################################################
# confirmation and error messages

Expand Down Expand Up @@ -1478,6 +1504,9 @@
118 => 'クリックして日付を選択してください',
119 => 'More..',
120 => 'この項目を送信しますか?',
121 => 'URLルーティングのデータを保存しました。',
122 => 'URLルーティングのデータを保存できませんでした。',
123 => 'URLルーティングのデータを削除しました。',
130 => '言語アイテムを削除しました。',
131 => '言語アイテムを保存しました。',
140 => 'コメントを削除しました。',
Expand Down Expand Up @@ -2194,6 +2223,7 @@
'censorlist' => 'バッドワード',
'ip_lookup' => 'IPアドレス検索',
'url_rewrite' => 'URLリライト',
'url_routing' => 'URLルーティング',
'cdn_hosted' => 'CDNのjQueryを使用する',
'meta_tags' => 'メタタグ',
'meta_description' => 'サイトの説明文のメタタグ',
Expand Down Expand Up @@ -2410,7 +2440,8 @@
33 => array('無効にする' => 0, '有効にする' => 1, '有効にする(リンクなし)' => 2, '有効にする(外部リンクなし)' => 3),
34 => array('グリッド' => 'grid', 'リスト' => 'list'),
35 => array('デフォルト' => 'default', '名前(昇順)' => 'NAME_ASC', '名前(降順)' => 'NAME_DESC', '種類(昇順)' => 'TYPE_ASC', '種類(降順)' => 'TYPE_DESC', '変更日時(昇順)' => 'MODIFIED_ASC', '変更日時(降順)' => 'MODIFIED_DESC'),
36 => array('False' => 'false', 'Frontpage only' => 'frontpage', 'Frontpage and Topics' => 'frontpage_topics')
36 => array('False' => 'false', 'Frontpage only' => 'frontpage', 'Frontpage and Topics' => 'frontpage_topics'),
37 => array('無効' => 0, '有効(index.phpあり)' => 1, '有効(index.phpなし)' => 2),
);

###############################################################################
Expand Down
7 changes: 3 additions & 4 deletions public_html/admin/configuration_validation.php
Expand Up @@ -2,7 +2,7 @@

/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
// | Geeklog 1.7 |
// | Geeklog 2.1 |
// +---------------------------------------------------------------------------+
// | configuration_validation.php |
// | |
Expand Down Expand Up @@ -30,7 +30,7 @@
// | |
// +---------------------------------------------------------------------------+

if (strpos(strtolower($_SERVER['PHP_SELF']), 'configuration_validation.php') !== false) {
if (stripos($_SERVER['PHP_SELF'], 'configuration_validation.php') !== false) {
die('This file can not be used on its own!');
}

Expand All @@ -50,6 +50,7 @@
'message' => isset($LANG_VALIDATION['yearOrRange']) ? $LANG_VALIDATION['yearOrRange'] : $LANG_VALIDATION['default']
);
$_CONF_VALIDATE['Core']['url_rewrite'] = array('rule' => 'boolean');
$_CONF_VALIDATE['Core']['url_routing'] = array('rule' => array('inList', array(0, 1, 2), false));
$_CONF_VALIDATE['Core']['cdn_hosted'] = array('rule' => 'boolean');
$_CONF_VALIDATE['Core']['meta_tags'] = array('rule' => array('inList', array(0, 1, 2), false));
$_CONF_VALIDATE['Core']['meta_description'] = array('rule' => 'stringOrEmpty');
Expand Down Expand Up @@ -719,5 +720,3 @@
// Subgroup Filemanager, Tab Audios
$_CONF_VALIDATE['Core']['filemanager_show_audio_player'] = array('rule' => 'boolean');
//$_CONF_VALIDATE['Core']['filemanager_audios_ext'] = array('rule' => 'boolean');

?>
3 changes: 2 additions & 1 deletion public_html/admin/install/config-install.php
Expand Up @@ -2,7 +2,7 @@

/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
// | Geeklog 1.6 |
// | Geeklog 2.1 |
// +---------------------------------------------------------------------------+
// | config-install.php |
// | |
Expand Down Expand Up @@ -54,6 +54,7 @@ function install_config()
$c->add('owner_name','','text',0,0,NULL,1000,TRUE, $me, 0);
$c->add('copyrightyear',date('Y'),'text',0,0,NULL,1440,FALSE, $me, 0);
$c->add('url_rewrite',FALSE,'select',0,0,1,1800,TRUE, $me, 0);
$c->add('url_routing',0,'select',0,0,37,1850,TRUE, $me, 0);
$c->add('cdn_hosted',FALSE,'select',0,0,1,1900,TRUE, $me, 0);
$c->add('meta_tags',0,'select',0,0,23,2000,TRUE, $me, 0);
$c->add('meta_description','Geeklog - The secure Content Management System.','textarea',0,0,NULL,2010,TRUE, $me, 0);
Expand Down
9 changes: 9 additions & 0 deletions public_html/admin/install/lib-upgrade.php
Expand Up @@ -518,6 +518,15 @@ function INST_doDatabaseUpgrades($current_gl_version)
$_SQL = '';
break;

case '2.1.0':
require_once $_CONF['path'] . 'sql/updates/' . $_DB_dbms . '_2.1.0_to_2.1.2.php';
INST_updateDB($_SQL);

update_ConfValuesFor212();
$current_gl_version = '2.1.2';
$_SQL = '';
break;

default:
$done = true;
}
Expand Down

0 comments on commit 59651b1

Please sign in to comment.