Ticket #9482: 0001-Make-mythconverg_restore.pl-change_hostname-not-brea.patch

File 0001-Make-mythconverg_restore.pl-change_hostname-not-brea.patch, 1.3 KB (added by Alex Tomlins <alex@…>, 9 years ago)
  • mythtv/programs/scripts/database/mythconverg_restore.pl

    From 113eec042fef5f332842550330c9b9a6f1e141fb Mon Sep 17 00:00:00 2001
    From: Alex Tomlins <alex@tomlins.org.uk>
    Date: Fri, 14 Jan 2011 18:49:39 +0000
    Subject: [PATCH] Make mythconverg_restore.pl --change_hostname not break with old_hostname='myth'
    
    ---
     .../scripts/database/mythconverg_restore.pl        |    6 +++---
     1 files changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/mythtv/programs/scripts/database/mythconverg_restore.pl b/mythtv/programs/scripts/database/mythconverg_restore.pl
    index 6e93d24..c629c5b 100755
    a b EOF 
    14351435            $query = "UPDATE $table_name SET value = REPLACE(value, ?, ?)".
    14361436                     " WHERE value LIKE ?";
    14371437            $sth_update = $dbh->prepare($query);
    1438             $sth_update->bind_param(1, $old_hostname);
    1439             $sth_update->bind_param(2, $new_hostname);
    1440             $sth_update->bind_param(3, '%'.$old_hostname.'%');
     1438            $sth_update->bind_param(1, 'SGweightPerDir:'.$old_hostname.':');
     1439            $sth_update->bind_param(2, 'SGweightPerDir:'.$new_hostname.':');
     1440            $sth_update->bind_param(3, 'SGweightPerDir:'.$old_hostname.':%');
    14411441            $result = $sth_update->execute;
    14421442            if (!defined($result))
    14431443            {