Need to test the plugin and publish it after it passes.

Comments

hamax’s picture

StatusFileSize
new11.15 KB

Patch for Drupal 7 support.

killes@www.drop.org’s picture

Status: Active » Needs work

What is this about?

killes@www.drop.org’s picture

Project: Drupal.org customizations » Zemanta
Version: 6.x-3.x-dev » 6.x-1.1

guess this belongs over there.

Rok Žlender’s picture

Version: 6.x-1.1 » 7.x-1.x-dev
+++ b/zemanta.infoundefined
@@ -1,3 +1,4 @@
+files[] = zemanta.module

Module doesn't need to be listed as a file

+++ b/zemanta.moduleundefined
@@ -47,13 +48,14 @@ function zemanta_menu() {
+  $node_types = array_map('check_plain', _node_types_build() -> names);

No spaces between function call -> and names

Also should use node_type_get_names() instead of calling internal _node_types_build

+++ b/zemanta.moduleundefined
@@ -61,11 +63,20 @@ function zemanta_admin() {
+    '#options' => array("Use block position settings", "Always next to the text editor (doesn't work on every theme)"),

Unstranslated strings. Should be wrapped in t()

+++ b/zemanta.moduleundefined
@@ -61,11 +63,20 @@ function zemanta_admin() {
+   # '#description' => t('Select content types for which you want to enable Zemanta.'),

Is this line commented out on purpose?

+++ b/zemanta.moduleundefined
@@ -214,17 +272,17 @@ function zemanta_check_filter() {
+      return file_save_data($result->data, $directory . '/' . basename($url), FILE_EXISTS_REPLACE);

I think here you want to use file_unmanaged_save_data.

You can use $file_destination var from above instead of concatenting directory and basename again.

+++ b/zemanta.moduleundefined
@@ -214,17 +272,17 @@ function zemanta_check_filter() {
+    watchdog('zemanta', 'Loader.js get returned error code ' . $result->code . ' - ' . $url, WATCHDOG_ERROR);

Watchdog needs to be called with 3rd parameter array of variables http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/watchd...

hamax’s picture

New patch with proposed fixes and some minor changes(code review module minor warnings).

Rok Žlender’s picture

Status: Needs work » Fixed

Thanks committed to 7 branch.

Status: Fixed » Closed (fixed)

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