Project

General

Profile

« Previous | Next » 

Revision 2084

Added by darkviper almost 11 years ago

  1. modules/wysiwyg/upgrade copy-past mistake corrected

View differences:

upgrade.php
101 101
                $aReplace = array( '{SYSVAR:AppUrl.MediaDir}', '{SYSVAR:AppUrl}', '{SYSVAR:AppUrl.MediaDir}', '{SYSVAR:AppUrl}', '\1', '\1');
102 102
                while (($aEntry = $oEntrySet->fetchRow(MYSQL_ASSOC))) {
103 103
                    $iCount = 0;
104
                    $aSubject = array($aEntry['content_long'], $aEntry['content_short']);
105
                    $aNewContents = preg_replace($aSearch, $aReplace, $aSubject, -1, $iCount);
104
                    $aEntry['content'] = preg_replace($aSearch, $aReplace, $aEntry['content'], -1, $iCount);
106 105
                    if ($iCount > 0) {
107 106
                        $iReplaced += $iCount;
108
                        $sql = 'UPDATE `'.$oDb->TablePrefix.'mod_news_posts` '
109
                             . 'SET `content_long`=\''.$oDb->escapeString($aNewContents[0]).'\', '
110
                             .     '`content_short`=\''.$oDb->escapeString($aNewContents[1]).'\' '
111
                             . 'WHERE `post_id`='.$aEntry['post_id'];
107
                        $sql = 'UPDATE `'.$oDb->TablePrefix.'mod_wysiwyg` '
108
                             . 'SET `content`=\''.$oDb->escapeString($aEntry['content']).'\' '
109
                             . 'WHERE `section_id`='.$aEntry['section_id'];
112 110
                        $oDb->doQuery($sql);
113 111
                        $iRecords++;
114 112
                    }

Also available in: Unified diff