Commit 5000ec49a17c686ba4df1364b0f11558825a3e53
1 parent
9b72a6cf
attempt to fix conflict brought about by revert of earlier commit
Showing
3 changed files
with
9 additions
and
42 deletions
lib/config/config.inc.php
| ... | ... | @@ -73,8 +73,7 @@ class KTConfig { |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | // FIXME nbm: how do we cache errors here? |
| 76 | - function loadCache() | |
| 77 | - { | |
| 76 | + function loadCache() { | |
| 78 | 77 | $filename = $this->getCacheFilename(); |
| 79 | 78 | if($filename === false){ |
| 80 | 79 | return false; |
| ... | ... | @@ -94,8 +93,7 @@ class KTConfig { |
| 94 | 93 | return true; |
| 95 | 94 | } |
| 96 | 95 | |
| 97 | - function createCache() | |
| 98 | - { | |
| 96 | + function createCache() { | |
| 99 | 97 | $filename = $this->getCacheFilename(); |
| 100 | 98 | |
| 101 | 99 | $config_cache = array(); |
| ... | ... | @@ -121,21 +119,20 @@ class KTConfig { |
| 121 | 119 | } |
| 122 | 120 | |
| 123 | 121 | // {{{ readConfig |
| 124 | - function readConfig () | |
| 125 | - { | |
| 122 | + function readConfig () { | |
| 126 | 123 | //Load config data from the database |
| 127 | 124 | $sQuery = 'select group_name, item, value, default_value from config_settings'; |
| 128 | 125 | $confResult = DBUtil::getResultArray($sQuery); |
| 129 | 126 | |
| 130 | - if(PEAR::isError($confResult)) { | |
| 127 | + if(PEAR::isError($confResult)){ | |
| 131 | 128 | return $confResult; |
| 132 | 129 | } |
| 133 | 130 | |
| 134 | 131 | // Update the config array - overwrite the current settings with the settings in the database. |
| 135 | - foreach ($confResult as $confItem) { | |
| 132 | + foreach ($confResult as $confItem) | |
| 133 | + { | |
| 136 | 134 | $this->setns($confItem['group_name'], $confItem['item'], $confItem['value'], $confItem['default_value']); |
| 137 | 135 | } |
| 138 | - | |
| 139 | 136 | $this->populateDefault(); |
| 140 | 137 | } |
| 141 | 138 | // }}} | ... | ... |
plugins/thumbnails/thumbnails.php
| ... | ... | @@ -141,7 +141,8 @@ class thumbnailGenerator extends BaseProcessor { |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | // if there is no pdf that exists - hop out |
| 144 | - if(!file_exists($pdfFile)) { | |
| 144 | + if(!file_exists($pdfFile)){ | |
| 145 | + global $default; | |
| 145 | 146 | $default->log->debug('Thumbnail Generator Plugin: PDF file does not exist, cannot generate a thumbnail'); |
| 146 | 147 | return false; |
| 147 | 148 | } |
| ... | ... | @@ -153,7 +154,7 @@ class thumbnailGenerator extends BaseProcessor { |
| 153 | 154 | |
| 154 | 155 | // do generation |
| 155 | 156 | if (extension_loaded('imagick')) { |
| 156 | - $result= KTUtil::pexec("\"{$default->imagemagick}\" -size 200x200 \"{$pdfFile}[0]\" -resize 230x200 \"$thumbnailfile\""); | |
| 157 | + $result= shell_exec("convert -size 200x200 {$pdfFile}[0] -resize 200x200 $thumbnailfile"); | |
| 157 | 158 | return true; |
| 158 | 159 | }else{ |
| 159 | 160 | $default->log->debug('Thumbnail Generator Plugin: Imagemagick not installed, cannot generate a thumbnail'); | ... | ... |
sql/mysql/upgrade/3.7.0/config_settings.sql deleted
| 1 | -INSERT INTO `config_settings` ( | |
| 2 | -`id` , | |
| 3 | -`group_name` , | |
| 4 | -`display_name` , | |
| 5 | -`description` , | |
| 6 | -`item` , | |
| 7 | -`value` , | |
| 8 | -`default_value` , | |
| 9 | -`type` , | |
| 10 | -`options` , | |
| 11 | -`can_edit` | |
| 12 | -) | |
| 13 | -VALUES ( | |
| 14 | -NULL , 'externalBinary', 'image magick', 'Path to binary', 'imagemagick', 'default', 'convert', 'string', NULL , '1' | |
| 15 | -); | |
| 16 | - | |
| 17 | -INSERT INTO `config_settings` ( | |
| 18 | -`id` , | |
| 19 | -`group_name` , | |
| 20 | -`display_name` , | |
| 21 | -`description` , | |
| 22 | -`item` , | |
| 23 | -`value` , | |
| 24 | -`default_value` , | |
| 25 | -`type` , | |
| 26 | -`options` , | |
| 27 | -`can_edit` | |
| 28 | -) | |
| 29 | -VALUES ( | |
| 30 | -NULL , 'externalBinary', 'pdf2swf', 'Path to binary', 'pdf2swf', 'default', 'pdf2swf', 'string', NULL , '1' | |
| 31 | -); |