Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 31 #32

Merged
merged 1 commit into from Mar 2, 2020
Merged

Issue 31 #32

merged 1 commit into from Mar 2, 2020

Conversation

maffmeier
Copy link
Contributor

#31

$this->ImageReplacer($dpi);
public function retrieveFilesList($file, $stats) {
$this->exctractOpenXmlFile($file);
if(substr($file,-3) === 'xml' && substr($file,0,4) === 'word') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to have a more targeted approach for this to save any kind of additional work (as I see the class already performance lacking). Every XML file seems to be a little overkill, as far as I can tell, as some docx files have many meta files that do not need to be touched.
I would probably generate something like a whitelist. Relevant files might include xml files in the subfolder word: document.xml, endnotes.xml, footer*.xml, footnotes.xml, header*.xml. There might be more files that are relevant, I haven't done the research on the structure, but the whitelist could be expanded in the future accordingly.
Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could be right. I will change my code accordingly.

@tobiasvielmetter tobiasvielmetter merged commit cac8031 into wrklst:master Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants