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
627a029b
Commit
627a029b
authored
Dec 11, 2018
by
gema
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.setisl.com/inutraliaapp/2018_web_app
into gemis_dev
parents
820ed667
6eea228d
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 @
627a029b
...
@@ -48,7 +48,7 @@ class Controller_Listacompra_Index extends \Controller_App{
...
@@ -48,7 +48,7 @@ class Controller_Listacompra_Index extends \Controller_App{
$recipe_ids
[]
=
$recipe
->
id
;
$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
//Titulo de la vista
$view
->
title
=
"Lista de la Compra"
;
$view
->
title
=
"Lista de la Compra"
;
...
...
fuel/app/classes/model/recipe.php
View file @
627a029b
...
@@ -59,9 +59,11 @@ class Model_Recipe extends Model{
...
@@ -59,9 +59,11 @@ class Model_Recipe extends Model{
$recipe
=
$this
->
ws_recipe_get
(
$this
->
recipe_id
);
$recipe
=
$this
->
ws_recipe_get
(
$this
->
recipe_id
);
if
(
!
$recipe
)
return
array
();
foreach
(
$recipe
->
ingredients
as
$ingredientRecipe
)
foreach
(
$recipe
->
ingredients
as
$ingredientRecipe
)
{
{
$ingredient
=
Model_Ingredient
::
forge
();
$ingredient
=
Model_Ingredient
::
forge
();
$ingredient
->
ingredient_id
=
$ingredientRecipe
->
id
;
$ingredient
->
ingredient_id
=
$ingredientRecipe
->
id
;
...
@@ -73,7 +75,6 @@ class Model_Recipe extends Model{
...
@@ -73,7 +75,6 @@ class Model_Recipe extends Model{
$ingredient
->
created_at
=
date
(
"Y-m-d H:i:s"
);
$ingredient
->
created_at
=
date
(
"Y-m-d H:i:s"
);
$this
->
ingredients
[]
=
$ingredient
;
$this
->
ingredients
[]
=
$ingredient
;
}
}
$this
->
loaded
=
'S'
;
$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