Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r21274: LJSUP-11389 (Need disable flag for New P...

Committer: ailyin
LJSUP-11389 (Need disable flag for New Photohosting when it's on Prod)
U   trunk/cgi-bin/LJ/Widget/EntryForm.pm
Modified: trunk/cgi-bin/LJ/Widget/EntryForm.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/EntryForm.pm	2012-03-01 11:37:09 UTC (rev 21273)
+++ trunk/cgi-bin/LJ/Widget/EntryForm.pm	2012-03-01 12:13:12 UTC (rev 21274)
@@ -1624,19 +1624,24 @@
     my $ljphoto_enabled = $remote->can_upload_photo();
 
     LJ::Widget::Fotki::Upload->render();
- 
+
+    my $photouploader_params = {
+        'action'          => 'add_new_post',
+        'availableSpace'  => $available_space,
+        'sizesData'       => $photo_sizes_json,
+        'albumsData'      => $album_list_json,
+        'privacyData'     => $user_groups,
+        'type'            => 'upload',
+        'guid'            => $auth_token,
+        'pics_production' => LJ::is_enabled('pics_production'),
+    };
+
+    my $photouploader_params_out = LJ::JSON->to_json($photouploader_params);
+
     $out .= <<JS ;
 <script type="text/javascript">
     window.ljphotoEnabled = $ljphoto_enabled;
-    jQuery('#updateForm').photouploader({
-        action: 'add_new_post',
-        availableSpace: '$available_space',
-        sizesData: $photo_sizes_json,
-        albumsData: $album_list_json,
-        privacyData: $user_groups,
-        type: 'upload',
-        guid: '$auth_token'
-    });
+    jQuery('#updateForm').photouploader($photouploader_params_out);
 </script>
 JS
 

Tags: ailyin, andy, livejournal, pm
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