diff options
author | habeascodice <habeascodice@federated.social> | 2014-10-07 22:35:02 -0700 |
---|---|---|
committer | habeascodice <habeascodice@federated.social> | 2014-10-07 22:35:02 -0700 |
commit | 737a3362d50900a5f26aada14f515c5c857a762f (patch) | |
tree | ae8337e97dd3ae5356daefa0c0da2812511341a0 | |
parent | f84453497bd5ef4eba8bca84917b8e82d784937a (diff) | |
parent | ee6c53c2e54619a39e16ac2176835adea3b73778 (diff) | |
download | volse-hubzilla-737a3362d50900a5f26aada14f515c5c857a762f.tar.gz volse-hubzilla-737a3362d50900a5f26aada14f515c5c857a762f.tar.bz2 volse-hubzilla-737a3362d50900a5f26aada14f515c5c857a762f.zip |
Merge remote branch 'upstream/master'
-rwxr-xr-x | include/diaspora.php | 6 | ||||
-rw-r--r-- | include/photo/photo_driver.php | 31 | ||||
-rw-r--r-- | view/php/theme_init.php | 2 | ||||
-rw-r--r-- | view/tpl/saved_searches.tpl | 4 | ||||
-rwxr-xr-x | view/tpl/saved_searches_aside.tpl | 4 |
5 files changed, 29 insertions, 18 deletions
diff --git a/include/diaspora.php b/include/diaspora.php index f650f0831..f0687e51e 100755 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -907,12 +907,12 @@ function get_diaspora_reshare_xml($url,$recurse = 0) { $x = z_fetch_url($url); if(! $x['success']) - $x = z_fetch_url(str_replace('https://','http://',$source_url)); + $x = z_fetch_url(str_replace('https://','http://',$url)); if(! $x['success']) { - logger('get_diaspora_reshare_xml: unable to fetch source url ' . $source_url); + logger('get_diaspora_reshare_xml: unable to fetch source url ' . $url); return; } - logger('diaspora_reshare: source: ' . $x['body'], LOGGER_DATA); + logger('get_diaspora_reshare_xml: source: ' . $x['body'], LOGGER_DEBUG); $source_xml = parse_xml_string($x['body'],false); diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index 15eac5a6d..0853ce84e 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -513,19 +513,30 @@ function guess_image_type($filename, $headers = '') { $type = $hdrs['Content-Type']; } if (is_null($type)){ -// FIXME!!!! + $ignore_imagick = get_config('system', 'ignore_imagick'); // Guessing from extension? Isn't that... dangerous? if(class_exists('Imagick') && !$ignore_imagick) { - logger('using imagemagick', LOGGER_DEBUG); - /** - * Well, this not much better, - * but at least it comes from the data inside the image, - * we won't be tricked by a manipulated extension - */ - $image = new Imagick($filename); - $type = $image->getImageMimeType(); - } else { + $v = Imagick::getVersion(); + preg_match('/ImageMagick ([0-9]+\.[0-9]+\.[0-9]+)/', $v['versionString'], $m); + if(version_compare($m[1],'6.6.7') >= 0) { + /** + * Well, this not much better, + * but at least it comes from the data inside the image, + * we won't be tricked by a manipulated extension + */ + $image = new Imagick($filename); + $type = $image->getImageMimeType(); + } + else { + // earlier imagick versions have issues with scaling png's + // don't log this because it will just fill the logfile. + // leave this note here so those who are looking for why + // we aren't using imagick can find it + } + } + + if(is_null($type)) { $ext = pathinfo($filename, PATHINFO_EXTENSION); $ph = photo_factory(''); $types = $ph->supportedTypes(); diff --git a/view/php/theme_init.php b/view/php/theme_init.php index ce576805a..f1eaded6a 100644 --- a/view/php/theme_init.php +++ b/view/php/theme_init.php @@ -33,7 +33,7 @@ head_add_js('library/cryptojs/components/core-min.js'); head_add_js('library/cryptojs/rollups/aes.js'); head_add_js('library/cryptojs/rollups/rabbit.js'); head_add_js('library/cryptojs/rollups/tripledes.js'); -head_add_js('library/stylish_select/jquery.stylish-select.js'); +//head_add_js('library/stylish_select/jquery.stylish-select.js'); head_add_js('acl.js'); head_add_js('webtoolkit.base64.js'); head_add_js('main.js'); diff --git a/view/tpl/saved_searches.tpl b/view/tpl/saved_searches.tpl index 1a9f51af9..884f21812 100644 --- a/view/tpl/saved_searches.tpl +++ b/view/tpl/saved_searches.tpl @@ -2,10 +2,10 @@ <h3 id="search">{{$title}}</h3> {{$searchbox}} - <ul id="saved-search-ul"> + <ul id="saved-search-ul" class="nav nav-pills nav-stacked"> {{foreach $saved as $search}} <li id="search-term-{{$search.id}}" class="saved-search-li clear"> - <a title="{{$search.delete}}" onclick="return confirmDelete();" id="drop-saved-search-term-{{$search.id}}" href="{{$search.dellink}}"><i id="dropicon-saved-search-term-{{$search.id}}" class="icon-remove drop-icons iconspacer saved-search-icon" ></i></a> + <a title="{{$search.delete}}" class="pull-right" onclick="return confirmDelete();" id="drop-saved-search-term-{{$search.id}}" href="{{$search.dellink}}"><i id="dropicon-saved-search-term-{{$search.id}}" class="icon-remove drop-icons iconspacer saved-search-icon" ></i></a> <a id="saved-search-term-{{$search.id}}" class="savedsearchterm{{if $search.selected}} search-selected{{/if}}" href="{{$search.srchlink}}">{{$search.displayterm}}</a> </li> {{/foreach}} diff --git a/view/tpl/saved_searches_aside.tpl b/view/tpl/saved_searches_aside.tpl index 0258a7632..e0983f0dd 100755 --- a/view/tpl/saved_searches_aside.tpl +++ b/view/tpl/saved_searches_aside.tpl @@ -2,10 +2,10 @@ <h3 id="search">{{$title}}</h3> {{$searchbox}} - <ul id="saved-search-ul"> + <ul id="saved-search-ul" class="nav nav-pills nav-stacked" > {{foreach $saved as $search}} <li id="search-term-{{$search.id}}" class="saved-search-li clear"> - <a title="{{$search.delete}}" onclick="return confirmDelete();" id="drop-saved-search-term-{{$search.id}}" href="network/?f=&remove=1&search={{$search.encodedterm}}"><i id="dropicon-saved-search-term-{{$search.id}}" class="icon-remove drop-icons iconspacer savedsearchdrop saved-search-icon" ></i></a> + <a title="{{$search.delete}}" class="pull-right" onclick="return confirmDelete();" id="drop-saved-search-term-{{$search.id}}" href="network/?f=&remove=1&search={{$search.encodedterm}}"><i id="dropicon-saved-search-term-{{$search.id}}" class="icon-remove drop-icons iconspacer savedsearchdrop saved-search-icon" ></i></a> <a id="saved-search-term-{{$search.id}}" class="savedsearchterm{{if $search.selected}} search-selected{{/if}}" href="network/?f=&search={{$search.encodedterm}}">{{$search.displayterm}}</a> </li> {{/foreach}} |