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

[livejournal] r17505: LJSUP-7012

Committer: gprochaev
LJSUP-7012

U   trunk/htdocs/manage/profile/index.bml
Modified: trunk/htdocs/manage/profile/index.bml
===================================================================
--- trunk/htdocs/manage/profile/index.bml	2010-10-05 02:52:03 UTC (rev 17504)
+++ trunk/htdocs/manage/profile/index.bml	2010-10-05 03:38:59 UTC (rev 17505)
@@ -553,7 +553,11 @@
             $ret .= "</table>\n";
 
 			$ret .= "<script type='text/javascript'>";
-			$ret .= "smsNotifyInitialState = \"".LJ::SMS::API::RU::Phone->get_status($u->{'userid'}, $tminfo->{'number'})."\";";
+            my $phone = LJ::SMS::API::RU::Phone->normalize($tminfo->{'number'});
+            my $status = LJ::SMS::API::RU::Phone->get_status($u->{'userid'}, $phone);
+            my $statuses = LJ::SMS::API::RU::Phone->get_cur_phone_statuses($phone);
+            $status = 'already_use' if grep { $_->[0] eq 'verified' } @$statuses;
+			$ret .= "smsNotifyInitialState = \"".$status."\";";
 			$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, 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