Last active
December 24, 2015 19:59
-
-
Save sternenseemann/6854647 to your computer and use it in GitHub Desktop.
Patch for Filebin to get it working on uberspace.de
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/application/controllers/file.php b/application/controllers/file.php | |
index 7d701b7..16c6d75 100644 | |
--- a/application/controllers/file.php | |
+++ b/application/controllers/file.php | |
@@ -316,7 +316,7 @@ class File extends MY_Controller { | |
echo '<div class="table-row">'."\n"; | |
echo '<div class="table-cell">'."\n"; | |
// TODO: use exec safe and catch exception | |
- $r = (new \libraries\ProcRunner(array(FCPATH.'scripts/Markdown.pl', $file)))->forbid_stderr()->exec(); | |
+ $r = (new \libraries\ProcRunner(array('perl '.FCPATH.'scripts/Markdown.pl', $file)))->forbid_stderr()->exec(); | |
echo $r['stdout']; | |
echo '</div></div></div>'; | |
diff --git a/install.php b/install.php | |
index 3d486d9..f44b27a 100644 | |
--- a/install.php | |
+++ b/install.php | |
@@ -35,7 +35,7 @@ $perldeps = array( | |
); | |
foreach ($perldeps as $dep) { | |
ob_start(); | |
- passthru("perl 2>&1 -M'$dep' -e1"); | |
+ passthru("perl -I/home/$user/perl5/lib/perl5 2>&1 -M'$dep' -e1"); | |
$buf = ob_get_contents(); | |
ob_end_clean(); | |
if ($buf != "") { | |
diff --git a/scripts/Markdown.pl b/scripts/Markdown.pl | |
index 169b15f..c50f12b 100755 | |
--- a/scripts/Markdown.pl | |
+++ b/scripts/Markdown.pl | |
@@ -1,6 +1,7 @@ | |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
+use local::lib; | |
use Text::Markdown qw(markdown); | |
=head1 NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment