Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
c333d436
Commit
c333d436
authored
Sep 06, 2015
by
Florian Schaal
Browse files
Merge branch 'master' of
http://git.ispconfig.org/ispconfig/ispconfig3
parents
fd166764
842b5c34
Changes
2
Show whitespace changes
Inline
Side-by-side
interface/lib/classes/remote.d/aps.inc.php
View file @
c333d436
...
...
@@ -39,13 +39,15 @@ class remoting_aps extends remoting {
{
global
$app
;
if
(
!
$this
->
checkPerm
(
$session_id
,
'sites_aps_update_package'
))
{
if
(
!
$this
->
checkPerm
(
$session_id
,
'sites_aps_update_package
_list
'
))
{
$this
->
server
->
fault
(
'permission_denied'
,
'You do not have the permissions to access this function.'
);
return
false
;
}
require_once
'../../../lib/config.inc.php'
;
$app
->
load
(
'aps_crawler'
);
$aps
=
new
ApsCrawler
(
$app
,
false
);
// true = Interface mode, false = Server mode
$aps
=
new
ApsCrawler
(
$app
,
true
);
// true = Interface mode, false = Server mode
$aps
->
startCrawler
();
$aps
->
parseFolderToDB
();
$aps
->
fixURLs
();
...
...
@@ -53,7 +55,7 @@ class remoting_aps extends remoting {
return
true
;
}
public
function
sites_aps_available_packages_list
(
$session_id
,
$params
)
public
function
sites_aps_available_packages_list
(
$session_id
,
$params
=
array
()
)
{
global
$app
;
...
...
@@ -198,6 +200,36 @@ class remoting_aps extends remoting {
return
$settings
;
}
public
function
sites_aps_change_package_status
(
$session_id
,
$primary_id
,
$params
)
{
global
$app
;
if
(
!
$this
->
checkPerm
(
$session_id
,
'sites_aps_change_package_status'
))
{
$this
->
server
->
fault
(
'permission_denied'
,
'You do not have the permissions to access this function.'
);
return
false
;
}
$app
->
load
(
'aps_base'
);
$app
->
load
(
'aps_guicontroller'
);
$gui
=
new
ApsGUIController
(
$app
);
// Make sure an integer ID is given
if
(
!
isset
(
$primary_id
)
||
!
$gui
->
isValidPackageID
(
$primary_id
,
true
))
{
// always adminflag
$this
->
server
->
fault
(
'package_error'
,
'The given Package ID is not valid.'
);
return
false
;
}
if
(
!
isset
(
$params
[
'package_status'
])
||
((
$params
[
'package_status'
]
!=
PACKAGE_ENABLED
)
&&
(
$params
[
'package_status'
]
!=
PACKAGE_LOCKED
)))
{
$this
->
server
->
fault
(
'package_error'
,
'Wrong new status: '
.
$params
[
'package_status'
]);
return
false
;
}
$sql
=
"UPDATE aps_packages SET package_status = ? WHERE id = ?"
;
$app
->
db
->
query
(
$sql
,
$params
[
'package_status'
],
$app
->
functions
->
intval
(
$primary_id
));
return
true
;
}
public
function
sites_aps_install_package
(
$session_id
,
$primary_id
,
$params
)
{
global
$app
;
...
...
interface/web/sites/lib/remote.conf.php
View file @
c333d436
...
...
@@ -8,5 +8,5 @@ $function_list['sites_web_domain_get,sites_web_domain_add,sites_web_domain_updat
$function_list
[
'sites_web_domain_backup'
]
=
'Sites Backup functions'
;
$function_list
[
'sites_web_aliasdomain_get,sites_web_aliasdomain_add,sites_web_aliasdomain_update,sites_web_aliasdomain_delete'
]
=
'Sites Aliasdomain functions'
;
$function_list
[
'sites_web_subdomain_get,sites_web_subdomain_add,sites_web_subdomain_update,sites_web_subdomain_delete'
]
=
'Sites Subdomain functions'
;
$function_list
[
'sites_aps_update_package_list,sites_aps_available_packages_list,sites_aps_install_package,sites_aps_get_package_details,sites_aps_get_package_file,sites_aps_get_package_settings,sites_aps_instance_get,sites_aps_instance_delete'
]
=
'Sites APS functions'
;
$function_list
[
'sites_aps_update_package_list,sites_aps_available_packages_list,sites_aps_
change_package_status,sites_aps_
install_package,sites_aps_get_package_details,sites_aps_get_package_file,sites_aps_get_package_settings,sites_aps_instance_get,sites_aps_instance_delete'
]
=
'Sites APS functions'
;
?>
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment