Man i didn't knew of this module, so i have to port it

Comments

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new7.6 KB

Forgot the patch

kars-t’s picture

Status: Needs review » Needs work

Did check out D7 HEAD and the D6 version of this module. I couldn't apply the changes to the .info and did this by hand. .module file worked fine.

+++ urlicon.module
@@ -223,27 +231,12 @@ function urlicon_file_download($filepath) {
+    '#default_value' => isset($filter->settings['urlicon']) ? $filter->settings['urlicon'] : $defaults['urlicon'],

I don't know D7 API that good but at first load of the module I don't get a default set and two errors on save pointing to this line. Maybe $defaults is not set?
* Notice: Undefined index: urlicon in urlicon_settings() (line 239 of urlicon.module).
* Notice: Undefined index: urlicon in urlicon_settings() (line 239 of urlicon.module).

+++ urlicon.module
@@ -274,7 +267,12 @@ function urlicon_theme($existing, $type, $theme, $path) {
+    $$key = $variables[$key];

IMHO $$variable aliasing is evil. Is there no way around this?

And the first time my system loads a new icon I get

* Notice: Undefined property: stdClass::$redirect_code in _urlicon_format_favicon() (line 190 of urlicon.module).
* Notice: Undefined property: stdClass::$data in _urlicon_format_favicon() (line 154 of urlicon.module).
* Notice: Undefined property: stdClass::$redirect_code in _urlicon_format_favicon() (line 190 of urlicon.module).
* Notice: Undefined index: Content-type in _urlicon_format_favicon() (line 194 of urlicon.module).
* The specified file temporary://file85Q6Lh could not be copied, because the destination sites/default/files/urlicon/www_karsihasi_de.ico is invalid. This is often caused by improper use of file_unmanaged_copy() or a missing stream wrapper.

After one reload this is gone. The icons always show correctly.

Powered by Dreditor.

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new8.42 KB

Thansk for testing it out

Did check out D7 HEAD and the D6 version of this module. I couldn't apply the changes to the .info and did this by hand. .module file worked fine.

I did the following to test it

cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d urlicon-DRUPAL-6--2 -r DRUPAL-6--2 contributions/modules/urlicon/
cd urlicon-DRUPAL-6--2
wget http://drupal.org/files/issues/692560-port_d7.patch
patch -p0 < 692560-port_d7.patch

And the patch applied.

+    '#default_value' => isset($filter->settings['urlicon']) ? $filter->settings['urlicon'] : $defaults['urlicon'],

Fixed with this version of the patch. Thanks!!

Do you really want to say that chx uses eval code :) http://drupal4hu.com/node/239
IMHO $$variable aliasing is evil. Is there no way around this?

 * Notice: Undefined property: stdClass::$redirect_code in _urlicon_format_favicon() (line 190 of urlicon.module).
* Notice: Undefined property: stdClass::$data in _urlicon_format_favicon() (line 154 of urlicon.module).
* Notice: Undefined property: stdClass::$redirect_code in _urlicon_format_favicon() (line 190 of urlicon.module).
* Notice: Undefined index: Content-type in _urlicon_format_favicon() (line 194 of urlicon.module).
* The specified file temporary://file85Q6Lh could not be copied, because the destination sites/default/files/urlicon/www_karsihasi_de.ico is invalid. This is often caused by improper use of file_unmanaged_copy() or a missing stream wrapper.

Fixed it. Drupal-7 has some interesting stuff :)

Sadly coder module is very uncompleted

sanduhrs’s picture

Commited to D7,HEAD
Thanks!

kars-t’s picture

Status: Needs review » Fixed

Commited to D7,HEAD

Setting this to fixed than :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.