[freeside-commits] branch master updated. 3289bfbbc1196f383f98db8365d2444f96a5e4ef

Mark Wells mark at 420.am
Tue Jul 16 10:50:29 PDT 2013


The branch, master has been updated
       via  3289bfbbc1196f383f98db8365d2444f96a5e4ef (commit)
      from  8f1fcb5c5409da6c9cfb9ff21d451853a7579db8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3289bfbbc1196f383f98db8365d2444f96a5e4ef
Author: Mark Wells <mark at freeside.biz>
Date:   Tue Jul 16 10:49:51 2013 -0700

    missing files, #20687

diff --git a/httemplate/misc/change_pkg_now.cgi b/httemplate/misc/change_pkg_now.cgi
new file mode 100644
index 0000000..73ee740
--- /dev/null
+++ b/httemplate/misc/change_pkg_now.cgi
@@ -0,0 +1,22 @@
+%if ( $error ) {
+%  errorpage($error);
+%} else {
+<% $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')) %>
+%}
+<%init>
+
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right('Change customer package');
+
+#untaint pkgnum
+my ($query) = $cgi->keywords;
+$query =~ /^(\d+)$/ || die "Illegal pkgnum";
+my $pkgnum = $1;
+
+my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
+my $change_to = FS::cust_pkg->by_key($cust_pkg->change_to_pkgnum);
+
+my $err_or_pkg = $cust_pkg->change({ 'cust_pkg' => $change_to });
+my $error = $err_or_pkg unless ref($err_or_pkg);
+
+</%init>
diff --git a/httemplate/misc/do_not_change_pkg.cgi b/httemplate/misc/do_not_change_pkg.cgi
new file mode 100644
index 0000000..c164c5c
--- /dev/null
+++ b/httemplate/misc/do_not_change_pkg.cgi
@@ -0,0 +1,20 @@
+%if ( $error ) {
+%  errorpage($error);
+%} else {
+<% $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')) %>
+%}
+<%init>
+
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right('Change customer package');
+
+#untaint pkgnum
+my ($query) = $cgi->keywords;
+$query =~ /^(\d+)$/ || die "Illegal pkgnum";
+my $pkgnum = $1;
+
+my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
+
+my $error = $cust_pkg->abort_change;
+
+</%init>

-----------------------------------------------------------------------

Summary of changes:
 .../misc/{unsusp_pkg.cgi => change_pkg_now.cgi}    |    6 ++++--
 .../misc/{unsusp_pkg.cgi => do_not_change_pkg.cgi} |    4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)
 copy httemplate/misc/{unsusp_pkg.cgi => change_pkg_now.cgi} (56%)
 mode change 100755 => 100644
 copy httemplate/misc/{unsusp_pkg.cgi => do_not_change_pkg.cgi} (74%)
 mode change 100755 => 100644




More information about the freeside-commits mailing list