Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
fixes in menus #40
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-mw committed Dec 17, 2014
1 parent 512ea93 commit 4a98a42
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/Microweber/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,10 @@ public function query($q, $cache_id = false, $cache_group = 'global', $only_quer

public function q($q)
{
return DB::select($q);


return DB::statement($q);
// return DB::select($q);
}


Expand Down
2 changes: 2 additions & 0 deletions src/Microweber/Providers/ContentManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3950,6 +3950,8 @@ public function save_content($data, $delete_the_cache = true)
}




if (!isset($data['url']) and intval($data['id']) != 0) {


Expand Down
7 changes: 4 additions & 3 deletions src/Microweber/Utils/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -708,8 +708,8 @@ public function update_position_field($table, $data = array())
$value = intval($value);
if ($value != 0) {
$q = "UPDATE $table_real SET position={$i} WHERE id={$value} ";

$q = $this->q($q);
DB::statement($q);
//$q = $this->q($q);
}
$i++;
}
Expand Down Expand Up @@ -865,8 +865,9 @@ public function import_sql_file($full_path_to_file)
$i = 1;
foreach ($sql_query as $sql) {
$sql = trim($sql);
DB::statement($sql);

$qz = $this->q($sql);
//$qz = $this->q($sql);
}
//$this->app->cache_manager->delete('db');
return true;
Expand Down
6 changes: 3 additions & 3 deletions userfiles/modules/categories/selector.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@

if (isset($orig_params['is_shop']) and trim($orig_params['is_shop']) == 'y') {

$tree['is_shop'] = 'y';
$tree['is_shop'] = 1;
$tree['parent'] = 'any';


Expand Down Expand Up @@ -176,7 +176,7 @@

if(isset($params['subtype']) and $params['subtype'] == 'product'){

$tree['is_shop'] = 'y';
$tree['is_shop'] = 1;
}
if(isset($params['subtype']) and $params['subtype'] == 'post'){
$tree['subtype'] = 'dynamic';
Expand All @@ -199,7 +199,7 @@

unset($tree['subtype']);
}

$tree['is_active'] = 1;
pages_tree($tree);
?>
<?php endif; ?>
Expand Down

0 comments on commit 4a98a42

Please sign in to comment.