From 56d2664a904119f73e7df4fb355e4c525e040b70 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 14 Apr 2008 17:48:46 +0000 Subject: - Patch #245115 by kkaefer, John Morahan, JohnAlbin et al: after a long discussion we've decided to make the concatenation operator consistent with the other operators. --- modules/php/php.install | 2 +- modules/php/php.module | 44 ++++++++++++++++++++++---------------------- 2 files changed, 23 insertions(+), 23 deletions(-) (limited to 'modules/php') diff --git a/modules/php/php.install b/modules/php/php.install index d5ee4d8bd..04c11eef4 100644 --- a/modules/php/php.install +++ b/modules/php/php.install @@ -17,7 +17,7 @@ function php_install() { // Enable the PHP evaluator filter. db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (%d, 'php', 0, 0)", $format); - drupal_set_message(t('A !php-code input format has been created.', array('!php-code' => l('PHP code', 'admin/settings/filters/'. $format)))); + drupal_set_message(t('A !php-code input format has been created.', array('!php-code' => l('PHP code', 'admin/settings/filters/' . $format)))); } } diff --git a/modules/php/php.module b/modules/php/php.module index c3f1d8ff3..222e1cf40 100644 --- a/modules/php/php.module +++ b/modules/php/php.module @@ -13,10 +13,10 @@ function php_help($path, $arg) { switch ($path) { case 'admin/help#php': - $output = '

'. t('The PHP filter adds the ability to include PHP code in posts. PHP is a general-purpose scripting language widely-used for web development; the content management system used by this website has been developed using PHP.') .'

'; - $output .= '

'. t('Through the PHP filter, users with the proper permission may include custom PHP code within a page of the site. While this is a powerful and flexible feature if used by a trusted user with PHP experience, it is a significant and dangerous security risk in the hands of a malicious user. Even a trusted user may accidentally compromise the site by entering malformed or incorrect PHP code. Only the most trusted users should be granted permission to use the PHP filter, and all PHP code added through the PHP filter should be carefully examined before use.') .'

'; - $output .= '

'. t('Drupal.org offers some example PHP snippets, or you can create your own with some PHP experience and knowledge of the Drupal system.', array('@drupal' => url('http://drupal.org'), '@php-snippets' => url('http://drupal.org/handbook/customization/php-snippets'))) .'

'; - $output .= '

'. t('For more information, see the online handbook entry for PHP module.', array('@php' => 'http://drupal.org/handbook/modules/php/')) .'

'; + $output = '

' . t('The PHP filter adds the ability to include PHP code in posts. PHP is a general-purpose scripting language widely-used for web development; the content management system used by this website has been developed using PHP.') . '

'; + $output .= '

' . t('Through the PHP filter, users with the proper permission may include custom PHP code within a page of the site. While this is a powerful and flexible feature if used by a trusted user with PHP experience, it is a significant and dangerous security risk in the hands of a malicious user. Even a trusted user may accidentally compromise the site by entering malformed or incorrect PHP code. Only the most trusted users should be granted permission to use the PHP filter, and all PHP code added through the PHP filter should be carefully examined before use.') . '

'; + $output .= '

' . t('Drupal.org offers some example PHP snippets, or you can create your own with some PHP experience and knowledge of the Drupal system.', array('@drupal' => url('http://drupal.org'), '@php-snippets' => url('http://drupal.org/handbook/customization/php-snippets'))) . '

'; + $output .= '

' . t('For more information, see the online handbook entry for PHP module.', array('@php' => 'http://drupal.org/handbook/modules/php/')) . '

'; return $output; } } @@ -31,24 +31,24 @@ function php_filter_tips($delta, $format, $long = false) { case 0: return t('You may post PHP code. You should include <?php ?> tags.'); case 1: - $output = '

'. t('Using custom PHP code') .'

'; - $output .= '

'. t('Custom PHP code may be embedded in some types of site content, including posts and blocks. While embedding PHP code inside a post or block is a powerful and flexible feature when used by a trusted user with PHP experience, it is a significant and dangerous security risk when used improperly. Even a small mistake when posting PHP code may accidentally compromise your site.') .'

'; - $output .= '

'. t('If you are unfamiliar with PHP, SQL, or Drupal, avoid using custom PHP code within posts. Experimenting with PHP may corrupt your database, render your site inoperable, or significantly compromise security.') .'

'; - $output .= '

'. t('Notes:') .'

'; - $output .= ''; - $output .= '

'. t('A basic example: Creating a "Welcome" block that greets visitors with a simple message.') .'

'; - $output .= ''; + $output .= '

' . t('Drupal.org offers some example PHP snippets, or you can create your own with some PHP experience and knowledge of the Drupal system.', array('@drupal' => url('http://drupal.org'), '@php-snippets' => url('http://drupal.org/handbook/customization/php-snippets'))) . '

'; return $output; } } -- cgit v1.2.3