Skip to content

Commit

Permalink
Remove serveral getClean before saving
Browse files Browse the repository at this point in the history
  • Loading branch information
partydragen committed Aug 7, 2022
1 parent f971d7d commit f9c7212
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
</div>
</form>

<center><p>Store Module by <a href="https://partydragen.com/" target="_blank">Partydragen</a></br>Support on <a href="https://discord.gg/TtH6tpp" target="_blank">Discord</a></p></center>
<center><p>Store Module by <a href="https://partydragen.com/" target="_blank">Partydragen</a></br>Support on <a href="https://discord.gg/TtH6tpp" target="_blank">Discord</a></br>Support the development on <a href="https://partydragen.com/patreon/" target="_blank">Patreon</a></p></center>
</div>
</div>

Expand Down
8 changes: 4 additions & 4 deletions upload/modules/Store/pages/panel/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@

// Save to database
DB::getInstance()->insert('store_categories', [
'name' => Output::getClean(Input::get('name')),
'description' => Output::getClean(Input::get('description')),
'name' => Input::get('name'),
'description' => Input::get('description'),
'parent_category' => $parent_category != 0 ? $parent_category : null,
'only_subcategories' => $only_subcategories,
'hidden' => $hidden,
Expand Down Expand Up @@ -177,8 +177,8 @@

// Save to database
DB::getInstance()->update('store_categories', $category->id, [
'name' => Output::getClean(Input::get('name')),
'description' => Output::getClean(Input::get('description')),
'name' => Input::get('name'),
'description' => Input::get('description'),
'parent_category' => $parent_category != 0 ? $parent_category : null,
'only_subcategories' => $only_subcategories,
'hidden' => $hidden,
Expand Down
12 changes: 6 additions & 6 deletions upload/modules/Store/pages/panel/fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@

// Save to database
DB::getInstance()->insert('store_fields', [
'identifier' => Output::getClean(Input::get('identifier')),
'description' => Output::getClean(Input::get('description')),
'identifier' => Input::get('identifier'),
'description' => Input::get('description'),
'type' => $type,
'required' => $required,
'options' => htmlspecialchars($options),
'options' => $options,
'order' => Input::get('order'),
'min' => Input::get('minimum'),
'max' => Input::get('maximum'),
Expand Down Expand Up @@ -234,11 +234,11 @@

// Save to database
DB::getInstance()->update('store_fields', $field->id, [
'identifier' => Output::getClean(Input::get('identifier')),
'description' => Output::getClean(Input::get('description')),
'identifier' => Input::get('identifier'),
'description' => Input::get('description'),
'type' => $type,
'required' => $required,
'options' => htmlspecialchars($options),
'options' => $options,
'min' => Input::get('minimum'),
'max' => Input::get('maximum'),
'order' => Input::get('order'),
Expand Down
6 changes: 3 additions & 3 deletions upload/modules/Store/pages/panel/product.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@

// Save to database
$product->update([
'name' => Output::getClean(Input::get('name')),
'description' => Output::getClean(Input::get('description')),
'name' => Input::get('name'),
'description' => Input::get('description'),
'category_id' => $category[0]->id,
'price' => $price,
'hidden' => $hidden,
Expand Down Expand Up @@ -158,7 +158,7 @@

if ($upload) {
$product->update([
'image' => Output::getClean($image->getName() . '.' . $image->getMime())
'image' => $image->getName() . '.' . $image->getMime()
]);

Session::flash('products_success', $store_language->get('admin', 'image_updated_successfully'));
Expand Down
4 changes: 2 additions & 2 deletions upload/modules/Store/pages/panel/products.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@

// Save to database
DB::getInstance()->insert('store_products', [
'name' => Output::getClean(Input::get('name')),
'description' => Output::getClean(Input::get('description')),
'name' => Input::get('name'),
'description' => Input::get('description'),
'category_id' => $category[0]->id,
'price' => $price,
'hidden' => $hidden,
Expand Down

0 comments on commit f9c7212

Please sign in to comment.