Version 3.2.3
This commit is contained in:
1 parent
ae5c01cc78
commit
78706903a2
2641 files changed
+228363
-201264
No files matched your search
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* XML Archive Hanlder: Can create XML Archives (gzips) of multiple files, binary and ascii
|
||||
* Last Updated: $Date: 2010-06-15 09:23:05 -0400 (Tue, 15 Jun 2010) $
|
||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Kernel
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 25th February 2004
|
||||
* @version $Revision: 425 $
|
||||
* @version $Revision: 8644 $
|
||||
*
|
||||
*
|
||||
* Example Usage:
|
||||
@@ -80,15 +80,15 @@ class classXMLArchive
|
||||
/**
|
||||
* XML Object
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
private $_xml = null;
|
||||
protected $_xml = null;
|
||||
|
||||
/**
|
||||
* File array
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
public $_fileArray = array();
|
||||
@@ -112,7 +112,7 @@ class classXMLArchive
|
||||
/**
|
||||
* Work files
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
public $_workFiles = array();
|
||||
@@ -136,25 +136,25 @@ class classXMLArchive
|
||||
/**
|
||||
* Allow hidden files
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var boolean
|
||||
*/
|
||||
private $_allowHiddenFiles = FALSE;
|
||||
protected $_allowHiddenFiles = FALSE;
|
||||
|
||||
/**
|
||||
* Root tag values
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
private $_defaultRootValues = array();
|
||||
protected $_defaultRootValues = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @param string Script root path
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -162,7 +162,7 @@ class classXMLArchive
|
||||
// Get the XML class
|
||||
//-----------------------------------
|
||||
|
||||
require_once( dirname( __FILE__ ) . '/classXML.php' );
|
||||
require_once( dirname( __FILE__ ) . '/classXML.php' );/*noLibHook*/
|
||||
$this->_xml = new classXML( IPS_DOC_CHAR_SET );
|
||||
|
||||
/* Set up the root values */
|
||||
@@ -262,11 +262,11 @@ class classXMLArchive
|
||||
*
|
||||
* @access public
|
||||
* @param string File name
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function read( $filename )
|
||||
{
|
||||
if ( file_exists( $filename ) )
|
||||
if ( is_file( $filename ) )
|
||||
{
|
||||
if ( strstr( $filename, '.gz' ) )
|
||||
{
|
||||
@@ -306,7 +306,7 @@ class classXMLArchive
|
||||
*
|
||||
* @access public
|
||||
* @param string Raw XML Data
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function readXML( $data )
|
||||
{
|
||||
@@ -329,7 +329,7 @@ class classXMLArchive
|
||||
*
|
||||
* @access public
|
||||
* @param string Filename
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function saveGZIP( $filename )
|
||||
{
|
||||
@@ -358,7 +358,7 @@ class classXMLArchive
|
||||
*
|
||||
* @access public
|
||||
* @param string FIlename
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function save( $filename )
|
||||
{
|
||||
@@ -583,7 +583,7 @@ class classXMLArchive
|
||||
* @param string File data
|
||||
* @param string File name
|
||||
* @param array Extra tags
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function addData( $data, $filename, $extra_tags=array() )
|
||||
{
|
||||
@@ -639,10 +639,10 @@ class classXMLArchive
|
||||
/**
|
||||
* Create the XML archive
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
* @access protected
|
||||
* @return @e void
|
||||
*/
|
||||
private function _create()
|
||||
protected function _create()
|
||||
{
|
||||
$this->_xml->newXMLDocument();
|
||||
$this->_xml->addElement( 'xmlarchive', '', (array)$this->_defaultRootValues );
|
||||
@@ -660,12 +660,12 @@ class classXMLArchive
|
||||
* Write contents of a file to disk
|
||||
* Creates directories, etc as it goes
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @param string Path with filename to write to
|
||||
* @param string Data to write
|
||||
* @return boolean
|
||||
*/
|
||||
private function _writeContents( $path, $content )
|
||||
protected function _writeContents( $path, $content )
|
||||
{
|
||||
$path = $this->_stripPath( $path );
|
||||
$_path = DOC_IPS_ROOT_PATH;
|
||||
@@ -678,13 +678,13 @@ class classXMLArchive
|
||||
|
||||
if ( ! is_dir( $_path ) )
|
||||
{
|
||||
if ( ! @mkdir( $_path, 0777 ) )
|
||||
if ( ! @mkdir( $_path, IPS_FOLDER_PERMISSION ) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@chmod( $_path, 0777 );
|
||||
@chmod( $_path, IPS_FOLDER_PERMISSION );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -694,7 +694,7 @@ class classXMLArchive
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@chmod( $_path . '/' . $file, 0777 );
|
||||
@chmod( $_path . '/' . $file, IPS_FILE_PERMISSION );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -702,11 +702,11 @@ class classXMLArchive
|
||||
/**
|
||||
* Strip path information from the real path
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @param string Input path
|
||||
* @return string Converted path
|
||||
*/
|
||||
private function _stripPath( $path )
|
||||
protected function _stripPath( $path )
|
||||
{
|
||||
if ( $this->_stripPathString )
|
||||
{
|
||||
@@ -719,11 +719,11 @@ class classXMLArchive
|
||||
/**
|
||||
* Get directory contents
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @param string Directory
|
||||
* @return boolean Successful
|
||||
*/
|
||||
private function _getDirContents( $dir )
|
||||
protected function _getDirContents( $dir )
|
||||
{
|
||||
if ( file_exists( $dir ) AND is_dir( $dir ) )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user