Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
768ed4d1
Commit
768ed4d1
authored
Feb 02, 2016
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix blob missing from disk (but still in database)
parent
18aacb0f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
blobs.php
qa-include/app/blobs.php
+5
-1
qa-blob.php
qa-include/qa-blob.php
+1
-1
No files found.
qa-include/app/blobs.php
View file @
768ed4d1
...
...
@@ -133,7 +133,11 @@
{
if
(
qa_to_override
(
__FUNCTION__
))
{
$args
=
func_get_args
();
return
qa_call_override
(
__FUNCTION__
,
$args
);
}
return
file_get_contents
(
qa_get_blob_filename
(
$blobid
,
$format
));
$filename
=
qa_get_blob_filename
(
$blobid
,
$format
);
if
(
is_readable
(
$filename
))
return
file_get_contents
(
$filename
);
else
return
null
;
}
...
...
qa-include/qa-blob.php
View file @
768ed4d1
...
...
@@ -47,7 +47,7 @@ qa_db_connect('qa_blob_db_fail_handler');
$blob
=
qa_read_blob
(
qa_get
(
'qa_blobid'
));
if
(
isset
(
$blob
))
{
if
(
isset
(
$blob
)
&&
isset
(
$blob
[
'content'
])
)
{
// allows browsers and proxies to cache the blob (30 days)
header
(
'Cache-Control: max-age=2592000, public'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment