Plugin Directory

Changeset 1193672


Ignore:
Timestamp:
07/06/2015 08:44:12 PM (11 years ago)
Author:
flashcentury
Message:

ver. 0.5.0

Location:
broken-link-manager/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • broken-link-manager/trunk/config/functions.php

    r1144670 r1193672  
    1111$cc_email = $_POST['cc_email'];
    1212$bcc_email = $_POST['bcc_email'];
    13 
    1413$default_url= $_POST['default_url'];
    1514
     
    3938$url  = isset($_POST['url']) ? $_POST['url'] : null;
    4039$type  = isset($_POST['type']) ? $_POST['type'] : null;
     40
     41$url = (int) intval($url);
     42if(is_numeric($url)){
    4143global $wpdb;
    42 if($type == 'old'){
    43     $wpdb->query("UPDATE " . TABLE_WBLM . " SET `new_url` = '$new_url', `active` = '1' WHERE id = '$url'");
    44     $page = $_POST['rpage'];
    45 }else{
    46     $wpdb->query("UPDATE " . TABLE_WBLM . " SET old_url = '$old_url', new_url = '$new_url' WHERE id = $url");
    47     $page = 'page=wblm-redirect';
     44    if($type == 'old'){
     45        $wpdb->query($wpdb->prepare("UPDATE " . TABLE_WBLM . " SET `new_url` = '%s', `active` = '1' WHERE id = '%d'", $new_url, $url));
     46        $page = $_POST['rpage'];
     47    }else{
     48        $wpdb->query($wpdb->prepare("UPDATE " . TABLE_WBLM . " SET old_url = '%s', `new_url` = '%s', `active` = '1' WHERE id = '%d'", $old_url,$new_url, $url));
     49        $page = 'page=wblm-redirect';
     50    }
    4851}
    49 
    5052_e('Updated ', 'wblm');
    51 
    52 //echo '<script type="text/javascript">
    53 //window.location="'. admin_url("admin.php?$page"). '";
    54 //</script>';
    5553}
    5654
    5755function wpslAddURL(){
    58 $old_url  = isset($_POST['old_url']) ? $_POST['old_url'] : null;
    59 $new_url  = isset($_POST['new_url']) ? $_POST['new_url'] : null;
     56    $old_url  = isset($_POST['old_url']) ? $_POST['old_url'] : null;
     57    $new_url  = isset($_POST['new_url']) ? $_POST['new_url'] : null;   
    6058
    61 global $wpdb;
    62 $wpdb->query("INSERT INTO " . TABLE_WBLM . " (`old_url`, `new_url`, `hit`, `active`) VALUES ('$old_url', '$new_url', '0', '1')");
    63 $page = 'wblm-redirect';
    64 
    65 _e('added ', 'wblm');
    66 
    67 echo '<script type="text/javascript">
    68 window.location="'. admin_url("admin.php?page=$page") . '";
    69 </script>';
     59    global $wpdb;
     60    $wpdb->query($wpdb->prepare("INSERT INTO " . TABLE_WBLM . " (`old_url`, `new_url`, `hit`, `active`)  VALUES ('%s', '%s', '0', '1')", $old_url,$new_url));   
     61    $page = 'wblm-redirect';
     62   
     63    _e('added ', 'wblm');
     64   
     65    echo '<script type="text/javascript">
     66    window.location="'. admin_url("admin.php?page=wblm-redirect") . '";
     67    </script>';
    7068}
    71 
     69   
    7270function wpslDelURL(){
    73 $url  = isset($_GET['url']) ? $_GET['url'] : null;
    74 $page  = isset($_GET['page']) ? $_GET['page'] : null;
    75 
    76 global $wpdb;
    77 $wpdb->query("DELETE FROM " . TABLE_WBLM . " WHERE id = $url");
    78 $wpdb->query("DELETE FROM " . TABLE_WBLM_LOG . " WHERE url = $url");
    79 
    80 echo '<script type="text/javascript">
    81 window.location="'. admin_url("admin.php?page=$page") . '";
    82 </script>';
     71    $url  = isset($_GET['url']) ? $_GET['url'] : null;
     72    $page  = isset($_GET['page']) ? $_GET['page'] : null;
     73   
     74    $url= (int) intval($url);
     75   
     76    if(is_numeric($url)){
     77    global $wpdb;
     78    $wpdb->query($wpdb->prepare("DELETE FROM " . TABLE_WBLM . " WHERE id = %d", $url));
     79    $wpdb->query($wpdb->prepare("DELETE FROM " . TABLE_WBLM_LOG . " WHERE id = %d", $url));
     80    }
     81   
     82    if($page=='wblm-broken' || $page=='wblm-redirect'){
     83        echo '<script type="text/javascript">
     84    window.location="'. admin_url("admin.php?page=$page") . '";
     85    </script>';
     86    }
    8387}
    8488
     
    121125    printf($topNavi, admin_url("admin.php?page=wblm-dashboard"), admin_url("admin.php?page=wblm-redirect"), admin_url("admin.php?page=wblm-broken"), admin_url("admin.php?page=wblm-add-url"), admin_url("admin.php?page=wblm-log"), admin_url("admin.php?page=wblm-settings"));
    122126}
    123 
    124127function get_bulkEdit($page, $buttonText){
    125128    $bulkEdit =  '
     
    148151    }   
    149152}
    150 function wpslEmptyBrokenUrls($page, $buttonText){
     153function wpslEmptyBrokenUrls(){
    151154    global $wpdb;
    152155    $wpdb->query("DELETE FROM " . TABLE_WBLM . " WHERE active = 0");
    153156}
    154 
    155157if($settingsSaveFunc){ wpslSettingsSave(); }
    156158if($editURLFunc){ wpslEditURL(); }
     
    159161if($emptyLOGFunc){ wpslEmptyLOG($emptyLOGStatu); }
    160162if($emptyBrokenUrlsFunc){ wpslEmptyBrokenUrls(); }
    161 
    162163?>
  • broken-link-manager/trunk/readme.txt

    r1186231 r1193672  
    44Requires at least: 3.0
    55Tested up to: 4.2.2
    6 Stable tag: 0.4.5
     6Stable tag: 0.5.0
    77Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8NYR3F4RVTBHS
    88
     
    3030> [- English (Hülya Kocak)](http://brokenlinkmanager.com)<br>
    3131> [- Deutsch (Berkant Kacar)](http://beqo.de) <br>
    32 > [- Türkçe (Hüseyin Kocak)](http://k-78.de) <br><br>
     32> [- Türkçe (Hüseyin Kocak)](http://k-78.de) <br>
     33> [- Français (Thomas L’Excellent)](http://www.thomaslexcellent.com) <br><br>
    3334
    34 > [- Download .pot file for your language](brokenlinkmanager.com/wblm.pot.zip) <br>
     35> [- Download .pot file for your language](http://brokenlinkmanager.com/wblm.pot.zip) <br>
    3536
    3637== Installation ==
     
    4748
    4849== Changelog ==
     50
     51= 0.5.0 =
     52* Take measure against SQL injection attack
     53* Added French Language (Thanks, Thomas L’Excellent)
    4954
    5055= 0.4.5 =
  • broken-link-manager/trunk/wblm.php

    r1186231 r1193672  
    44Plugin URI: https://wordpress.org/plugins/broken-link-manager
    55Description: WBLM -> Wordpress Broken Link Manager. This plugin helps you check, organise and monitor your broken backlinks.
    6 Version: 0.4.5
     6Version: 0.5.0
    77Author: Hüseyin Kocak
    88Author URI: http://k-78.de
     
    4848}
    4949if(!defined('WBLM_ICON')) {
    50     define( 'WBLM_ICON', $get_wblm['AuthorURI'].'/wblm/icon.png?ver='.WBLM_VERSION );
     50    define( 'WBLM_ICON', $get_wblm['AuthorURI'].'/wblm/icon.png');
    5151}
    5252global $wpdb;
Note: See TracChangeset for help on using the changeset viewer.