Project

General

Profile

« Previous | Next » 

Revision 66

Added by stefan about 19 years ago

Changed column names in mod_news_posts from short,long to content_short, content_long.

View differences:

view.php
105 105
	}
106 106
	
107 107
	// Query posts (for this page)
108
	$query_posts = $database->query("SELECT group_id,post_id,title,link,short,posted_by,posted_when FROM ".TABLE_PREFIX."mod_news_posts WHERE section_id = '$section_id' AND active = '1' AND title != ''$query_extra ORDER BY position DESC".$limit_sql);
108
	$query_posts = $database->query("SELECT group_id,post_id,title,link,content_short,posted_by,posted_when FROM ".TABLE_PREFIX."mod_news_posts WHERE section_id = '$section_id' AND active = '1' AND title != ''$query_extra ORDER BY position DESC".$limit_sql);
109 109
	$num_posts = $query_posts->numRows();
110 110
	
111 111
	// Create previous and next links
......
185 185
				if($group_image == '') { $display_image = 'none'; } else { $display_image = ''; }
186 186
				if($group_id == 0) { $display_group = 'none'; } else { $display_group = ''; }
187 187
				// Replace [wblink--PAGE_ID--] with real link
188
				$short = $this->strip_slashes_dummy($post['short']);
188
				$short = $this->strip_slashes_dummy($post['content_short']);
189 189
				$this->preprocess($short);
190 190
				// Replace vars with values
191 191
				$vars = array('[PAGE_TITLE]', '[GROUP_ID]', '[GROUP_TITLE]', '[GROUP_IMAGE]', '[DISPLAY_GROUP]', '[DISPLAY_IMAGE]', '[TITLE]', '[SHORT]', '[LINK]', '[DATE]', '[TIME]', '[USER_ID]', '[USERNAME]', '[DISPLAY_NAME]', '[EMAIL]', '[TEXT_READ_MORE]');
......
258 258
			if($group_id == 0) { $display_group = 'none'; } else { $display_group = ''; }
259 259
			$vars = array('[PAGE_TITLE]', '[GROUP_ID]', '[GROUP_TITLE]', '[GROUP_IMAGE]', '[DISPLAY_GROUP]', '[DISPLAY_IMAGE]', '[TITLE]', '[SHORT]', '[BACK]', '[DATE]', '[TIME]', '[USER_ID]', '[USERNAME]', '[DISPLAY_NAME]', '[EMAIL]');
260 260
			if(isset($users[$uid]['username']) AND $users[$uid]['username'] != '') {
261
				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes_dummy($post['title']), $this->strip_slashes_dummy($post['short']), $page_link, $post_date, $post_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email']);
261
				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes_dummy($post['title']), $this->strip_slashes_dummy($post['content_short']), $page_link, $post_date, $post_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email']);
262 262
			} else {
263
				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes_dummy($post['title']), $this->strip_slashes_dummy($post['short']), $page_link, $post_date, $post_time, '', '', '', '');
263
				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes_dummy($post['title']), $this->strip_slashes_dummy($post['content_short']), $page_link, $post_date, $post_time, '', '', '', '');
264 264
			}
265
			$post_long = $this->strip_slashes_dummy($post['long']);
265
			$post_long = $this->strip_slashes_dummy($post['content_long']);
266 266
		}
267 267
	} else {
268 268
		header('Location: '.WB_URL.'/pages/');

Also available in: Unified diff