[packages/phorum] Update to 5.2.23
glen
glen at pld-linux.org
Tue Nov 24 12:02:11 CET 2020
commit 5ce5b6cca53ef63db2055c079b1b9b95fd6186b1
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Tue Nov 24 12:17:01 2020 +0200
Update to 5.2.23
docsurl.patch | 26 +++---
no-pear-json.patch | 6 +-
paths.patch | 67 +++++++---------
phorum.spec | 12 ++-
sys-phpmailer.patch | 19 +++--
translate-macros.patch | 22 +++--
unhide-errors.patch | 6 +-
wordwrap.patch | 213 -------------------------------------------------
8 files changed, 74 insertions(+), 297 deletions(-)
---
diff --git a/phorum.spec b/phorum.spec
index f9c0de2..221e572 100644
--- a/phorum.spec
+++ b/phorum.spec
@@ -6,12 +6,12 @@
Summary: Phorum is a web based message board written in PHP
Summary(pl.UTF-8): Phorum - implementacja forum WWW w PHP
Name: phorum
-Version: %{mainver}.20
+Version: %{mainver}.23
Release: 1
License: Apache-like
Group: Applications/WWW
-Source0: http://www.phorum.org/downloads/%{name}-%{version}.tar.gz
-# Source0-md5: 46c9edad965401102e1a943d13bf315e
+Source0: https://www.phorum.org/downloads/%{name}-%{version}.tar.gz
+# Source0-md5: a44c193b2e140f72d4090de345289bd1
Source3: apache.conf
Patch0: paths.patch
Patch1: mysql.patch
@@ -21,9 +21,8 @@ Patch4: sys-recaptcha.patch
Patch5: enable-mbstring.patch
Patch6: no-pear-json.patch
Patch10: translate-macros.patch
-Patch11: wordwrap.patch
Patch12: unhide-errors.patch
-URL: http://www.phorum.org/
+URL: https://www.phorum.org/
BuildRequires: iconv
BuildRequires: rpm-php-pearprov
BuildRequires: rpmbuild(macros) >= 1.595
@@ -242,7 +241,7 @@ Lightweight template for Phorum.
%prep
%setup -qc
-mv Phorum-Core-*/* .
+mv Core-phorum_*/* .
%undos -f php,css,js,html,txt
install -d htdocs/admin examples
@@ -332,7 +331,6 @@ sed -i -e "s,require_once PHORUM_DIR.'/common.php';,require_once 'common.php';,"
%patch5 -p1
%patch6 -p1
%patch10 -p1
-%patch11 -p1
%patch12 -p1
# cleanup backups after patching
diff --git a/docsurl.patch b/docsurl.patch
index d4aa420..599b1ed 100644
--- a/docsurl.patch
+++ b/docsurl.patch
@@ -1,26 +1,26 @@
basically running and manually verifying result:
-grep -r '"docs/' . -l |xargs sed -i -e 's,"docs/,"http://www.phorum.org/phorum5/docs/,g'
+grep -r '"docs/' . -l |xargs sed -i -e 's,"docs/,"https://www.phorum.org/phorum5/docs/,g'
---- phorum-5.2.14/common.php 2010-01-06 19:20:04.816130942 +0200
-+++ phorum-5.2.14-docsurl/common.php 2010-01-06 19:19:58.458214715 +0200
-@@ -92,7 +92,7 @@
+--- phorum-5.2.23/common.php~ 2020-11-24 12:23:47.000000000 +0200
++++ phorum-5.2.23/common.php 2020-11-24 12:25:57.349551331 +0200
+@@ -103,7 +103,7 @@
if (!file_exists("/etc/webapps/phorum/config.php")) { ?>
- Phorum has been installed on this server, but the configuration<br/>
- for the database connection has not yet been made. Please read<br/>
+ Phorum has been installed on this server, but the configuration<br />
+ for the database connection has not yet been made. Please read<br />
- <a href="docs/install.txt">docs/install.txt</a> for installation
-+ <a href="http://www.phorum.org/phorum5/docs/install.txt">docs/install.txt</a> for installation
++ <a href="https://www.phorum.org/phorum5/docs/install.txt">https://www.phorum.org/phorum5/docs/install.txt</a> for installation
instructions. <?php
} else {
$fp = fopen("/etc/webapps/phorum/config.php", "r");
---- phorum-5.2.14/include/admin/install.php 2010-01-06 19:20:04.822797116 +0200
-+++ phorum-5.2.14-docsurl/include/admin/install.php 2010-01-06 19:19:58.468214501 +0200
-@@ -519,7 +519,7 @@
+--- phorum-5.2.23/include/admin/install.php~ 2020-11-24 12:23:47.000000000 +0200
++++ phorum-5.2.23/include/admin/install.php 2020-11-24 12:25:13.710631576 +0200
+@@ -520,7 +520,7 @@
- $cont_url = phorum_admin_build_url('');
+ $cont_url = phorum_admin_build_url('');
phorum_db_update_settings( array("installed"=>1) );
-- echo "The setup is complete. You can now go to <a href=\"$cont_url\">the admin</a> and start making Phorum all your own.<br /><br /><strong>Here are some things you will want to look at:</strong><br /><br /><a href=\"$_SERVER[PHP_SELF]?module=settings\">The General Settings page</a><br /><br /><a href=\"$_SERVER[PHP_SELF]?module=mods\">Pre-installed modules</a><br /><br /><a href=\"docs/faq.txt\">The FAQ</a><br /><br /><a href=\"docs/performance.txt\">How to get peak performance from Phorum</a><br /><br /><strong>For developers:</strong><br /><br /><a href=\"docs/creating_mods.txt\">Module Creation</a><br /><br /><a href=\"docs/permissions.txt\">How Phorum permisssions work</a><br /><br /><a href=\"docs/CODING-STANDARDS\">The Phorum Team's codings standards</a>";
-+ echo "The setup is complete. You can now go to <a href=\"$cont_url\">the admin</a> and start making Phorum all your own.<br /><br /><strong>Here are some things you will want to look at:</strong><br /><br /><a href=\"$_SERVER[PHP_SELF]?module=settings\">The General Settings page</a><br /><br /><a href=\"$_SERVER[PHP_SELF]?module=mods\">Pre-installed modules</a><br /><br /><a href=\"http://www.phorum.org/phorum5/docs/faq.txt\">The FAQ</a><br /><br /><a href=\"http://www.phorum.org/phorum5/docs/performance.txt\">How to get peak performance from Phorum</a><br /><br /><strong>For developers:</strong><br /><br /><a href=\"http://www.phorum.org/phorum5/docs/creating_mods.txt\">Module Creation</a><br /><br /><a href=\"http://www.phorum.org/phorum5/docs/permissions.txt\">How Phorum permisssions work</a><br /><br /><a href=\"http://www.phorum.org/phorum5/docs/CODING-STANDARDS\">The Phorum Team's codings standards</a>";
+- echo "The setup is complete. You can now go to <a href=\"$cont_url\">the admin</a> and start making Phorum all your own.<br /><br /><strong>Here are some things you will want to look at:</strong><br /><br /><a href=\"$_SERVER[PHP_SELF]?module=settings\">The General Settings page</a><br /><br /><a href=\"$_SERVER[PHP_SELF]?module=mods\">Pre-installed modules</a><br /><br /><a href=\"docs/faq.txt\">The FAQ</a><br /><br /><a href=\"docs/performance.txt\">How to get peak performance from Phorum</a><br /><br /><strong>For developers:</strong><br /><br /><a href=\"docs/creating_mods.txt\">Module Creation</a><br /><br /><a href=\"docs/permissions.txt\">How Phorum permisssions work</a><br /><br /><a href=\"docs/CODING-STANDARDS\">The Phorum Team's codings standards</a>";
++ echo "The setup is complete. You can now go to <a href=\"$cont_url\">the admin</a> and start making Phorum all your own.<br /><br /><strong>Here are some things you will want to look at:</strong><br /><br /><a href=\"$_SERVER[PHP_SELF]?module=settings\">The General Settings page</a><br /><br /><a href=\"$_SERVER[PHP_SELF]?module=mods\">Pre-installed modules</a><br /><br /><a href=\"https://www.phorum.org/phorum5/docs/faq.txt\">The FAQ</a><br /><br /><a href=\"https://www.phorum.org/phorum5/docs/performance.txt\">How to get peak performance from Phorum</a><br /><br /><strong>For developers:</strong><br /><br /><a href=\"https://www.phorum.org/phorum5/docs/creating_mods.txt\">Module Creation</a><br /><br /><a href=\"https://www.phorum.org/phorum5/docs/permissions.txt\">How Phorum permisssions work</a><br /><br /><a href=\"https://www.phorum.org/phorum5/docs/CODING-STANDARDS\">The Phorum Team's codings standards</a>";
break;
diff --git a/no-pear-json.patch b/no-pear-json.patch
index d9eab1f..5323355 100644
--- a/no-pear-json.patch
+++ b/no-pear-json.patch
@@ -1,5 +1,5 @@
---- phorum/include/api/json.php~ 2010-02-10 17:40:56.000000000 +0200
-+++ phorum/include/api/json.php 2010-02-10 17:47:36.549956833 +0200
+--- phorum-5.2.23/include/api/json.php~ 2020-11-24 12:27:50.000000000 +0200
++++ phorum-5.2.23/include/api/json.php 2020-11-24 12:28:18.410167660 +0200
@@ -33,45 +33,6 @@
if (!defined('PHORUM')) return;
@@ -28,7 +28,7 @@
- return $json->decode($content);
- }
-}
--
+-
-if (!function_exists('json_encode'))
-{
- function json_encode($content)
diff --git a/paths.patch b/paths.patch
index aa93750..8a1f61d 100644
--- a/paths.patch
+++ b/paths.patch
@@ -1,5 +1,5 @@
---- phorum/common.php 2010-01-12 19:36:17.512942870 +0200
-+++ phorum/common.php 2010-02-10 17:49:57.546277613 +0200
+--- phorum-5.2.23/common.php~ 2020-11-24 12:17:50.000000000 +0200
++++ phorum-5.2.23/common.php 2020-11-24 12:20:12.218398789 +0200
@@ -20,6 +20,8 @@
// Check that this file is not loaded directly.
if ( basename( __FILE__ ) == basename( $_SERVER["PHP_SELF"] ) ) exit();
@@ -9,7 +9,7 @@
// ----------------------------------------------------------------------
// Initialize variables and constants and load required libraries
-@@ -82,22 +84,22 @@
+@@ -95,18 +95,18 @@
ob_start();
// Load configuration.
@@ -21,8 +21,8 @@
// No database configuration found.
- if (!file_exists("./include/db/config.php")) { ?>
+ if (!file_exists("/etc/webapps/phorum/config.php")) { ?>
- Phorum has been installed on this server, but the configuration<br/>
- for the database connection has not yet been made. Please read<br/>
+ Phorum has been installed on this server, but the configuration<br />
+ for the database connection has not yet been made. Please read<br />
<a href="docs/install.txt">docs/install.txt</a> for installation
instructions. <?php
} else {
@@ -31,11 +31,6 @@
// Unable to read the configuration file.
if (!$fp) { ?>
A database configuration file was found in
-- ./include/db/config.php,<br/>but Phorum was unable to read it.
-+ config.php,<br/>but Phorum was unable to read it.
- Please check the file permissions<br/>for this file. <?php
- // Unknown error.
- } else {
@@ -128,13 +130,13 @@
// layer, but people might still be using "mysqli" as their configured
// database type.
@@ -238,8 +233,8 @@
background-position: 5px 5px;
background-repeat: no-repeat;
font-family: Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica;
---- phorum-5.2.14/include/admin/cache.php 2010-01-11 16:58:45.262528168 +0200
-+++ phorum/include/admin/cache.php 2010-02-10 17:53:45.066588504 +0200
+--- phorum-5.2.23/include/admin/cache.php~ 2020-11-24 12:17:50.000000000 +0200
++++ phorum-5.2.23/include/admin/cache.php 2020-11-24 12:19:24.709279215 +0200
@@ -32,7 +32,7 @@
case "cache":
@@ -255,7 +250,7 @@
$new_settings[$field] = "file";
- } elseif ( !file_exists( './include/cache/'.$value.'.php' ) ) {
+ } elseif ( !file_exists( PHORUM_INCLUDES_DIR.'/cache/'.$value.'.php' ) ) {
- $error = "This cache layer ($value) does not exist.";
+ $error .= 'This cache layer ($value) does not exist. ';
} else {
$new_settings[$field] = $value;
--- phorum/include/db/mysql.php~ 2010-01-12 18:38:55.000000000 +0200
@@ -468,8 +463,8 @@
} else {
---- phorum-5.2.14/include/admin/sanity_checks/modules_filenames.php~ 2010-01-13 22:36:06.000000000 +0200
-+++ phorum-5.2.14/include/admin/sanity_checks/modules_filenames.php 2010-01-13 22:41:12.744027348 +0200
+--- phorum-5.2.23/include/admin/sanity_checks/modules_filenames.php~ 2020-11-24 12:17:50.000000000 +0200
++++ phorum-5.2.23/include/admin/sanity_checks/modules_filenames.php 2020-11-24 12:18:51.454228915 +0200
@@ -29,7 +29,7 @@
}
@@ -480,31 +475,31 @@
{
// Some entries which we skip by default.
@@ -39,20 +39,20 @@
-
- // Read in the module information.
- $lines = array();
-- if (file_exists("./mods/$entry/info.txt")) {
-- $lines = file("./mods/$entry/info.txt");
-+ if (file_exists(PHORUM_DIR."/mods/$entry/info.txt")) {
-+ $lines = file(PHORUM_DIR."/mods/$entry/info.txt");
- }
-
-- if(is_file("./mods/$entry") && substr($entry, -4)==".php") {
-+ if(is_file(PHORUM_DIR."/mods/$entry") && substr($entry, -4)==".php") {
- // one file module, skip it
- } else {
-- if(!file_exists("./mods/$entry/info.txt")) {
-+ if(!file_exists(PHORUM_DIR."/mods/$entry/info.txt")) {
- return array(
+
+ // Read in the module information.
+ $lines = array();
+- if (file_exists("./mods/$entry/info.txt")) {
+- $lines = file("./mods/$entry/info.txt");
++ if (file_exists(PHORUM_DIR."/mods/$entry/info.txt")) {
++ $lines = file(PHORUM_DIR."/mods/$entry/info.txt");
+ }
+
+- if(is_file("./mods/$entry") && substr($entry, -4)==".php") {
++ if(is_file(PHORUM_DIR."/mods/$entry") && substr($entry, -4)==".php") {
+ // one file module, skip it
+ } else {
+- if(!file_exists("./mods/$entry/info.txt")) {
++ if(!file_exists(PHORUM_DIR."/mods/$entry/info.txt")) {
+ return array(
PHORUM_SANITY_WARN,
- "Your module "$entry" doesn't have an info.txt file in its directory. Either its not a module or the installation of that module is broken.",
+ "Your module "$entry" doesn't have an info.txt file in its directory. Either its not a module or the installation of that module is broken.",
"You should remove all files or directories which are not modules from the mods-directory and fix broken module installations."
);
-- } elseif (!file_exists("./mods/$entry/$entry.php")) {
-+ } elseif (!file_exists(PHORUM_DIR."/mods/$entry/$entry.php")) {
- return array(
+- } elseif (!file_exists("./mods/$entry/$entry.php")) {
++ } elseif (!file_exists(PHORUM_DIR."/mods/$entry/$entry.php")) {
+ return array(
PHORUM_SANITY_WARN,
- "Your module "$entry" doesn't have an corresponding .php file in its directory.
+ "Your module "$entry" doesn't have an corresponding .php file in its directory.
--- phorum-5.2.16/mods/username_restrictions/settings.php~ 2011-01-31 15:57:12.000000000 +0200
+++ phorum-5.2.16/mods/username_restrictions/settings.php 2011-01-31 16:14:26.662057255 +0200
@@ -1,7 +1,7 @@
diff --git a/sys-phpmailer.patch b/sys-phpmailer.patch
index 986218d..29e9571 100644
--- a/sys-phpmailer.patch
+++ b/sys-phpmailer.patch
@@ -1,15 +1,14 @@
---- phorum-5.2.14/mods/smtp_mail/smtp_mail.php~ 2010-01-12 19:24:42.000000000 +0200
-+++ phorum-5.2.14/mods/smtp_mail/smtp_mail.php 2010-01-12 19:25:15.725706726 +0200
-@@ -35,11 +35,8 @@
+--- phorum-5.2.23/mods/smtp_mail/smtp_mail.php~ 2020-11-24 12:26:36.000000000 +0200
++++ phorum-5.2.23/mods/smtp_mail/smtp_mail.php 2020-11-24 12:27:06.033097480 +0200
+@@ -35,10 +35,9 @@
try {
-- require_once PHORUM_DIR.'/mods/smtp_mail/phpmailer/class.phpmailer.php';
--
-+ require_once 'class.phpmailer.php';
- $mail = new PHPMailer();
-- $mail->PluginDir = "./mods/smtp_mail/phpmailer/";
--
+- require_once PHORUM_DIR.'/mods/smtp_mail/phpmailer/class.phpmailer.php';
++ require_once 'class.phpmailer.php';
+
+ $mail = new PHPMailer();
+- $mail->PluginDir = "./mods/smtp_mail/phpmailer/";
+
$mail->CharSet = $PHORUM["DATA"]["CHARSET"];
$mail->Encoding = $PHORUM["DATA"]["MAILENCODING"];
- $mail->Mailer = "smtp";
diff --git a/translate-macros.patch b/translate-macros.patch
index 0437a99..168bc80 100644
--- a/translate-macros.patch
+++ b/translate-macros.patch
@@ -83,15 +83,15 @@ detailed list:
// For email_user_start.
"mailmessagetpl" => 'PMNotifyMessage',
---- phorum-5.2.15a/include/controlcenter/users.php~ 2010-11-04 12:58:48.000000000 +0200
-+++ phorum-5.2.15a/include/controlcenter/users.php 2010-11-04 14:53:22.786298453 +0200
+--- phorum-5.2.23/include/controlcenter/users.php~ 2020-11-24 12:28:50.000000000 +0200
++++ phorum-5.2.23/include/controlcenter/users.php 2020-11-24 12:29:15.829798916 +0200
@@ -51,6 +51,7 @@
// send reg approved message
$maildata["mailsubject"]=$PHORUM["DATA"]["LANG"]["RegApprovedSubject"];
- $maildata["mailmessage"]=wordwrap($PHORUM["DATA"]["LANG"]["RegApprovedEmailBody"], 72);
+ $maildata["mailmessage"]=phorum_wordwrap($PHORUM["DATA"]["LANG"]["RegApprovedEmailBody"], 72);
+ $maildata["phorum_title"]=$PHORUM['title'];
phorum_email_user(array($user["email"]), $maildata);
-
+
}
--- phorum-5.2.15a/include/controlcenter/email.php~ 2010-11-03 17:22:38.000000000 +0200
+++ phorum-5.2.15a/include/controlcenter/email.php 2010-11-03 18:23:56.130121394 +0200
@@ -124,22 +124,20 @@ detailed list:
$maildata['mailmessage'] =
wordwrap($PHORUM["DATA"]["LANG"]["LostPassEmailBody1"],72).
"\n\n".
---- phorum-5.2.15a/htdocs/register.php 2010-11-04 15:12:06.565756512 +0200
-+++ phorum-5.2.15a/htdocs/register.php 2010-11-04 15:16:56.303019222 +0200
-@@ -250,9 +250,15 @@
- if (preg_match("!aol\.com$!i", $userdata["email"])) {
+--- phorum-5.2.23/htdocs/register.php~ 2020-11-24 12:28:52.000000000 +0200
++++ phorum-5.2.23/htdocs/register.php 2020-11-24 12:30:23.433289302 +0200
+@@ -257,8 +257,13 @@
$verify_url = "<a href=\"$verify_url\">$verify_url</a>";
}
-+
$maildata = array();
+ $maildata["phorum_title"] = $PHORUM['title'];
+ $maildata["login_url"] = phorum_get_url(PHORUM_LOGIN_URL);
$maildata["mailsubject"] = $PHORUM["DATA"]["LANG"]["VerifyRegEmailSubject"];
-- $maildata["mailmessage"] = wordwrap($PHORUM["DATA"]["LANG"]["VerifyRegEmailBody1"], 72)."\n\n$verify_url\n\n".wordwrap($PHORUM["DATA"]["LANG"]["VerifyRegEmailBody2"], 72);
+- $maildata["mailmessage"] = phorum_wordwrap($PHORUM["DATA"]["LANG"]["VerifyRegEmailBody1"], 72)."\n\n$verify_url\n\n".phorum_wordwrap($PHORUM["DATA"]["LANG"]["VerifyRegEmailBody2"], 72);
+ $maildata["mailmessage"] =
-+ wordwrap($PHORUM["DATA"]["LANG"]["VerifyRegEmailBody1"],72).
++ phorum_wordwrap($PHORUM["DATA"]["LANG"]["VerifyRegEmailBody1"], 72).
+ "\n\n$verify_url\n\n".
-+ wordwrap($PHORUM["DATA"]["LANG"]["VerifyRegEmailBody2"],72);
++ phorum_wordwrap($PHORUM["DATA"]["LANG"]["VerifyRegEmailBody2"], 72);
phorum_email_user(array($userdata["email"]), $maildata);
}
diff --git a/unhide-errors.patch b/unhide-errors.patch
index 28f0c89..5c8a34d 100644
--- a/unhide-errors.patch
+++ b/unhide-errors.patch
@@ -1,5 +1,5 @@
---- phorum/include/db/mysql/mysqli_replication.php 2011-04-11 13:34:43.832383910 +0300
-+++ phorum-5.2.18/include/db/mysql/mysqli_replication.php 2012-05-15 23:31:55.915439900 +0300
+--- phorum-5.2.23/include/db/mysql/mysqli_replication.php~ 2020-11-24 12:33:27.000000000 +0200
++++ phorum-5.2.23/include/db/mysql/mysqli_replication.php 2020-11-24 12:33:53.897485209 +0200
@@ -98,7 +98,7 @@
$conn_read = phorum_db_get_random_connection($PHORUM['DBCONFIG']['slaves']);
@@ -12,7 +12,7 @@
@@ -119,7 +119,7 @@
} else {
// we suppress errors from the mysqli_connect command as errors
- // are catched differently.
+ // are catched differently.
- $conn_write = @mysqli_connect(
+ $conn_write = mysqli_connect(
$PHORUM['DBCONFIG']['server'],
diff --git a/wordwrap.patch b/wordwrap.patch
deleted file mode 100644
index 7540d08..0000000
--- a/wordwrap.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-http://trac.phorum.org/ticket/971
-https://github.com/Phorum/Core/issues/863
-
---- ./common.php 2010-11-04 18:05:47.000000000 +0200
-+++ ./common.php 2011-01-19 13:59:55.000000000 +0200
-@@ -1715,6 +1715,33 @@
- return $ret_string;
- }
-
-+function phorum_wordwrap($str = '', $width = 75, $break = "\n", $cut = false)
-+{
-+ global $PHORUM;
-+
-+ if (empty($PHORUM["DATA"]["HCHARSET"]) or !$cut) {
-+ // if unable to get charset or word cut not enabled use wordwrap
-+ return wordwrap($str, $width, $break, $cut);
-+ }
-+
-+ $l = mb_strlen($str, $PHORUM["DATA"]["HCHARSET"]);
-+ if($l == 0) {
-+ return '';
-+ }
-+
-+ $pl = 1;
-+ $return = '';
-+ for ($i = 0; $i < $l ; $i++) {
-+ if ($pl > $width) {
-+ $return .= $break;
-+ $pl = 1;
-+ }
-+ $return .= mb_substr($str, $i, 1, $PHORUM["DATA"]["HCHARSET"]);
-+ $pl++;
-+ }
-+ return $return;
-+}
-+
- // removes slashes from all array-entries
- function phorum_recursive_stripslashes( $array )
- {
---- ./htdocs/login.php 2010-11-04 18:05:47.000000000 +0200
-+++ ./htdocs/login.php 2011-01-19 14:01:55.000000000 +0200
-@@ -174,9 +174,9 @@
- $maildata["login_url"] = phorum_get_url(PHORUM_LOGIN_URL);
- $maildata["mailsubject"] = $PHORUM["DATA"]["LANG"]["VerifyRegEmailSubject"];
- $maildata["mailmessage"] =
-- wordwrap($PHORUM["DATA"]["LANG"]["VerifyRegEmailBody1"],72).
-+ phorum_wordwrap($PHORUM["DATA"]["LANG"]["VerifyRegEmailBody1"],72).
- "\n\n$verify_url\n\n".
-- wordwrap($PHORUM["DATA"]["LANG"]["VerifyRegEmailBody2"],72);
-+ phorum_wordwrap($PHORUM["DATA"]["LANG"]["VerifyRegEmailBody2"],72);
- phorum_email_user(array($user["email"]), $maildata);
-
- $okmsg = $PHORUM["DATA"]["LANG"]["RegVerifyEmail"];
-@@ -205,12 +205,12 @@
- $maildata["phorum_title"] = $PHORUM['title'];
- $maildata["login_url"] = phorum_get_url(PHORUM_LOGIN_URL);
- $maildata['mailmessage'] =
-- wordwrap($PHORUM["DATA"]["LANG"]["LostPassEmailBody1"],72).
-+ phorum_wordwrap($PHORUM["DATA"]["LANG"]["LostPassEmailBody1"],72).
- "\n\n".
- $PHORUM["DATA"]["LANG"]["Username"] .": $user[username]\n".
- $PHORUM["DATA"]["LANG"]["Password"] .": $newpass".
- "\n\n".
-- wordwrap($PHORUM["DATA"]["LANG"]["LostPassEmailBody2"],72);
-+ phorum_wordwrap($PHORUM["DATA"]["LANG"]["LostPassEmailBody2"],72);
- $maildata['mailsubject'] = $PHORUM["DATA"]["LANG"]["LostPassEmailSubject"];
- phorum_email_user(array( 0 => $user['email'] ), $maildata);
-
---- ./htdocs/pm.php 2010-11-04 18:05:47.000000000 +0200
-+++ ./htdocs/pm.php 2011-01-19 14:01:55.000000000 +0200
-@@ -1444,7 +1444,7 @@
- // Build a quoted version of the message body.
- $quote = phorum_strip_body($message["message"]);
- $quote = str_replace("\n", "\n> ", $quote);
-- $quote = wordwrap(trim($quote), 50, "\n> ", true);
-+ $quote = phorum_wordwrap(trim($quote), 50, "\n> ", true);
- $quote = "$author {$PHORUM['DATA']['LANG']['Wrote']}:\n" .
- str_repeat("-", 55)."\n> {$quote}\n\n\n";
- }
---- ./htdocs/register.php 2010-11-04 18:05:47.000000000 +0200
-+++ ./htdocs/register.php 2011-01-19 14:01:55.000000000 +0200
-@@ -256,9 +256,9 @@
- $maildata["login_url"] = phorum_get_url(PHORUM_LOGIN_URL);
- $maildata["mailsubject"] = $PHORUM["DATA"]["LANG"]["VerifyRegEmailSubject"];
- $maildata["mailmessage"] =
-- wordwrap($PHORUM["DATA"]["LANG"]["VerifyRegEmailBody1"],72).
-+ phorum_wordwrap($PHORUM["DATA"]["LANG"]["VerifyRegEmailBody1"],72).
- "\n\n$verify_url\n\n".
-- wordwrap($PHORUM["DATA"]["LANG"]["VerifyRegEmailBody2"],72);
-+ phorum_wordwrap($PHORUM["DATA"]["LANG"]["VerifyRegEmailBody2"],72);
- phorum_email_user(array($userdata["email"]), $maildata);
- }
-
---- ./htdocs/report.php 2010-11-04 18:05:47.000000000 +0200
-+++ ./htdocs/report.php 2011-01-19 14:01:55.000000000 +0200
-@@ -62,11 +62,11 @@
- "reportedby" => $PHORUM["user"]["display_name"],
- "author" => $message["author"],
- "subject" => $message["subject"],
-- "body" => wordwrap($message["body"], 72),
-+ "body" => phorum_wordwrap($message["body"], 72),
- "ip" => $message["ip"],
- "raw_date" => $message["datestamp"],
- "date" => phorum_date($PHORUM["short_date_time"], $message["datestamp"]),
-- "explanation" => wordwrap($_POST["explanation"], 72),
-+ "explanation" => phorum_wordwrap($_POST["explanation"], 72),
- "url" => phorum_get_url_no_uri_auth(PHORUM_READ_URL, $message["thread"], $message_id),
- "delete_url" => phorum_get_url_no_uri_auth(PHORUM_MODERATION_URL, PHORUM_DELETE_MESSAGE, $message_id),
- "hide_url" => phorum_get_url_no_uri_auth(PHORUM_MODERATION_URL, PHORUM_HIDE_POST, $message_id),
---- ./include/admin/mods.php 2010-11-04 18:05:47.000000000 +0200
-+++ ./include/admin/mods.php 2011-01-19 14:01:55.000000000 +0200
-@@ -96,7 +96,7 @@
- $text.=" (version ".$info["version"].")";
- }
- if(isset($info["desc"])){
-- $text.="<div class=\"small\">".wordwrap($info["desc"], 90, "<br />")."</div>";
-+ $text.="<div class=\"small\">".phorum_wordwrap($info["desc"], 90, "<br />")."</div>";
- }
- if(isset($info["author"])){
- $text.="<div class=\"small\">Created by ".$info["author"]."</div>";
---- ./include/cache/file.php 2010-11-04 18:05:46.000000000 +0200
-+++ ./include/cache/file.php 2011-01-19 14:01:55.000000000 +0200
-@@ -42,7 +42,7 @@
- if(is_array($key)) {
- $ret=array();
- foreach($key as $realkey) {
-- $path=$partpath."/".wordwrap(md5($realkey), PHORUM_CACHE_SPLIT, "/", true)."/data.php";
-+ $path=$partpath."/".phorum_wordwrap(md5($realkey), PHORUM_CACHE_SPLIT, "/", true)."/data.php";
- if(file_exists($path)) {
- // the data is: array($ttl_time,$data,$version)
- // $version might not be set.
-@@ -66,7 +66,7 @@
- if(count($ret) == 0) $ret = NULL;
-
- } else {
-- $path=$partpath."/".wordwrap(md5($key), PHORUM_CACHE_SPLIT, "/", true)."/data.php";
-+ $path=$partpath."/".phorum_wordwrap(md5($key), PHORUM_CACHE_SPLIT, "/", true)."/data.php";
- if(!file_exists($path)){
- $ret=NULL;
- } else {
-@@ -101,7 +101,7 @@
- */
- function phorum_cache_put($type,$key,$data,$ttl=PHORUM_CACHE_DEFAULT_TTL,$version = NULL) {
-
-- $path=$GLOBALS['PHORUM']['real_cache']."/$type/".wordwrap(md5($key), PHORUM_CACHE_SPLIT, "/", true);
-+ $path=$GLOBALS['PHORUM']['real_cache']."/$type/".phorum_wordwrap(md5($key), PHORUM_CACHE_SPLIT, "/", true);
- if(!file_exists($path)){
- phorum_cache_mkdir($path);
- }
-@@ -120,7 +120,7 @@
- function phorum_cache_remove($type,$key) {
-
- $ret =true;
-- $path=$GLOBALS['PHORUM']['real_cache']."/$type/".wordwrap(md5($key), PHORUM_CACHE_SPLIT, "/", true)."/data.php";
-+ $path=$GLOBALS['PHORUM']['real_cache']."/$type/".phorum_wordwrap(md5($key), PHORUM_CACHE_SPLIT, "/", true)."/data.php";
- if(file_exists($path)) {
- $ret=@unlink($path);
- }
---- ./include/controlcenter/email.php 2010-11-04 18:05:47.000000000 +0200
-+++ ./include/controlcenter/email.php 2011-01-19 14:01:55.000000000 +0200
-@@ -65,7 +65,7 @@
- $_POST['email_temp']=$_POST['email']."|".$conf_code;
- // ... send email ... //
- $maildata=array(
-- 'mailmessage' => wordwrap($PHORUM['DATA']['LANG']['EmailVerifyBody'], 72),
-+ 'mailmessage' => phorum_wordwrap($PHORUM['DATA']['LANG']['EmailVerifyBody'], 72),
- 'mailsubject' => $PHORUM['DATA']['LANG']['EmailVerifySubject'],
- 'phorum_title' => $PHORUM['title'],
- 'uname' => $PHORUM['DATA']['PROFILE']['username'],
---- ./include/controlcenter/users.php 2010-11-04 18:05:47.000000000 +0200
-+++ ./include/controlcenter/users.php 2011-01-19 14:01:55.000000000 +0200
-@@ -50,7 +50,7 @@
- $userdata["active"]=PHORUM_USER_ACTIVE;
- // send reg approved message
- $maildata["mailsubject"]=$PHORUM["DATA"]["LANG"]["RegApprovedSubject"];
-- $maildata["mailmessage"]=wordwrap($PHORUM["DATA"]["LANG"]["RegApprovedEmailBody"], 72);
-+ $maildata["mailmessage"]=phorum_wordwrap($PHORUM["DATA"]["LANG"]["RegApprovedEmailBody"], 72);
- $maildata["phorum_title"]=$PHORUM['title'];
- phorum_email_user(array($user["email"]), $maildata);
-
---- ./include/email_functions.php 2010-11-04 18:05:47.000000000 +0200
-+++ ./include/email_functions.php 2011-01-19 14:01:55.000000000 +0200
-@@ -278,7 +278,7 @@
- "author" => phorum_api_user_get_display_name($message["user_id"], $message["from_username"], PHORUM_FLAG_PLAINTEXT),
- "subject" => $message["subject"],
- "full_body" => $message["message"],
-- "plain_body" => wordwrap(phorum_strip_body($message["message"]),72),
-+ "plain_body" => phorum_wordwrap(phorum_strip_body($message["message"]),72),
- "read_url" => phorum_get_url_no_uri_auth(PHORUM_PM_URL, "page=read", "pm_id=" . $message["pm_message_id"]),
- "phorum_title" => $PHORUM['title'],
-
---- ./include/posting/request_first.php 2010-11-04 18:05:46.000000000 +0200
-+++ ./include/posting/request_first.php 2011-01-19 14:01:55.000000000 +0200
-@@ -83,7 +83,7 @@
- {
- $quoted = phorum_strip_body($dbmessage["body"]);
- $quoted = str_replace("\n", "\n> ", $quoted);
-- $quoted = wordwrap(trim($quoted), 50, "\n> ", true);
-+ $quoted = phorum_wordwrap(trim($quoted), 50, "\n> ", true);
- $quoted = "$author " .
- "{$PHORUM["DATA"]["LANG"]["Wrote"]}:\n" .
- str_repeat("-", 55) . "\n> $quoted\n\n\n";
---- ./include/thread_sort.php 2010-11-04 18:05:46.000000000 +0200
-+++ ./include/thread_sort.php 2011-01-19 14:01:55.000000000 +0200
-@@ -101,7 +101,7 @@
- $cut_len = $cut_max - $indent*$cut_indentfactor;
- if ($cut_len < $cut_min) $cut_len = $cut_min;
- $order[$curr_id]["subject"] =
-- wordwrap($order[$curr_id]["subject"], $cut_len, " ", TRUE);
-+ phorum_wordwrap($order[$curr_id]["subject"], $cut_len, " ", TRUE);
- }
- }
- array_push($stack, $curr_id);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/phorum.git/commitdiff/85fc950f759f149060a90d00dbbc678f4d24a761
More information about the pld-cvs-commit
mailing list