diff --git a/README.md b/README.md
index 5e95096b..8b1d8263 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,7 @@ Social
- [Twitter](https://twitter.com/bludit)
- [Facebook](https://www.facebook.com/bluditcms)
- [Google+](https://plus.google.com/+Bluditcms)
+- [Freenode IRC](https://webchat.freenode.net) channel #bludit
[](https://gitter.im/dignajar/bludit?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
@@ -30,6 +31,7 @@ You only need a web server with PHP support.
* Apache with [mod_rewrite](http://httpd.apache.org/docs/current/mod/mod_rewrite.html) module.
* Lighttpd with [mod_rewrite](http://redmine.lighttpd.net/projects/1/wiki/docs_modrewrite) module.
* Nginx with [ngx_http_rewrite_module](http://nginx.org/en/docs/http/ngx_http_rewrite_module.html) module.
+ * PHP Built-in web server
Installation guide
------------------
diff --git a/kernel/abstract/dbjson.class.php b/kernel/abstract/dbjson.class.php
index ccd3fa80..1c96feb1 100644
--- a/kernel/abstract/dbjson.class.php
+++ b/kernel/abstract/dbjson.class.php
@@ -46,7 +46,7 @@ class dbJSON
}
}
- public function restoreDb()
+ public function restoreDB()
{
$this->db = $this->dbBackup;
return true;
diff --git a/kernel/admin/controllers/dashboard.php b/kernel/admin/controllers/dashboard.php
index 44abfa52..f3f8216a 100644
--- a/kernel/admin/controllers/dashboard.php
+++ b/kernel/admin/controllers/dashboard.php
@@ -3,6 +3,28 @@
// ============================================================================
// Functions
// ============================================================================
+function updateBludit()
+{
+ global $Site;
+
+ // Check if Bludit need to be update.
+ if($Site->currentBuild() < BLUDIT_BUILD)
+ {
+ $directories = array(PATH_POSTS, PATH_PAGES, PATH_PLUGINS_DATABASES, PATH_UPLOADS_PROFILES);
+
+ foreach($directories as $dir)
+ {
+ // Check if the directory is already created.
+ if(!file_exists($dir)) {
+ // Create the directory recursive.
+ mkdir($dir, DIR_PERMISSIONS, true);
+ }
+ }
+
+ // Set and save the database.
+ $Site->set(array('currentBuild'=>BLUDIT_BUILD));
+ }
+}
// ============================================================================
// Main before POST
@@ -16,6 +38,10 @@
// Main after POST
// ============================================================================
+// Try update Bludit
+updateBludit();
+
+// Get draft posts and schedules
$_draftPosts = array();
$_scheduledPosts = array();
foreach($posts as $Post)
@@ -28,6 +54,7 @@ foreach($posts as $Post)
}
}
+// Get draft pages
$_draftPages = array();
foreach($pages as $Page)
{
diff --git a/kernel/admin/themes/default/img/default.jpg b/kernel/admin/themes/default/img/default.jpg
index b8f1f672..2854b892 100644
Binary files a/kernel/admin/themes/default/img/default.jpg and b/kernel/admin/themes/default/img/default.jpg differ
diff --git a/kernel/admin/themes/default/index.php b/kernel/admin/themes/default/index.php
index 3f8d6b77..c5f03ba4 100644
--- a/kernel/admin/themes/default/index.php
+++ b/kernel/admin/themes/default/index.php
@@ -99,9 +99,9 @@ $(document).ready(function() {
-
username().'.jpg';
- if(!file_exists($profilePictureSrc)) {
- $profilePictureSrc = HTML_PATH_ADMIN_THEME_IMG.'default.jpg';
+ $profilePictureSrc = HTML_PATH_ADMIN_THEME_IMG.'default.jpg';
+ if(file_exists(PATH_UPLOADS_PROFILES.$Login->username().'.jpg')) {
+ $profilePictureSrc = HTML_PATH_UPLOADS_PROFILES.$Login->username().'.jpg';
}
?>
diff --git a/kernel/ajax/uploader.php b/kernel/ajax/uploader.php
index d16d691e..5544c6ae 100644
--- a/kernel/ajax/uploader.php
+++ b/kernel/ajax/uploader.php
@@ -33,16 +33,20 @@ if(empty($tmpName)) {
}
// --- PROFILE PICTURE ---
-if($type=='profilePicture') {
- $username = Sanitize::html($_POST['username']);
- $tmpName = $username.'.jpg';
-
- move_uploaded_file($source, PATH_UPLOADS_PROFILES.$tmpName);
+if($type=='profilePicture')
+{
+ // Move to tmp file
+ move_uploaded_file($source, PATH_UPLOADS_PROFILES.'tmp'.'.'.$fileExtension);
// Resize and crop profile image.
+ $username = Sanitize::html($_POST['username']);
+ $tmpName = $username.'.jpg';
$Image = new Image();
- $Image->setImage(PATH_UPLOADS_PROFILES.$tmpName, '200', '200', 'crop');
+ $Image->setImage(PATH_UPLOADS_PROFILES.'tmp'.'.'.$fileExtension, '200', '200', 'crop');
$Image->saveImage(PATH_UPLOADS_PROFILES.$tmpName, 100, true);
+
+ // Remove tmp file
+ unlink(PATH_UPLOADS_PROFILES.'tmp'.'.'.$fileExtension);
}
// --- OTHERS ---
else {
diff --git a/kernel/boot/init.php b/kernel/boot/init.php
index ef7f8e5f..7c537758 100644
--- a/kernel/boot/init.php
+++ b/kernel/boot/init.php
@@ -4,6 +4,7 @@
define('BLUDIT_VERSION', 'githubVersion');
define('BLUDIT_CODENAME', '');
define('BLUDIT_RELEASE_DATE', '');
+define('BLUDIT_BUILD', '20151119');
// Debug mode
define('DEBUG_MODE', TRUE);
@@ -85,6 +86,9 @@ define('TOKEN_EMAIL_TTL', '+15 minutes');
// Charset, default UTF-8.
define('CHARSET', 'UTF-8');
+// Directory permissions
+define('DIR_PERMISSIONS', '0755');
+
// Multibyte string extension loaded.
define('MB_STRING', extension_loaded('mbstring'));
diff --git a/kernel/boot/rules/70.posts.php b/kernel/boot/rules/70.posts.php
index 2294d624..4ad9a82a 100644
--- a/kernel/boot/rules/70.posts.php
+++ b/kernel/boot/rules/70.posts.php
@@ -22,7 +22,7 @@ function reIndexTagsPosts()
$dbTags->reindexPosts( $dbPosts->db );
// Restore de db on dbPost
- $dbPosts->restoreDb();
+ $dbPosts->restoreDB();
return true;
}
diff --git a/kernel/dblanguage.class.php b/kernel/dblanguage.class.php
index 6cb9bd11..0cc98689 100644
--- a/kernel/dblanguage.class.php
+++ b/kernel/dblanguage.class.php
@@ -93,14 +93,17 @@ class dbLanguage extends dbJSON
foreach($files as $file)
{
-
$t = new dbJSON($file, false);
- $native = $t->db['language-data']['native'];
- $locale = basename($file, '.json');
- $tmp[$locale] = $native;
+
+ // Check if the JSON is complete.
+ if(isset($t->db['language-data']['native']))
+ {
+ $native = $t->db['language-data']['native'];
+ $locale = basename($file, '.json');
+ $tmp[$locale] = $native;
+ }
}
return $tmp;
}
-
}
\ No newline at end of file
diff --git a/kernel/dbsite.class.php b/kernel/dbsite.class.php
index 7a000448..0cc438da 100644
--- a/kernel/dbsite.class.php
+++ b/kernel/dbsite.class.php
@@ -21,7 +21,8 @@ class dbSite extends dbJSON
'cliMode'=> array('inFile'=>false, 'value'=>true),
'emailFrom'=> array('inFile'=>false, 'value'=>''),
'dateFormat'=> array('inFile'=>false, 'value'=>'F j, Y'),
- 'timeFormat'=> array('inFile'=>false, 'value'=>'g:i a')
+ 'timeFormat'=> array('inFile'=>false, 'value'=>'g:i a'),
+ 'currentBuild'=> array('inFile'=>false, 'value'=>0)
);
function __construct()
@@ -167,6 +168,12 @@ class dbSite extends dbJSON
return $this->getField('timezone');
}
+ // Returns the current build / version of Bludit.
+ public function currentBuild()
+ {
+ return $this->getField('currentBuild');
+ }
+
// Returns posts per page.
public function postsPerPage()
{
diff --git a/kernel/dbtags.class.php b/kernel/dbtags.class.php
index 8ab3b6bd..c91b32f7 100644
--- a/kernel/dbtags.class.php
+++ b/kernel/dbtags.class.php
@@ -8,7 +8,7 @@ class dbTags extends dbJSON
$postsIndex['tag2']['name'] = 'Tag 2';
$postsIndex['tag2']['posts'] = array('post1','post5');
*/
- private $dbFields = array(
+ public $dbFields = array(
'postsIndex'=>array('inFile'=>false, 'value'=>array()),
'pagesIndex'=>array('inFile'=>false, 'value'=>array())
);
diff --git a/kernel/dbusers.class.php b/kernel/dbusers.class.php
index b13bf1ee..677e79b7 100644
--- a/kernel/dbusers.class.php
+++ b/kernel/dbusers.class.php
@@ -2,17 +2,17 @@
class dbUsers extends dbJSON
{
- private $dbFields = array(
- 'firstName'=> array('inFile'=>false, 'value'=>''),
- 'lastName'=> array('inFile'=>false, 'value'=>''),
- 'username'=> array('inFile'=>false, 'value'=>''),
- 'role'=> array('inFile'=>false, 'value'=>'editor'),
- 'password'=> array('inFile'=>false, 'value'=>''),
- 'salt'=> array('inFile'=>false, 'value'=>'!Pink Floyd!Welcome to the machine!'),
- 'email'=> array('inFile'=>false, 'value'=>''),
- 'registered'=> array('inFile'=>false, 'value'=>'1985-03-15 10:00'),
- 'tokenEmail'=> array('inFile'=>false, 'value'=>''),
- 'tokenEmailTTL'=>array('inFile'=>false, 'value'=>'2009-03-15 14:00')
+ public $dbFields = array(
+ 'firstName'=> array('inFile'=>false, 'value'=>''),
+ 'lastName'=> array('inFile'=>false, 'value'=>''),
+ 'username'=> array('inFile'=>false, 'value'=>''),
+ 'role'=> array('inFile'=>false, 'value'=>'editor'),
+ 'password'=> array('inFile'=>false, 'value'=>''),
+ 'salt'=> array('inFile'=>false, 'value'=>'!Pink Floyd!Welcome to the machine!'),
+ 'email'=> array('inFile'=>false, 'value'=>''),
+ 'registered'=> array('inFile'=>false, 'value'=>'1985-03-15 10:00'),
+ 'tokenEmail'=> array('inFile'=>false, 'value'=>''),
+ 'tokenEmailTTL'=> array('inFile'=>false, 'value'=>'2009-03-15 14:00')
);
function __construct()
@@ -20,6 +20,11 @@ class dbUsers extends dbJSON
parent::__construct(PATH_DATABASES.'users.php');
}
+ public function getAll()
+ {
+ return $this->db;
+ }
+
// Return an array with the username databases, filtered by username.
public function getDb($username)
{
@@ -51,11 +56,6 @@ class dbUsers extends dbJSON
return isset($this->db[$username]);
}
- public function getAll()
- {
- return $this->db;
- }
-
public function generateTokenEmail($username)
{
// Random hash
diff --git a/languages/bg_BG.json b/languages/bg_BG.json
index 2767658b..609914e5 100644
--- a/languages/bg_BG.json
+++ b/languages/bg_BG.json
@@ -1,9 +1,10 @@
+
{
"language-data":
{
"native": "Български (България)",
"english-name": "Bulgarian",
- "last-update": "2015-11-09",
+ "last-update": "2015-11-18",
"author": "Христо Дипчиков",
"email": "",
"website": "www.hristodipchikov.tk"
@@ -36,7 +37,7 @@
"save": "Запази",
"draft": "Чернова",
"delete": "Изтриване",
- "registered": "Препоръчано",
+ "registered": "Добавен",
"Notifications": "Известия",
"profile": "Профил",
"email": "Имейл адрес",
@@ -202,5 +203,16 @@
"images": "Снимки",
"upload-image": "Прикачи снимка",
"drag-and-drop-or-click-here": "Влачите и пускате или натиснете тук",
- "insert-image": "Вмъкни снимка"
+ "insert-image": "Вмъкни снимка",
+ "supported-image-file-types": "Поддържани файлови формати за снимки",
+ "date-format": "Формат за дата",
+ "time-format": "Формат за време",
+ "chat-with-developers-and-users-on-gitter":"Чат с разработчици и потребители на [Gitter](https://gitter.im/dignajar/bludit)",
+ "this-is-a-brief-description-of-yourself-our-your-site":"Това е кратко описание на вашия сайт, за да се промени този текст отидете в админ панела, настройки плъгини, конфигуриране на плъгин About.",
+ "profile-picture": "Снимка на профила",
+ "the-about-page-is-very-important": "The about page is an important and powerful tool for potential clients and partners. For those who wonder who is behind the website, your About page is the first source of information.",
+ "change-this-pages-content-on-the-admin-panel": "Промяна на съдържанието на страницата се извършва от админ панела, управление, страници и кликнете върху страницата.",
+ "about-your-site-or-yourself": "За твоя сайт или за теб",
+ "welcome-to-bludit": "Добре дошли в Bludit"
}
+
diff --git a/languages/es_AR.json b/languages/es_AR.json
index 27949c55..504d0ccd 100644
--- a/languages/es_AR.json
+++ b/languages/es_AR.json
@@ -51,7 +51,7 @@
"themes": "Temas",
"prev-page": "Pag. anterior",
"next-page": "Pag. siguiente",
- "configure-plugin": "Configurar plugin",
+ "configure-plugin": "Configurar complemento",
"confirm-delete-this-action-cannot-be-undone": "Confirmar eliminación, esta operación no se puede deshacer.",
"site-title": "Titulo del sitio",
"site-slogan": "Slogan del sitio",
@@ -76,9 +76,9 @@
"published-date": "Fecha de publicación",
"modified-date": "Fecha de modificación",
"empty-title": "Titulo vacío",
- "plugins": "Plugins",
- "install-plugin": "Instalar plugin",
- "uninstall-plugin": "Desinstalar plugin",
+ "plugins": "Complementos",
+ "install-plugin": "Instalar complemento",
+ "uninstall-plugin": "Desinstalar complemento",
"new-password": "Nueva contraseña",
"edit-user": "Editar usuario",
"publish-now": "Publicar",
@@ -163,7 +163,7 @@
"scheduled": "Programado",
"publish": "Publicar",
"please-check-your-theme-configuration": "Verifique la configuración del tema.",
- "plugin-label": "Titulo del plugin",
+ "plugin-label": "Titulo del complemento",
"enabled": "Habilitado",
"disabled": "Deshabilitado",
"cli-mode": "Modo Cli",
@@ -199,5 +199,19 @@
"manage-users": "Administrar usuarios",
"view-and-edit-your-profile": "Modifique su perfil.",
- "password-must-be-at-least-6-characters-long": "La contraseña debe tener al menos 6 carácteres."
+ "password-must-be-at-least-6-characters-long": "La contraseña debe tener al menos 6 carácteres.",
+ "images": "Imagenes",
+ "upload-image": "Subir imagen",
+ "drag-and-drop-or-click-here": "Arrastre y suelte, o haga clic aquí",
+ "insert-image": "Insertar imagen",
+ "supported-image-file-types": "Tipo de imagen soportados",
+ "date-format": "Formato de fecha",
+ "time-format": "Formato de hora",
+ "chat-with-developers-and-users-on-gitter":"Charla con los desarrolladores y usuarios en [Gitter](https://gitter.im/dignajar/bludit)",
+ "this-is-a-brief-description-of-yourself-our-your-site":"Breve descripción de ti o de tu sitio, para cambiar este texto, vaya al panel de administración, ajustes, complementos, y configurar el complemento Acerca de",
+ "profile-picture": "Imagen de perfil",
+ "the-about-page-is-very-important": "La página acerca es una herramienta importante y de gran alcance para los clientes y socios potenciales. Para aquellos que quieren saber quien esta detras de este sitio, su pagina Acerca de es la primera fuente de información.",
+ "change-this-pages-content-on-the-admin-panel": "Modifique el contenido de esta pagina en el panel de administración, administrar, paginas, y luego clic en la pagina Acerca de.",
+ "about-your-site-or-yourself": "Acerca de ti o de tu sitio",
+ "welcome-to-bludit": "Bienvenido a Bludit"
}
\ No newline at end of file
diff --git a/languages/fr_FR.json b/languages/fr_FR.json
old mode 100644
new mode 100755
index 8c1bc7a4..20179f01
--- a/languages/fr_FR.json
+++ b/languages/fr_FR.json
@@ -206,5 +206,12 @@
"insert-image": "Insérer l’image sélectionnée",
"supported-image-file-types": "Extensions des images prises en charge",
"date-format": "Format de la Date",
- "time-format": "Format de l’heure"
+ "time-format": "Format de l’heure",
+ "chat-with-developers-and-users-on-gitter":"Chattez avec les développeurs et les utilisateurs sur [Gitter](https://gitter.im/dignajar/bludit)",
+ "this-is-a-brief-description-of-yourself-our-your-site":"Ceci est une brève description de vous-même ou de votre site, pour modifier ce texte aller dans le panneau d’administration, paramètres -> plugins et configurer le plugin « à propos ».",
+ "profile-picture": "Image de profil",
+ "the-about-page-is-very-important": "Votre page **à propos** est très utile. Elle fournit à vos visiteurs des informations importantes sur vous, elle crée un rapport de confiance entre vous et votre visiteur, elle présente votre société et votre site et elle vous différencie de tous les autres sites de votre niche.",
+ "change-this-pages-content-on-the-admin-panel": "Changer le contenu de cette page à partir du panneau d’administration, Gestion de contenu -> Pages et cliquez sur la page « à propos » pour l’éditer.",
+ "about-your-site-or-yourself": "À propos de vous",
+ "welcome-to-bludit": "Bienvenue sur Bludit"
}
\ No newline at end of file
diff --git a/languages/uk_UA.json b/languages/uk_UA.json
index 96c018a8..c39db864 100644
--- a/languages/uk_UA.json
+++ b/languages/uk_UA.json
@@ -3,7 +3,7 @@
{
"native": "Українська (Україна)",
"english-name": "Ukrainian",
- "last-update": "2015-10-30",
+ "last-update": "2015-11-19",
"author": "Allec Bernz",
"email": "admin@allec.info",
"website": "allec.info"
@@ -86,7 +86,7 @@
"last-name": "Прізвище",
"bludit-version": "Версія Bludit",
"powered-by": "Працює на",
- "recent-posts": "Останні повідомлення",
+ "recent-posts": "Останні публікації",
"manage-pages": "Керування сторінками",
"advanced-options": "Додаткові параметри",
"user-deleted": "Користувач видалений",
@@ -119,14 +119,15 @@
"you-can-use-this-field-to-define-a-set-of": "Ви можете використовувати це поле для визначення набору параметрів, що відносяться до мови, країни та особливих переваг.",
"you-can-modify-the-url-which-identifies":"Ви можете змінити URL, який ідентифікує сторінку чи публікацію за допомогою легких для розуміння ключових слів. Не більше 150 символів.",
"this-field-can-help-describe-the-content": "Це поле може допомогти описати зміст у декількох словах. Не більше 150 символів.",
+
"delete-the-user-and-all-its-posts":"Видалити користувача та всі його публікації",
"delete-the-user-and-associate-its-posts-to-admin-user": "Видалити користувача та зв'язати його публікації з користувачем admin",
"read-more": "Читати далі",
"show-blog": "Показати блог",
- "default-home-page": "Домашня сторінка за промовчанням",
+ "default-home-page": "Домашня сторінка за замовчуванням",
"version": "Версія",
"there-are-no-drafts": "Немає чернеток.",
- "create-a-new-article-for-your-blog":"Створити нову статтю для свого блогу.",
+ "create-a-new-article-for-your-blog":"Створити нову публікацію для вашого блогу.",
"create-a-new-page-for-your-website":"Створити нову сторінку для вашого сайту.",
"invite-a-friend-to-collaborate-on-your-website":"Запросити друга співпрацювати на вашому сайті.",
"change-your-language-and-region-settings":"Змінити Вашу мову та регіональні налаштування.",
@@ -134,7 +135,7 @@
"author": "Автор",
"start-here": "Почніть тут",
"install-theme": "Встановити тему",
- "first-post": "Перша стаття",
+ "first-post": "Перша публікація",
"congratulations-you-have-successfully-installed-your-bludit": "Вітаємо, Ви успішно встановили ваш **Bludit**",
"whats-next": "Що далі",
"manage-your-bludit-from-the-admin-panel": "Керуйте вашим Bludit через [панель управління](./admin/)",
@@ -158,6 +159,7 @@
"ip-address-has-been-blocked": "IP-адресу заблоковано.",
"try-again-in-a-few-minutes": "Повторіть спробу через декілька хвилин.",
"date": "Дата",
+
"scheduled": "Заплановано",
"publish": "Опублікувати",
"please-check-your-theme-configuration": "Будь ласка, перевірте конфігурацію вашої теми.",
@@ -167,6 +169,7 @@
"cli-mode": "Режим CLI",
"command-line-mode": "Режим командного рядка",
"enable-the-command-line-mode-if-you-add-edit": "Увімкніть режим командного рядка, якщо ви додаєте, редагуєте або видаляєте публікації та сторінки з файлової системи",
+
"configure": "Налаштування",
"uninstall": "Видалити",
"change-password": "Зміна пароля",
@@ -194,5 +197,21 @@
"general-settings": "Загальні налаштування",
"advanced-settings": "Додаткові налаштування",
"manage-users": "Управління користувачами",
- "view-and-edit-your-profile": "Перегляд і редагування свого профілю."
+ "view-and-edit-your-profile": "Перегляд і редагування свого профілю.",
+
+ "password-must-be-at-least-6-characters-long": "Пароль повинен містити не менше 6 символів",
+ "images": "Зображення",
+ "upload-image": "Завантажити зображення",
+ "drag-and-drop-or-click-here": "Перетягніть або натисніть тут",
+ "insert-image": "Вставити зображення",
+ "supported-image-file-types": "Підтримувані типи файлів зображень",
+ "date-format": "Формат дати",
+ "time-format": "Формат часу",
+ "chat-with-developers-and-users-on-gitter":"Чат з розробниками і користувачами [Gitter](https://gitter.im/dignajar/bludit)",
+ "this-is-a-brief-description-of-yourself-our-your-site":"Це короткий опис про себе або про сайт, щоб змінити цей текст зайдіть в панель адміністратора, налаштування, плагіни, і налаштуйте плагін про сайт.",
+ "profile-picture": "Зображення профілю",
+ "the-about-page-is-very-important": "Сторінка про сайт є важливим і потужним інструментом для потенційних клієнтів і партнерів. Для тих, кому цікаво, хто стоїть за сайтом, ваша сторінка про сайт є першим джерелом інформації.",
+ "change-this-pages-content-on-the-admin-panel": "Щоб змінити зміст цієї сторінки зайдіть в панель адміністратора, керування, сторінки та натисніть кнопку Про сайт.",
+ "about-your-site-or-yourself": "Про Ваш сайт або про Вас",
+ "welcome-to-bludit": "Ласкаво просимо до Bludit"
}