projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bd84525
)
DataObjects/Images.php
author
edward
<edward@roojs.com>
Fri, 10 Nov 2017 04:07:53 +0000
(12:07 +0800)
committer
edward
<edward@roojs.com>
Fri, 10 Nov 2017 04:07:53 +0000
(12:07 +0800)
DataObjects/Images.php
patch
|
blob
|
history
diff --git
a/DataObjects/Images.php
b/DataObjects/Images.php
index
320d889
..
c23f56f
100644
(file)
--- a/
DataObjects/Images.php
+++ b/
DataObjects/Images.php
@@
-132,31
+132,7
@@
class Pman_Core_DataObjects_Images extends DB_DataObject
}
if($this->mimetype == 'application/pdf'){
}
if($this->mimetype == 'application/pdf'){
-
- require_once 'System.php';
-
- $this->no_of_pages = 0;
-
- $pdfinfo = System::which('pdfinfo');
-
- if (!empty($pdfinfo)) {
-
- $cmd = "{$pdfinfo} {$file}";
-
- $ret = `$cmd`;
-
- $info = explode("\n", $ret);
-
- foreach ($info as $i){
-
- if(preg_match('/^Pages:[\s]*([0-9]+)/', $i, $matches)){
- $this->no_of_pages = (empty($matches[1])) ? 0 : $matches[1];
- continue;
- }
-
- }
- }
-
+ $this->no_of_pages = $this->getNumberOfPage($file);
}
$this->filesize = filesize($file);
}
$this->filesize = filesize($file);