Revision 2077
Added by darkviper almost 12 years ago
- little fixes in modules/news
- little fixes in some other files
| branches/2.8.x/CHANGELOG | ||
|---|---|---|
| 11 | 11 |
! = Update/Change |
| 12 | 12 |
=============================================================================== |
| 13 | 13 |
|
| 14 |
06 Jan-2014 Build 2077 Manuela v.d.Decken(DarkViper) |
|
| 15 |
# little fixes in modules/news |
|
| 16 |
# little fixes in some other files |
|
| 14 | 17 |
06 Jan-2014 Build 2076 Manuela v.d.Decken(DarkViper) |
| 15 | 18 |
# some fixes in admin/users |
| 16 | 19 |
# some fixes in admin/pages |
| branches/2.8.x/wb/admin/interface/version.php | ||
|---|---|---|
| 51 | 51 |
|
| 52 | 52 |
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled) |
| 53 | 53 |
if(!defined('VERSION')) define('VERSION', '2.8.4');
|
| 54 |
if(!defined('REVISION')) define('REVISION', '2076');
|
|
| 54 |
if(!defined('REVISION')) define('REVISION', '2077');
|
|
| 55 | 55 |
if(!defined('SP')) define('SP', '');
|
| branches/2.8.x/wb/framework/class.wb.php | ||
|---|---|---|
| 25 | 25 |
/* -------------------------------------------------------- */ |
| 26 | 26 |
// Include PHPLIB template class |
| 27 | 27 |
if(!class_exists('Template', false)){ include(WB_PATH.'/include/phplib/template.inc'); }
|
| 28 |
// Include new wbmailer class (subclass of PHPmailer) |
|
| 29 |
if(!class_exists('wbmailer', false)){ include(WB_PATH.'/framework/class.wbmailer.php'); }
|
|
| 30 | 28 |
|
| 31 | 29 |
class wb extends SecureForm |
| 32 | 30 |
{
|
| branches/2.8.x/wb/framework/UpgradeHelper.php | ||
|---|---|---|
| 129 | 129 |
{
|
| 130 | 130 |
if (defined('DB_PASSWORD')) {
|
| 131 | 131 |
// old config.php is active |
| 132 |
if (!is_writable($sAppPath.'config.php') || !is_writable($sAppPath.'config.php.new') || !is_writable($sAppPath.'setup.ini.php.new')) |
|
| 132 |
if ( !is_writable($sAppPath.'config.php') |
|
| 133 |
|| (file_exists($sAppPath.'config.php.new') && !is_writable($sAppPath.'config.php.new')) |
|
| 134 |
|| (file_exists($sAppPath.'setup.ini.php') && !is_writable($sAppPath.'setup.ini.php')) |
|
| 135 |
|| (!file_exists($sAppPath.'setup.ini.php') && !is_writable($sAppPath.'setup.ini.php.new')) |
|
| 136 |
) |
|
| 133 | 137 |
{
|
| 134 | 138 |
// stop script if there's an error occured |
| 135 |
$sMsg = 'Following files must exist and be writable to run upgrade:<br />' |
|
| 136 |
. '<ul><li>config.php</li>'.(file_exists($sAppPath.'config.php.new') ? '<li>config.php.new</li>' : '') |
|
| 137 |
. '<li>setup.ini.php.new</li></ul>'; |
|
| 139 |
$sMsg = 'Following files must exist and be writable to run upgrade:<br />'.PHP_EOL |
|
| 140 |
. '<ul>'.PHP_EOL |
|
| 141 |
. '<li>config.php</li>'.PHP_EOL |
|
| 142 |
. (file_exists($sAppPath.'config.php.new') ? '<li>config.php.new</li>'.PHP_EOL : '') |
|
| 143 |
. (file_exists($sAppPath.'setup.ini.php') ? '<li>setup.ini.php</li>'.PHP_EOL : '') |
|
| 144 |
. (!file_exists($sAppPath.'setup.ini.php') ? '<li>setup.ini.php.new</li>'.PHP_EOL : '') |
|
| 145 |
. '</ul>'.PHP_EOL; |
|
| 138 | 146 |
self::dieWithMessage($sMsg); |
| 139 | 147 |
} else { // ok, let's change the files now!
|
| 140 | 148 |
if (file_exists($sAppPath.'setup.ini.php')) {
|
| branches/2.8.x/wb/modules/news/upgrade.php | ||
|---|---|---|
| 159 | 159 |
// first copy values inside the table and exchange all \ by / in field `link` |
| 160 | 160 |
$sql = 'UPDATE `'.$oDb->TablePrefix.'mod_news_posts` ' |
| 161 | 161 |
. 'SET `created_by`=`posted_by`, ' |
| 162 |
. '`created_when`=`posted_when` ' |
|
| 162 |
. '`created_when`=`posted_when`, '
|
|
| 163 | 163 |
. '`link`= REPLACE(`link`, \'\\\', \'/\')'; |
| 164 | 164 |
$oDb->query($sql); |
| 165 | 165 |
// read Timestamps from old styled accessfiles |
| branches/2.8.x/wb/modules/news/save_post.php | ||
|---|---|---|
| 59 | 59 |
$group_id = intval($admin->get_post('group'));
|
| 60 | 60 |
// Include WB functions file |
| 61 | 61 |
require($oReg->AppPath.'framework/functions.php'); |
| 62 |
// Work-out all needed path and filenames |
|
| 63 |
$sAccessFsileRootPath = $oReg->AppPath.$oReg->PagesDir.$sNewsLinkSubdir;
|
|
| 62 |
// Work-out all needed path and filenames
|
|
| 63 |
$sAccessFileRootPath = $oReg->AppPath.$oReg->PagesDir.$sNewsLinkSubdir; |
|
| 64 | 64 |
$sOldLink = preg_replace('/^\/?'.preg_quote($sNewsLinkSubdir, '/').'/', '', str_replace('\\', '/', $admin->StripCodeFromText($admin->get_post('link'))));
|
| 65 | 65 |
$sOldFilename = $sAccessFileRootPath.$sOldLink.$oReg->PageExtension; |
| 66 | 66 |
$sNewLink = page_filename($title).$oReg->PageSpacer.$post_id; |
| 67 | 67 |
$sNewFilename = $sAccessFileRootPath.$sNewLink.$oReg->PageExtension; |
| 68 | 68 |
$sBackUrl = $oReg->AcpUrl.'pages/modify.php?page_id='.$page_id; |
| 69 |
// get publisedwhen and publisheduntil |
|
| 69 |
// get publisedwhen and publisheduntil
|
|
| 70 | 70 |
$x = strtotime(preg_replace('/^(\d{1,2})\.(\d{1,2})\.(\d{2,4})(.*)$/s', '\2/\1/\3\4', $admin->get_post_escaped('publishdate')));
|
| 71 | 71 |
$publishedwhen = $x ? $x : 0; |
| 72 | 72 |
$x = strtotime(preg_replace('/^(\d{1,2})\.(\d{1,2})\.(\d{2,4})(.*)$/s', '\2/\1/\3\4', $admin->get_post_escaped('enddate')), $publishedwhen);
|
Also available in: Unified diff