Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-mw committed Jan 19, 2015
1 parent 0c5a163 commit 70603dd
Show file tree
Hide file tree
Showing 22 changed files with 1,192 additions and 1,207 deletions.
2 changes: 1 addition & 1 deletion .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Options -MultiViews
</IfModule>
RewriteEngine On
# RewriteRule ^(.*)/$ C:\Users\Boyan\Documents\GitHub\microweber/$1 [R=301,L]
# RewriteRule ^(.*)/$ C:\xampp\htdocs\l5/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [NC,L]
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion cache/mw_cache-1619127284/db/options_db_db_init0.php

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion cache/mw_cache-1619127284/db/usersdb_init-511577245.php

This file was deleted.

Empty file.
Empty file.
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
|
*/

'key' => 'YourSecretKey!!!',
'key' => 'cfC3nQlh6E6wkEzvDiRFQ7QrOCO8PBM8',

'cipher' => MCRYPT_RIJNDAEL_128,

Expand Down
23 changes: 19 additions & 4 deletions src/Microweber/Providers/ContentManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1309,6 +1309,11 @@ public function pages_tree($parent = 0, $link = false, $active_ids = false, $act

$to_print = str_replace('{exteded_classes}', '', $to_print);

if ($item['id'] == $item['parent']) {
$remove_ids[] = $item['id'];
}


if (is_array($remove_ids) == true) {
if (in_array($item['id'], $remove_ids)) {
if ($removed_ids_code == false) {
Expand Down Expand Up @@ -1374,13 +1379,15 @@ public function pages_tree($parent = 0, $link = false, $active_ids = false, $act
}

if ($skip_pages_from_tree == false) {

$children = $this->pages_tree($params);
if ($item['id'] != $item['parent']) {
$children = $this->pages_tree($params);
}
}
} else {
if ($skip_pages_from_tree == false) {

$children = $this->pages_tree(intval($item['id']), $link, $active_ids, $active_code, $remove_ids, $removed_ids_code, $ul_class_name = false);
if ($item['id'] != $item['parent']) {
$children = $this->pages_tree(intval($item['id']), $link, $active_ids, $active_code, $remove_ids, $removed_ids_code, $ul_class_name = false);
}
}
}

Expand Down Expand Up @@ -3284,6 +3291,14 @@ public function save_content($data, $delete_the_cache = true)
}


if (isset($data_to_save['parent']) and $data_to_save['parent'] != 0) {
if (isset($data_to_save['id']) and $data_to_save['id'] != 0) {
if ($data_to_save['parent'] == $data_to_save['id']) {
$data_to_save['parent'] = 0;
}
}

}
$save = $this->app->database->extended_save($table, $data_to_save);

$id = $save;
Expand Down
Loading

0 comments on commit 70603dd

Please sign in to comment.