? modal.patch
? misc/dialog.js
? sites/default/files
? sites/default/private
? sites/default/settings.php
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.977
diff -u -p -r1.977 common.inc
--- includes/common.inc	26 Aug 2009 15:00:17 -0000	1.977
+++ includes/common.inc	30 Aug 2009 23:46:30 -0000
@@ -5188,3 +5188,34 @@ function xmlrpc($url) {
   return call_user_func_array('_xmlrpc', $args);
 }
 
+
+/**
+ * Add a dialog using jquery UI.
+ * @param $trigger_selector
+ *   A jquery selector which should open a dialog when clicked.
+ *     Example: 'a#modal-link'
+ * @param $content_selector
+ *   A jquery selector which contains the content for display in the dialog.
+ * @param $options
+ *   An array of dialog options keyed by option name.
+ *     See http://docs.jquery.com/UI/Dialog#options for available options.
+ */
+function drupal_dialog($trigger_selector = '', $content_selector = '', $options = array()) {
+  $dialogs = &drupal_static(__FUNCTION__, array());
+  if (!count($dialogs)) {
+    drupal_add_library('system', 'ui.dialog');
+    drupal_add_library('system', 'ui.draggable');
+    drupal_add_library('system', 'ui.resizable');
+    drupal_add_js('misc/dialog.js');
+  }
+  if (!isset($dialogs[$trigger_selector])) {
+    $dialogs[$trigger_selector] = array(
+      'content_selector' => $content_selector,
+      'options' => $options,
+    );
+    // Allow modules to alter dialogs.
+    drupal_alter('dialog', $dialogs);
+    drupal_add_js(array('dialogs' => $dialogs), 'setting');
+  }
+  return $dialogs;
+}
\ No newline at end of file
Index: modules/filter/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.287
diff -u -p -r1.287 filter.module
--- modules/filter/filter.module	30 Aug 2009 06:04:09 -0000	1.287
+++ modules/filter/filter.module	30 Aug 2009 23:46:30 -0000
@@ -741,7 +741,11 @@ function filter_dom_serialize($dom_docum
  * @ingroup themeable
  */
 function theme_filter_tips_more_info() {
-  return '<p>' . l(t('More information about text formats'), 'filter/tips') . '</p>';
+  $output = '<p>' . l(t('More information about text formats'), 'filter/tips', array('attributes' => array('class' => 'filter-tips-modal'))) . '</p>';
+  $content = filter_tips_long();
+  $output .= '<div id="filter-tips-modal-dialog" class="ui-helper-hidden" title="' . t('Filter Tips') . '">' . $content . '</div>';
+  drupal_dialog(".filter-tips-modal", "#filter-tips-modal-dialog", array('width' => 600, 'height' => 500));
+  return $output;
 }
 
 /**
Index: modules/filter/filter.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.pages.inc,v
retrieving revision 1.7
diff -u -p -r1.7 filter.pages.inc
--- modules/filter/filter.pages.inc	8 Mar 2009 21:25:18 -0000	1.7
+++ modules/filter/filter.pages.inc	30 Aug 2009 23:46:30 -0000
@@ -11,14 +11,7 @@
  * Menu callback; show a page with long filter tips.
  */
 function filter_tips_long() {
-  $format = arg(2);
-  if ($format) {
-    $output = theme('filter_tips', _filter_tips($format, TRUE), TRUE);
-  }
-  else {
-    $output = theme('filter_tips', _filter_tips(-1, TRUE), TRUE);
-  }
-  return $output;
+  return theme('filter_tips', _filter_tips(-1, TRUE), TRUE);
 }
 
 
Index: modules/php/php.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/php/php.test,v
retrieving revision 1.16
diff -u -p -r1.16 php.test
--- modules/php/php.test	28 Aug 2009 16:23:04 -0000	1.16
+++ modules/php/php.test	30 Aug 2009 23:46:30 -0000
@@ -56,7 +56,7 @@ class PHPFilterTestCase extends PHPTestC
 
     // Make sure that the PHP code shows up as text.
     $this->drupalGet('node/' . $node->nid);
-    $this->assertText('print', t('PHP code is displayed.'));
+    $this->assertText('print "SimpleTest PHP was executed!"', t('PHP code is displayed.'));
 
     // Change filter to PHP filter and see that PHP code is evaluated.
     $edit = array();
@@ -66,7 +66,7 @@ class PHPFilterTestCase extends PHPTestC
     $this->assertRaw(t('Page %title has been updated.', array('%title' => $node->title)), t('PHP code filter turned on.'));
 
     // Make sure that the PHP code shows up as text.
-    $this->assertNoText('print', t('PHP code isn\'t displayed.'));
+    $this->assertNoText('print "SimpleTest PHP was executed!"', t('PHP code isn\'t displayed.'));
     $this->assertText('SimpleTest PHP was executed!', t('PHP code has been evaluated.'));
   }
 }
