Example #1
0
File: Pack.php Project: 4otaku/art
 public function recieve_data($data)
 {
     if (!empty($data['data']['title'])) {
         $this->filename = $data['data']['title'] . '.zip';
     }
     parent::recieve_data($data);
 }
Example #2
0
File: Art.php Project: 4otaku/art
 public function recieve_data($data)
 {
     if (!empty($data['data']['pack'])) {
         foreach ($data['data']['pack'] as $pack) {
             if ($pack['id'] == $this->pack) {
                 $this->filename = $pack['filename'];
             }
         }
     }
     if (!empty($data['data']['manga'])) {
         foreach ($data['data']['manga'] as $manga) {
             if ($manga['id'] == $this->manga) {
                 $order = $manga['order'] + 1;
                 $zero_len = max(0, 5 - strlen($order));
                 $this->filename = str_repeat('0', $zero_len) . $order . '.' . $data['data']['ext'];
             }
         }
     }
     parent::recieve_data($data);
 }