Adds checkbox for the "show crosspost link" option to the general Other 
Sites view, so that it's more visible.

        Patch by Erin of <user name="teamdestroyer">. 

diffs (47 lines):

diff -r 50c3866d1cec -r 18a19f24b6a8 bin/upgrading/en.dat
--- a/bin/upgrading/en.dat      Fri Dec 10 15:05:11 2010 +0800
+++ b/bin/upgrading/en.dat      Fri Dec 10 15:16:55 2010 +0800
@@ -3079,6 +3079,8 @@ setting.xpost.option.footer.when.never=N
 
 setting.xpost.option.password=Password
 
+setting.xpost.option.recordlink=Display Crosspost Link
+
 setting.xpost.option.server=Server
 
 setting.xpost.option.username=Username
diff -r 50c3866d1cec -r 18a19f24b6a8 cgi-bin/DW/Setting/XPostAccounts.pm
--- a/cgi-bin/DW/Setting/XPostAccounts.pm       Fri Dec 10 15:05:11 2010 +0800
+++ b/cgi-bin/DW/Setting/XPostAccounts.pm       Fri Dec 10 15:16:55 2010 +0800
@@ -69,6 +69,7 @@ sub option {
         $ret .= "<th>" . $class->ml('setting.xpost.option.username') . 
"</th>\n";
         $ret .= "<th>" . $class->ml('setting.xpost.option.server') . "</th>\n";
         $ret .= "<th>" . $class->ml('setting.xpost.option.xpostbydefault') . 
"</th>\n";
+        $ret .= "<th>" . $class->ml('setting.xpost.option.recordlink') . 
"</th>\n";
         $ret .= "<th>" . $class->ml('setting.xpost.option.change') . "</th>\n";
         $ret .= "<th>" . $class->ml('setting.xpost.option.delete') . "</th>\n";
         $ret .= "</tr>\n";
@@ -84,6 +85,12 @@ sub option {
                 value    => 1,
                 id       => "${key}xpostbydefault[${acctid}]",
                 selected => $externalacct->xpostbydefault
+            }) . "</td>";
+            $ret .= "<td class='checkbox'>" . LJ::html_check({
+                name     => "${key}recordlink[${acctid}]",
+                value    => 1,
+                id       => "${key}recordlink[${acctid}]",
+                selected => $externalacct->recordlink
             }) . "</td>";
             $ret .= "<td style='text-align: center;'><a 
href='$LJ::SITEROOT/manage/externalaccount?acctid=${acctid}'>" . 
$class->ml('setting.xpost.option.change') . "</a></td>\n";
             $ret .= "<td class='checkbox'>" . LJ::html_check({
@@ -281,6 +288,10 @@ sub save {
                 if ($class->get_arg($args, "xpostbydefault[$acctid]") ne 
$account->{'xpostbydefault'}) {
                     $account->set_xpostbydefault($class->get_arg($args, 
"xpostbydefault[$acctid]"));
                 }
+                # check to see if we need to reset the recordlink
+                if ($class->get_arg($args, "recordlink[$acctid]") ne 
$account->{'recordlink'}) {
+                    $account->set_recordlink($class->get_arg($args, 
"recordlink[$acctid]"));
+                }
             }
         }
     }
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to