Title: [198822] trunk/Websites/webkit.org
Revision
198822
Author
j...@apple.com
Date
2016-03-29 19:36:36 -0700 (Tue, 29 Mar 2016)

Log Message

Fixed a property access error by removing the lamda function for updates

Modified Paths

Diff

Modified: trunk/Websites/webkit.org/ChangeLog (198821 => 198822)


--- trunk/Websites/webkit.org/ChangeLog	2016-03-30 02:22:47 UTC (rev 198821)
+++ trunk/Websites/webkit.org/ChangeLog	2016-03-30 02:36:36 UTC (rev 198822)
@@ -1,5 +1,12 @@
 2016-03-29  Jon Davis  <j...@apple.com>
 
+        Fixed a property access error by removing the lamda function for updates
+        https://bugs.webkit.org/show_bug.cgi?id=155989
+
+        * wp-content/plugins/sync-nightly-builds.php: 
+
+2016-03-29  Jon Davis  <j...@apple.com>
+
         Fixed a context error for Nightly Build sync plugin, tightens layout styles for abovetitle
         https://bugs.webkit.org/show_bug.cgi?id=155989
 

Modified: trunk/Websites/webkit.org/wp-content/plugins/sync-nightly-builds.php (198821 => 198822)


--- trunk/Websites/webkit.org/wp-content/plugins/sync-nightly-builds.php	2016-03-30 02:22:47 UTC (rev 198821)
+++ trunk/Websites/webkit.org/wp-content/plugins/sync-nightly-builds.php	2016-03-30 02:36:36 UTC (rev 198822)
@@ -33,28 +33,26 @@
         $upload_dir_info = wp_upload_dir();
         $this->uploads_dir = trailingslashit($upload_dir_info['basedir']);
 
-        add_action('update_webkit_nightly_builds', function () {
-            $SyncBuild = SyncWebKitNightlyBuilds::object();
-            foreach ($SyncBuild->archives as $endpoint => $filename) {
-                // Download a copy of the archives
-                $url = "" $endpoint);
+        add_action('update_webkit_nightly_builds', array($this, 'sync'));
+        add_action('wp_ajax_search_nightly_builds', array($this, 'search'));
 
-                if (!copy($url, $SyncBuild->uploads_dir. $filename))  {
-                    error_log("Couldn't download the $filename archive index. ({$errors['type']}) {$errors['message']}");
-                }
-            }
-        });
-
         register_activation_hook(__FILE__, function () {
             if (!wp_next_scheduled('update_webkit_nightly_builds'))
                 wp_schedule_event(current_time('timestamp'), 'hourly', 'update_webkit_nightly_builds');
 
             do_action('update_webkit_nightly_builds');
         });
+    }
 
+    public function sync() {
+        foreach ($this->archives as $endpoint => $filename) {
+            // Download a copy of the archives
+            $url = "" $endpoint);
 
-        add_action('wp_ajax_search_nightly_builds', array($this, 'search'));
-
+            if (!copy($url, $this->uploads_dir. $filename))  {
+                error_log("Couldn't download the $filename archive index. ({$errors['type']}) {$errors['message']}");
+            }
+        }
     }
 
     public function latest($archive = 'builds') {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to