From 8a24ac90e5a5e584d12f1d519c5696b0b6bb7c43 Mon Sep 17 00:00:00 2001 From: dignajar Date: Mon, 16 Nov 2015 23:45:03 -0300 Subject: [PATCH] Improves uploader --- install.php | 19 +++++++++++++++---- kernel/ajax/uploader.php | 5 ++++- languages/en_US.json | 8 ++++++-- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/install.php b/install.php index 763bee99..9f64bc8e 100644 --- a/install.php +++ b/install.php @@ -282,6 +282,14 @@ function install($adminPassword, $email, $timezoneOffset) 'status'=>'published', 'date'=>$currentDate, 'position'=>0 + ), + 'about'=>array( + 'description'=>$Language->get('About your site or yourself'), + 'username'=>'admin', + 'tags'=>array(), + 'status'=>'published', + 'date'=>$currentDate, + 'position'=>1 ) ); @@ -290,7 +298,7 @@ function install($adminPassword, $email, $timezoneOffset) // File posts.php $data = array( $firstPostSlug=>array( - 'description'=>'Welcome to Bludit', + 'description'=>$Language->get('Welcome to Bludit'), 'username'=>'admin', 'status'=>'published', 'tags'=>array('bludit'=>'Bludit','cms'=>'CMS','flat-files'=>'Flat files'), @@ -394,7 +402,7 @@ function install($adminPassword, $email, $timezoneOffset) array( 'position'=>0, 'label'=>$Language->get('About'), - 'text'=>$Language->get('this-is-a-brief-description-of-yourself-our-your-blog') + 'text'=>$Language->get('this-is-a-brief-description-of-yourself-our-your-site') ), JSON_PRETTY_PRINT), LOCK_EX @@ -427,13 +435,16 @@ function install($adminPassword, $email, $timezoneOffset) // File index.txt for error page $data = 'Title: '.$Language->get('Error').' - Content: '.$Language->get('The page has not been found'); +Content: '.$Language->get('The page has not been found'); file_put_contents(PATH_PAGES.'error'.DS.'index.txt', $data, LOCK_EX); // File index.txt for about page $data = 'Title: '.$Language->get('About').' - Content: '; +Content: +'.$Language->get('the-about-page-is-very-important').' + +'.$Language->get('change-this-pages-content-on-the-admin-panel'); file_put_contents(PATH_PAGES.'about'.DS.'index.txt', $data, LOCK_EX); diff --git a/kernel/ajax/uploader.php b/kernel/ajax/uploader.php index 8f379e1d..d16d691e 100644 --- a/kernel/ajax/uploader.php +++ b/kernel/ajax/uploader.php @@ -3,7 +3,10 @@ header('Content-Type: application/json'); // Type -$type = Sanitize::html($_POST['type']); +$type = 'other'; +if(!empty($_POST['type'])) { + $type = Sanitize::html($_POST['type']); +} // Source $source = $_FILES['files']['tmp_name'][0]; diff --git a/languages/en_US.json b/languages/en_US.json index a643f654..421ec689 100644 --- a/languages/en_US.json +++ b/languages/en_US.json @@ -208,6 +208,10 @@ "date-format": "Date format", "time-format": "Time format", "chat-with-developers-and-users-on-gitter":"Chat with developers and users on [Gitter](https://gitter.im/dignajar/bludit)", - "this-is-a-brief-description-of-yourself-our-your-blog":"This is a brief description of yourself or your blog, to change this text go to the admin panel, settings, plugins, and configure the plugin about.", - "profile-picture": "Profile picture" + "this-is-a-brief-description-of-yourself-our-your-site":"This is a brief description of yourself or your site, to change this text go to the admin panel, settings, plugins, and configure the plugin about.", + "profile-picture": "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": "Change this page's content on the admin panel, manage, pages and click on the about page.", + "about-your-site-or-yourself": "About your site or yourself", + "welcome-to-bludit": "Welcome to Bludit" } \ No newline at end of file