Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
c05ef822
Commit
c05ef822
authored
8 years ago
by
Alex ORLUC
Browse files
Options
Downloads
Patches
Plain Diff
change order resList in visa v2 + update header license
parent
f4f3c0e8
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/basket/Models/BasketsModelAbstract.php
+27
-25
27 additions, 25 deletions
modules/basket/Models/BasketsModelAbstract.php
modules/visa/Controllers/VisaController.php
+278
-254
278 additions, 254 deletions
modules/visa/Controllers/VisaController.php
with
305 additions
and
279 deletions
modules/basket/Models/BasketsModelAbstract.php
+
27
−
25
View file @
c05ef822
<?php
<?php
/*
/**
* Copyright 2015 Maarch
* Copyright Maarch since 2008 under licence GPLv3.
* See LICENCE.txt file at the root folder for more details.
* This file is part of Maarch software.
*
*
* This file is part of Maarch Framework.
*/
*
* Maarch Framework is free software: you can redistribute it and/or modify
/**
* it under the terms of the GNU General Public License as published by
* @brief BasketModelAbstract
* the Free Software Foundation, either version 3 of the License, or
* @author <dev@maarch.org>
* (at your option) any later version.
* @ingroup basket
*
* Maarch Framework is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
*/
*/
require_once
'apps/maarch_entreprise/services/Table.php'
;
require_once
'apps/maarch_entreprise/services/Table.php'
;
...
@@ -28,12 +22,14 @@ class BasketsModelAbstract extends Apps_Table_Service {
...
@@ -28,12 +22,14 @@ class BasketsModelAbstract extends Apps_Table_Service {
static
::
checkString
(
$aArgs
,
[
'basketId'
]);
static
::
checkString
(
$aArgs
,
[
'basketId'
]);
$aBasket
=
static
::
select
([
$aBasket
=
static
::
select
(
[
'select'
=>
[
'basket_clause'
],
'select'
=>
[
'basket_clause'
],
'table'
=>
[
'baskets'
],
'table'
=>
[
'baskets'
],
'where'
=>
[
'basket_id = ?'
],
'where'
=>
[
'basket_id = ?'
],
'data'
=>
[
$aArgs
[
'basketId'
]]
'data'
=>
[
$aArgs
[
'basketId'
]]
]);
]
);
if
(
empty
(
$aBasket
[
0
])
||
empty
(
$aBasket
[
0
][
'basket_clause'
]))
{
if
(
empty
(
$aBasket
[
0
])
||
empty
(
$aBasket
[
0
][
'basket_clause'
]))
{
return
[];
return
[];
...
@@ -41,12 +37,14 @@ class BasketsModelAbstract extends Apps_Table_Service {
...
@@ -41,12 +37,14 @@ class BasketsModelAbstract extends Apps_Table_Service {
$where
=
str_replace
(
'@user'
,
"'"
.
$_SESSION
[
'user'
][
'UserId'
]
.
"'"
,
$aBasket
[
0
][
'basket_clause'
]);
$where
=
str_replace
(
'@user'
,
"'"
.
$_SESSION
[
'user'
][
'UserId'
]
.
"'"
,
$aBasket
[
0
][
'basket_clause'
]);
$aResList
=
static
::
select
([
$aResList
=
static
::
select
(
[
'select'
=>
empty
(
$aArgs
[
'select'
])
?
[
'*'
]
:
$aArgs
[
'select'
],
'select'
=>
empty
(
$aArgs
[
'select'
])
?
[
'*'
]
:
$aArgs
[
'select'
],
'table'
=>
[
'res_view_letterbox'
],
'table'
=>
[
'res_view_letterbox'
],
'where'
=>
[
$where
],
'where'
=>
[
$where
],
'order_by'
=>
"creation_date DESC"
,
'order_by'
=>
empty
(
$aArgs
[
'order_by'
])
?
[
'creation_date DESC'
]
:
$aArgs
[
'order_by'
],
]);
]
);
return
$aResList
;
return
$aResList
;
}
}
...
@@ -56,12 +54,14 @@ class BasketsModelAbstract extends Apps_Table_Service {
...
@@ -56,12 +54,14 @@ class BasketsModelAbstract extends Apps_Table_Service {
static
::
checkNumeric
(
$aArgs
,
[
'actionId'
]);
static
::
checkNumeric
(
$aArgs
,
[
'actionId'
]);
$aAction
=
static
::
select
([
$aAction
=
static
::
select
(
[
'select'
=>
empty
(
$aArgs
[
'select'
])
?
[
'*'
]
:
$aArgs
[
'select'
],
'select'
=>
empty
(
$aArgs
[
'select'
])
?
[
'*'
]
:
$aArgs
[
'select'
],
'table'
=>
[
'actions'
],
'table'
=>
[
'actions'
],
'where'
=>
[
'id = ?'
],
'where'
=>
[
'id = ?'
],
'data'
=>
[
$aArgs
[
'actionId'
]]
'data'
=>
[
$aArgs
[
'actionId'
]]
]);
]
);
return
$aAction
[
0
];
return
$aAction
[
0
];
}
}
...
@@ -71,12 +71,14 @@ class BasketsModelAbstract extends Apps_Table_Service {
...
@@ -71,12 +71,14 @@ class BasketsModelAbstract extends Apps_Table_Service {
static
::
checkString
(
$aArgs
,
[
'basketId'
]);
static
::
checkString
(
$aArgs
,
[
'basketId'
]);
$aAction
=
static
::
select
([
$aAction
=
static
::
select
(
[
'select'
=>
[
'id_action'
],
'select'
=>
[
'id_action'
],
'table'
=>
[
'actions_groupbaskets'
],
'table'
=>
[
'actions_groupbaskets'
],
'where'
=>
[
'basket_id = ?'
],
'where'
=>
[
'basket_id = ?'
],
'data'
=>
[
$aArgs
[
'basketId'
]]
'data'
=>
[
$aArgs
[
'basketId'
]]
]);
]
);
if
(
empty
(
$aAction
[
0
]))
{
if
(
empty
(
$aAction
[
0
]))
{
return
''
;
return
''
;
...
...
This diff is collapsed.
Click to expand it.
modules/visa/Controllers/VisaController.php
+
278
−
254
View file @
c05ef822
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment