1- <?php namespace FeatherBB \Core ;
1+ <?php
2+
3+ namespace FeatherBB \Core ;
24
35/**
46 * Copyright (C) 2015-2017 FeatherBB
@@ -819,55 +821,6 @@ public function update($simulateInstall = true, $deleteDownload = true)
819821
820822 return true ;
821823 }
822-
823- /**
824- * Bulk cURL requests
825- *
826- * @param array $urls URLs to connect to
827- *
828- * @return array Array of [url => body content]
829- */
830- // protected function _bulkRequests($urls = array())
831- // {
832- // $multi = curl_multi_init();
833- // $channels = array();
834- // // Loop through the URLs so request, create curl-handles,
835- // // attach the handle to our multi-request
836- // foreach ($urls as $url) {
837- // $ch = curl_init();
838- // curl_setopt($ch, CURLOPT_URL, $url);
839- // curl_setopt($ch, CURLOPT_HEADER, false);
840- // curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
841- // curl_multi_add_handle($multi, $ch);
842- // $channels[$url] = $ch;
843- // }
844- // // While we're still active, execute curl
845- // $active = null;
846- // do {
847- // $mrc = curl_multi_exec($multi, $active);
848- // } while ($mrc == CURLM_CALL_MULTI_PERFORM);
849- // while ($active && $mrc == CURLM_OK) {
850- // // Wait for activity on any curl-connection
851- // if (curl_multi_select($multi) == -1) {
852- // continue;
853- // }
854- // // Continue to exec until curl is ready to
855- // // give us more data
856- // do {
857- // $mrc = curl_multi_exec($multi, $active);
858- // } while ($mrc == CURLM_CALL_MULTI_PERFORM);
859- // }
860- // // Loop through the channels and retrieve the received
861- // // content, then remove the handle from the multi-handle
862- // $results = array();
863- // foreach ($channels as $url => $channel) {
864- // $results[$url] = curl_multi_getcontent($channel);
865- // curl_multi_remove_handle($multi, $channel);
866- // }
867- // // Close the multi-handle and return our results
868- // curl_multi_close($multi);
869- // return $results;
870- // }
871824}
872825
873826class PluginAutoUpdater extends AutoUpdater
@@ -884,16 +837,3 @@ public function __construct($plugin)
884837 }
885838}
886839
887- class CoreAutoUpdater extends AutoUpdater
888- {
889- public function __construct ()
890- {
891- // Construct parent class
892- parent ::__construct (getcwd ().'/temp ' , getcwd ());
893-
894- // Set plugin informations
895- $ this ->setRootFolder ('featherbb ' );
896- $ this ->setCurrentVersion (ForumEnv::get ('FORUM_VERSION ' ));
897- $ this ->setUpdateUrl ('https://api.github.com/repos/featherbb/featherbb/releases ' );
898- }
899- }
0 commit comments