summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-05-02 09:43:17 +0200
committerRoeland Jago Douma <rullzer@owncloud.com>2016-05-02 19:34:32 +0200
commitc96ed5c4ce27d4ab62cf483193d311fed1c37556 (patch)
tree645706a86415d096b7032281e121df168aa8c62e /lib
parent0cb434686ca05708dc53aba7254e882741de7477 (diff)
downloadnextcloud-server-c96ed5c4ce27d4ab62cf483193d311fed1c37556.tar.gz
nextcloud-server-c96ed5c4ce27d4ab62cf483193d311fed1c37556.zip
Move OC_Archive to \OC\Archive\Archive
* Move out of legacy folder * Move to proper namespace * Fix calling code
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Archive/Archive.php (renamed from lib/private/legacy/archive.php)7
-rw-r--r--lib/private/Archive/TAR.php2
-rw-r--r--lib/private/Archive/ZIP.php2
-rw-r--r--lib/private/Installer.php2
4 files changed, 6 insertions, 7 deletions
diff --git a/lib/private/legacy/archive.php b/lib/private/Archive/Archive.php
index aebc586d721..b5286968a2f 100644
--- a/lib/private/legacy/archive.php
+++ b/lib/private/Archive/Archive.php
@@ -28,15 +28,14 @@
*
*/
-use OC\Archive\TAR;
-use OC\Archive\ZIP;
+namespace OC\Archive;
-abstract class OC_Archive{
+abstract class Archive{
/**
* Open any of the supported archive types
*
* @param string $path
- * @return OC_Archive|void
+ * @return Archive|void
*/
public static function open($path) {
$mime = \OC::$server->getMimeTypeDetector()->detect($path);
diff --git a/lib/private/Archive/TAR.php b/lib/private/Archive/TAR.php
index e233bdeb9cc..d783e53d40c 100644
--- a/lib/private/Archive/TAR.php
+++ b/lib/private/Archive/TAR.php
@@ -32,7 +32,7 @@
namespace OC\Archive;
-class TAR extends \OC_Archive {
+class TAR extends Archive {
const PLAIN = 0;
const GZIP = 1;
const BZIP = 2;
diff --git a/lib/private/Archive/ZIP.php b/lib/private/Archive/ZIP.php
index 1d35e178923..2bc17507d32 100644
--- a/lib/private/Archive/ZIP.php
+++ b/lib/private/Archive/ZIP.php
@@ -29,7 +29,7 @@
namespace OC\Archive;
-class ZIP extends \OC_Archive{
+class ZIP extends Archive{
/**
* @var \ZipArchive zip
*/
diff --git a/lib/private/Installer.php b/lib/private/Installer.php
index 643590ae22e..8ecc92e134b 100644
--- a/lib/private/Installer.php
+++ b/lib/private/Installer.php
@@ -300,7 +300,7 @@ class Installer {
$extractDir = \OC::$server->getTempManager()->getTemporaryFolder();
OC_Helper::rmdirr($extractDir);
mkdir($extractDir);
- if($archive=\OC_Archive::open($path)) {
+ if($archive=\OC\Archive\Archive::open($path)) {
$archive->extract($extractDir);
} else {
OC_Helper::rmdirr($extractDir);