Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
project_composer
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
project_composer
Commits
352c99aa
Commit
352c99aa
authored
2 years ago
by
Neil Drumm
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3342516
: Remove old menu callback
parent
65108370
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
project_composer.module
+4
-30
4 additions, 30 deletions
project_composer.module
with
4 additions
and
30 deletions
project_composer.module
+
4
−
30
View file @
352c99aa
...
...
@@ -27,13 +27,6 @@ define('PROJECT_COMPOSER_CATEGORY_EXTERNAL', "external");
* Implements hook_menu().
*/
function
project_composer_menu
()
{
$items
[
'packages/%project_composer_endpoint/packages.json'
]
=
[
'page callback'
=>
'project_composer_root_metadata'
,
'page arguments'
=>
[
1
],
'access arguments'
=>
[
'access content'
],
'type'
=>
MENU_CALLBACK
,
];
$items
[
'packages/%project_composer_endpoint/search.json'
]
=
[
'page callback'
=>
'project_composer_search'
,
'page arguments'
=>
[
1
],
...
...
@@ -320,19 +313,6 @@ function project_composer_manage_provider_includes($includes) {
}
}
/**
* Menu callback for /packages.json.
*
* @param string $release_category
* Either 'legacy' or 'current'.
*/
function
project_composer_root_metadata
(
$release_category
)
{
// Hey Kid, Stop all the page cachin'
drupal_page_is_cacheable
(
FALSE
);
drupal_json_output
(
project_composer_root_metadata_data
(
$release_category
));
}
/**
* Returns the data structure for the root composer.json.
*
...
...
@@ -1855,11 +1835,8 @@ function project_composer_write_json($release_category, $json, $packagename = NU
$full_project_dir
=
$project_dir
.
'/'
.
$subdir
;
if
(
!
file_prepare_directory
(
$full_project_dir
,
FILE_CREATE_DIRECTORY
|
FILE_MODIFY_PERMISSIONS
))
{
$wrapper
=
file_stream_wrapper_get_instance_by_uri
(
$project_dir
);
watchdog
(
'project_composer'
,
'%path does not exist or is not writable.'
,
array
(
'%path'
=>
$wrapper
->
realpath
()));
if
(
function_exists
(
'drush_main'
))
{
drush_set_error
(
'NO_DIRECTORY'
,
dt
(
'@path does not exist or is not writable.'
,
[
'@path'
=>
$wrapper
->
realpath
()]));
}
return
array
(
'hash'
=>
'error'
,
'filename'
=>
'error'
);
watchdog
(
'project_composer'
,
'%path does not exist or is not writable.'
,
[
'%path'
=>
$wrapper
->
realpath
()],
WATCHDOG_ERROR
);
return
[
'hash'
=>
'error'
,
'filename'
=>
'error'
];
}
// Write out file.
...
...
@@ -1892,11 +1869,8 @@ function project_composer_write_include_json($release_category, $json, $groupnam
$project_dir
=
_project_composer_get_metadata_file_dir
(
$release_category
);
if
(
!
file_prepare_directory
(
$project_dir
,
FILE_CREATE_DIRECTORY
|
FILE_MODIFY_PERMISSIONS
))
{
$wrapper
=
file_stream_wrapper_get_instance_by_uri
(
$project_dir
);
watchdog
(
'project_composer'
,
'%path does not exist or is not writable.'
,
array
(
'%path'
=>
$wrapper
->
realpath
()));
if
(
function_exists
(
'drush_main'
)){
drush_set_error
(
'NO_DIRECTORY'
,
dt
(
'@path does not exist or is not writable.'
,
[
'@path'
=>
$wrapper
->
realpath
()]));
}
return
array
(
'hash'
=>
'error'
,
'filename'
=>
'error'
);
watchdog
(
'project_composer'
,
'%path does not exist or is not writable.'
,
[
'%path'
=>
$wrapper
->
realpath
()],
WATCHDOG_ERROR
);
return
[
'hash'
=>
'error'
,
'filename'
=>
'error'
];
}
// Write out file.
...
...
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