diff --git a/.gitignore b/.gitignore index 3a373671..c593b486 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,12 @@ bl-plugins/timemachine bl-plugins/timemachine-x bl-plugins/discovery bl-plugins/updater +bl-plugins/medium-editor +bl-plugins/quill bl-kernel/bludit.pro.php bl-themes/docs bl-themes/docsx -bl-themes/mediumish \ No newline at end of file +bl-themes/editorial +bl-themes/mediumish +bl-themes/clean-blog +bl-themes/grayscale diff --git a/.htaccess b/.htaccess index 3ef5e449..3b38df5b 100644 --- a/.htaccess +++ b/.htaccess @@ -15,4 +15,4 @@ RewriteRule ^bl-content/(databases|workspaces|pages|tmp)/.*$ - [R=404,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*) index.php [PT,L] - \ No newline at end of file + diff --git a/README.md b/README.md index 04635711..27fe15ee 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,6 @@ Social Networks - [Twitter](https://twitter.com/bludit) - [Facebook](https://www.facebook.com/bluditcms) -- [Google+](https://plus.google.com/+Bluditcms) - [Youtube](https://www.youtube.com/channel/UCuLu0Z_CHBsTiYTDz129x9Q?view_as=subscriber) Requirements diff --git a/bl-kernel/abstract/dblist.class.php b/bl-kernel/abstract/dblist.class.php index 1fabc6b6..26f7293a 100644 --- a/bl-kernel/abstract/dblist.class.php +++ b/bl-kernel/abstract/dblist.class.php @@ -46,8 +46,6 @@ class dbList extends dbJSON // Returns all the items from the list if ($numberOfItems==-1) { - // Invert keys to values, is necesary returns as key the key pages - $list = array_flip($list); return $list; } diff --git a/bl-kernel/abstract/plugin.class.php b/bl-kernel/abstract/plugin.class.php index 62d82d79..1e726a45 100644 --- a/bl-kernel/abstract/plugin.class.php +++ b/bl-kernel/abstract/plugin.class.php @@ -131,7 +131,7 @@ class Plugin { return Sanitize::htmlDecode($this->db[$field]); } } - return false; + return $this->dbFields[$field]; } public function label() @@ -216,10 +216,10 @@ class Plugin { // Create workspace $workspace = $this->workspace(); - mkdir($workspace, 0755, true); + mkdir($workspace, DIR_PERMISSIONS, true); // Create plugin directory for the database - mkdir(PATH_PLUGINS_DATABASES.$this->directoryName, 0755, true); + mkdir(PATH_PLUGINS_DATABASES.$this->directoryName, DIR_PERMISSIONS, true); $this->dbFields['position'] = $position; // Sanitize default values to store in the file diff --git a/bl-kernel/admin/controllers/dashboard.php b/bl-kernel/admin/controllers/dashboard.php index b924561d..d3fb3a2c 100644 --- a/bl-kernel/admin/controllers/dashboard.php +++ b/bl-kernel/admin/controllers/dashboard.php @@ -5,12 +5,17 @@ // ============================================================================ function updateBludit() { global $site; - // Check if Bludit need to be update. - if( ($site->currentBuild() < BLUDIT_BUILD) || isset($_GET['update']) ) { + // New installation + if ($site->currentBuild()==0) { + $site->set(array('currentBuild'=>BLUDIT_BUILD)); + } + + // Check if Bludit need to be update + if ( ($site->currentBuild() < BLUDIT_BUILD) || isset($_GET['update']) ) { Log::set('UPDATE SYSTEM - Starting.'); // Updates only for version less than Bludit v3.0 rc-3 - if ($site->currentBuild()<'20180910') { + if ($site->currentBuild()<='20180910') { @mkdir(PATH_WORKSPACES, DIR_PERMISSIONS, true); $plugins = array('simple-stats', 'pluginRSS', 'pluginSitemap', 'pluginTimeMachineX', 'pluginBackup'); foreach ($plugins as $plugin) { @@ -22,6 +27,12 @@ function updateBludit() { } } + // Updates only for version less than Bludit v3.1 + if ($site->currentBuild()<='20180921') { + @mkdir(PATH_UPLOADS_PAGES, DIR_PERMISSIONS, true); + $site->set(array('imageRelativeToAbsolute'=>true, 'imageRestrict'=>false)); + } + // Set the current build number $site->set(array('currentBuild'=>BLUDIT_BUILD)); Log::set('UPDATE SYSTEM - Finished.'); diff --git a/bl-kernel/admin/controllers/edit-content.php b/bl-kernel/admin/controllers/edit-content.php index eae42488..0566ea95 100644 --- a/bl-kernel/admin/controllers/edit-content.php +++ b/bl-kernel/admin/controllers/edit-content.php @@ -64,6 +64,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { try { $pageKey = $layout['parameters']; $page = new Page($pageKey); + $uuid = $page->uuid(); } catch (Exception $e) { Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to get the page: '.$pageKey, LOG_TYPE_ERROR); Redirect::page('content'); diff --git a/bl-kernel/admin/controllers/logout.php b/bl-kernel/admin/controllers/logout.php index dbb5794e..68fbb5e7 100644 --- a/bl-kernel/admin/controllers/logout.php +++ b/bl-kernel/admin/controllers/logout.php @@ -21,5 +21,5 @@ // ============================================================================ if ($login->logout()) { - Redirect::home(); + Redirect::admin(); } diff --git a/bl-kernel/admin/controllers/new-content.php b/bl-kernel/admin/controllers/new-content.php index fd119222..908a4d2a 100644 --- a/bl-kernel/admin/controllers/new-content.php +++ b/bl-kernel/admin/controllers/new-content.php @@ -32,5 +32,8 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // Main after POST // ============================================================================ +// UUID of the page is need it for autosave and media manager +$uuid = $pages->generateUUID(); + // Title of the page $layout['title'] = $L->g('New content').' - '.$layout['title']; \ No newline at end of file diff --git a/bl-kernel/admin/themes/booty/css/bludit.css b/bl-kernel/admin/themes/booty/css/bludit.css index c8cde06e..e5f32e29 100644 --- a/bl-kernel/admin/themes/booty/css/bludit.css +++ b/bl-kernel/admin/themes/booty/css/bludit.css @@ -51,6 +51,12 @@ a:hover { border-color: #4a90e2; } +.btn-light { + color: #212529; + background-color: #f3f3f3; + border-color: #ced4d9; +} + .btn-form { background-color: #F3F3F3; border-color: #DDD; @@ -91,6 +97,10 @@ body.login { #dashboard ul.list-group.list-group-striped li { border: none; + word-break: break-word; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; } #dashboard ul.list-group.list-group-striped li:nth-of-type(even) { @@ -112,6 +122,16 @@ body.login { color: #4586d4; } +#hello-message { + padding: 10px 0; + color: #777; + margin-bottom: 20px; +} + +#hello-message span.oi { + top: 3px; +} + .ct-series-a .ct-line { /* Set the colour of this series line */ stroke: #4a90e2; @@ -223,4 +243,16 @@ div.sidebar .nav-item span.oi { td.child { padding-left: 30px; -} \ No newline at end of file +} + +/* + Manage > New Content +*/ + +#jseditor { + background: #fff; + padding: 10px 5% !important; + font-size: 16px; + line-height: 1.5em; + +} diff --git a/bl-kernel/admin/themes/booty/html/media.php b/bl-kernel/admin/themes/booty/html/media.php index e2bab522..1dce774f 100644 --- a/bl-kernel/admin/themes/booty/html/media.php +++ b/bl-kernel/admin/themes/booty/html/media.php @@ -1,18 +1,31 @@ -