wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r17339: LJSUP-6482

Committer: gprochaev
[LJSUP-6482] SMS Notification RU

U   trunk/cgi-bin/LJ/Widget/SubscribeInterface.pm
U   trunk/htdocs/manage/profile/index.bml
Modified: trunk/cgi-bin/LJ/Widget/SubscribeInterface.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/SubscribeInterface.pm	2010-09-10 07:27:59 UTC (rev 17338)
+++ trunk/cgi-bin/LJ/Widget/SubscribeInterface.pm	2010-09-10 07:45:36 UTC (rev 17339)
@@ -21,9 +21,8 @@
 
     my @ntypes = @LJ::NOTIFY_TYPES;
     my (undef, $country) = LJ::GeoLocation->ip_class;
-    if ($country eq 'ru'){
-        @ntypes = map { $_ eq 'LJ::NotificationMethod::SMS' ? 'LJ::NotificationMethod::SMSru' : $_ }
-                    @ntypes;
+    if ($country ne 'RU'){
+        @ntypes = grep { $_ ne 'LJ::NotificationMethod::SMSru' ? 1 : 0 } @ntypes;
     }
 
     my $colnum = scalar(@ntypes) + 1;

Modified: trunk/htdocs/manage/profile/index.bml
===================================================================
--- trunk/htdocs/manage/profile/index.bml	2010-09-10 07:27:59 UTC (rev 17338)
+++ trunk/htdocs/manage/profile/index.bml	2010-09-10 07:45:36 UTC (rev 17339)
@@ -8,6 +8,7 @@
     use LJ::Setting;
     use LJ::TimeUtil;
     use LJ::UserHead;
+    use LJ::SMS::API::RU::Phone;
 
     LJ::set_active_crumb('editprofile');
     LJ::need_res('stc/lj_base.css', 'stc/lj_settings.css', 'js/editprofile.js');
@@ -523,6 +524,7 @@
             $ret .= "</table>\n";
 
 			$ret .= "<script type='text/javascript'>";
+			$ret .= "smsNotifyInitialState = \"".LJ::SMS::API::RU::Phone->get_status($u->{'userid'}, $tminfo->{'number'})."\";";
 			$ret .= "var supportedDEF = [901,903,905,906,909,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934,936,937,938,960,961,962,963,964,965,967,968,997];";
 			$ret .= "var smsNotifyDict = {";
 			$ret .= "";

Tags: bml, livejournal, pm, wisest-owl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments