Permalink
Browse files

use Phar class if ZipArchive is not installed

  • Loading branch information...
1 parent c6acf26 commit 9826d5c161e719b5f5d116aaf4158a126b957725 @chadsmith committed Feb 13, 2013
Showing with 4 additions and 3 deletions.
  1. +1 −1 README.md
  2. +2 −2 plugin.json
  3. +1 −0 upgrade.php
View
@@ -1,6 +1,6 @@
# One-click updates for OpenVBX
-In order for this plugin to work, the [ZipArchive][1] or [Phar][2] class will need to be installed, and the root directory for OpenVBX will need to be group writable by the local web user.
+In order for the plugin to work, the [ZipArchive][1] or [Phar][2] class will need to be installed, and the root directory for OpenVBX will need to be group writable by the local web user.
[1]: http://www.php.net/manual/en/book.zip.php
[2]: http://www.php.net/manual/en/book.phar.php
View
@@ -1,12 +1,12 @@
{
"name" : "Automatic Upgrade",
"author" : "Chad Smith <chad@nospam.me>",
- "description" : "One click updates for OpenVBX.",
+ "description" : "One-click updates for OpenVBX.",
"url" : "http://twitter.com/chadsmith",
"links" : [{
"menu" : "System",
"url" : "upgrade",
"script" : "upgrade.php",
"label" : "Automatic Upgrade"
}]
-}
+}
View
@@ -5,6 +5,7 @@
die('The <a href="http://www.php.net/manual/en/book.zip.php">ZipArchive</a> or <a href="http://www.php.net/manual/en/book.phar.php">Phar</a> class must be installed to use this plugin.');
$cwd = dirname(__FILE__);
$tmp = $cwd . '/tmp/';
+mkdir($tmp, 2775);
$root = dirname(dirname($cwd));
if(!is_writable($root))
die($root . ' must be writable by ' . get_current_user());

0 comments on commit 9826d5c

Please sign in to comment.