Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ISPConfig 3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Webslice
ISPConfig 3
Commits
c333d436
Commit
c333d436
authored
9 years ago
by
Florian Schaal
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
http://git.ispconfig.org/ispconfig/ispconfig3
parents
fd166764
842b5c34
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
interface/lib/classes/remote.d/aps.inc.php
+36
-4
36 additions, 4 deletions
interface/lib/classes/remote.d/aps.inc.php
interface/web/sites/lib/remote.conf.php
+1
-1
1 addition, 1 deletion
interface/web/sites/lib/remote.conf.php
with
37 additions
and
5 deletions
interface/lib/classes/remote.d/aps.inc.php
+
36
−
4
View file @
c333d436
...
@@ -39,13 +39,15 @@ class remoting_aps extends remoting {
...
@@ -39,13 +39,15 @@ class remoting_aps extends remoting {
{
{
global
$app
;
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.'
);
$this
->
server
->
fault
(
'permission_denied'
,
'You do not have the permissions to access this function.'
);
return
false
;
return
false
;
}
}
require_once
'../../../lib/config.inc.php'
;
$app
->
load
(
'aps_crawler'
);
$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
->
startCrawler
();
$aps
->
parseFolderToDB
();
$aps
->
parseFolderToDB
();
$aps
->
fixURLs
();
$aps
->
fixURLs
();
...
@@ -53,7 +55,7 @@ class remoting_aps extends remoting {
...
@@ -53,7 +55,7 @@ class remoting_aps extends remoting {
return
true
;
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
;
global
$app
;
...
@@ -198,6 +200,36 @@ class remoting_aps extends remoting {
...
@@ -198,6 +200,36 @@ class remoting_aps extends remoting {
return
$settings
;
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
)
public
function
sites_aps_install_package
(
$session_id
,
$primary_id
,
$params
)
{
{
global
$app
;
global
$app
;
...
...
This diff is collapsed.
Click to expand it.
interface/web/sites/lib/remote.conf.php
+
1
−
1
View file @
c333d436
...
@@ -8,5 +8,5 @@ $function_list['sites_web_domain_get,sites_web_domain_add,sites_web_domain_updat
...
@@ -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_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_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_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'
;
?>
?>
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