Selaa lähdekoodia

move patch to drupal.patch as we have to patch even more (one thing is img_assist module now)

Ralf S. Engelschall 17 vuotta sitten
vanhempi
commit
5d38a77061
2 muutettua tiedostoa jossa 41 lisäystä ja 15 poistoa
  1. 37 0
      drupal/drupal.patch
  2. 4 15
      drupal/drupal.spec

+ 37 - 0
drupal/drupal.patch

@@ -234,3 +234,40 @@ Index: modules/system/system.module
    $items['admin/settings/file-system'] = array(
      'title' => 'File system',
      'description' => 'Tell Drupal where to store uploaded files and how they are accessed.',
+
+-----------------------------------------------------------------------------
+
+Properly activate Drupal support module in TinyMCE
+
+Index: sites/all/modules/tinymce/plugin_reg.php
+--- sites/all/modules/tinymce/plugin_reg.php.orig	2008-03-27 21:11:17 +0100
++++ sites/all/modules/tinymce/plugin_reg.php	2008-05-02 20:56:56 +0200
+@@ -102,5 +102,9 @@
+ $plugins['zoom'] = array();
+ $plugins['zoom']['theme_advanced_buttons2'] = array('zoom');
+ 
++$plugins['drupalimage'] = array();
++$plugins['drupalimage']['theme_advanced_buttons1'] = array('drupalimage');
++$plugins['drupalimage']['extended_valid_elements'] = array('img[class|src|border=0|alt|title|width|height|align|name]');
++
+ return $plugins;
+ }
+
+-----------------------------------------------------------------------------
+
+Fix SQL in "remove" functionality of "img_assist" module.
+http://drupal.org/node/250128
+
+Index: sites/all/modules/img_assist/img_assist.module
+--- sites/all/modules/img_assist/img_assist.module.orig	2008-04-06 19:32:33 +0200
++++ sites/all/modules/img_assist/img_assist.module	2008-05-02 21:00:24 +0200
+@@ -1239,7 +1239,7 @@
+ }
+ 
+ function _img_assist_remove($node, $size) {
+-  $result = db_query("SELECT * FROM {files} f INNER JOIN {image} i WHERE f.fid = i.fid AND i.nid = %d AND f.filename = '%s'", $node->nid, $size['key']);
++  $result = db_query("SELECT * FROM {files} f INNER JOIN {image} ON f.fid = i.fid WHERE i.nid = %d AND f.filename = '%s'", $node->nid, $size['key']);
+   while ($file = db_fetch_object($result)) {
+     // Never delete original image.
+     if ($file->filepath != $node->images[IMAGE_ORIGINAL]) {
+

+ 4 - 15
drupal/drupal.spec

@@ -1266,8 +1266,8 @@ AutoReqProv:  no
     }
 
 %prep
+    #   unpack core distribution
     %setup -q -n drupal-%{version}
-    %patch -p0
 
     #   create additional sub-trees
     %{l_shtool} mkdir -f -p -m 755 \
@@ -1462,20 +1462,6 @@ AutoReqProv:  no
     ( cd sites/all/modules/tinymce || exit $?
       unzip -q -x %{SOURCE303}
       mv ../img_assist/drupalimage tinymce/jscripts/tiny_mce/plugins/
-      ( echo "Index: plugin_reg.php"
-        echo "--- plugin_reg.php.orig	2008-03-27 21:11:17 +0100"
-        echo "+++ plugin_reg.php	2008-05-02 20:36:47 +0200"
-        echo "@@ -102,5 +102,9 @@"
-        echo " \$plugins['zoom'] = array();"
-        echo " \$plugins['zoom']['theme_advanced_buttons2'] = array('zoom');"
-        echo " "
-        echo "+\$plugins['drupalimage'] = array();"
-        echo "+\$plugins['drupalimage']['theme_advanced_buttons1'] = array('drupalimage');"
-        echo "+\$plugins['drupalimage']['extended_valid_elements'] = array('img[class|src|border=0|alt|title|width|height|align|name]');"
-        echo "+"
-        echo " return \$plugins;"
-        echo " }"
-      ) | %{l_patch} -p0
     ) || exit $?
     ( cd sites/all/modules/print || exit $?
       %{l_tar} xfz %{SOURCE304}
@@ -1484,6 +1470,9 @@ AutoReqProv:  no
       echo "Disallow: /print/" >>../../../../robots.txt
     ) || exit $?
 
+    #   apply local patches
+    %patch -p0
+
 %build
 
 %install