Commit 5000ec49a17c686ba4df1364b0f11558825a3e53

Authored by Prince Mbekwa
1 parent 9b72a6cf

attempt to fix conflict brought about by revert of earlier commit

lib/config/config.inc.php
@@ -73,8 +73,7 @@ class KTConfig { @@ -73,8 +73,7 @@ class KTConfig {
73 } 73 }
74 74
75 // FIXME nbm: how do we cache errors here? 75 // FIXME nbm: how do we cache errors here?
76 - function loadCache()  
77 - { 76 + function loadCache() {
78 $filename = $this->getCacheFilename(); 77 $filename = $this->getCacheFilename();
79 if($filename === false){ 78 if($filename === false){
80 return false; 79 return false;
@@ -94,8 +93,7 @@ class KTConfig { @@ -94,8 +93,7 @@ class KTConfig {
94 return true; 93 return true;
95 } 94 }
96 95
97 - function createCache()  
98 - { 96 + function createCache() {
99 $filename = $this->getCacheFilename(); 97 $filename = $this->getCacheFilename();
100 98
101 $config_cache = array(); 99 $config_cache = array();
@@ -121,21 +119,20 @@ class KTConfig { @@ -121,21 +119,20 @@ class KTConfig {
121 } 119 }
122 120
123 // {{{ readConfig 121 // {{{ readConfig
124 - function readConfig ()  
125 - { 122 + function readConfig () {
126 //Load config data from the database 123 //Load config data from the database
127 $sQuery = 'select group_name, item, value, default_value from config_settings'; 124 $sQuery = 'select group_name, item, value, default_value from config_settings';
128 $confResult = DBUtil::getResultArray($sQuery); 125 $confResult = DBUtil::getResultArray($sQuery);
129 126
130 - if(PEAR::isError($confResult)) { 127 + if(PEAR::isError($confResult)){
131 return $confResult; 128 return $confResult;
132 } 129 }
133 130
134 // Update the config array - overwrite the current settings with the settings in the database. 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 $this->setns($confItem['group_name'], $confItem['item'], $confItem['value'], $confItem['default_value']); 134 $this->setns($confItem['group_name'], $confItem['item'], $confItem['value'], $confItem['default_value']);
137 } 135 }
138 -  
139 $this->populateDefault(); 136 $this->populateDefault();
140 } 137 }
141 // }}} 138 // }}}
plugins/thumbnails/thumbnails.php
@@ -141,7 +141,8 @@ class thumbnailGenerator extends BaseProcessor { @@ -141,7 +141,8 @@ class thumbnailGenerator extends BaseProcessor {
141 } 141 }
142 142
143 // if there is no pdf that exists - hop out 143 // if there is no pdf that exists - hop out
144 - if(!file_exists($pdfFile)) { 144 + if(!file_exists($pdfFile)){
  145 + global $default;
145 $default->log->debug('Thumbnail Generator Plugin: PDF file does not exist, cannot generate a thumbnail'); 146 $default->log->debug('Thumbnail Generator Plugin: PDF file does not exist, cannot generate a thumbnail');
146 return false; 147 return false;
147 } 148 }
@@ -153,7 +154,7 @@ class thumbnailGenerator extends BaseProcessor { @@ -153,7 +154,7 @@ class thumbnailGenerator extends BaseProcessor {
153 154
154 // do generation 155 // do generation
155 if (extension_loaded('imagick')) { 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 return true; 158 return true;
158 }else{ 159 }else{
159 $default->log->debug('Thumbnail Generator Plugin: Imagemagick not installed, cannot generate a thumbnail'); 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 -);