Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
2
2018_web_app
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
inutralia
2018_web_app
Commits
3747d4d1
Commit
3747d4d1
authored
Dec 11, 2018
by
Luis Perez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corregido error en lista de la compra cuando no se han guardado ninguna receta
parent
246daf5a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
index.php
fuel/app/classes/controller/listacompra/index.php
+1
-1
recipe.php
fuel/app/classes/model/recipe.php
+3
-2
No files found.
fuel/app/classes/controller/listacompra/index.php
View file @
3747d4d1
...
...
@@ -48,7 +48,7 @@ class Controller_Listacompra_Index extends \Controller_App{
$recipe_ids
[]
=
$recipe
->
id
;
}
$view
->
ingredients
=
Model_Ingredient
::
get_ingredients_week
(
$recipe_ids
);
$view
->
ingredients
=
count
(
$recipe_ids
)
>
0
?
Model_Ingredient
::
get_ingredients_week
(
$recipe_ids
)
:
array
(
);
//Titulo de la vista
$view
->
title
=
"Lista de la Compra"
;
...
...
fuel/app/classes/model/recipe.php
View file @
3747d4d1
...
...
@@ -59,9 +59,11 @@ class Model_Recipe extends Model{
$recipe
=
$this
->
ws_recipe_get
(
$this
->
recipe_id
);
if
(
!
$recipe
)
return
array
();
foreach
(
$recipe
->
ingredients
as
$ingredientRecipe
)
{
$ingredient
=
Model_Ingredient
::
forge
();
$ingredient
->
ingredient_id
=
$ingredientRecipe
->
id
;
...
...
@@ -73,7 +75,6 @@ class Model_Recipe extends Model{
$ingredient
->
created_at
=
date
(
"Y-m-d H:i:s"
);
$this
->
ingredients
[]
=
$ingredient
;
}
$this
->
loaded
=
'S'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment