Merge branch 'dignajar/master'

This commit is contained in:
Frédéric K 2015-07-15 11:22:16 +02:00
commit bedb49aa76
13 changed files with 136 additions and 26 deletions

View File

@ -25,4 +25,8 @@ Installation guide
1. Download the latest version from http://www.bludit.com/bludit_latest.zip
2. Extract the zip file into a directory like `bludit`.
3. Upload the directory `bludit` on your hosting.
4. Done!
4. Done!
License
-------
Bludit is opensource software licensed under the [MIT license](https://tldrlegal.com/license/mit-license)

View File

@ -51,7 +51,7 @@ if($Login->role()!=='admin') {
$layout['parameters'] = $Login->username();
}
$_user = $dbUsers->get($layout['parameters']);
$_user = $dbUsers->getDb($layout['parameters']);
// If the user doesn't exist, redirect to the users list.
if($_user===false) {

2
content/README Normal file
View File

@ -0,0 +1,2 @@
Set the correct permissions on this directory.
Check the documentation: http://docs.bludit.com/en/troubleshooting/writing-test-failure-err205

View File

@ -4,7 +4,7 @@
* Bludit
* http://www.bludit.com
* Author Diego Najar
* All Bludit code is released under the GNU General Public License.
* Bludit is opensource software licensed under the MIT license.
*/
// Check installation

View File

@ -1,4 +1,12 @@
<?php
/*
* Bludit
* http://www.bludit.com
* Author Diego Najar
* Bludit is opensource software licensed under the MIT license.
*/
// Security constant
define('BLUDIT', true);

View File

@ -36,20 +36,6 @@ class dbJSON
}
}
// Get database.
public function get()
{
return $this->db;
}
// Set and save database.
public function set($db)
{
$this->db = $db;
return $this->save();
}
// Returns the amount of database items.
public function count()
{

View File

@ -144,7 +144,8 @@ class Plugin {
// Create database
$Tmp = new dbJSON($this->filenameDb);
$Tmp->set($this->dbFields);
$Tmp->db = $this->dbFields;
$Tmp->save();
return true;
}

View File

@ -69,7 +69,7 @@ function build_page($key)
// Parse username for the page.
if( $dbUsers->userExists( $Page->username() ) )
{
$user = $dbUsers->get( $Page->username() );
$user = $dbUsers->getDb( $Page->username() );
$Page->setField('authorFirstName', $user['firstName'], false);

View File

@ -57,7 +57,7 @@ function buildPost($key)
// Parse username for the post.
if( $dbUsers->userExists( $Post->username() ) )
{
$user = $dbUsers->get( $Post->username() );
$user = $dbUsers->getDb( $Post->username() );
$Post->setField('authorFirstName', $user['firstName'], false);

View File

@ -62,7 +62,7 @@ function build_plugins()
$database = new dbJSON($languageFilename, false);
}
$databaseArray = $database->get();
$databaseArray = $database->db;
$Plugin->setData( $databaseArray['plugin-data'] );
// Add words to language dictionary.

View File

@ -19,7 +19,7 @@ class dbUsers extends dbJSON
}
// Return an array with the username databases
public function get($username)
public function getDb($username)
{
if($this->userExists($username))
{
@ -57,7 +57,7 @@ class dbUsers extends dbJSON
{
$dataForDb = array();
$user = $this->get($args['username']);
$user = $this->getDb($args['username']);
if($user===false)
{
@ -70,10 +70,10 @@ class dbUsers extends dbJSON
{
if( isset($this->dbFields[$field]) )
{
// Sanitize if will be saved on database.
// Sanitize.
$tmpValue = Sanitize::html($value);
// Set type
// Set type.
settype($tmpValue, gettype($this->dbFields[$field]['value']));
$user[$field] = $tmpValue;

View File

@ -60,7 +60,7 @@ class Login {
return false;
}
$user = $this->dbUsers->get($username);
$user = $this->dbUsers->getDb($username);
if($user==false) {
Log::set(__METHOD__.LOG_SEP.'Username not exist: '.$username);
return false;

109
languages/ja_JP.json Normal file
View File

@ -0,0 +1,109 @@
{
"language-data":
{
"native": "日本語",
"english-name": "Japanese",
"last-update": "2015-07-15",
"author": "Jun NOGATA",
"email": "nogajun@gmail.com",
"website": "http://www.nofuture.tv/"
},
"username": "ユーザー名",
"password": "パスワード",
"confirm-password": "パスワードの確認",
"editor": "編集者",
"dashboard": "ダッシュボード",
"role": "役割",
"posts": "記事",
"users": "ユーザー",
"administrator": "管理者",
"add": "追加",
"cancel": "キャンセル",
"content": "内容",
"title": "タイトル",
"no-parent": "親ページなし",
"edit-page": "ページの編集",
"edit-post": "記事の編集",
"add-a-new-user": "新規ユーザーの追加",
"parent": "親ページ",
"friendly-url": "フレンドリーURL",
"description": "概要",
"posted-by": "投稿者",
"tags": "タグ",
"position": "位置",
"save": "保存",
"draft": "下書き",
"delete": "削除",
"registered": "登録日",
"Notifications": "通知",
"profile": "プロフィール",
"email": "Eメール",
"settings": "設定",
"general": "全般",
"advanced": "詳細",
"regional": "地域",
"about": "Bluditについて",
"login": "ログイン",
"logout": "ログアウト",
"dasbhoard": "ダッシュボード",
"manage": "管理",
"themes": "テーマ",
"configure-plugin": "プラグインの設定",
"confirm-delete-this-action-cannot-be-undone": "削除しますか? この操作は取り消せません",
"site-title": "サイトタイトル",
"site-slogan": "サイトキャッチフレーズ",
"site-description": "サイト概要",
"footer-text": "フッターテキスト",
"posts-per-page": "ページあたりの投稿数",
"site-url": "サイトURL",
"writting-settings": "編集設定",
"url-filters": "URLフィルター",
"pages": "ページ",
"home": "ホーム",
"welcome-back": "お帰りなさい",
"language": "言語",
"website": "Webサイト",
"timezone": "タイムゾーン",
"locale": "ロケール",
"notifications": "お知らせ",
"new-post": "新規記事",
"html-and-markdown-code-supported": "HTMLとMarkdownが利用できます",
"new-page": "新規ページ",
"manage-posts": "投稿の管理",
"published-date": "公開日",
"modified-date": "更新日",
"empty-title": "タイトルなし",
"plugins": "プラグイン",
"install-plugin": "インストール",
"uninstall-plugin": "アンインストール",
"new-password": "新しいパスワード",
"edit-user": "ユーザーの編集",
"publish-now": "今すぐ公開",
"first-name": "名",
"last-name": "姓",
"manage-pages": "ページの管理",
"advanced-options": "詳細オプション",
"database-regenerated": "データベースを再生成しました",
"html-markdown-code-supported": "HTMLとMarkdownが利用できます",
"enable-more-features-at": "より多くの機能を有効に",
"settings-advanced-writting-settings": "設定->詳細->編集設定",
"new-posts-and-pages-synchronized": "新規投稿とページを同期しました",
"you-can-choose-the-users-privilege": "ユーザーの権限を設定します。編集者は記事とページの投稿編集のみできます",
"email-will-not-be-publicly-displayed": "メールアドレスは公開されません。パスワードの復旧や通知に利用されます",
"use-this-field-to-name-your-site": "サイト名を入力します。サイト名は各ページ上部に表示されます",
"use-this-field-to-add-a-catchy-prhase": "サイトのキャッチフレーズを入力します",
"you-can-add-a-site-description-to-provide": "サイトの説明や紹介に利用する概要を入力します",
"you-can-add-a-small-text-on-the-bottom": "各ページ下部に追加する短いテキストを入力します。使用例: 著作権表示、所有者名表示、日付など",
"number-of-posts-to-show-per-page": "1ページに表示する投稿数を設定します",
"the-url-of-your-site": "サイトのURLを設定します",
"add-or-edit-description-tags-or": "コンテンツ概要やタグの追加と編集、フレンドリーURLの変更オプションを利用します",
"select-your-sites-language": "サイトで利用する言語を選択します",
"select-a-timezone-for-a-correct": "正しい日付/時刻を表示するためのタイムゾーンを選択します",
"you-can-use-this-field-to-define-a-set-of": "言語や国、固有の設定に関する設定を変更する場合に利用します",
"email": "Eメール",
"email": "Eメール",
"email": "Eメール",
"email": "Eメール",
"email": "Eメール"
}