Changeset 280
- Timestamp:
- 07/30/2003 02:44:57 PM (23 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 1 added
- 1 deleted
- 5 edited
-
help/en/linkcategories.php.help.html (added)
-
help/en/linkcategories.php.htlp.html (deleted)
-
linkcategories.php (modified) (6 diffs)
-
linkmanager.php (modified) (18 diffs)
-
upgrade-071-to-072.php (modified) (2 diffs)
-
wp-install-helper.php (modified) (2 diffs)
-
wp-install.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/linkcategories.php
r254 r280 57 57 if ($user_level < $minadminlevel) 58 58 die ("Cheatin' uh ?"); 59 59 60 60 $cat_name=addslashes($HTTP_POST_VARS["cat_name"]); 61 61 $auto_toggle = $HTTP_POST_VARS["auto_toggle"]; … … 64 64 } 65 65 66 $wpdb->query("INSERT INTO $tablelinkcategories (cat_id,cat_name, auto_toggle) VALUES ('0', '$cat_name', '$auto_toggle')"); 66 $show_images = $HTTP_POST_VARS["show_images"]; 67 if ($show_images != 'Y') { 68 $show_images = 'N'; 69 } 67 70 71 $show_description = $HTTP_POST_VARS["show_description"]; 72 if ($show_description != 'Y') { 73 $show_description = 'N'; 74 } 75 76 $show_rating = $HTTP_POST_VARS["show_rating"]; 77 if ($show_rating != 'Y') { 78 $show_rating = 'N'; 79 } 80 81 $show_updated = $HTTP_POST_VARS["show_updated"]; 82 if ($show_updated != 'Y') { 83 $show_updated = 'N'; 84 } 85 86 $sort_order = $HTTP_POST_VARS["sort_order"]; 87 88 $sort_desc = $HTTP_POST_VARS["sort_desc"]; 89 if ($sort_desc != 'Y') { 90 $sort_desc = 'N'; 91 } 92 $text_before_link = addslashes($HTTP_POST_VARS["text_before_link"]); 93 $text_after_link = addslashes($HTTP_POST_VARS["text_after_link"]); 94 $text_after_all = addslashes($HTTP_POST_VARS["text_after_all"]); 95 96 $list_limit = $HTTP_POST_VARS["list_limit"]; 97 if ($list_limit == '') 98 $list_limit = -1; 99 100 $wpdb->query("INSERT INTO $tablelinkcategories (cat_id, cat_name, auto_toggle, show_images, show_description, \n" . 101 " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, text_after_all, list_limit) \n" . 102 " VALUES ('0', '$cat_name', '$auto_toggle', '$show_images', '$show_description', \n" . 103 " '$show_rating', '$show_updated', '$sort_order', '$sort_desc', '$text_before_link', '$text_after_link', \n" . 104 " '$text_after_all', $list_limit)"); 105 68 106 header("Location: linkcategories.php"); 69 107 break; … … 83 121 if ($user_level < $minadminlevel) 84 122 die ("Cheatin' uh ?"); 85 123 86 124 $wpdb->query("DELETE FROM $tablelinkcategories WHERE cat_id='$cat_id'"); 87 125 $wpdb->query("UPDATE $tablelinks SET link_category=1 WHERE link_category='$cat_id'"); … … 94 132 include_once ("./b2header.php"); 95 133 $cat_id = $HTTP_POST_VARS["cat_id"]; 96 $cat_name=get_linkcatname($cat_id); 97 $cat_name=addslashes($cat_name); 98 $auto_toggle=get_autotoggle($cat_id); 134 $row = $wpdb->get_row("SELECT cat_id, cat_name, auto_toggle, show_images, show_description, " 135 . " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, " 136 . " text_after_all, list_limit FROM $tablelinkcategories WHERE cat_id=$cat_id"); 137 if ($row) { 138 if ($row->list_limit == -1) { 139 $row->list_limit = ''; 140 } 99 141 ?> 100 142 <div class="wrap"> 101 <p> <b>Old</b> name: <?php echo $cat_name ?></p>143 <p>Edit Link Category '<b><?php echo $row->cat_name?></b>'</p> 102 144 <p> 103 145 <form name="editcat" method="post"> 104 <b>New</b> name:<br />105 146 <input type="hidden" name="action" value="editedcat" /> 106 <input type="hidden" name="cat_id" value="<?php echo $HTTP_POST_VARS["cat_id"] ?>" /> 107 <input type="text" name="cat_name" value="<?php echo $cat_name ?>" /><br /> 108 <input type="checkbox" name="auto_toggle" value="Y" <?php echo $auto_toggle == 'Y' ? '"checked"' : ''; ?>/> auto-toggle?<br /> 109 <input type="submit" name="submit" value="Edit it !" class="search" /> 147 <input type="hidden" name="cat_id" value="<?php echo $row->cat_id ?>" /> 148 <table border="0"> 149 <tr> 150 <td align="right">Name:</td> 151 <td><input type="text" name="cat_name" size="25" value="<?php echo stripslashes($row->cat_name)?>" /> 152 <input type="checkbox" name="auto_toggle" <?php echo ($row->auto_toggle == 'Y') ? 'checked' : '';?> value="Y" /> auto-toggle?</td> 153 </tr> 154 <tr> 155 <td align="right"><b>Show:</b></td> 156 <td> 157 <input type="checkbox" name="show_images" <?php echo ($row->show_images == 'Y') ? 'checked' : '';?> value="Y" /> images 158 <input type="checkbox" name="show_description" <?php echo ($row->show_description == 'Y') ? 'checked' : '';?> value="Y" /> description 159 <input type="checkbox" name="show_rating" <?php echo ($row->show_rating == 'Y') ? 'checked' : '';?> value="Y" /> rating 160 <input type="checkbox" name="show_updated" <?php echo ($row->show_updated == 'Y') ? 'checked' : '';?> value="Y" /> updated 161 </td> 162 </tr> 163 <tr> 164 <td align="right">Sort order:</td> 165 <td> 166 <select name="sort_order" size="1"> 167 <option value="name" <?php echo ($row->sort_order == 'name') ? 'selected' : ''?>>Name</option> 168 <option value="id" <?php echo ($row->sort_order == 'id') ? 'selected' : ''?>>Id</option> 169 <option value="url" <?php echo ($row->sort_order == 'url') ? 'selected' : ''?>>URL</option> 170 <option value="rating" <?php echo ($row->sort_order == 'rating') ? 'selected' : ''?>>Rating</option> 171 <option value="updated" <?php echo ($row->sort_order == 'updated') ? 'selected' : ''?>>Updated</option> 172 <option value="rand" <?php echo ($row->sort_order == 'rand') ? 'selected' : ''?>>Random</option> 173 </select> 174 <input type="checkbox" name="sort_desc" <?php echo ($row->sort_desc == 'Y') ? 'checked' : '';?> value="Y" /> Descending?<br /> 175 </td> 176 </tr> 177 <tr> 178 <td align="center"><b>Text/HTML</b></td> 179 <td> </td> 180 </tr> 181 <tr> 182 <td align="right">before:</td> 183 <td><input type="text" name="text_before_link" size="45" value="<?php echo stripslashes($row->text_before_link)?>" /></td> 184 </tr> 185 <tr> 186 <td align="right">between:</td> 187 <td><input type="text" name="text_after_link" size="45" value="<?php echo stripslashes($row->text_after_link)?>" /></td> 188 </tr> 189 <tr> 190 <td align="right">after:</td> 191 <td><input type="text" name="text_after_all" size="45" value="<?php echo stripslashes($row->text_after_all)?>" /></td> 192 </tr> 193 <tr> 194 <td align="right">limit:</td> 195 <td><input type="text" name="list_limit" size="5" value="<?php echo $row->list_limit?>"/> (leave empty for no limit)</td> 196 </tr> 197 <tr> 198 <td align="center" colspan="2"> 199 <input type="submit" name="submit" value="Save" class="search" /> 200 <input type="submit" name="submit" value="Cancel" class="search"> 201 </td> 202 </tr> 203 </table> 110 204 </form> 111 205 </p> 112 206 </div> 113 207 <?php 208 } // end if row 114 209 break; 115 210 } // end Edit … … 121 216 if ($user_level < $minadminlevel) 122 217 die ("Cheatin' uh ?"); 218 219 if (isset($submit) && ($submit == "Save")) { 220 221 $cat_id=$HTTP_POST_VARS["cat_id"]; 123 222 124 223 $cat_name=addslashes($HTTP_POST_VARS["cat_name"]); 125 $cat_id=$HTTP_POST_VARS["cat_id"]; 126 $auto_toggle=$HTTP_POST_VARS["auto_toggle"]; 127 128 $wpdb->query("UPDATE $tablelinkcategories SET cat_name='$cat_name', auto_toggle='$auto_toggle' WHERE cat_id=$cat_id"); 224 $auto_toggle = $HTTP_POST_VARS["auto_toggle"]; 225 if ($auto_toggle != 'Y') { 226 $auto_toggle = 'N'; 227 } 228 229 $show_images = $HTTP_POST_VARS["show_images"]; 230 if ($show_images != 'Y') { 231 $show_images = 'N'; 232 } 233 234 $show_description = $HTTP_POST_VARS["show_description"]; 235 if ($show_description != 'Y') { 236 $show_description = 'N'; 237 } 238 239 $show_rating = $HTTP_POST_VARS["show_rating"]; 240 if ($show_rating != 'Y') { 241 $show_rating = 'N'; 242 } 243 244 $show_updated = $HTTP_POST_VARS["show_updated"]; 245 if ($show_updated != 'Y') { 246 $show_updated = 'N'; 247 } 248 249 $sort_order = $HTTP_POST_VARS["sort_order"]; 250 251 $sort_desc = $HTTP_POST_VARS["sort_desc"]; 252 if ($sort_desc != 'Y') { 253 $sort_desc = 'N'; 254 } 255 $text_before_link = addslashes($HTTP_POST_VARS["text_before_link"]); 256 $text_after_link = addslashes($HTTP_POST_VARS["text_after_link"]); 257 $text_after_all = addslashes($HTTP_POST_VARS["text_after_all"]); 258 259 $list_limit = $HTTP_POST_VARS["list_limit"]; 260 if ($list_limit == '') 261 $list_limit = -1; 262 263 $wpdb->query("UPDATE $tablelinkcategories set 264 cat_name='$cat_name', 265 auto_toggle='$auto_toggle', 266 show_images='$show_images', 267 show_description='$show_description', 268 show_rating='$show_rating', 269 show_updated='$show_updated', 270 sort_order='$sort_order', 271 sort_desc='$sort_desc', 272 text_before_link='$text_before_link', 273 text_after_link='$text_after_link', 274 text_after_all='$text_after_all', 275 list_limit=$list_limit 276 WHERE cat_id=$cat_id 277 "); 278 } // end if save 279 129 280 130 281 header("Location: linkcategories.php"); 131 282 break; 132 } // end edit 283 } // end editcat 133 284 default: 134 285 { … … 141 292 <div class="wrap"> 142 293 <table width="" cellpadding="5" cellspacing="0" border="0"> 143 <tr><td><b>Link Categories:</b></td></tr>144 294 <tr> 145 295 <td> 146 296 <form name="cats" method="post"> 147 297 <b>Edit</b> a link category:<br /> 298 <table width="" cellpadding="5" cellspacing="0" border="0"> 299 <tr style="background-color: #ddd;"> 300 <th rowspan="2" valign="bottom" style="border-bottom: 1px dotted #9C9A9C;" >Id</th> 301 <th rowspan="2" valign="bottom" style="border-bottom: 1px dotted #9C9A9C;" >Name</th> 302 <th rowspan="2" valign="bottom" style="border-bottom: 1px dotted #9C9A9C;" >Auto<br />Toggle?</th> 303 <th colspan="4" valign="bottom" style="border-left: 1px dotted #9C9A9C; border-right: 1px dotted #9C9A9C;">Show</th> 304 <th rowspan="2" valign="bottom" style="border-bottom: 1px dotted #9C9A9C;" >Sort Order</th> 305 <th rowspan="2" valign="bottom" style="border-bottom: 1px dotted #9C9A9C;" >Desc?</th> 306 <th colspan="3" valign="bottom" style="border-left: 1px dotted #9C9A9C; border-right: 1px dotted #9C9A9C;">Text/HTML</th> 307 <th rowspan="2" valign="bottom" style="border-bottom: 1px dotted #9C9A9C;" >Limit</th> 308 <th rowspan="2" colspan="2" style="border-bottom: 1px dotted #9C9A9C;" > </th> 309 </tr> 310 <tr style="background-color: #ddd;"> 311 <th valign="top" style="border-bottom: 1px dotted #9C9A9C; border-left: 1px dotted #9C9A9C;" >images?</th> 312 <th valign="top" style="border-bottom: 1px dotted #9C9A9C;" >desc?</th> 313 <th valign="top" style="border-bottom: 1px dotted #9C9A9C;" >rating?</th> 314 <th valign="top" style="border-bottom: 1px dotted #9C9A9C; border-right: 1px dotted #9C9A9C;" >updated?</th> 315 <th valign="top" style="border-bottom: 1px dotted #9C9A9C; border-left: 1px dotted #9C9A9C;" >before</th> 316 <th valign="top" style="border-bottom: 1px dotted #9C9A9C;" >between</th> 317 <th valign="top" style="border-bottom: 1px dotted #9C9A9C; border-right: 1px dotted #9C9A9C;" >after</th> 318 </tr> 319 <form name="cats" method="post"> 320 <input type="hidden" name="cat_id" value="" /> 321 <input type="hidden" name="action" value="" /> 148 322 <?php 149 $results = $wpdb->get_results("SELECT cat_id, cat_name, auto_toggle FROM $tablelinkcategories ORDER BY cat_id"); 150 echo " <select name=\"cat_id\">\n"; 323 $results = $wpdb->get_results("SELECT cat_id, cat_name, auto_toggle, show_images, show_description, " 324 . " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, " 325 . " text_after_all, list_limit FROM $tablelinkcategories ORDER BY cat_id"); 151 326 foreach ($results as $row) { 152 echo " <option value=\"".$row->cat_id."\""; 153 if ($row->cat_id == $cat_id) 154 echo ' selected'; 155 echo ">".$row->cat_id.": ".$row->cat_name; 156 if ($row->auto_toggle == 'Y') 157 echo ' (auto toggle)'; 158 echo "</option>\n"; 159 } 160 echo " </select>\n"; 327 if ($row->list_limit == -1) { 328 $row->list_limit = 'none'; 329 } 330 $style = ($i % 2) ? ' class="alternate"' : ''; 161 331 ?> 162 <br /><br /> 163 <input type="submit" name="action" value="Delete" class="search" /> 164 <input type="submit" name="action" value="Edit" class="search" /> 332 <tr valign="middle" <?php echo $style ?>> 333 <td style="border-bottom: 1px dotted #9C9A9C;"><?php echo $row->cat_id?></td> 334 <td style="border-bottom: 1px dotted #9C9A9C;"><?php echo stripslashes($row->cat_name)?></td> 335 <td style="border-bottom: 1px dotted #9C9A9C;"><?php echo $row->auto_toggle?></td> 336 <td style="border-bottom: 1px dotted #9C9A9C;"><?php echo $row->show_images?></td> 337 <td style="border-bottom: 1px dotted #9C9A9C;"><?php echo $row->show_description?></td> 338 <td style="border-bottom: 1px dotted #9C9A9C;"><?php echo $row->show_rating?></td> 339 <td style="border-bottom: 1px dotted #9C9A9C;"><?php echo $row->show_updated?></td> 340 <td style="border-bottom: 1px dotted #9C9A9C;"><?php echo $row->sort_order?></td> 341 <td style="border-bottom: 1px dotted #9C9A9C;"><?php echo $row->sort_desc?></td> 342 <td style="border-bottom: 1px dotted #9C9A9C;" nowrap><?php echo htmlentities($row->text_before_link)?> </td> 343 <td style="border-bottom: 1px dotted #9C9A9C;" nowrap><?php echo htmlentities($row->text_after_link)?> </td> 344 <td style="border-bottom: 1px dotted #9C9A9C;" nowrap><?php echo htmlentities($row->text_after_all)?></td> 345 <td style="border-bottom: 1px dotted #9C9A9C;"><?php echo $row->list_limit?></td> 346 <td style="border-bottom: 1px dotted #9C9A9C;"><input type="submit" name="edit" onclick="forms['cats'].cat_id.value='<?php echo $row->cat_id?>'; forms['cats'].action.value='Edit'; " value="Edit" class="search" /></td> 347 <td style="border-bottom: 1px dotted #9C9A9C;"><input type="submit" name="delete" onclick="forms['cats'].cat_id.value='<?php echo $row->cat_id?>'; forms['cats'].action.value='Delete'; return confirm('You are about to delete this category.\\n \'Cancel\' to stop, \'OK\' to delete.'); " value="Delete" class="search" /></td> 348 </tr> 349 <?php 350 ++$i; 351 } 352 ?> 353 </table> 354 355 </table> 165 356 </form> 166 </td> 357 </div> 358 359 <div class="wrap"> 360 <form name="addcat" method="post"> 361 <input type="hidden" name="action" value="addcat" /> 362 <table border="0"> 363 <tr> 364 <th>Add a Link Category:</th> 365 </tr> 366 <tr> 367 <td align="right">Name:</td> 368 <td><input type="text" name="cat_name" size="25" /> 369 <input type="checkbox" name="auto_toggle" value="Y" /> auto-toggle?</td> 370 </tr> 371 <tr> 372 <td align="right">Show:</td> 167 373 <td> 168 <?php echo $blankline ?> 169 </td> 170 <td> 171 <b>Add</b> a link category:<br /> 172 <form name="addcat" method="post"> 173 <input type="hidden" name="action" value="addcat" /> 174 <input type="text" name="cat_name" /> <input type="checkbox" name="auto_toggle" value="Y" /> auto-toggle?<br /><br /> 175 <input type="submit" name="submit" value="Add it !" class="search" /> 176 </form> 177 </td> 178 </tr> 374 <input type="checkbox" name="show_images" value="Y" /> images 375 <input type="checkbox" name="show_description" value="Y" /> description 376 <input type="checkbox" name="show_rating" value="Y" /> rating 377 <input type="checkbox" name="show_updated" value="Y" /> updated</td> 378 </tr> 379 <tr> 380 <td align="right">Sort order:</td> 381 <td><select name="sort_order" size="1"> 382 <option value="name">Name</option> 383 <option value="id">Id</option> 384 <option value="url">URL</option> 385 <option value="rating">Rating</option> 386 <option value="updated">Updated</option> 387 <option value="rand">Random</option> 388 </select> 389 <input type="checkbox" name="sort_desc" value="N" /> Descending?<br /></td> 390 </tr> 391 <tr> 392 <td align="center">Text/HTML</td> 393 <td> </td> 394 </tr> 395 <tr> 396 <td align="right">before:</td> 397 <td><input type="text" name="text_before_link" size="45" value="<li>"/></td> 398 </tr> 399 <tr> 400 <td align="right">between:</td> 401 <td><input type="text" name="text_after_link" size="45" value="<br />" /></td> 402 </tr> 403 <tr> 404 <td align="right">after:</td> 405 <td><input type="text" name="text_after_all" size="45" value="</li>"/></td> 406 </tr> 407 <tr> 408 <td align="right">limit:</td> 409 <td><input type="text" name="list_limit" size="5" value=""/> (leave empty for no limit)</td> 410 </tr> 411 <tr> 412 <td align="center" colspan="2"><input type="submit" name="submit" value="Add Category!" class="search" /></td> 413 </tr> 414 </form> 179 415 </table> 180 416 -
trunk/wp-admin/linkmanager.php
r279 r280 32 32 33 33 $title = 'Manage Links'; 34 $this_file = 'linkmanager.php'; 34 35 35 36 function category_dropdown($fieldname, $selected = 0) { 36 37 global $wpdb, $tablelinkcategories; 37 38 38 39 $results = $wpdb->get_results("SELECT cat_id, cat_name, auto_toggle FROM $tablelinkcategories ORDER BY cat_id"); 39 40 echo ' <select name="'.$fieldname.'" size="1">'."\n"; … … 91 92 $action = $action2; 92 93 93 //error_log("action=$action");94 94 switch ($action) { 95 95 case 'Assign': … … 97 97 $standalone = 1; 98 98 include_once('b2header.php'); 99 99 100 100 // check the current user's level first. 101 101 if ($user_level < $minadminlevel) 102 102 die ("Cheatin' uh ?"); 103 103 104 104 //for each link id (in $linkcheck[]): if the current user level >= the 105 105 //userlevel of the owner of the link then we can proceed. 106 106 107 107 if (count($linkcheck) == 0) { 108 header('Location: linkmanager.php');108 header('Location: '.$this_file); 109 109 exit; 110 110 } … … 121 121 $q = $wpdb->query("update $tablelinks SET link_owner='$newowner' WHERE link_id IN ($all_links)"); 122 122 123 header('Location: linkmanager.php');123 header('Location: '.$this_file); 124 124 break; 125 125 } … … 128 128 $standalone = 1; 129 129 include_once('b2header.php'); 130 130 131 131 // check the current user's level first. 132 132 if ($user_level < $minadminlevel) 133 133 die ("Cheatin' uh ?"); 134 134 135 135 //for each link id (in $linkcheck[]): toggle the visibility 136 136 if (count($linkcheck) == 0) { 137 header('Location: linkmanager.php');137 header('Location: '.$this_file); 138 138 exit; 139 139 } … … 153 153 $q = $wpdb->query("update $tablelinks SET link_visible='N' WHERE link_id IN ($all_linksoff)"); 154 154 } 155 155 156 156 if (count($ids_to_turnon)) { 157 157 $all_linkson = join(',', $ids_to_turnon); … … 159 159 } 160 160 161 header('Location: linkmanager.php');161 header('Location: '.$this_file); 162 162 break; 163 163 } … … 169 169 if ($user_level < $minadminlevel) 170 170 die ("Cheatin' uh ?"); 171 171 172 172 //for each link id (in $linkcheck[]) change category to selected value 173 173 if (count($linkcheck) == 0) { 174 header('Location: linkmanager.php');174 header('Location: '.$this_file); 175 175 exit; 176 176 } … … 179 179 $q = $wpdb->query("update $tablelinks SET link_category='$category' WHERE link_id IN ($all_links)"); 180 180 181 header('Location: linkmanager.php');181 header('Location: '.$this_file); 182 182 break; 183 183 } … … 214 214 . addslashes($link_description) . "', '$link_visible', $user_ID, $link_rating, '" . addslashes($link_rel) . "', '" . addslashes($link_notes) . "')"); 215 215 216 header('Location: linkmanager.php');216 header('Location: '.$this_file); 217 217 break; 218 218 } // end Add … … 264 264 " link_notes='" . addslashes($link_notes) . "'\n" . 265 265 " WHERE link_id=$link_id"); 266 //error_log($sql);267 266 } // end if save 268 267 setcookie('links_show_cat_id', $links_show_cat_id, time()+600); 269 header( "Location: linkmanager.php");268 header('Location: '.$this_file); 270 269 break; 271 270 } // end Save … … 292 291 $links_show_cat_id = $cat_id; 293 292 setcookie("links_show_cat_id", $links_show_cat_id, time()+600); 294 header( "Location: linkmanager.php");293 header('Location: '.$this_file); 295 294 break; 296 295 } // end Delete … … 383 382 <td height="20" align="right">Visible:</td> 384 383 <td><label> 385 <input type="radio" name="visible" checked="checked"value="Y">384 <input type="radio" name="visible" <?php if ($link_visible == 'Y') echo "checked"; ?> value="Y"> 386 385 Yes</label> 387 386 <label> 388 <input type="radio" name="visible" value="N">387 <input type="radio" name="visible" <?php if ($link_visible == 'N') echo "checked"; ?> value="N"> 389 388 No</label> 390 389 </td> … … 466 465 ?> 467 466 <script type="text/javascript"> 468 <!-- 467 <!-- 469 468 function checkAll(form) 470 469 { … … 479 478 } 480 479 //--> 481 </script> 480 </script> 482 481 483 482 <div class="wrap"> … … 564 563 LEFT JOIN $tableusers ON $tableusers.ID = $tablelinks.link_owner "; 565 564 566 //$use_adminlevels = 0;567 568 565 if (isset($cat_id) && ($cat_id != 'All')) { 569 // have we already started the where clause?570 566 $sql .= " WHERE link_category = $cat_id "; 571 567 } … … 602 598 LINKS; 603 599 $show_buttons = 1; // default 604 600 605 601 if ($use_adminlevels && ($link->user_level > $user_level)) { 606 602 $show_buttons = 0; 607 603 } 608 604 609 605 if ($show_buttons) { 610 606 echo <<<LINKS … … 737 733 738 734 <div class="wrap"> 739 <p>You can drag <a href="javascript:void(linkmanpopup=window.open('<?php echo $siteurl; ?>/wp-admin/ linkmanager.php?action=popup&linkurl='+escape(location.href)+'&name='+escape(document.title),'Link Manager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();" title="Link add bookmarklet">link this</a> to your toolbar and when you click it a window will pop up that will allow you to add whatever site you're on to your links! Right now this only works on Mozilla or Netscape, but we're working on it.</p>735 <p>You can drag <a href="javascript:void(linkmanpopup=window.open('<?php echo $siteurl; ?>/wp-admin/<?php echo $this_file ?>?action=popup&linkurl='+escape(location.href)+'&name='+escape(document.title),'Link Manager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();" title="Link add bookmarklet">link this</a> to your toolbar and when you click it a window will pop up that will allow you to add whatever site you're on to your links! Right now this only works on Mozilla or Netscape, but we're working on it.</p> 740 736 </div> 741 737 <?php -
trunk/wp-admin/upgrade-071-to-072.php
r267 r280 82 82 $ddl = "ALTER TABLE $tablelinks ADD COLUMN link_notes MEDIUMTEXT NOT NULL DEFAULT '' "; 83 83 maybe_add_column($tablename, 'link_notes', $ddl); 84 if (check_column($tablelinks, 'link_notes', 'mediumtext')) { 85 $res .= $tablename . ' - ok <br />'; 86 } else { 87 $res .= 'There was a problem with ' . $tablename . '<br />'; 88 ++$error_count; 89 } 84 if (check_column($tablename, 'link_notes', 'mediumtext')) { 85 $res .= $tablename . ' - ok <br />'; 86 } else { 87 $res .= 'There was a problem with ' . $tablename . '<br />'; 88 ++$error_count; 89 } 90 91 $tablename = $tablelinkcategories; 92 $ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN show_images enum('Y','N') NOT NULL default 'Y'"; 93 maybe_add_column($tablename, 'show_images', $ddl); 94 if (check_column($tablename, 'show_images', "enum('Y','N')")) { 95 $res .= $tablename . ' - ok <br />'; 96 } else { 97 $res .= 'There was a problem with ' . $tablename . '<br />'; 98 ++$error_count; 99 } 100 101 $tablename = $tablelinkcategories; 102 $ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN show_description enum('Y','N') NOT NULL default 'Y'"; 103 maybe_add_column($tablename, 'show_description', $ddl); 104 if (check_column($tablename, 'show_description', "enum('Y','N')")) { 105 $res .= $tablename . ' - ok <br />'; 106 } else { 107 $res .= 'There was a problem with ' . $tablename . '<br />'; 108 ++$error_count; 109 } 110 111 $tablename = $tablelinkcategories; 112 $ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN show_rating enum('Y','N') NOT NULL default 'Y'"; 113 maybe_add_column($tablename, 'show_rating', $ddl); 114 if (check_column($tablename, 'show_rating', "enum('Y','N')")) { 115 $res .= $tablename . ' - ok <br />'; 116 } else { 117 $res .= 'There was a problem with ' . $tablename . '<br />'; 118 ++$error_count; 119 } 120 121 $tablename = $tablelinkcategories; 122 $ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN show_updated enum('Y','N') NOT NULL default 'Y'"; 123 maybe_add_column($tablename, 'show_updated', $ddl); 124 if (check_column($tablename, 'show_updated', "enum('Y','N')")) { 125 $res .= $tablename . ' - ok <br />'; 126 } else { 127 $res .= 'There was a problem with ' . $tablename . '<br />'; 128 ++$error_count; 129 } 130 131 $tablename = $tablelinkcategories; 132 $ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN sort_order varchar(64) NOT NULL default 'name'"; 133 maybe_add_column($tablename, 'sort_order', $ddl); 134 if (check_column($tablename, 'sort_order', "varchar(64)")) { 135 $res .= $tablename . ' - ok <br />'; 136 } else { 137 $res .= 'There was a problem with ' . $tablename . '<br />'; 138 ++$error_count; 139 } 140 141 $tablename = $tablelinkcategories; 142 $ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN sort_desc enum('Y','N') NOT NULL default 'N'"; 143 maybe_add_column($tablename, 'sort_desc', $ddl); 144 if (check_column($tablename, 'sort_Desc', "enum('Y','N')")) { 145 $res .= $tablename . ' - ok <br />'; 146 } else { 147 $res .= 'There was a problem with ' . $tablename . '<br />'; 148 ++$error_count; 149 } 150 151 $tablename = $tablelinkcategories; 152 $ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN text_before_link varchar(128) not null default '<li>'"; 153 maybe_add_column($tablename, 'text_before_link', $ddl); 154 if (check_column($tablename, 'text_before_link', 'varchar(128)')) { 155 $res .= $tablename . ' - ok <br />'; 156 } else { 157 $res .= 'There was a problem with ' . $tablename . '<br />'; 158 ++$error_count; 159 } 160 161 $tablename = $tablelinkcategories; 162 $ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN text_after_link varchar(128) not null default '<br />'"; 163 maybe_add_column($tablename, 'text_after_link', $ddl); 164 if (check_column($tablename, 'text_after_link', 'varchar(128)')) { 165 $res .= $tablename . ' - ok <br />'; 166 } else { 167 $res .= 'There was a problem with ' . $tablename . '<br />'; 168 ++$error_count; 169 } 170 171 $tablename = $tablelinkcategories; 172 $ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN text_after_all varchar(128) not null default '</li>'"; 173 maybe_add_column($tablename, 'text_after_all', $ddl); 174 if (check_column($tablename, 'text_after_all', 'varchar(128)')) { 175 $res .= $tablename . ' - ok <br />'; 176 } else { 177 $res .= 'There was a problem with ' . $tablename . '<br />'; 178 ++$error_count; 179 } 180 181 $tablename = $tablelinkcategories; 182 $ddl = "ALTER TABLE $tablelinkcategories ADD COLUMN list_limit int not null default -1"; 183 maybe_add_column($tablename, 'list_limit', $ddl); 184 if (check_column($tablename, 'list_limit', 'int(11)')) { 185 $res .= $tablename . ' - ok <br />'; 186 } else { 187 $res .= 'There was a problem with ' . $tablename . '<br />'; 188 ++$error_count; 189 } 190 191 if ($error_count > 0) { 192 ?> 193 <p>Hmmm... there was some kind of error. If you cannot figure out 194 see from the output above how to correct the problems please 195 visit our <a href="http://wordpress.org/support/">support 196 forums</a> and report your problem.</p> 197 <?php 198 } else { 90 199 ?> 91 200 <p>OK, that wasn't too bad was it? Let's move on to <a href="<?php echo $thisfile;?>?step=2">step 2</a>!</p> 92 93 <?php 201 <?php 202 } 203 break; 94 204 case 2: 95 205 ?> … … 105 215 blog_id int(11) NOT NULL default 0, 106 216 option_name varchar(64) NOT NULL default '', 107 option_can_override enum ('Y','N') NOT NULL default 'Y',217 option_can_override enum('Y','N') NOT NULL default 'Y', 108 218 option_type int(11) NOT NULL default 1, 109 219 option_value varchar(255) NOT NULL default '', -
trunk/wp-admin/wp-install-helper.php
r265 r280 96 96 97 97 foreach ($results as $row ) { 98 print_r($row);98 //print_r($row); 99 99 if ($row->Field == $col_name) { 100 100 // got our column, check the params 101 echo ("checking $row->Type !=$col_type\n");101 //echo ("checking $row->Type against $col_type\n"); 102 102 if (($col_type != null) && ($row->Type != $col_type)) { 103 103 ++$diffs; … … 115 115 ++$diffs; 116 116 } 117 if ($diffs > 0) 117 if ($diffs > 0) { 118 //echo ("diffs = $diffs returning false\n"); 118 119 return false; 120 } 119 121 return true; 120 122 } // end if found our column -
trunk/wp-admin/wp-install.php
r267 r280 90 90 " cat_name tinytext NOT NULL, ". 91 91 " auto_toggle enum ('Y','N') NOT NULL default 'N', ". 92 " show_images enum ('Y','N') NOT NULL default 'Y', " . 93 " show_description enum ('Y','N') NOT NULL default 'Y', " . 94 " show_rating enum ('Y','N') NOT NULL default 'Y', " . 95 " show_updated enum ('Y','N') NOT NULL default 'Y', " . 96 " sort_order varchar(64) NOT NULL default 'name', " . 97 " sort_desc enum('Y','N') NOT NULL default 'N', " . 98 " text_before_link varchar(128) not null default '<li>', " . 99 " text_after_link varchar(128) not null default '<br />'," . 100 " text_after_all varchar(128) not null default '</li>', " . 101 " list_limit int not null default -1, " . 92 102 " PRIMARY KEY (cat_id) ". 93 103 ") ";
Note: See TracChangeset
for help on using the changeset viewer.