Project

General

Profile

« Previous | Next » 

Revision 1877

Added by Dietmar over 11 years ago

! fix news reorg.php to be backward compatible slash settings

View differences:

branches/2.8.x/CHANGELOG
11 11
! = Update/Change
12 12
===============================================================================
13 13

  
14
02 Mae-2013 Build 1877 Dietmar Woellbrink (Luisehahne)
15
! fix news reorg.php to be backward compatible slash settings  
14 16
01 Mae-2013 Build 1876 Dietmar Woellbrink (Luisehahne)
15 17
! wysgwyg, first try to repair missing table entries
16 18
! page sections typofix in header
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.3');
54
if(!defined('REVISION')) define('REVISION', '1876');
54
if(!defined('REVISION')) define('REVISION', '1877');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/modules/news/Reorg.php
34 34

  
35 35
class m_news_Reorg {
36 36

  
37
	private $_aSys = array();
37
	private $_oReg = array();
38 38
/**
39 39
 * Execute reorganisation
40 40
 * @return string all occured messages 
......
43 43
	{
44 44
		$sOutput = null;
45 45
		if(class_exists('WbAdaptor')) {
46
			$this->_aSys['TablePrefix'] = WbAdaptor::getInstance()->TablePrefix;
47
			$this->_aSys['AppPath'] = WbAdaptor::getInstance()->AppPath;
48
			$this->_aSys['PagesDir'] = WbAdaptor::getInstance()->PagesDir;
49
			$this->_aSys['PageExtension'] = WbAdaptor::getInstance()->PageExtension;
46
			$this->_oReg = WbAdaptor::getInstance();
47
			$sTmp = trim($this->_oReg->PagesDir, '/');
48
			$sTmp = ($sTmp == '' ? '' : '/'.$sTmp);
49
			$this->_oReg->PagesDir =$sTmp;
50 50
			$sOutput = $this->createAccessFiles();
51 51
		}
52 52
		// add here the requests for additional reorg methods
......
61 61
		$count = 0;
62 62
		$aReturnMsg = array();
63 63
		$sql  = 'SELECT `page_id`,`post_id`,`section_id`,`link` ';
64
		$sql .= 'FROM `'.$this->_aSys['TablePrefix'].'mod_news_posts`';
64
		$sql .= 'FROM `'.$this->_oReg->TablePrefix.'mod_news_posts`';
65 65
		$sql .= 'WHERE `link` != \'\'';
66 66
		if(($oPosts = WbDatabase::getInstance()->query($sql))) {
67 67
			while($aPost = $oPosts->fetchRow(MYSQL_ASSOC))
68 68
			{
69
				$sAccessFile = $this->_aSys['AppPath'].$this->_aSys['PagesDir']
69
				$sAccessFile = $this->_oReg->AppPath.$this->_oReg->PagesDir
70 70
				               . trim(str_replace('\\', '/', $aPost['link']), '/')
71
				               . $this->_aSys['PageExtension'];
71
				               . $this->_oReg->PageExtension;
72 72
				$aOptionalCommand = array(
73 73
					'$section_id   = '.$aPost['section_id'].';',
74 74
					'$post_section = '.$aPost['section_id'].';',

Also available in: Unified diff