File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -75,16 +75,17 @@ public function __construct($strFilename)
7575 $ this ->_objZip = new $ zipClass ();
7676 $ this ->_objZip ->open ($ this ->_tempFileName );
7777
78- // Find and load up to three headers and footers
79- for ($ i = 1 ; $ i <= 3 ; $ i ++) {
80- $ headerName = $ this ->getHeaderName ($ i );
81- $ footerName = $ this ->getFooterName ($ i );
82- if ($ this ->_objZip ->locateName ($ headerName ) !== false ) {
83- $ this ->_headerXMLs [$ i ] = $ this ->_objZip ->getFromName ($ headerName );
84- }
85- if ($ this ->_objZip ->locateName ($ footerName ) !== false ) {
86- $ this ->_footerXMLs [$ i ] = $ this ->_objZip ->getFromName ($ footerName );
87- }
78+ // Find and load headers and footers
79+ $ i = 1 ;
80+ while ($ this ->_objZip ->locateName ($ this ->getHeaderName ($ i )) !== false ) {
81+ $ this ->_headerXMLs [$ i ] = $ this ->_objZip ->getFromName ($ this ->getHeaderName ($ i ));
82+ $ i ++;
83+ }
84+
85+ $ i = 1 ;
86+ while ($ this ->_objZip ->locateName ($ this ->getFooterName ($ i )) !== false ) {
87+ $ this ->_footerXMLs [$ i ] = $ this ->_objZip ->getFromName ($ this ->getFooterName ($ i ));
88+ $ i ++;
8889 }
8990
9091 $ this ->_documentXML = $ this ->_objZip ->getFromName ('word/document.xml ' );
You can’t perform that action at this time.
0 commit comments