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
Helmo
ISPConfig 3
Commits
a548e7d1
Commit
a548e7d1
authored
9 years ago
by
Dominik
Browse files
Options
Downloads
Patches
Plain Diff
fixed problem with not working aps-crawler over remote (must use interface mode)
added possibility to change package-status over remote
parent
ae9ca85a
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
+34
-4
34 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
35 additions
and
5 deletions
interface/lib/classes/remote.d/aps.inc.php
+
34
−
4
View file @
a548e7d1
...
...
@@ -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,34 @@ 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
;
}
$app
->
db
->
query
(
"UPDATE aps_packages SET package_status = "
.
$params
[
'package_status'
]
.
" WHERE id = '"
.
$app
->
functions
->
intval
(
$primary_id
)
.
"';"
);
return
true
;
}
public
function
sites_aps_install_package
(
$session_id
,
$primary_id
,
$params
)
{
global
$app
;
...
...
This diff is collapsed.
Click to expand it.
interface/web/sites/lib/remote.conf.php
+
1
−
1
View file @
a548e7d1
...
...
@@ -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'
;
?>
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