Search
Search
Search
Search
Information
Information
Light
Dark
Open actions menu
Basic upload method
Bypass upload method
Tips!
If you encounter an error (by firewall) while uploading using both methods,
try changing extension of the file before uploading it and rename it right after.
This uploader supports multiple file upload.
Submit
~
var
www
podiocopy.bitkit.dk
httpdocs
app
Http
Controllers
Transfer
File Content:
AppToAppMoveAsynchronousController.php
<?php namespace App\Http\Controllers\Transfer; /** * Created by PhpStorm. * User: jis * Date: 20/5/15 * Time: 3:55 PM */ use App\Http\Controllers\Controller; use App\Modules\Application\AppMoveRepo; use App\Modules\Application\AppToAppMoveRepo; use App\Modules\Application\PodioAppModel; use App\Modules\Auth\AuthRepository; use App\Modules\GenModels\TransferQueue; use App\Modules\Item\AppToAppItemRepo; use App\Modules\Item\ItemModel; use App\Modules\Item\ItemRepo; use App\Modules\OrganizationMove\OrganizationRepo; use App\Modules\WorkSpace\WorkSpaceMoveRepo; use Exception; use Illuminate\Support\Facades\Auth; use Input; use Log; use MongoDB\BSON\ObjectId; use MongoId; class AppToAppMoveAsynchronousController extends Controller { private $authRepo; public function __construct() { $this->authRepo = new AuthRepository(); $this->transferQModel = new TransferQueue(); $this->itemModel = new ItemModel(); $this->podioAppsModel = new PodioAppModel(); $this->appRepo = new AppToAppMoveRepo(); $this->queueModel = new TransferQueue(); $this->itemRepo = new AppToAppItemRepo(); try { ini_set('memory_limit', '512M'); ini_set('max_execution_time', 0); // seconds } catch (Exception $e) { Log::error($e); } } public function getDoNextStepOfAppToAppMove() { try { $queueID = Input::get('queue_id'); $transferQueue = $this->transferQModel->findOne(array('_id' => new ObjectId($queueID))); if ($this->authRepo->authenticateUser($transferQueue['user'])) { $appMoveRepo = new AppToAppMoveRepo(); $appMoveRepo->doNextStepOfAppToAppMove($queueID); } } catch (Exception $e) { echo "<pre>"; print_r($e); exit; } } public function getDoNextStepOfItemMove() { $appRepo = new AppToAppMoveRepo(); $queueID = Input::get('queue_id'); $appID = Input::get('app_id'); $transferQueue = $this->transferQModel->findOne(array('_id' => new ObjectId($queueID))); $this->authRepo->authenticateUser($transferQueue['user']); $appMoveRepo = new AppToAppItemRepo(); $doLoop = 10; do { $needToContinue = false; $doLoop--; log::info("Start Prcoeesing Item Move of Q id " . $queueID . ''); $items = $this->itemModel->find(array('queue_id' => $queueID, 'status' => array('$ne' => 'completed')), 5); if ($items) { $needToContinue = true; foreach ($items as $item) { $appMoveRepo->doNextStepOfItmMove($queueID, $appID, $item); } } else { Log::info('ProcessCompleated'); $app = $this->podioAppsModel->findOne(array('app_id' => $appID)); Log::info('AppId: '.$appID); $completed_steps = $app['completed_steps']; $completed_steps[] = "All Items Moved To New App"; // $this->podioAppsModel->update(array('app_id' => $appID), $this->podioAppsModel->update(array('queue_id' => $queueID,'app_id' => $appID), array("status" => "completed", "next_step" => "app_completed_process_next_app", "completed_steps" => $completed_steps)); $appRepo->callForNextStepOfAppToAppMove($queueID); } } while ($doLoop > 0 && $needToContinue); if ($doLoop == 0) { $appRepo->callForNextStepOfItemMove($queueID, $appID); } } public function getStartAppToAppMove() { $queueID = Input::get('dbQueueId'); $userId = Input::get('userID'); $appMoveRepo = new AppToAppMoveRepo(); $appMoveRepo->getStartAppToAppMove($userId, $queueID); } public function getDoUpdateFirstApp() { $queueID = Input::get('queue_id'); $transferQueue = $this->transferQModel->findOne(array('_id' => new ObjectId($queueID))); if ($this->authRepo->authenticateUser($transferQueue['user'])) { $appMoveRepo = new AppToAppMoveRepo(); $appMoveRepo->updateFirstApp(intval(Input::get('space_id')), $queueID); } } }
Edit
Download
Unzip
Chmod
Delete