Changeset 189
- Timestamp:
- 06/18/06 12:02:50 (2 years ago)
- Files:
-
- trunk/public_html/post.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/public_html/post.php
r149 r189 79 79 80 80 if (!$bm_users->is_logged_in()) { 81 $bm_home = $ _GET['page'];81 $bm_home = $bm_page; 82 82 $login_url = 'login.php?from=post'; 83 83 $action = ''; … … 96 96 } 97 97 98 if (empty($_POST) || empty($_POST['step'])) 98 $step = intval($_POST['step']); 99 if (empty($_POST) || $step == 0) 99 100 { 100 101 $step = 1; 101 if (!empty($_GET['url'])) { 102 $smarty->assign('url', $_GET['url']); 102 $url = $_GET['url']; 103 if (!empty($url)) 104 { 105 $smarty->assign('url', $url); 103 106 } 104 107 else { … … 121 124 122 125 $bm_errors = 0; 126 $step = $_POST['step']; 123 127 $memes = new memes($bm_db, $bm_user, $bm_promo_level); 124 128 if ($_POST['step'] == 1) { … … 129 133 $url = ''; 130 134 } 131 $smarty->assign('content_type', $_POST['content_type']); 135 $content_type = $_POST['content_type']; 136 $smarty->assign('content_type', $content_type); 132 137 if (empty($title)) { 133 138 $smarty->assign('error_title', true); … … 140 145 if (!empty($url)) { 141 146 $smarty->assign('url', check_plain($url)); 142 if (!check_url($url)) { 147 if (check_url($url) == 0) { 148 echo "bad url = $url"; 143 149 $smarty->assign('error_url', true); 144 150 $bm_errors++; … … 189 195 $smarty->assign('meme_tags', check_plain($meme_tags)); 190 196 $smarty->assign('favicon', $favicon); 191 $smarty->assign('micro_content', get_youtube($url)); 197 $smarty->assign('gravatar', get_gravatar($bm_url, $bm_users->get_user_email(), 16)); 198 $video = get_youtube($url); 199 $smarty->assign('micro_content', $video); 200 if (empty($video)) 201 $smarty->assign('page_image', 'http://img.simpleapi.net/small/'.$url); 192 202 $smarty->assign('debates', $_POST['debates']); 193 203 if ($bm_errors == 0) { … … 222 232 $smarty->assign('meme_tags', check_plain($meme_tags)); 223 233 $smarty->assign('cats', $bm_options); 224 $smarty->assign('micro_content', get_youtube($url)); 234 $smarty->assign('gravatar', get_gravatar($bm_url, $bm_users->get_user_email(), 16)); 235 $video = get_youtube($url); 236 $smarty->assign('micro_content', $video); 237 if (empty($video)) 238 $smarty->assign('page_image', 'http://img.simpleapi.net/small/'.$url); 225 239 $smarty->assign('favicon', $favicon); 226 240 } … … 229 243 $_POST['user_id'] = $bm_users->get_user_id(); 230 244 $memes->add_meme($_POST); 245 $smarty->clear_all_cache(); 231 246 $title = $_POST['title']; 232 247 $url = $_POST['url'];
