Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Feeds
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Feeds
Commits
d5e71621
Commit
d5e71621
authored
15 years ago
by
Andrew Dolgov
Browse files
Options
Downloads
Patches
Plain Diff
api: add show_content to getHeadlines to allow CDM-styled operation
parent
b792cd70
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
api/index.php
+8
-3
8 additions, 3 deletions
api/index.php
with
8 additions
and
3 deletions
api/index.php
+
8
−
3
View file @
d5e71621
...
...
@@ -201,7 +201,8 @@
$limit
=
(
int
)
db_escape_string
(
$_REQUEST
[
"limit"
]);
$filter
=
db_escape_string
(
$_REQUEST
[
"filter"
]);
$is_cat
=
(
bool
)
db_escape_string
(
$_REQUEST
[
"is_cat"
]);
$show_except
=
(
bool
)
db_escape_string
(
$_REQUEST
[
"show_excerpt"
]);
$show_excerpt
=
(
bool
)
db_escape_string
(
$_REQUEST
[
"show_excerpt"
]);
$show_content
=
(
bool
)
db_escape_string
(
$_REQUEST
[
"show_content"
]);
/* do not rely on params below */
...
...
@@ -231,11 +232,15 @@
"feed_id"
=>
$line
[
"feed_id"
],
);
if
(
$show_except
)
{
if
(
$show_exce
r
pt
)
{
$excerpt
=
truncate_string
(
strip_tags
(
$line
[
"content_preview"
]),
100
);
$headline_row
[
"excerpt"
]
=
$excerpt
;
}
if
(
$show_content
)
{
$headline_row
[
"content"
]
=
$line
[
"content_preview"
];
}
array_push
(
$headlines
,
$headline_row
);
}
...
...
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