Revision 1880
Added by Luisehahne over 12 years ago
- bugfix missing slash in class m_news_Reorg
| branches/2.8.x/CHANGELOG | ||
|---|---|---|
| 11 | 11 |
! = Update/Change |
| 12 | 12 |
=============================================================================== |
| 13 | 13 |
|
| 14 |
|
|
| 15 |
05 Mar-2013 Build 1880 Dietmar Woellbrink (Luisehahne) |
|
| 16 |
# bugfix missing slash in class m_news_Reorg |
|
| 14 | 17 |
05 Mar-2013 Build 1879 Werner v.d.Decken(DarkViper) |
| 15 | 18 |
# protect magic setter to fix security issue in WbAdapter |
| 16 | 19 |
05 Mar-2013 Build 1878 Werner v.d.Decken(DarkViper) |
| 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', '1879');
|
|
| 54 |
if(!defined('REVISION')) define('REVISION', '1880');
|
|
| 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 $_oReg = array(); |
|
| 37 |
protected $_oReg = null; |
|
| 38 |
protected $_sPagesDir = ''; |
|
| 39 |
|
|
| 38 | 40 |
/** |
| 39 | 41 |
* Execute reorganisation |
| 40 | 42 |
* @return string all occured messages |
| ... | ... | |
| 42 | 44 |
public function execute() |
| 43 | 45 |
{
|
| 44 | 46 |
$sOutput = null; |
| 47 |
$this->_oReg = null; |
|
| 45 | 48 |
if(class_exists('WbAdaptor')) {
|
| 46 | 49 |
$this->_oReg = WbAdaptor::getInstance(); |
| 47 | 50 |
$sTmp = trim($this->_oReg->PagesDir, '/'); |
| 48 |
$sTmp = ($sTmp == '' ? '' : '/'.$sTmp);
|
|
| 49 |
$this->_oReg->PagesDir =$sTmp;
|
|
| 51 |
$sTmp = ($sTmp == '' ? '' : $sTmp); |
|
| 52 |
$this->_sPagesDir = $sTmp;
|
|
| 50 | 53 |
$sOutput = $this->createAccessFiles(); |
| 51 | 54 |
} |
| 52 | 55 |
// add here the requests for additional reorg methods |
| ... | ... | |
| 66 | 69 |
if(($oPosts = WbDatabase::getInstance()->query($sql))) {
|
| 67 | 70 |
while($aPost = $oPosts->fetchRow(MYSQL_ASSOC)) |
| 68 | 71 |
{
|
| 69 |
$sAccessFile = $this->_oReg->AppPath.$this->_oReg->PagesDir
|
|
| 70 |
. trim(str_replace('\\', '/', $aPost['link']), '/')
|
|
| 72 |
$sAccessFile = $this->_oReg->AppPath.$this->_sPagesDir
|
|
| 73 |
. rtrim(str_replace('\\', '/', $aPost['link']), '/')
|
|
| 71 | 74 |
. $this->_oReg->PageExtension; |
| 72 | 75 |
$aOptionalCommand = array( |
| 73 | 76 |
'$section_id = '.$aPost['section_id'].';', |
| 74 | 77 |
'$post_section = '.$aPost['section_id'].';', |
| 75 | 78 |
'$post_id = '.$aPost['post_id'].';' |
| 76 | 79 |
); |
| 80 |
|
|
| 77 | 81 |
if(create_access_file($sAccessFile, $aPost['page_id'], 0, $aOptionalCommand)){
|
| 78 | 82 |
$count++; |
| 79 | 83 |
} else {
|
Also available in: Unified diff