X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2F7zip.inc;h=751a131168cc82d0e0acc53ec5334ec139ef1acb;hb=b11abb540f237c040e9ab00dd90b752b54dc64a2;hp=4ac480ed0f13b6ec514060511be859a8e7fc2a8c;hpb=617a5b1e15eb52f2fe0b0f7493e6e66eee26c6dd;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/7zip.inc b/maintenance/7zip.inc index 4ac480ed0f..751a131168 100644 --- a/maintenance/7zip.inc +++ b/maintenance/7zip.inc @@ -2,6 +2,24 @@ /** * 7z stream wrapper * + * Copyright © 2005 Brion Vibber + * https://www.mediawiki.org/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * * @file * @ingroup Maintenance */ @@ -14,10 +32,11 @@ * @ingroup Maintenance */ class SevenZipStream { - var $stream; + protected $stream; private function stripPath( $path ) { $prefix = 'mediawiki.compress.7z://'; + return substr( $path, strlen( $prefix ) ); } @@ -73,4 +92,5 @@ class SevenZipStream { return fseek( $this->stream, $offset, $whence ); } } + stream_wrapper_register( 'mediawiki.compress.7z', 'SevenZipStream' );