Changeset 1853 in ExiteCMS
- Timestamp:
- 10/16/08 11:37:18 (3 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
-
albums.php (modified) (1 diff)
-
blogs.php (modified) (1 diff)
-
feeds.php (modified) (1 diff)
-
forum/viewforum.php (modified) (1 diff)
-
forum/viewposts.php (modified) (2 diffs)
-
includes/class.httpdownload.php (modified) (1 diff)
-
includes/jscripts/hoteditor-4.2/editor.js (modified) (3 diffs)
-
includes/sendmail_include.php (modified) (1 diff)
-
includes/session_functions.php (modified) (2 diffs)
-
includes/templates/main.albums.galleryedit.tpl (modified) (1 diff)
-
includes/templates/main.blogs.tpl (modified) (2 diffs)
-
includes/templates/main.pm.post.tpl (modified) (1 diff)
-
modules/main_menu_panel/module_installer.php (modified) (1 diff)
-
modules/user_info_panel/module_installer.php (modified) (1 diff)
-
modules/welcome_message_panel/module_installer.php (modified) (1 diff)
-
setuser.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/albums.php
r1810 r1853 703 703 $variables['album']['photo_count'] = dbfunction("COUNT(*)", "album_photos", "album_id = ".$album_id); 704 704 // SWFUpload needs this, Flash doesn't maintain the session 705 $variables['session_id'] = $_COOKIE['site_visited'];705 $variables['session_id'] = _session_ua(); 706 706 $variables['session_name'] = $_COOKIE[$settings['session_name']]; 707 707 // to check security when uploading -
trunk/blogs.php
r1425 r1853 198 198 ORDER BY blog_datestamp DESC LIMIT ".$settings['blogs_indexsize']); 199 199 } 200 error_reporting(E_ALL); 200 201 while ($data = dbarray($result)) { 201 202 // store the blog entry(s) 202 203 $data['blog_text'] = stripslashes($data['blog_text']); 204 $idx = 0; 205 while ($next = strpos($data['blog_text'], "<br /><br />", $idx)) { 206 if ($next > 500) break; 207 $idx = $next + 1; 208 } 209 if ($next) $idx = $next; 210 if ($idx) { 211 $data['blog_intro'] = substr($data['blog_text'],0, $idx); 212 $data['read_more'] = true; 213 } else { 214 $data['blog_intro'] = $data['blog_text']; 215 $data['read_more'] = false; 216 } 203 217 // count comments for this blog entry 204 218 $data['comments'] = $data['blog_comments'] ? dbcount("(comment_id)", "comments", "comment_type='B' AND comment_item_id='".$data['blog_id']."'") : 0; -
trunk/feeds.php
r1476 r1853 72 72 $item['description'] = "<![CDATA[ <b>".$data['user_name']." ".$locale['401']."</b> ".(strlen($data['post_message']) > 500 ? (substr($data['post_message'],0,496)." ...") : $data['post_message'])." ]]>"; 73 73 // locale must be english for this to work! 74 $loc = setlocale( "LC_TIME", "en_US");74 $loc = setlocale(LC_TIME, "en_US"); 75 75 $item['pubDate'] = strftime("%a, %d %b %G %T %z", $data['post_datestamp']); 76 setlocale( "LC_TIME", $loc);76 setlocale(LC_TIME, $loc); 77 77 $item['guid'] = $item['link']; // make the guid equal to the link, we don't have a need for permalinks 78 78 $feed[] = $item; -
trunk/forum/viewforum.php
r1715 r1853 153 153 "SELECT t.*, MAX(p.post_id) AS last_post, COUNT(p.post_id) AS thread_replies, tu1.user_name AS user_author, tu1.user_ip AS user_ip, 154 154 tu2.user_name AS user_lastuser, tu1.user_cc_code AS user_cc_code FROM ".$db_prefix."threads t 155 INNER JOIN ".$db_prefix."posts p USING ( thread_id )155 INNER JOIN ".$db_prefix."posts p ON t.thread_id = p.thread_id 156 156 LEFT JOIN ".$db_prefix."users tu1 ON t.thread_author = tu1.user_id 157 157 LEFT JOIN ".$db_prefix."users tu2 ON t.thread_lastuser = tu2.user_id -
trunk/forum/viewposts.php
r1715 r1853 38 38 "SELECT tp.*, tf.* FROM ".$db_prefix."posts tp 39 39 INNER JOIN ".$db_prefix."threads th USING(thread_id) 40 INNER JOIN ".$db_prefix."forums tf USING(forum_id)40 INNER JOIN ".$db_prefix."forums tf ON tp.forum_id = tf.forum_id 41 41 WHERE ".($thread_limit==0?"":" th.thread_lastpost > ".$thread_limit." AND ").groupaccess('forum_access').($forum_id ? " AND tp.forum_id = '$forum_id'" : "") 42 42 ); … … 52 52 "SELECT tp.*, tf.* FROM ".$db_prefix."posts tp 53 53 INNER JOIN ".$db_prefix."threads th USING(thread_id) 54 INNER JOIN ".$db_prefix."forums tf USING(forum_id)54 INNER JOIN ".$db_prefix."forums tf ON tp.forum_id = tf.forum_id 55 55 WHERE ".($thread_limit==0?"":" th.thread_lastpost > ".$thread_limit." AND ").groupaccess('forum_access').($forum_id ? " AND tp.forum_id = '$forum_id'" : "")." 56 56 ORDER BY post_datestamp DESC -
trunk/includes/class.httpdownload.php
r863 r1853 238 238 **/ 239 239 function _header($var) { 240 if ($this->handler['header']) return @call_user_func($this->handler['header'],$var); 241 else return header($var); 240 if ($this->handler['header']) $ret = @call_user_func($this->handler['header'],$var); 241 else $ret = header($var); 242 return $ret; 242 243 } 243 244 244 245 function &_fopen($file,$mode) { 245 if ($this->handler['fopen']) return @call_user_func($this->handler['fopen'],$file,$mode); 246 else return fopen($file,$mode); 246 if ($this->handler['fopen']) $ret = @call_user_func($this->handler['fopen'],$file,$mode); 247 else $ret = fopen($file,$mode); 248 return $ret; 247 249 } 248 250 249 251 function _fclose($res) { 250 if ($this->handler['fclose']) return @call_user_func($this->handler['fclose'],$res); 251 else return fclose($res); 252 if ($this->handler['fclose']) $ret = @call_user_func($this->handler['fclose'],$res); 253 else $ret = fclose($res); 254 return $ret; 252 255 } 253 256 254 257 function _fseek($res,$len) { 255 if ($this->handler['fseek']) return @call_user_func($this->handler['fseek'],$res,$len); 256 else return fseek($res,$len); 258 if ($this->handler['fseek']) $ret = @call_user_func($this->handler['fseek'],$res,$len); 259 else $ret = fseek($res,$len); 260 return $ret; 257 261 } 258 262 259 263 function &_fread($file,$size) { 260 if ($this->handler['fread']) return @call_user_func($this->handler['fread'],$file,$size); 261 else return fread($file,$size); 264 if ($this->handler['fread']) $ret = @call_user_func($this->handler['fread'],$file,$size); 265 else $ret = fread($file,$size); 266 return $ret; 262 267 } 263 268 264 269 function _auth() { 265 270 if (!isset($_SERVER['PHP_AUTH_USER'])) return false; 266 if ($this->handler['auth']) return @call_user_func($this->handler['auth'],$_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']); 267 else return true; //you must use a handler 271 if ($this->handler['auth']) $ret = @call_user_func($this->handler['auth'],$_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']); 272 else $ret = true; //you must use a handler 273 return $ret; 268 274 } 269 275 -
trunk/includes/jscripts/hoteditor-4.2/editor.js
r1802 r1853 61 61 var show_mode_editor = "1"; 62 62 var show_arrow_up_down = 1; 63 var mydirection = "ltr";64 63 var vk_main = ""; 64 65 // Text direction can be set by the template 66 if (mydirection == null) var mydirection = "ltr"; 65 67 66 68 // Path definitions … … 2275 2277 a = a.replace(/\[url\](.*?)\[\/url\]/gi, "<a href=\"$1\">$1[/url]"); 2276 2278 a = a.replace(/\[\/url\]/gi, "</a>"); 2279 a = a.replace(/<a href="(.*?)"><\/a>/gi, "<a href=\"$1\">$1</a>"); 2277 2280 a = a.replace(/\[img\](.*?)\[\/img\]/gi, "<img src=\"$1\">"); 2278 2281 var b = a.match(/\[(list|list=1|list=a)\]/gi); … … 2482 2485 o = p[0]; 2483 2486 if (k.style) { 2484 if (n[1] == o) { 2485 m = "[url]" + AnalyzeHTMLBlock(g, k); 2487 m = "[url=" + o + "]"; 2488 var q = AnalyzeHTMLBlock(g, k); 2489 if (q == "") { 2490 m = m + o; 2486 2491 } else { 2487 m = "[url=" + o + "]" + AnalyzeHTMLBlock(g, k);2492 m = m + q; 2488 2493 } 2489 2494 } else { 2490 if (n[1] == o) { 2491 m = "[url]"; 2495 if (o.indexOf("mailto:") != -1) { 2496 var q = o.replace(/mailto:/i, ""); 2497 if (q == n[1]) { 2498 m = "[mail]"; 2499 } else { 2500 m = "[mail=" + q + "]"; 2501 } 2492 2502 } else { 2493 if (o.indexOf("mailto:") != -1) { 2494 var q = o.replace(/mailto:/i, ""); 2495 if (q == n[1]) { 2496 m = "[mail]"; 2497 } else { 2498 m = "[mail=" + q + "]"; 2499 } 2500 } else { 2501 m = "[url=" + o + "]"; 2502 } 2503 m = "[url=" + o + "]"; 2503 2504 } 2504 2505 } -
trunk/includes/sendmail_include.php
r1799 r1853 69 69 $mail->ClearAllRecipients(); 70 70 $mail->ClearReplyTos(); 71 return "";71 return false; 72 72 } 73 73 -
trunk/includes/session_functions.php
r1802 r1853 36 36 // to stay in the same session when uploading file(s) 37 37 // (session hijacking is mitigated by the session_ua function) 38 if (isset($_POST['SWFSESSIONID']) && !empty($_POST['SWFSESSIONID'])) {39 $_COOKIE['site_visited'] = $_POST['SWFSESSIONID'];40 }41 38 if (isset($_POST[$settings['session_name']]) && !empty($_POST[$settings['session_name']])) { 42 39 session_id($_POST[$settings['session_name']]); … … 207 204 208 205 $session_ua = ""; 209 // $session_ua .= isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ""; 210 $session_ua .= isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ""; 211 $session_ua .= isset($_SERVER['HTTP_VIA']) ? $_SERVER['HTTP_VIA'] : ""; 212 $session_ua .= isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : ""; 206 207 // when called from SWFUpload, set the session cookies from the post variable 208 // to stay in the same session when uploading file(s) 209 // (session hijacking is mitigated by the session_ua function) 210 if (isset($_POST['SWFSESSIONID']) && !empty($_POST['SWFSESSIONID']) && strlen($_POST['SWFSESSIONID'])==32) { 211 return $_POST['SWFSESSIONID']; 212 } 213 $session_ua .= isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ""; 214 // $session_ua .= isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ""; 213 215 $session_ua .= isset($_COOKIE['site_visited']) ? $_COOKIE['site_visited'] : ""; 214 216 -
trunk/includes/templates/main.albums.galleryedit.tpl
r1802 r1853 82 82 <option value='-1'{if $gallery.gallery_read == -1} selected='selected'{/if}>{$locale.496}</option> 83 83 {section name=id loop=$all_user_groups} 84 <option value='{$all_user_groups[id].0}'{if $ user_groups[id].0 == $gallery.gallery_read} selected='selected'{/if}>{$all_user_groups[id].1}</option>84 <option value='{$all_user_groups[id].0}'{if $all_user_groups[id].0 == $gallery.gallery_read} selected='selected'{/if}>{$all_user_groups[id].1}</option> 85 85 {/section} 86 86 </select> -
trunk/includes/templates/main.blogs.tpl
r1821 r1853 156 156 <tr> 157 157 <td style='width:100%;vertical-align:top;'> 158 {if $blog_id|default:0 == 0} 159 {assign var="rl" value=" <a href='blogs.php?blog_id="|cat:$bloglist[id].blog_id|cat:"'>...</a>"} 160 {$bloglist[id].blog_text|truncate:500:$rl}<br /> 158 {if $blog_id|default:0 != 0} 159 {$bloglist[id].blog_text} 161 160 {else} 162 {$bloglist[id].blog_text}<br /> 161 {$bloglist[id].blog_intro} 162 {if $bloglist[id].read_more} <a href='blogs.php?blog_id={$bloglist[id].blog_id} alt='{$locale.422}' title='{$locale.422}''>...</a>{/if} 163 163 {/if} 164 164 </td> … … 170 170 {$bloglist[id].user_name}{if $smarty.const.iMEMBER}</a>{/if} 171 171 {$locale.421} {$bloglist[id].blog_datestamp|date_format:"longdate"} 172 {if !$blog_id}· <a href='blogs.php?blog_id={$bloglist[id].blog_id}'>{$locale.422}</a>{/if}172 {if $bloglist[id].read_more && $blog_id|default:0 == 0}· <a href='blogs.php?blog_id={$bloglist[id].blog_id}'>{$locale.422}</a>{/if} 173 173 <img src='{$smarty.const.THEME}images/bulletb.gif' alt='' /> 174 174 <br /> -
trunk/includes/templates/main.pm.post.tpl
r1802 r1853 239 239 <input type='submit' name='send_message' value='{$locale.430}' class='button' onclick="return ValidateForm()" /> 240 240 {else} 241 <input type='submit' name='send_preview' value='{$locale.429}' class='button' onclick= "javascript:get_hoteditor_data("message");return ValidateForm()"/>242 <input type='submit' name='send_message' value='{$locale.430}' class='button' onclick= "javascript:get_hoteditor_data("message");return ValidateForm()"/>241 <input type='submit' name='send_preview' value='{$locale.429}' class='button' onclick='javascript:get_hoteditor_data("message");return ValidateForm()' /> 242 <input type='submit' name='send_message' value='{$locale.430}' class='button' onclick='javascript:get_hoteditor_data("message");return ValidateForm()' /> 243 243 {/if} 244 244 </td> -
trunk/modules/main_menu_panel/module_installer.php
r1250 r1853 36 36 37 37 // check for a minumum version of the ExiteCMS engine 38 if (str_replace(".", "", $settings['version']) < 7 00) {39 $mod_errors .= sprintf($locale['mod001'], '7. 00');38 if (str_replace(".", "", $settings['version']) < 720) { 39 $mod_errors .= sprintf($locale['mod001'], '7.20'); 40 40 } 41 41 // check for a maximum version of the ExiteCMS engine 42 if (str_replace(".", "", $settings['version']) > 7 10) {43 $mod_errors .= sprintf($locale['mod002'], '7. 10');42 if (str_replace(".", "", $settings['version']) > 720) { 43 $mod_errors .= sprintf($locale['mod002'], '7.20'); 44 44 } 45 45 // check for a specific revision number range that is supported -
trunk/modules/user_info_panel/module_installer.php
r1250 r1853 36 36 37 37 // check for a minumum version of the ExiteCMS engine 38 if (str_replace(".", "", $settings['version']) < 7 00) {39 $mod_errors .= sprintf($locale['mod001'], '7. 00');38 if (str_replace(".", "", $settings['version']) < 720) { 39 $mod_errors .= sprintf($locale['mod001'], '7.20'); 40 40 } 41 41 // check for a maximum version of the ExiteCMS engine 42 if (str_replace(".", "", $settings['version']) > 7 10) {43 $mod_errors .= sprintf($locale['mod002'], '7. 10');42 if (str_replace(".", "", $settings['version']) > 720) { 43 $mod_errors .= sprintf($locale['mod002'], '7.20'); 44 44 } 45 45 // check for a specific revision number range that is supported -
trunk/modules/welcome_message_panel/module_installer.php
r1250 r1853 36 36 37 37 // check for a minumum version of the ExiteCMS engine 38 if (str_replace(".", "", $settings['version']) < 7 00) {39 $mod_errors .= sprintf($locale['mod001'], '7. 00');38 if (str_replace(".", "", $settings['version']) < 720) { 39 $mod_errors .= sprintf($locale['mod001'], '7.20'); 40 40 } 41 41 // check for a maximum version of the ExiteCMS engine 42 if (str_replace(".", "", $settings['version']) > 7 10) {43 $mod_errors .= sprintf($locale['mod002'], '7. 10');42 if (str_replace(".", "", $settings['version']) > 720) { 43 $mod_errors .= sprintf($locale['mod002'], '7.20'); 44 44 } 45 45 // check for a specific revision number range that is supported -
trunk/setuser.php
r1776 r1853 19 19 20 20 // set the redirect url (set in theme_cleanup), butnot when in maintenance! 21 if ( eregi("maintenance.php", $_SERVER['HTTP_REFERER'])) {21 if (isset($_SERVER['HTTP_REFERER']) && eregi("maintenance.php", $_SERVER['HTTP_REFERER'])) { 22 22 $variables['url'] = BASEDIR."index.php"; 23 23 } elseif (isset($_SESSION['last_url'])) { … … 95 95 $message['line2'] = "<b>".$locale['196']."</b>"; 96 96 } 97 } else { 98 $message['line2'] = "<b>SESSION ERROR. Please report this to the Webmaster</b>"; 97 99 } 98 100 }
Note: See TracChangeset
for help on using the changeset viewer.
