Changeset 291
- Timestamp:
- 01/14/05 09:38:16 (3 years ago)
- Files:
-
- wordpress-mobile-edition/trunk/wp-mobile.php (modified) (7 diffs)
- wordpress-mobile-edition/trunk/wp-mobile.plugin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wordpress-mobile-edition/trunk/wp-mobile.php
r287 r291 19 19 20 20 function next_post_m($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') { 21 global $tableposts, $p, $posts, $id, $post, $ siteurl, $blogfilename, $wpdb;21 global $tableposts, $p, $posts, $id, $post, $blogfilename, $wpdb; 22 22 global $time_difference, $single; 23 23 global $querystring_start, $querystring_equal, $querystring_separator; … … 56 56 ); 57 57 if ($nextpost) { 58 $string = '<a href="'.$ PHPSELF.'?p='.$nextpost->ID.'&more=1">'.$next;58 $string = '<a href="'.$_SERVER['PHP_SELF'].'?p='.$nextpost->ID.'&more=1">'.$next; 59 59 if ($title=='yes') { 60 60 $string .= wptexturize(stripslashes($nextpost->post_title)); … … 68 68 69 69 function previous_post_m($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') { 70 global $tableposts, $id, $post, $ siteurl, $blogfilename, $wpdb;70 global $tableposts, $id, $post, $blogfilename, $wpdb; 71 71 global $p, $posts, $posts_per_page, $s, $single; 72 72 global $querystring_start, $querystring_equal, $querystring_separator; … … 102 102 ); 103 103 if ($lastpost) { 104 $string = '<a href="'.$ PHPSELF.'?p='.$lastpost->ID.'&more=1">'.$previous;104 $string = '<a href="'.$_SERVER['PHP_SELF'].'?p='.$lastpost->ID.'&more=1">'.$previous; 105 105 if ($title == 'yes') { 106 106 $string .= wptexturize(stripslashes($lastpost->post_title)); … … 123 123 124 124 $main_blogfilename = get_settings('blogfilename'); 125 if (strrpos($ HTTP_SERVER_VARS["PHP_SELF"], "/") != false) {126 $blogfilename = substr($ HTTP_SERVER_VARS["PHP_SELF"], strrpos($HTTP_SERVER_VARS["PHP_SELF"], "/") + 1);125 if (strrpos($_SERVER['PHP_SELF'], "/") != false) { 126 $blogfilename = substr($_SERVER['PHP_SELF'], strrpos($HTTP_SERVER_VARS["PHP_SELF"], "/") + 1); 127 127 } 128 128 else { … … 172 172 $arc_year = $arc_row['YEAR(post_date)']; 173 173 $arc_month = $arc_row['MONTH(post_date)']; 174 echo '<li><a href="'.$ HTTP_SERVER_VARS["PHP_SELF"].'?view=month&y='.$arc_year.'&m='.$arc_month.'">';174 echo '<li><a href="'.$_SERVER['PHP_SELF'].'?view=month&y='.$arc_year.'&m='.$arc_month.'">'; 175 175 echo $month[zeroise($arc_month,2)].' '.$arc_year; 176 176 echo '</a></li>'."\n"; … … 202 202 ); 203 203 while ($post = mysql_fetch_array($month)) { 204 echo '<li><a href="'.$ HTTP_SERVER_VARS["PHP_SELF"].'?p='.$post["ID"].'&more=1">'204 echo '<li><a href="'.$_SERVER['PHP_SELF'].'?p='.$post["ID"].'&more=1">' 205 205 .stripslashes($post["post_title"]) 206 206 .'</a> ('.substr($post["post_date"],5,5).")\n"; wordpress-mobile-edition/trunk/wp-mobile.plugin.php
r221 r291 21 21 */ 22 22 23 $small_browsers = array("Elaine/3.0" 24 ,"Palm" 25 ,"EudoraWeb" 26 ,"Blazer" 27 ,"AvantGo" 28 ,"Windows CE" 29 ,"Cellphone" 30 ,"Small" 31 ,"MMEF20" 32 ,"Danger" 33 ,"hiptop" 34 ,"Proxinet" 35 ,"Newt" 36 ,"PalmOS" 37 ,"NetFront" 38 ,"SHARP-TQ-GX10" 39 ,"SonyEricsson" 40 ,"SymbianOS" 41 ,"UP.Browser" 42 ,"TS21i-10" 43 ,"BlackBerry" 23 $small_browsers = array('Elaine/3.0' 24 ,'Palm' 25 ,'EudoraWeb' 26 ,'Blazer' 27 ,'AvantGo' 28 ,'Windows CE' 29 ,'Cellphone' 30 ,'Small' 31 ,'MMEF20' 32 ,'Danger' 33 ,'hiptop' 34 ,'Proxinet' 35 ,'Newt' 36 ,'PalmOS' 37 ,'NetFront' 38 ,'SHARP-TQ-GX10' 39 ,'SonyEricsson' 40 ,'SymbianOS' 41 ,'UP.Browser' 42 ,'TS21i-10' 43 ,'BlackBerry' 44 ,'portalmmm' 44 45 ); 45 46 46 47 foreach ($small_browsers as $browser) { 47 48 if (strstr($_SERVER["HTTP_USER_AGENT"], $browser) && !strstr($_SERVER['REQUEST_URI'], 'wp-mobile.php')) { 48 global $siteurl; 49 $URL = $siteurl.'/wp-mobile.php?'; 49 $URL = get_settings('siteurl').'/wp-mobile.php?'; 50 50 if (isset($p)) { 51 51 $URL .= 'p='.$p.'&';
