Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor 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
drupal.org
feeds
Commits
38bdd6df
Commit
38bdd6df
authored
14 years ago
by
Alex Barth
Browse files
Options
Downloads
Patches
Plain Diff
#755556 Monkey Master, andrewlevine, alex_b: Support saving local files in filefields.
parent
e2f0f434
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
CHANGELOG.txt
+2
-0
2 additions, 0 deletions
CHANGELOG.txt
plugins/FeedsParser.inc
+10
-0
10 additions, 0 deletions
plugins/FeedsParser.inc
with
12 additions
and
0 deletions
CHANGELOG.txt
+
2
−
0
View file @
38bdd6df
...
...
@@ -3,6 +3,8 @@
Feeds 6.x xxxxxxxxxxxxxxxxxxxxxx
--------------------------------
- #755556 Monkey Master, andrewlevine, alex_b: Support saving local files in
filefields.
- #891982 bangpound, twistor: Support Link 2.x.
- #870278 budda: Fix SQL query in taxonomy_get_term_by_name_vid().
- #795114 budda, alex_b: Taxonomy term processor doesn't require vocabulary to
...
...
This diff is collapsed.
Click to expand it.
plugins/FeedsParser.inc
+
10
−
0
View file @
38bdd6df
...
...
@@ -245,6 +245,16 @@ class FeedsEnclosure extends FeedsElement {
*/
public
function
getFile
()
{
if
(
empty
(
$this
->
file
)
&&
$this
->
getValue
())
{
// Check if this enclosure contains a local file.
if
(
!
parse_url
(
$this
->
getValue
(),
PHP_URL_SCHEME
))
{
if
(
file_check_location
(
$this
->
getValue
(),
file_directory_path
()))
{
if
(
file_exists
(
$this
->
getValue
()))
{
$this
->
file
=
$this
->
getValue
();
return
$this
->
file
;
}
}
throw
new
Exception
(
t
(
'Invalid enclosure %enclosure'
,
array
(
'%enclosure'
=>
$this
->
getValue
())));
}
$filename
=
basename
(
$this
->
getValue
());
if
(
module_exists
(
'transliteration'
))
{
require_once
(
drupal_get_path
(
'module'
,
'transliteration'
)
.
'/transliteration.inc'
);
...
...
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