Project

General

Profile

« Previous | Next » 

Revision 1918

Added by Dietmar about 11 years ago

! /modules/news/ beginning beginning recoding
replacing absolute MediaUrl with place holder

View differences:

upgrade.php
20 20
 * upgrade.php
21 21
 * 
22 22
 * @category     Module
23
 * @package      Module_news
23
 * @package      news
24 24
 * @subpackage   upgrade
25 25
 * @author       Dietmar Wöllbrink <dietmar.woellbrink@websitebaker.org>
26 26
 * @author       Werner v.d.Decken <wkl@isteam.de>
......
92 92

  
93 93
			$sPagesPath = WB_PATH.PAGES_DIRECTORY;
94 94
			$sPostsPath = $sPagesPath.'/posts';
95
	// create /posts/ - directory if not exists
95
// create /posts/ - directory if not exists
96 96
			if(is_writable($sPagesPath)) {
97 97
				if(!($bRetval = is_dir($sPostsPath))) {
98 98
					$iOldUmask = umask(0) ;
......
133 133
				$msg[] = 'TABLE `'.$database->TablePrefix.'mod_news_posts` Datafield `created_by` already exists.'." $OK";
134 134
				$doImportDate = false; 
135 135
			}
136
 	// preset new fields `created_by` and `created_by` from existing values
136
// preset new fields `created_by` and `created_by` from existing values
137 137
			if($doImportDate) {
138 138
				$sql  = 'UPDATE `'.$database->TablePrefix.'mod_news_posts` ';
139 139
				$sql .= 'SET `created_by`=`posted_by`, `created_when`=`posted_when`';
140 140
				$database->query($sql);
141 141
			}
142

  
142
	if($doImportDate) {
143 143
	/**
144 144
	 * rebuild news post folder
145 145
	 */
......
176 176
			if($count > 0) {
177 177
				$msg[] = 'Save date of creation from '.$count.' old accessfiles and delete these files.'." $OK";
178 178
			}
179
	}
179 180
// ************************************************
180
		// Check the validity of 'create-file-timestamp' and balance against 'posted-timestamp'
181
// Check the validity of 'create-file-timestamp' and balance against 'posted-timestamp'
181 182
			$sql  = 'UPDATE `'.$database->TablePrefix.'mod_news_posts` ';
182 183
			$sql .= 'SET `created_when`=`published_when` ';
183 184
			$sql .= 'WHERE `published_when`<`created_when`';

Also available in: Unified diff