Plugin Directory

Changeset 2236498


Ignore:
Timestamp:
01/31/2020 02:39:42 PM (6 years ago)
Author:
pdtasktrack
Message:

version updated

Location:
backupsavvychild/trunk
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • backupsavvychild/trunk/backupsavvychild.php

    r2127918 r2236498  
    11<?php
    2 /*
     2/**
    33 * Plugin Name: BackUpSavvyChild
    4  * Plugin URI: https://backupsavvy.com
    5  * Description: WordPress Backup Plugin
    6  * Author: BackupSavvy
    7  * Version: 1.0.1
     4 * Plugin URI: http://backupsavvy.com
     5 * Description: WordPress Backup Child Plugin
     6 * Author: BackupSavvy.com
     7 * Version: 1.0.2
    88 * Domain Path: /
    99 * Network: true
     
    1111 * License URI: http://www.gnu.org/licenses/gpl-3.0
    1212*/
    13 
    14 if ( ! defined( 'ABSPATH' ) ) exit;
    15 
    16 if ( ! defined( 'WPINC' ) ) die;
    17 
    18 if ( ! class_exists( 'BackupSavvyChild', false ) ) {
    19 
    20 
    21     class BackupSavvyChild {
    22 
    23         private static $instance = null;
     13if (!defined('ABSPATH')) exit;
     14
     15if (!defined('WPINC')) die;
     16
     17if (!class_exists('BackupSavvyChild', false)) {
     18
     19
     20    class BackupSavvyChild
     21    {
     22
     23        private static $instance = null;
    2424//      private $api_key = '53t181Hf3Xe8f80we472aye7695167V9Q08a4c';
    25         private $source_dir;
    26 
    27         public function __construct() {
    28 
    29             include_once 'vendor/autoload.php';
    30             include_once 'inc/bsv_compressHandler.php';
    31 
    32             register_deactivation_hook( __FILE__, array(&$this,'deactivation_hook'));
    33 
    34             add_action( 'rest_api_init', array(&$this, 'child_api_callback'));
    35             add_action('admin_menu',array(&$this,'register_backup_savvy_child_custom_menu'),10);
    36 
    37     //      $option = get_option('backupsavvy_child_secret', 0);
    38 
    39             $this->sql_dir = $_SERVER['DOCUMENT_ROOT'] . '/wpbackitup_sql';
    40             $this->source_dir = $_SERVER['DOCUMENT_ROOT'] . '/wpbackitup_tmp';
    41 
    42             if (!file_exists($this->source_dir)) {
    43                 mkdir($this->source_dir, 0755, true);
    44             }
    45             if (!file_exists($this->sql_dir)) {
    46                 mkdir($this->sql_dir, 0755, true);
    47             }
    48 
    49         }
    50 
    51 
    52         public function register_backup_savvy_child_custom_menu() {
    53             add_menu_page( 'BackupSavvy Child', 'BackupSavvy Child', 'manage_options', 'backup-savvy-child-settings', array(&$this,'settings_page'), 'none', '30.3');
     25        private $source_dir;
     26        private $upload_result;
     27
     28        public function __construct()
     29        {
     30            // disable updates to premium version
     31            if($this->get_vars()->status == 'prem')
     32                add_filter( 'site_transient_update_plugins', array(&$this, 'backupsavvychild_filter_plugin_updates') );
     33
     34            include_once 'inc/bsvHelperFunctions.php';
     35            include_once 'vendor/autoload.php';
     36            include_once 'inc/bsv_compressHandler.php';
     37
     38            register_deactivation_hook(__FILE__, array(&$this, 'deactivation_hook'));
     39
     40            add_action('rest_api_init', array(&$this, 'child_api_callback'));
     41            add_action('admin_menu', array(&$this, 'register_backup_savvy_child_custom_menu'), 10);
     42
     43            //      $option = get_option('backupsavvy_child_secret', 0);
     44
     45            $this->sql_dir = $_SERVER['DOCUMENT_ROOT'] . '/backupsavvy_sql';
     46            $this->source_dir = $_SERVER['DOCUMENT_ROOT'] . '/backupsavvy_dump';
     47
     48            if (!file_exists($this->source_dir)) {
     49                mkdir($this->source_dir, 0755, true);
     50            }
     51            if (!file_exists($this->sql_dir)) {
     52                mkdir($this->sql_dir, 0755, true);
     53            }
     54
     55            $old_path = $_SERVER['DOCUMENT_ROOT'] . '/wpbackitup_sql';
     56            if(file_exists($old_path)) {
     57                $manager = new bsvHelperFunctions();
     58                $manager->discovery($old_path);
     59                if($manager->files)
     60                    foreach ($manager->files as $file) {
     61                        if(!unlink($file))
     62                            error_log('File '.$file.' can not be removed');
     63
     64                    }
     65                if($manager->directories)
     66                    foreach ($manager->directories as $directory) {
     67                        if (basename($directory) != '.' && basename($directory) != '..') {
     68                            if(!rmdir($directory))
     69                                error_log('Directory '.$directory.' can not be removed');
     70                        }
     71                    }
     72            }
     73        }
     74
     75        /**
     76         * @param $value
     77         *
     78         * @return mixed
     79         */
     80        public function backupsavvychild_filter_plugin_updates( $value ) {
     81            if( isset( $value->response['backupsavvy-child/backupsavvychild.php'] ) ) {
     82                unset( $value->response['backupsavvy-child/backupsavvychild.php'] );
     83            }
     84
     85            return $value;
     86        }
     87        public function register_backup_savvy_child_custom_menu()
     88        {
     89            add_menu_page('BackupSavvy Child', 'BackupSavvy Child', 'manage_options', 'backup-savvy-child-settings', array(&$this, 'settings_page'), 'none', '30.3');
    5490//
    55         }
    56 
    57         public function settings_page() {
    58             include_once 'settings-page.php';
    59         }
    60 
    61         public function child_api_callback() {
    62             register_rest_route( 'backupsavvyapi', "addsite",array(
    63                 'methods'  => 'POST',
    64                 'callback' => array(&$this, 'add_site')
    65 
    66             ) );
    67             register_rest_route( 'backupsavvyapi', "backup",array(
    68                 'methods'  => 'POST',
    69                 'callback' => array(&$this, 'add_backup')
    70 
    71             ) );
    72             // separate add backup and upload
    73             register_rest_route( 'backupsavvyapi', "upload",array(
    74                 'methods'  => 'POST',
    75                 'callback' => array(&$this, 'upload_backup')
    76 
    77             ) );
    78             register_rest_route( 'backupsavvyapi', "settings",array(
    79                 'methods'  => 'POST',
    80                 'callback' => array(&$this, 'update_settings')
    81 
    82             ) );
    83         }
    84 
    85 
    86         public function update_settings($params = false) {
     91        }
     92
     93        public function settings_page()
     94        {
     95            include_once 'settings-page.php';
     96        }
     97
     98        public function child_api_callback()
     99        {
     100            register_rest_route('backupsavvyapi', "addsite", array(
     101                'methods' => 'POST',
     102                'callback' => array(&$this, 'add_site')
     103
     104            ));
     105            register_rest_route('backupsavvyapi', "backup", array(
     106                'methods' => 'POST',
     107                'callback' => array(&$this, 'add_backup')
     108
     109            ));
     110            // separate add backup and upload
     111            register_rest_route('backupsavvyapi', "upload", array(
     112                'methods' => 'POST',
     113                'callback' => array(&$this, 'upload_backup')
     114            ));
     115
     116            register_rest_route('backupsavvyapi', "settings", array(
     117                'methods' => 'POST',
     118                'callback' => array(&$this, 'update_settings')
     119            ));
     120       
     121        }
     122
     123
     124        public function update_settings($params = false)
     125        {
    87126//          if($params['apikey'] != $this->api_key)
    88127//              return array('status' => 'apikey');
    89             if($params['secret'] != get_option('backupsavvy_child_secret', 0))
    90                 return array('status' => 'secret');
    91 
    92             $res = null;
    93             if($params['action'] == 'storage') {
    94                 $data = $params['data'];
    95                 switch ($data['connection']):
    96                     case 'ftp':
    97                         $res = $this->update_ftp($data);
    98                         break;
    99                     case 'sftp':
    100                         $res = $this->update_sftp($data);
    101                         break;
    102                     case 'dropbox':
    103                         $res = $this->update_dropbox();
    104                         break;
    105                     default: $res = null;
    106                 endswitch;
    107             }
    108 
    109             return array('status' => 'success');
    110 
    111         }
    112 
    113         private function update_ftp($data) {
    114             $data = serialize($data);
    115             update_option('backupsavvy_child_storage', $data);
    116 
    117             return true;
    118         }
    119 
    120         private function update_sftp($data) {
    121             return true;
    122         }
    123 
    124         private function update_dropbox() {
     128
     129            $params = $params->get_params();
     130
     131            if(!$this->checkSecret($params))
     132                return array('status' => 'secret');
     133
     134            $res = null;
     135            $status = 'success';
     136            if ($params['action'] == 'storage') {
     137                $data = $params['data'];
     138                switch ($data['connection']):
     139                    case 'ftp':
     140                        $res = $this->update_ftp($data);
     141                        break;
     142                    case 'sftp':
     143                        $res = $this->update_sftp($data);
     144                        break;
     145                    case 'dropbox':
     146                        $res = $this->update_dropbox($data);
     147                        break;
     148                    case 'google_drive':
     149                        $res = $this->update_google_drive($data);
     150                        break;
     151                    default:
     152                        $res = null;
     153                        $status = 'storage';
     154                endswitch;
     155            }
     156
     157            return array('status' => $status);
     158
     159        }
     160
     161        private function update_ftp($data)
     162        {
     163            $data = serialize($data);
     164            update_option('backupsavvy_child_storage', $data);
     165
     166            return true;
     167        }
     168
     169        private function update_sftp($data)
     170        {
     171            return true;
     172        }
     173
     174        private function update_dropbox($data)
     175        {
     176            $data = serialize($data);
     177            update_option('backupsavvy_child_storage', $data);
     178
     179            return true;
     180        }
     181
     182        private function update_google_drive($data) {
     183            $data = serialize($data);
     184            update_option('backupsavvy_child_storage', $data);
     185
     186            return true;
     187        }
     188
     189        public function add_site($params = false)
     190        {
     191            $params = $params->get_params();
     192
     193            if(!$this->checkSecret($params))
     194                return array('status' => 'secret');
     195
     196
     197            return array('status' => 'success');
     198        }
     199
     200        private function checkSecret($params) {
     201
     202            if(empty($params['secret']))
     203                return false;
     204
     205            $secret = $params['secret'];
     206
     207            $site_s = get_option('backupsavvy_child_secret', 0);
     208            $expected = md5($site_s.'.bcssvy');
     209
     210            if ($expected != $secret)
     211                if(!$this->checkMainWpAccess($secret))
     212                    return false;
     213
     214            return true;
     215        }
     216
     217        private function checkMainWpAccess($secret) {
     218            $uniqueId = get_option( 'mainwp_child_uniqueId' );
     219            $expected = md5('wnwp_'.$uniqueId.'.bcssvy');
     220            if ( '' != $uniqueId )
     221                if($expected == $secret)
     222                    return true;
     223
     224            $super_admins = get_super_admins();
     225            foreach ($super_admins as $admin) {
     226                $expected = md5('wnwp_'.$admin.'.bcssvy');
     227                if($expected == $secret)
     228                    return true;
     229            }
    125230
    126231            return false;
    127         }
    128 
    129         public function add_site($params = false) {
    130 
     232        }
     233
     234        public function add_backup($params = false)
     235        {
     236             $params = $params->get_params(); // wp method
     237
     238            if (!$params)
     239                return array('status' => 'params');
     240
     241            if(!$this->checkSecret($params))
     242                return array('status' => 'secret');
    131243//          if($params['apikey'] != $this->api_key)
    132244//              return array('status' => 'apikey');
    133             if($params['secret'] != get_option('backupsavvy_child_secret', 0))
    134                 return array('status' => 'secret');
    135 
    136             return array('status' => 'success');
    137         }
    138 
    139         public function add_backup($params = false) {
    140             if(!$params)
    141                 return array('status' => 'params');
     245
     246            $backup_path = $this->create_backup();
     247
     248            if (!$backup_path)
     249                return array('status' => 'backup_error');
     250
     251            update_option('backupsavvy_child_last_backup', $backup_path);
     252
     253            return array('status' => 'success', 'backup' => $backup_path);
     254        }
     255
     256
     257        private function create_backup()
     258        {
     259            global $wpdb;
     260            include_once 'inc/bsvBackupDb.php';
     261            include_once 'inc/bsv_backupFiles.php';
     262
     263            $this->deleteOldBackups();
     264
     265            try {
     266                $date = date("Y-m-d");
     267                $sql_dump = new bsv_backup_restore(array(
     268                    'dumpfile' => $this->sql_dir . '/sql_dump_' . $date . '.gz',
     269                    'sourcedir' => $this->sql_dir
     270                ));
     271                $sql_dump->backup();
     272
     273                unset($sql_dump);
     274            } catch (Exception $e) {
     275                error_log($e->getMessage());
     276                return false;
     277            }
     278
     279            try {
     280
     281                $backup = new bsvBackupFiles();
     282                $file_path = $backup->get_file_path();
     283
     284            } catch (Exception $e) {
     285                error_log($e->getMessage());
     286                return false;
     287            }
     288
     289            return $file_path;
     290        }
     291
     292        /* Remove the all old archives */
     293        private function deleteOldBackups()
     294        {
     295            $ts = time();
     296            $files = glob($this->source_dir . "/*");
     297            if ($files) {
     298                foreach ($files as $file) {
     299
     300                    //          if ( $ts - filemtime( $file ) > $this->delay_delete ) {
     301
     302                    unlink($file);
     303
     304                    //          }
     305
     306                }
     307            }
     308            $files_sql = glob($this->sql_dir . "/*");
     309            if ($files_sql) {
     310                foreach ($files_sql as $file) {
     311
     312                    unlink($file);
     313
     314                }
     315            }
     316
     317        }
     318
     319        public function upload_backup($params)
     320        {
    142321
    143322//          if($params['apikey'] != $this->api_key)
    144323//              return array('status' => 'apikey');
    145 
    146             if($params['secret'] != get_option('backupsavvy_child_secret', 0))
    147                 return array('status' => 'secret');
    148 
    149       $backup_path = $this->create_backup();
    150             if(!$backup_path)
    151                 return array('status' => 'backup_error');
    152 
    153             update_option('backupsavvy_child_last_backup', $backup_path);
    154 
    155             return array('status' => 'success');
     324             $params = $params->get_params();
     325
     326            if(!$this->checkSecret($params))
     327                return array('status' => 'secret');
     328
     329            $storage = get_option('backupsavvy_child_storage', false);
     330
     331            if (!$storage)
     332                return array('status' => 'storage');
     333
     334            $storage = maybe_unserialize($storage);
     335
     336            $backup_path = get_option('backupsavvy_child_last_backup', false);
     337
     338            $storage_settings = '';
     339            if(isset($storage['storage'])) {
     340                $storage_settings = maybe_unserialize($storage['storage']);
     341            }
     342
     343            if (!$backup_path)
     344                return array('status' => 'backup_name');
     345
     346
     347            if (!file_exists($backup_path))
     348                return array('status' => $backup_path);
     349
     350            if ($storage['connection'] == 'ftp')
     351                if (!$this->upload_ftp($backup_path))
     352                    return array('status' => 'upload_error');
     353
     354            if($storage['connection'] == 'dropbox')
     355                if(!$this->upload_dropbox($backup_path))
     356                    return array('status' => 'upload_error');
     357
     358            if($storage['connection'] == 'google_drive')
     359                if(!$this->upload_google_drive($backup_path, $storage_settings))
     360                    return array(
     361                        'status' => 'upload_error',
     362                        'result' => $this->upload_result
     363                        );
     364
     365            $backup_name = basename($backup_path);
     366
     367            $result = array(
     368                'status' => 'success',
     369                'backup_name' => $backup_name,
     370                'result' => array(
     371                    'fileId' => $this->upload_result->id
     372                ) // google file id
     373            );
     374
     375            return $result;
     376        }
     377
     378
     379        private function upload_ftp($file_path)
     380        {
     381            include_once 'inc/bsv_ftpUpload.php';
     382
     383            $args = array(
     384                'file_path' => $file_path,
     385            );
     386
     387            $ftp = new bsvFtpUpload($args);
     388            $result = $ftp->ftp_exec();
     389            if($result == 'size' || $result === false)
     390                return false;
     391
     392            $this->upload_result = $result;
     393
     394            return true;
     395        }
     396
     397        private function get_vars() {
     398            return (object) array(
     399                'version' => '1.0.0',
     400                'status' => 'prem',
     401                'php' => '5.6'
     402            );
     403        }
     404
     405        private function upload_dropbox($file_path) {
     406
     407            ini_set("max_execution_time", "5000");
     408            ini_set("max_input_time", "5000");
     409            @ini_set( 'memory_limit', '1000M' );
     410            @set_time_limit( 0 );
     411            if(!defined('BCSVDIR')) define('BCSVDIR', __DIR__);
     412
     413            include_once 'inc/DropboxClient.php';
     414            include_once 'inc/bsv_dropboxUpload.php';
     415            $args = array(
     416                'file_path' => $file_path,
     417            );
     418           
     419            $uploader = new bsvDropboxUpload($args);
     420            if(!$uploader->start())
     421                return false;
     422
     423            return true;
     424        }
     425
     426        private function upload_google_drive($file_path, $storage_settings) {
     427            $vault = $storage_settings->getStorage('google_drive');
     428
     429            require_once __DIR__ . '/vendor/autoload.php';
     430            $client = new Google_Client();
     431
     432            $client->addScope(Google_Service_Drive::DRIVE);
     433            $redirect_uri = $vault['redirect_uri'];
     434            $client->setRedirectUri($redirect_uri);
     435
     436            $tokens['access_token'] = $vault['token'];
     437            if(isset($vault['refresh_token'])) {
     438                $tokens['refresh_token'] = $vault['refresh_token'];
     439                $tokens['expires_in'] = $vault['expires_in'];
     440            }
     441
     442            $client->setAccessToken($tokens);
     443            $service = new Google_Service_Drive($client);
     444//
     445            $file = new Google_Service_Drive_DriveFile();
     446            $file->setName(basename( $file_path ));
     447            $this->upload_result = $service->files->create(
     448                $file,
     449                array(
     450                    'data' => file_get_contents($file_path),
     451                    'mimeType' => 'application/octet-stream',
     452                    'uploadType' => 'media'
     453                )
     454            );
     455
     456            return true;
     457
     458        }
     459
     460        public function deactivation_hook()
     461        {
     462            delete_option('backupsavvy_child_secret');
     463
     464            if (is_dir($this->source_dir)) {
     465                rmdir($this->source_dir);
     466            }
     467        }
     468
     469        public static function generate_secret()
     470        {
     471            $site_name = get_bloginfo();
     472
     473            return substr(md5($site_name . time() . rand(1, 100)), 0, 12);
     474        }
     475
     476        public static function get_instance()
     477        {
     478            if (null === self::$instance) {
     479                self::$instance = new self;
     480            }
     481
     482            return self::$instance;
     483        }
     484
     485    }
     486
     487    class backupSavvyChild_Exception extends Exception
     488    {
     489    }
     490
     491    if (!class_exists('storageSettings', false)) {
     492        class storageSettings {
     493            private $name;
     494            private $vaults = [];
     495
     496            public function __construct( $name, array $args ) {
     497                $this->name            = $name;
     498                $args['name']          = $name;
     499                $this->vaults[ $name ] = $args;
     500            }
     501
     502            public function getStorage( $name ) {
     503                return !empty($this->vaults[ $name ]) ? $this->vaults[ $name ] : false;
     504            }
     505
     506            /**
     507             * @param storageSettings $storage current storage
     508             * @param storageSettings $new_storage new storage to add it
     509             *
     510             * @return storageSettings $storage
     511             */
     512            public function addStorage( storageSettings $storage, $new_storage ) {
     513
     514                $storage->vaults[ $this->name ] = $new_storage->getStorage( $this->name ); // array
     515
     516                return $storage;
     517
     518            }
     519
     520            // will be removed storage from the saved storage object
     521            public function cleanStorage() {
     522
     523            }
     524
    156525        }
    157 
    158 
    159         private function create_backup() {
    160             global $wpdb;
    161             include_once 'inc/bsvBackupDb.php';
    162             include_once 'inc/bsv_backupFiles.php';
    163 
    164             $this->deleteOldBackups();
    165 
    166             try {
    167                 $date = date("Y-m-d");
    168                 $sql_dump = new bsv_backup_restore(array('dumpfile' => $this->sql_dir . '/sql_dump_' . $date . '.gz', 'sourcedir' => $this->sql_dir));
    169                 foreach ( $sql_dump->tables_to_dump as $key => $table ) {
    170                     if ( $wpdb->prefix != substr( $table,0 , strlen( $wpdb->prefix ) ) )
    171                         unset( $sql_dump->tables_to_dump[ $key ] );
    172                 }
    173                 $sql_dump->db_backup();
    174                 unset( $sql_dump );
    175             } catch ( Exception $e ) {
    176                 die( $e->getMessage() );
    177             }
    178 
    179             try {
    180                 $backup = new bsvBackupFiles();
    181                 $file_path = $backup->get_file_path();
    182             } catch ( Exception $e ) {
    183                 return false;
    184             }
    185 
    186             return $file_path;
    187         }
    188 
    189         /* Remove the all old archives */
    190         private function deleteOldBackups() {
    191             $ts = time();
    192 //          $files = glob( $this->dump_dir . "/*.zip" );
    193             $files = glob( $this->source_dir."/*" );
    194             if ( $files ) {
    195                 foreach ( $files as $file ) {
    196 
    197                     //          if ( $ts - filemtime( $file ) > $this->delay_delete ) {
    198 
    199                     unlink( $file );
    200 
    201                     //          }
    202 
    203                 }
    204             }
    205             $files_sql = glob( $this->sql_dir."/*" );
    206             if ( $files_sql ) {
    207                 foreach ( $files_sql as $file ) {
    208 
    209                     unlink( $file );
    210 
    211                 }
    212             }
    213 
    214         }
    215 
    216         public function upload_backup($params) {
    217 
    218 //          if($params['apikey'] != $this->api_key)
    219 //              return array('status' => 'apikey');
    220 
    221             if($params['secret'] != get_option('backupsavvy_child_secret', 0))
    222                 return array('status' => 'secret');
    223 
    224             $storage = get_option('backupsavvy_child_storage', false);
    225             if(!$storage)
    226                 return array('status' => 'storage');
    227 
    228             $storage = maybe_unserialize($storage);
    229 
    230       $backup_path = get_option('backupsavvy_child_last_backup', false);
    231 
    232       if(!$backup_path)
    233         return array('status' => 'backup_name');
    234 
    235 
    236       if(!file_exists($backup_path))
    237         return array('status' => 'backup_not_exists');
    238 
    239       if($storage['connection'] == 'ftp')
    240         if(!$this->upload_ftp($backup_path))
    241           return array('status' => 'upload_error');
    242 
    243       return array('status' => 'success');
    244         }
    245 
    246 
    247         private function upload_ftp($file_path) {
    248 
    249       include_once 'inc/bsv_ftpUpload.php';
    250 
    251       $args = array(
    252         'file_path' => $file_path,
    253       );
    254 
    255       $ftp = new bsvFtpUpload($args);
    256       if(!$ftp->ftp_exec())
    257         return false;
    258 
    259             return true;
    260         }
    261 
    262         public function deactivation_hook() {
    263             delete_option('backupsavvy_child_secret');
    264 
    265             if (is_dir($this->source_dir)) {
    266                 rmdir($this->source_dir);
    267             }
    268         }
    269 
    270         public static function generate_secret() {
    271             $site_name = get_bloginfo();
    272 
    273             return substr(md5($site_name.time().rand(1,100)), 0, 12);
    274         }
    275 
    276         public static function get_instance() {
    277             if ( null === self::$instance ) {
    278                 self::$instance = new self;
    279             }
    280 
    281             return self::$instance;
    282         }
    283 
    284526    }
    285527
    286     class backupSavvyChild_Exception extends Exception {}
    287 
    288     add_action( 'plugins_loaded', array( 'BackupSavvyChild', 'get_instance' ) );
    289 
    290     function backupSavvyChild_activation_hook() {
    291         update_option('backupsavvy_child_secret', BackupSavvyChild::generate_secret());
    292     }
    293     register_activation_hook( __FILE__, 'backupSavvyChild_activation_hook' );
     528    add_action('plugins_loaded', array('BackupSavvyChild', 'get_instance'));
     529
     530    function backupSavvyChild_activation_hook()
     531    {
     532        update_option('backupsavvy_child_secret', BackupSavvyChild::generate_secret());
     533    }
     534
     535    register_activation_hook(__FILE__, 'backupSavvyChild_activation_hook');
    294536
    295537}
  • backupsavvychild/trunk/inc/bsvBackupDb.php

    r1927854 r2236498  
    5252    private $table_types = array();
    5353    private $table_status = array();
     54    private $defaulthandle;
     55    private $dbclientflags;
     56    private $database;
     57    private $user;
     58    private $pass;
     59    private $dbcharset;
    5460
    5561
     
    6369    public function __construct( $args = array() ) {
    6470        // Raise the memory limit and max_execution time
    65         @ini_set( 'memory_limit', '32M' );
     71        ini_set("max_execution_time", "5000");
     72        ini_set("max_input_time", "5000");
     73        @ini_set( 'memory_limit', '1000M' );
    6674        @set_time_limit( 0 );
    6775
     
    110118
    111119        $this->connect();
    112         $this->set_charset();
     120//      $this->set_charset();
    113121        $this->open_file();
    114         $this->get_table_info();
    115         $this->db_backup();
    116122
    117123    }
     
    123129     */
    124130    private function connect() {
    125 
    126131        $this->mysqli = mysqli_init();
    127132        if ( ! $this->mysqli ) {
     
    135140            throw new backupSavvy_MySQLDump_Exception( sprintf( __( 'Cannot connect to MySQL database %1$d: %2$s', 'wpbackitup' ), mysqli_connect_errno(), mysqli_connect_error() ) );
    136141        }
    137 
    138142
    139143    }
     
    159163            if ( substr( strtolower( $this->dumpfile ), -3 ) === '.gz' ) {
    160164                if ( ! function_exists( 'gzencode' ) )
    161                     throw new backupSavvy_MySQLDump_Exception( __( 'Functions for gz compression not available', 'wpbackitup' ) );
     165                    throw new backupSavvy_MySQLDump_Exception( __( 'Functions for gz compression not available', 'backupsavvy' ) );
    162166                $this->compression = 'gz';
    163167                $this->handle = fopen( 'compress.zlib://' . $this->dumpfile, 'ab' );
     
    178182
    179183
    180     private function get_table_info() {
    181         global $wpdb;
    182         //get table info
    183         $res = $this->mysqli->query( "SHOW TABLE STATUS FROM `" . $this->database . "`" );
    184         $wpdb->num_queries ++;
    185         if ( $this->mysqli->error ) {
    186             throw new backupSavvy_MySQLDump_Exception( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SHOW TABLE STATUS FROM `" . $this->database . "`" ) );
    187         } else {
    188             while ( $tablestatus = $res->fetch_assoc() ) {
    189                 $this->table_status[ $tablestatus['Name'] ] = $tablestatus;
    190             }
    191             $res->close();
    192         }
    193 
    194         $res = $this->mysqli->query( 'SHOW FULL TABLES FROM `' . $this->database . '`' );
    195         $wpdb->num_queries ++;
    196         if ( $this->mysqli->error ) {
    197             throw new backupSavvy_MySQLDump_Exception( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, 'SHOW FULL TABLES FROM `' . $this->database . '`' ) );
    198         } else {
    199             while ( $table = $res->fetch_array( MYSQLI_NUM ) ) {
    200                 $this->table_types[ $table[ 0 ] ] = $table[ 1 ];
    201                 $this->tables_to_dump[] = $table[ 0 ];
    202                 if ( $table[ 1 ] === 'VIEW' ) {
    203                     $this->views_to_dump[] = $table[ 0 ];
    204                     $this->table_status[ $table[ 0 ] ][ 'Rows' ] = 0;
     184    /**
     185     * Kick off a backup
     186     *
     187     * @access public
     188     * @return bool
     189     */
     190    public function backup() {
     191
     192
     193        $link = $this->mysqli;
     194
     195//      mysqli_set_charset( DB_CHARSET, $this->db );
     196
     197        // Begin new backup of MySql
     198        $tables = mysqli_query($link, 'SHOW TABLES' );
     199
     200        $sql_file  = "# BackupSavvy MySQL database backup\n";
     201        $sql_file .= "#\n";
     202        $sql_file .= "# Generated: " . date( 'l j. F Y H:i T' ) . "\n";
     203        $sql_file .= "# Hostname: " . $this->host . "\n";
     204        $sql_file .= "# Database: " . $this->sql_backquote( $this->database ) . "\n";
     205        $sql_file .= "# --------------------------------------------------------\n";
     206
     207        for ( $i = 0; $i < mysqli_num_rows( $tables ); $i++ ) {
     208            mysqli_data_seek( $tables, $i );
     209            $f = mysqli_fetch_array( $tables );
     210            $curr_table = $f[0];
     211//          self::dump($curr_table);
     212            // Create the SQL statements
     213            $sql_file .= "# --------------------------------------------------------\n";
     214            $sql_file .= "# Table: " . $this->sql_backquote( $curr_table ) . "\n";
     215            $sql_file .= "# --------------------------------------------------------\n";
     216
     217            $this->make_sql( $sql_file, $curr_table );
     218
     219        }
     220
     221        // Read the backup file into string then remove the file
     222//      $finalbackup = file_get_contents($this->database_dump_filename);
     223//      unlink($this->database_dump_filename);
     224//      return $finalbackup;
     225
     226    }
     227
     228    /**
     229     * Reads the Database table in $table and creates
     230     * SQL Statements for recreating structure and data
     231     * Taken partially from phpMyAdmin and partially from
     232     * Alain Wolf, Zurich - Switzerland
     233     * Website: http://restkultur.ch/personal/wolf/scripts/db_backup/
     234     *
     235     * @access private
     236     * @param string $sql_file
     237     * @param string $table
     238     */
     239    private function make_sql( $sql_file, $table ) {
     240        $link = $this->mysqli;
     241        // Add SQL statement to drop existing table
     242        $sql_file .= "\n";
     243        $sql_file .= "\n";
     244        $sql_file .= "#\n";
     245        $sql_file .= "# Delete any existing table " . $this->sql_backquote( $table ) . "\n";
     246        $sql_file .= "#\n";
     247        $sql_file .= "\n";
     248        $sql_file .= "DROP TABLE IF EXISTS " . $this->sql_backquote( $table ) . ";\n";
     249
     250        /* Table Structure */
     251
     252        // Comment in SQL-file
     253        $sql_file .= "\n";
     254        $sql_file .= "\n";
     255        $sql_file .= "#\n";
     256        $sql_file .= "# Table structure of table " . $this->sql_backquote( $table ) . "\n";
     257        $sql_file .= "#\n";
     258        $sql_file .= "\n";
     259
     260        // Get table structure
     261        $query = 'SHOW CREATE TABLE ' . $this->sql_backquote( $table );
     262
     263        $result = mysqli_query($link, $query );
     264
     265        if ( $result ) {
     266
     267            if ( mysqli_num_rows( $result ) > 0 ) {
     268                $sql_create_arr = mysqli_fetch_array( $result );
     269                $sql_file .= $sql_create_arr[1];
     270            }
     271
     272            mysqli_free_result( $result );
     273            $sql_file .= ' ;';
     274
     275        }
     276
     277
     278        /* Table Contents */
     279
     280        // Get table contents
     281        $query = 'SELECT * FROM ' . $this->sql_backquote( $table );
     282        $result = mysqli_query($link, $query);
     283
     284//          self::dump($result);
     285
     286        if ( $result ) {
     287            $fields_cnt = mysqli_num_fields($result );
     288            $rows_cnt   = mysqli_num_rows( $result);
     289        }
     290
     291        // Comment in SQL-file
     292        $sql_file .= "\n";
     293        $sql_file .= "\n";
     294        $sql_file .= "#\n";
     295        $sql_file .= "# Data contents of table " . $table . " (" . $rows_cnt . " records)\n";
     296        $sql_file .= "#\n";
     297
     298        // Checks whether the field is an integer or not
     299        for ( $j = 0; $j < $fields_cnt; $j++ ) {
     300            $table_info = mysqli_fetch_field_direct( $result, $j );
     301
     302            $field_set[$j] = $this->sql_backquote( $table_info->name );
     303            $type = $table_info->type;
     304
     305            //if ( $type === 'tinyint' || $type === 'smallint' || $type === 'mediumint' || $type === 'int' || $type === 'bigint'  || $type === 'timestamp')
     306            # Remove timestamp to avoid error while restore
     307            if ( $type === 'tinyint' || $type === 'smallint' || $type === 'mediumint' || $type === 'int' || $type === 'bigint')
     308                $field_num[$j] = true;
     309
     310            else
     311                $field_num[$j] = false;
     312
     313        }
     314
     315        // Sets the scheme
     316        $entries = 'INSERT INTO ' . $this->sql_backquote( $table ) . ' VALUES (';
     317        $search   = array( '\x00', '\x0a', '\x0d', '\x1a' );  //\x08\\x09, not required
     318        $replace  = array( '\0', '\n', '\r', '\Z' );
     319        $current_row = 0;
     320        $batch_write = 0;
     321
     322        while ( $row = mysqli_fetch_row( $result ) ) {
     323
     324            $current_row++;
     325
     326            // build the statement
     327            for ( $j = 0; $j < $fields_cnt; $j++ ) {
     328
     329                if ( ! isset($row[$j] ) ) {
     330                    $values[]     = 'NULL';
     331
     332                } elseif ( $row[$j] === '0' || $row[$j] !== '' ) {
     333
     334                    // a number
     335                    if ( $field_num[$j] )
     336                        $values[] = $row[$j];
     337
     338                    else {
     339//                              str_replace($search, $replace, $this->sql_addslashes($row[$j])
     340                        $value = mysqli_real_escape_string($link, $row[$j]);
     341                        $values[] = "'" . $value . "'";
     342                    }
     343
     344                } else {
     345                    $values[] = "''";
     346
    205347                }
    206             }
    207             $res->close();
    208         }
    209 
    210     }
    211 
    212     public function db_backup() {
    213         //write dump head
    214         $this->create_dump_head();
    215         //write tables
    216         foreach( $this->tables_to_dump as $table ) {
    217             $this->dump_table_head( $table );
    218             $this->dump_table( $table );
    219             $this->dump_table_footer( $table );
    220         }
    221         //write footer
    222         $this->create_dump_footer();
    223     }
    224 
    225     private function create_dump_head( $wp_info = FALSE ) {
    226         global $wpdb;
    227         // get sql timezone
    228         $res = $this->mysqli->query( "SELECT @@time_zone" );
    229         $wpdb->num_queries ++;
    230         $mysqltimezone = $res->fetch_row();
    231         $mysqltimezone = $mysqltimezone[0];
    232         $res->close();
    233 
    234         //For SQL always use \n as MySQL wants this on all platforms.
    235         $dbdumpheader  = "-- ---------------------------------------------------------\n";
    236         $dbdumpheader .= "-- Backup with backWpItUp wordpress plugin\n";
    237         if ( $wp_info ) {
    238             $dbdumpheader .= "-- Blog Name: " . get_bloginfo( 'name' ) . "\n";
    239             $dbdumpheader .= "-- Blog URL: " . trailingslashit( get_bloginfo( 'url' ) ) . "\n";
    240             $dbdumpheader .= "-- Blog ABSPATH: " . trailingslashit( str_replace( '\\', '/', ABSPATH ) ) . "\n";
    241             $dbdumpheader .= "-- Blog Charset: " . get_bloginfo( 'charset' ) . "\n";
    242             $dbdumpheader .= "-- Table Prefix: " . $wpdb->prefix . "\n";
    243         }
    244         $dbdumpheader .= "-- Database Name: " . $this->database . "\n";
    245         $dbdumpheader .= "-- Backup on: " . date( 'Y-m-d H:i:s', current_time( 'timestamp' ) ) . "\n";
    246         $dbdumpheader .= "-- ---------------------------------------------------------\n\n";
    247         //for better import with mysql client
    248         $dbdumpheader .= "/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n";
    249         $dbdumpheader .= "/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n";
    250         $dbdumpheader .= "/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n";
    251         $dbdumpheader .= "/*!40101 SET NAMES " . $this->mysqli->character_set_name() . " */;\n";
    252         $dbdumpheader .= "/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n";
    253         $dbdumpheader .= "/*!40103 SET TIME_ZONE='" . $mysqltimezone . "' */;\n";
    254         $dbdumpheader .= "/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n";
    255         $dbdumpheader .= "/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n";
    256         $dbdumpheader .= "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n";
    257         $dbdumpheader .= "/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n";
    258         $this->write_out( $dbdumpheader );
    259     }
    260 
    261     private function dump_table_head( $table ) {
    262         global $wpdb;
    263         //dump View
    264         if ( $this->table_types[ $table ] === 'VIEW' ) {
    265             //Dump the view table structure
    266             $fields = array();
    267             $res = $this->mysqli->query( "SELECT * FROM `" . $table . "` LIMIT 1" );
    268             $wpdb->num_queries ++;
    269             if ( $this->mysqli->error ) {
    270                 trigger_error( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SELECT * FROM `" . $table . "` LIMIT 1" ), E_USER_WARNING );
    271             } else {
    272                 $fields = $res->fetch_fields();
    273                 $res->close();
    274             }
    275             if ( $res ) {
    276                 $tablecreate = "\n--\n-- Temporary table structure for view `" . $table . "`\n--\n\n";
    277                 $tablecreate .= "DROP TABLE IF EXISTS `" . $table . "`;\n";
    278                 $tablecreate .= "/*!50001 DROP VIEW IF EXISTS `" . $table . "`*/;\n";
    279                 $tablecreate .= "/*!40101 SET @saved_cs_client     = @@character_set_client */;\n";
    280                 $tablecreate .= "/*!40101 SET character_set_client = '" . $this->mysqli->character_set_name() . "' */;\n";
    281                 $tablecreate .= "CREATE TABLE `" . $table . "` (\n";
    282                 foreach( $fields as $field ) {
    283                     $tablecreate .= "  `". $field->orgname . "` tinyint NOT NULL,\n";
    284                 }
    285                 $tablecreate = substr( $tablecreate, 0, -2 ) ."\n";
    286                 $tablecreate .= ");\n";
    287                 $tablecreate .= "/*!40101 SET character_set_client = @saved_cs_client */;\n";
    288                 $this->write_out( $tablecreate );
    289             }
    290             return 0;
    291         }
    292 
    293         //dump normal Table
    294         $tablecreate = "\n--\n-- Table structure for `" . $table . "`\n--\n\n";
    295         $tablecreate .= "DROP TABLE IF EXISTS `" . $table . "`;\n";
    296         $tablecreate .= "/*!40101 SET @saved_cs_client     = @@character_set_client */;\n";
    297         $tablecreate .= "/*!40101 SET character_set_client = '" . $this->mysqli->character_set_name() . "' */;\n";
    298         //Dump the table structure
    299         $res = $this->mysqli->query( "SHOW CREATE TABLE `" . $table . "`" );
    300         $wpdb->num_queries ++;
    301         if ( $this->mysqli->error ) {
    302             trigger_error( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SHOW CREATE TABLE `" . $table . "`" ), E_USER_WARNING );
    303         } else {
    304             $createtable = $res->fetch_assoc();
    305             $res->close();
    306             $tablecreate .= $createtable[ 'Create Table' ] . ";\n";
    307             $tablecreate .= "/*!40101 SET character_set_client = @saved_cs_client */;\n";
    308             $this->write_out( $tablecreate );
    309 
    310             if ( $this->table_status[ $table ][ 'Engine' ] !== 'MyISAM' ) {
    311                 $this->table_status[ $table ][ 'Rows' ] = '~' . $this->table_status[ $table ][ 'Rows' ];
    312             }
    313 
    314             if ( $this->table_status[ $table ][ 'Rows' ] !== 0 ) {
    315                 //Dump Table data
    316                 $this->write_out( "\n--\n-- Backup data for table `" . $table . "`\n--\n\nLOCK TABLES `" . $table . "` WRITE;\n/*!40000 ALTER TABLE `" . $table . "` DISABLE KEYS */;\n" );
    317             }
    318 
    319             return $this->table_status[ $table ][ 'Rows' ];
    320         }
    321 
    322         return 0;
    323     }
    324 
    325     private function dump_table( $table ) {
    326         ini_set('memory_limit','256M');
    327         global $wpdb;
    328         $done_records = 0;
    329 
    330         if ( $this->table_types[ $table ] == 'VIEW' ) {
    331             return $done_records;
    332         }
    333 
    334         //get data from table
    335         $res = $this->mysqli->query( "SELECT * FROM `" . $table . "` ", MYSQLI_USE_RESULT );
    336         $wpdb->num_queries ++;
    337         if ( $this->mysqli->error ) {
    338             trigger_error( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SELECT * FROM `" . $table . "`" ), E_USER_WARNING );
    339             return 0;
    340         }
    341 
    342         $fieldsarray = array();
    343         $fieldinfo   = array();
    344         $fields      = $res->fetch_fields();
    345         $i = 0;
    346         foreach ( $fields as $filed ) {
    347             $fieldsarray[ $i ]               = $filed->orgname;
    348             $fieldinfo[ $fieldsarray[ $i ] ] = $filed;
    349             $i ++;
    350         }
    351         $dump = '';
    352         while ( $data = $res->fetch_assoc() ) {
    353             $values = array();
    354             foreach ( $data as $key => $value ) {
    355                 if ( is_null( $value ) || ! isset( $value ) ) { // Make Value NULL to string NULL
    356                     $value = "NULL";
    357                 } elseif ( in_array( (int) $fieldinfo[ $key ]->type, array( MYSQLI_TYPE_DECIMAL, MYSQLI_TYPE_TINY, MYSQLI_TYPE_SHORT, MYSQLI_TYPE_LONG,  MYSQLI_TYPE_FLOAT, MYSQLI_TYPE_DOUBLE, MYSQLI_TYPE_LONGLONG, MYSQLI_TYPE_INT24 ), true ) ) {//is value numeric no esc
    358                     $value = empty( $value ) ? 0 : $value;
    359                 } elseif ( $fieldinfo[ $key ]->flags & MYSQLI_BINARY_FLAG ) {//is value binary
    360                     $hex = unpack( 'H*', $value );
    361                     $value = empty( $value ) ? "''" : "0x$hex[1]";
    362                 } else {
    363                     $value = "'" . $this->mysqli->real_escape_string( $value ) . "'";
    364                 }
    365                 $values[ ] = $value;
    366             }
    367             //new query in dump on more than 50000 chars.
    368             if ( empty( $dump ) )
    369                 $dump = "INSERT INTO `" . $table . "` (`" . implode( "`, `", $fieldsarray ) . "`) VALUES \n";
    370             if ( strlen( $dump ) <= 50000  ) {
    371                 $dump .= "(" . implode( ", ", $values ) . "),\n";
    372             } else {
    373                 $dump .= "(" . implode( ", ", $values ) . ");\n";
    374                 $this->write_out( $dump );
    375                 $dump = '';
    376             }
    377             $done_records ++;
    378         }
    379         if ( ! empty( $dump ) ) {
    380             $dump = substr( $dump, 0, -2 ) . ";\n" ;
    381             $this->write_out( $dump );
    382         }
    383         $res->close();
    384 
    385         return $done_records;
    386     }
    387 
    388     private function dump_table_footer($table) {
    389         if ( $this->table_status[ $table ][ 'Rows' ] !== 0 ) {
    390             $this->write_out( "/*!40000 ALTER TABLE `" . $table . "` ENABLE KEYS */;\nUNLOCK TABLES;\n" );
    391         }
    392     }
    393 
    394     /**
    395      * Write Dump Footer with dump of functions and procedures
    396      */
    397     public function create_dump_footer() {
    398         global $wpdb;
    399         //dump Views
    400         if($this->views_to_dump) {
    401             foreach ( $this->views_to_dump as $view ) {
    402                 $this->dump_view_table_head( $view );
    403             }
    404         }
    405 
    406         //dump procedures and functions
    407         $this->write_out( "\n--\n-- Backup routines for database '" . $this->database . "'\n--\n" );
    408 
    409         //dump Functions
    410         $res = $this->mysqli->query( "SHOW FUNCTION STATUS" );
    411         $wpdb->num_queries ++;
    412         if ( $this->mysqli->error ) {
    413             trigger_error( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SHOW FUNCTION STATUS" ), E_USER_WARNING );
    414         } else {
    415             while ( $function_status = $res->fetch_assoc() ) {
    416                 if ( $this->database != $function_status[ 'Db' ] ) {
    417                     continue;
    418                 }
    419                 $res2 = $this->mysqli->query( "SHOW CREATE FUNCTION `" .  $function_status[ 'Db' ] . "`.`" . $function_status[ 'Name' ] . "`" );
    420                 $wpdb->num_queries ++;
    421                 if ( $this->mysqli->error ) {
    422                     trigger_error( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SHOW CREATE FUNCTION `" .  $function_status[ 'Db' ] . "`.`" . $function_status[ 'Name' ] . "`" ), E_USER_WARNING );
    423                 } else {
    424                     $create_function = $res2->fetch_assoc();
    425                     $res2->close();
    426                     $create = "\n--\n-- Function structure for " . $function_status[ 'Name' ] . "\n--\n\n";
    427                     $create .= "DROP FUNCTION IF EXISTS `" . $function_status[ 'Name' ] . "`;\n";
    428                     $create .= "/*!40101 SET @saved_cs_client     = @@character_set_client */;\n";
    429                     $create .= "/*!40101 SET character_set_client = '" . $this->mysqli->character_set_name() . "' */;\n";
    430                     $create .= $create_function[ 'Create Function' ] . ";\n";
    431                     $create .= "/*!40101 SET character_set_client = @saved_cs_client */;\n";
    432                     $this->write_out( $create );
    433                 }
    434             }
    435             $res->close();
    436         }
    437 
    438         //dump Procedures
    439         $res = $this->mysqli->query( "SHOW PROCEDURE STATUS" );
    440         $wpdb->num_queries ++;
    441         if ( $this->mysqli->error ) {
    442             trigger_error( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SHOW PROCEDURE STATUS" ), E_USER_WARNING );
    443         } else {
    444             while ( $procedure_status = $res->fetch_assoc() ) {
    445                 if ( $this->database != $procedure_status[ 'Db' ] ) {
    446                     continue;
    447                 }
    448                 $res2 = $this->mysqli->query( "SHOW CREATE PROCEDURE `" . $procedure_status[ 'Db' ] . "`.`" . $procedure_status[ 'Name' ] . "`" );
    449                 $GLOBALS[ 'wpdb' ]->num_queries ++;
    450                 if ( $this->mysqli->error ) {
    451                     trigger_error( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SHOW CREATE PROCEDURE `" . $procedure_status[ 'Db' ] . "`.`" . $procedure_status[ 'Name' ] . "`" ), E_USER_WARNING );
    452                 } else {
    453                     $create_procedure = $res2->fetch_assoc();
    454                     $res2->close();
    455                     $create = "\n--\n-- Procedure structure for " . $procedure_status[ 'Name' ] . "\n--\n\n";
    456                     $create .= "DROP PROCEDURE IF EXISTS `" . $procedure_status[ 'Name' ] . "`;\n";
    457                     $create .= "/*!40101 SET @saved_cs_client     = @@character_set_client */;\n";
    458                     $create .= "/*!40101 SET character_set_client = '" . $this->mysqli->character_set_name() . "' */;\n";
    459                     $create .= $create_procedure[ 'Create Procedure' ] . ";\n";
    460                     $create .= "/*!40101 SET character_set_client = @saved_cs_client */;\n";
    461                     $this->write_out( $create );
    462                 }
    463             }
    464             $res->close();
    465         }
    466 
    467         //dump Trigger
    468         $res = $this->mysqli->query( "SHOW TRIGGERS FROM `" . $this->database . "`" );
    469         $wpdb->num_queries ++;
    470         if ( $this->mysqli->error ) {
    471             trigger_error( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SHOW TRIGGERS" ), E_USER_WARNING );
    472         } else {
    473             while ( $triggers = $res->fetch_assoc() ) {
    474                 $res2 = $this->mysqli->query( "SHOW CREATE TRIGGER `" . $this->database . "`.`" . $triggers[ 'Trigger' ] . "`" );
    475                 $GLOBALS[ 'wpdb' ]->num_queries ++;
    476                 if ( $this->mysqli->error ) {
    477                     trigger_error( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SHOW CREATE TRIGGER `" . $this->database . "`.`" . $triggers[ 'Trigger' ] . "`" ), E_USER_WARNING );
    478                 } else {
    479                     $create_trigger = $res2->fetch_assoc();
    480                     $res2->close();
    481                     $create = "\n--\n-- Trigger structure for " . $triggers[ 'Trigger' ] . "\n--\n\n";
    482                     $create .= "DROP TRIGGER IF EXISTS `" . $triggers[ 'Trigger' ] . "`;\n";
    483                     $create .= "DELIMITER //\n";
    484                     $create .= $create_trigger[ 'SQL Original Statement' ] . ";\n";
    485                     $create .= "//\nDELIMITER ;\n";
    486                     $this->write_out( $create );
    487                 }
    488             }
    489             $res->close();
    490         }
    491 
    492         //for better import with mysql client
    493         $dbdumpfooter  = "\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n";
    494         $dbdumpfooter .= "/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n";
    495         $dbdumpfooter .= "/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n";
    496         $dbdumpfooter .= "/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n";
    497         $dbdumpfooter .= "/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n";
    498         $dbdumpfooter .= "/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n";
    499         $dbdumpfooter .= "/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n";
    500         $dbdumpfooter .= "/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n";
    501         $dbdumpfooter .= "\n-- Backup completed on " . date( 'Y-m-d H:i:s', current_time( 'timestamp' ) ). "\n";
    502         $this->write_out( $dbdumpfooter );
    503     }
    504 
    505     /**
    506      * Dump view structure
    507      *
    508      * @param string $view name of Table to dump
    509      * @throws backupSavvy_MySQLDump_Exception
    510      * @return int Size of table
    511      */
    512     public function dump_view_table_head( $view ) {
    513 
    514         //Dump the view structure
    515         $res = $this->mysqli->query( "SHOW CREATE VIEW `" . $view . "`" );
    516         $GLOBALS[ 'wpdb' ]->num_queries ++;
    517         if ( $this->mysqli->error ) {
    518             trigger_error( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SHOW CREATE VIEW `" . $view . "`" ), E_USER_WARNING );
    519         } else {
    520             $createview = $res->fetch_assoc();
    521             $res->close();
    522             $tablecreate = "\n--\n-- View structure for `" . $view . "`\n--\n\n";
    523             $tablecreate .= "DROP TABLE IF EXISTS `" . $view . "`;\n";
    524             $tablecreate .= "DROP VIEW IF EXISTS `" . $view . "`;\n";
    525             $tablecreate .= "/*!40101 SET @saved_cs_client     = @@character_set_client */;\n";
    526             $tablecreate .= "/*!40101 SET character_set_client = '" . $this->mysqli->character_set_name() . "' */;\n";
    527             $tablecreate .= $createview[ 'Create View' ] . ";\n";
    528             $tablecreate .= "/*!40101 SET character_set_client = @saved_cs_client */;\n";
    529             $this->write( $tablecreate );
    530         }
     348
     349            }
     350
     351            $sql_file .= " \n" . $entries . implode( ', ', $values ) . ") ;";
     352
     353            // write the rows in batches of 100
     354            if ( $batch_write === 100 ) {
     355                $batch_write = 0;
     356                $this->write_sql( $sql_file );
     357                $sql_file = '';
     358            }
     359
     360            $batch_write++;
     361            unset( $values );
     362
     363        }
     364
     365        mysqli_free_result( $result );
     366
     367        // Create footer/closing comment in SQL-file
     368        $sql_file .= "\n";
     369        $sql_file .= "#\n";
     370        $sql_file .= "# End of data contents of table " . $table . "\n";
     371        $sql_file .= "# --------------------------------------------------------\n";
     372        $sql_file .= "\n";
     373//      self::dump($sql_file);
     374        $this->write_sql( $sql_file );
     375
     376    }
     377
     378    /**
     379     * Write the SQL file
     380     *
     381     * @access private
     382     * @param string $sql
     383     * @return bool
     384     */
     385    private function write_sql( $sql ) {
     386        if(!fwrite( $this->handle, $sql ))
     387            return false;
     388
     389        return true;
     390
     391//      }
    531392
    532393    }
     
    539400    }
    540401
    541     /************************** SET GET METHOD FOR FILE AND PATH ******************/
    542 
    543     /**
    544      * Get the directory backups are saved to
    545      *
    546      * @access public
    547      * @return string
    548      */
    549     private function get_path() {
    550 
    551         if ( empty( $this->path ) )
    552             $this->set_path( self::conform_dir( $this->file_path ) );
    553 
    554         //  echo $this->path;die;
    555         return $this->path;
    556 
    557     }
    558 
    559 
    560     /**
    561      * Set the directory backups are saved to
    562      *
    563      * @access public
    564      * @param string $path
    565      * @return null
    566      */
    567 
    568     private function set_path( $path ) {
    569 
    570         if ( empty( $path ) || ! is_string( $path ) )
    571             throw new Exception( 'Invalid backup path <code>' . $path . '</code> must be a non empty (string)' );
    572 
    573         $this->path = self::conform_dir( $path );
    574 
    575     }
    576 
    577     /**
    578      * Sanitize a directory path
    579      *
    580      * @access public
    581      * @static
    582      * @param string $dir
    583      * @param bool $rel. (default: false)
    584      * @return string $dir
    585      */
    586     public static function conform_dir( $dir, $recursive = false ) {
    587 
    588         // Assume empty dir is root
    589         if ( ! $dir )
    590             $dir = '/';
    591 
    592         // Replace single forward slash (looks like double slash because we have to escape it)
    593         $dir = str_replace( '\\', '/', $dir );
    594         $dir = str_replace( '//', '/', $dir );
    595 
    596         // Remove the trailing slash
    597         if ( $dir !== '/' )
    598             $dir = self::untrailingslashit( $dir );
    599 
    600         // Carry on until completely normalized
    601         if ( ! $recursive && self::conform_dir( $dir, true ) != $dir )
    602             return self::conform_dir( $dir );
    603 
    604         return (string) $dir;
    605 
    606     }
    607 
    608     /**
    609      * Get the full filepath to the database dump file.
    610      *
    611      * @access public
    612      * @return string
    613      */
    614     public function get_database_dump_filepath() {
    615 
    616         return $this->trailingslashit( $this->get_path() ) . $this->get_database_dump_filename();
    617 
    618     }
    619 
    620     /**
    621      * Get the filename of the database dump file
    622      *
    623      * @access public
    624      * @return string
    625      */
    626     public function get_database_dump_filename() {
    627 
    628         if ( empty( $this->database_dump_filename ) )
    629             $this->set_database_dump_filename( 'database_' . $this->database . '.sql' );
    630 
    631         return $this->database_dump_filename;
    632 
    633     }
    634 
    635     /**
    636      * Set the filename of the database dump file
    637      *
    638      * @access public
    639      * @param string $filename
    640      */
    641     public function set_database_dump_filename( $filename ) {
    642 
    643         if ( empty( $filename ) || ! is_string( $filename ) )
    644             throw new Exception( 'database dump filename must be a non empty string' );
    645 
    646         if ( pathinfo( $filename, PATHINFO_EXTENSION ) !== 'sql' )
    647             throw new Exception( 'invalid file extension for database dump filename <code>' . $filename . '</code>' );
    648 
    649         //$this->database_dump_filename = strtolower( sanitize_file_name( remove_accents( $filename ) ) );
    650         $this->database_dump_filename = strtolower( $this->remove_accents( $filename ) ) ;
    651 
    652     }
    653 
    654     /********************************** END **********************************/
    655    
    656 
    657    
    658 
    659     private function remove_accents($string) {
    660         if ( !preg_match('/[\x80-\xff]/', $string) )
    661             return $string;
    662 
    663         if (seems_utf8($string)) {
    664             $chars = array(
    665                 // Decompositions for Latin-1 Supplement
    666                 chr(194).chr(170) => 'a', chr(194).chr(186) => 'o',
    667                 chr(195).chr(128) => 'A', chr(195).chr(129) => 'A',
    668                 chr(195).chr(130) => 'A', chr(195).chr(131) => 'A',
    669                 chr(195).chr(132) => 'A', chr(195).chr(133) => 'A',
    670                 chr(195).chr(134) => 'AE',chr(195).chr(135) => 'C',
    671                 chr(195).chr(136) => 'E', chr(195).chr(137) => 'E',
    672                 chr(195).chr(138) => 'E', chr(195).chr(139) => 'E',
    673                 chr(195).chr(140) => 'I', chr(195).chr(141) => 'I',
    674                 chr(195).chr(142) => 'I', chr(195).chr(143) => 'I',
    675                 chr(195).chr(144) => 'D', chr(195).chr(145) => 'N',
    676                 chr(195).chr(146) => 'O', chr(195).chr(147) => 'O',
    677                 chr(195).chr(148) => 'O', chr(195).chr(149) => 'O',
    678                 chr(195).chr(150) => 'O', chr(195).chr(153) => 'U',
    679                 chr(195).chr(154) => 'U', chr(195).chr(155) => 'U',
    680                 chr(195).chr(156) => 'U', chr(195).chr(157) => 'Y',
    681                 chr(195).chr(158) => 'TH',chr(195).chr(159) => 's',
    682                 chr(195).chr(160) => 'a', chr(195).chr(161) => 'a',
    683                 chr(195).chr(162) => 'a', chr(195).chr(163) => 'a',
    684                 chr(195).chr(164) => 'a', chr(195).chr(165) => 'a',
    685                 chr(195).chr(166) => 'ae',chr(195).chr(167) => 'c',
    686                 chr(195).chr(168) => 'e', chr(195).chr(169) => 'e',
    687                 chr(195).chr(170) => 'e', chr(195).chr(171) => 'e',
    688                 chr(195).chr(172) => 'i', chr(195).chr(173) => 'i',
    689                 chr(195).chr(174) => 'i', chr(195).chr(175) => 'i',
    690                 chr(195).chr(176) => 'd', chr(195).chr(177) => 'n',
    691                 chr(195).chr(178) => 'o', chr(195).chr(179) => 'o',
    692                 chr(195).chr(180) => 'o', chr(195).chr(181) => 'o',
    693                 chr(195).chr(182) => 'o', chr(195).chr(184) => 'o',
    694                 chr(195).chr(185) => 'u', chr(195).chr(186) => 'u',
    695                 chr(195).chr(187) => 'u', chr(195).chr(188) => 'u',
    696                 chr(195).chr(189) => 'y', chr(195).chr(190) => 'th',
    697                 chr(195).chr(191) => 'y', chr(195).chr(152) => 'O',
    698                 // Decompositions for Latin Extended-A
    699                 chr(196).chr(128) => 'A', chr(196).chr(129) => 'a',
    700                 chr(196).chr(130) => 'A', chr(196).chr(131) => 'a',
    701                 chr(196).chr(132) => 'A', chr(196).chr(133) => 'a',
    702                 chr(196).chr(134) => 'C', chr(196).chr(135) => 'c',
    703                 chr(196).chr(136) => 'C', chr(196).chr(137) => 'c',
    704                 chr(196).chr(138) => 'C', chr(196).chr(139) => 'c',
    705                 chr(196).chr(140) => 'C', chr(196).chr(141) => 'c',
    706                 chr(196).chr(142) => 'D', chr(196).chr(143) => 'd',
    707                 chr(196).chr(144) => 'D', chr(196).chr(145) => 'd',
    708                 chr(196).chr(146) => 'E', chr(196).chr(147) => 'e',
    709                 chr(196).chr(148) => 'E', chr(196).chr(149) => 'e',
    710                 chr(196).chr(150) => 'E', chr(196).chr(151) => 'e',
    711                 chr(196).chr(152) => 'E', chr(196).chr(153) => 'e',
    712                 chr(196).chr(154) => 'E', chr(196).chr(155) => 'e',
    713                 chr(196).chr(156) => 'G', chr(196).chr(157) => 'g',
    714                 chr(196).chr(158) => 'G', chr(196).chr(159) => 'g',
    715                 chr(196).chr(160) => 'G', chr(196).chr(161) => 'g',
    716                 chr(196).chr(162) => 'G', chr(196).chr(163) => 'g',
    717                 chr(196).chr(164) => 'H', chr(196).chr(165) => 'h',
    718                 chr(196).chr(166) => 'H', chr(196).chr(167) => 'h',
    719                 chr(196).chr(168) => 'I', chr(196).chr(169) => 'i',
    720                 chr(196).chr(170) => 'I', chr(196).chr(171) => 'i',
    721                 chr(196).chr(172) => 'I', chr(196).chr(173) => 'i',
    722                 chr(196).chr(174) => 'I', chr(196).chr(175) => 'i',
    723                 chr(196).chr(176) => 'I', chr(196).chr(177) => 'i',
    724                 chr(196).chr(178) => 'IJ',chr(196).chr(179) => 'ij',
    725                 chr(196).chr(180) => 'J', chr(196).chr(181) => 'j',
    726                 chr(196).chr(182) => 'K', chr(196).chr(183) => 'k',
    727                 chr(196).chr(184) => 'k', chr(196).chr(185) => 'L',
    728                 chr(196).chr(186) => 'l', chr(196).chr(187) => 'L',
    729                 chr(196).chr(188) => 'l', chr(196).chr(189) => 'L',
    730                 chr(196).chr(190) => 'l', chr(196).chr(191) => 'L',
    731                 chr(197).chr(128) => 'l', chr(197).chr(129) => 'L',
    732                 chr(197).chr(130) => 'l', chr(197).chr(131) => 'N',
    733                 chr(197).chr(132) => 'n', chr(197).chr(133) => 'N',
    734                 chr(197).chr(134) => 'n', chr(197).chr(135) => 'N',
    735                 chr(197).chr(136) => 'n', chr(197).chr(137) => 'N',
    736                 chr(197).chr(138) => 'n', chr(197).chr(139) => 'N',
    737                 chr(197).chr(140) => 'O', chr(197).chr(141) => 'o',
    738                 chr(197).chr(142) => 'O', chr(197).chr(143) => 'o',
    739                 chr(197).chr(144) => 'O', chr(197).chr(145) => 'o',
    740                 chr(197).chr(146) => 'OE',chr(197).chr(147) => 'oe',
    741                 chr(197).chr(148) => 'R',chr(197).chr(149) => 'r',
    742                 chr(197).chr(150) => 'R',chr(197).chr(151) => 'r',
    743                 chr(197).chr(152) => 'R',chr(197).chr(153) => 'r',
    744                 chr(197).chr(154) => 'S',chr(197).chr(155) => 's',
    745                 chr(197).chr(156) => 'S',chr(197).chr(157) => 's',
    746                 chr(197).chr(158) => 'S',chr(197).chr(159) => 's',
    747                 chr(197).chr(160) => 'S', chr(197).chr(161) => 's',
    748                 chr(197).chr(162) => 'T', chr(197).chr(163) => 't',
    749                 chr(197).chr(164) => 'T', chr(197).chr(165) => 't',
    750                 chr(197).chr(166) => 'T', chr(197).chr(167) => 't',
    751                 chr(197).chr(168) => 'U', chr(197).chr(169) => 'u',
    752                 chr(197).chr(170) => 'U', chr(197).chr(171) => 'u',
    753                 chr(197).chr(172) => 'U', chr(197).chr(173) => 'u',
    754                 chr(197).chr(174) => 'U', chr(197).chr(175) => 'u',
    755                 chr(197).chr(176) => 'U', chr(197).chr(177) => 'u',
    756                 chr(197).chr(178) => 'U', chr(197).chr(179) => 'u',
    757                 chr(197).chr(180) => 'W', chr(197).chr(181) => 'w',
    758                 chr(197).chr(182) => 'Y', chr(197).chr(183) => 'y',
    759                 chr(197).chr(184) => 'Y', chr(197).chr(185) => 'Z',
    760                 chr(197).chr(186) => 'z', chr(197).chr(187) => 'Z',
    761                 chr(197).chr(188) => 'z', chr(197).chr(189) => 'Z',
    762                 chr(197).chr(190) => 'z', chr(197).chr(191) => 's',
    763                 // Decompositions for Latin Extended-B
    764                 chr(200).chr(152) => 'S', chr(200).chr(153) => 's',
    765                 chr(200).chr(154) => 'T', chr(200).chr(155) => 't',
    766                 // Euro Sign
    767                 chr(226).chr(130).chr(172) => 'E',
    768                 // GBP (Pound) Sign
    769                 chr(194).chr(163) => '',
    770                 // Vowels with diacritic (Vietnamese)
    771                 // unmarked
    772                 chr(198).chr(160) => 'O', chr(198).chr(161) => 'o',
    773                 chr(198).chr(175) => 'U', chr(198).chr(176) => 'u',
    774                 // grave accent
    775                 chr(225).chr(186).chr(166) => 'A', chr(225).chr(186).chr(167) => 'a',
    776                 chr(225).chr(186).chr(176) => 'A', chr(225).chr(186).chr(177) => 'a',
    777                 chr(225).chr(187).chr(128) => 'E', chr(225).chr(187).chr(129) => 'e',
    778                 chr(225).chr(187).chr(146) => 'O', chr(225).chr(187).chr(147) => 'o',
    779                 chr(225).chr(187).chr(156) => 'O', chr(225).chr(187).chr(157) => 'o',
    780                 chr(225).chr(187).chr(170) => 'U', chr(225).chr(187).chr(171) => 'u',
    781                 chr(225).chr(187).chr(178) => 'Y', chr(225).chr(187).chr(179) => 'y',
    782                 // hook
    783                 chr(225).chr(186).chr(162) => 'A', chr(225).chr(186).chr(163) => 'a',
    784                 chr(225).chr(186).chr(168) => 'A', chr(225).chr(186).chr(169) => 'a',
    785                 chr(225).chr(186).chr(178) => 'A', chr(225).chr(186).chr(179) => 'a',
    786                 chr(225).chr(186).chr(186) => 'E', chr(225).chr(186).chr(187) => 'e',
    787                 chr(225).chr(187).chr(130) => 'E', chr(225).chr(187).chr(131) => 'e',
    788                 chr(225).chr(187).chr(136) => 'I', chr(225).chr(187).chr(137) => 'i',
    789                 chr(225).chr(187).chr(142) => 'O', chr(225).chr(187).chr(143) => 'o',
    790                 chr(225).chr(187).chr(148) => 'O', chr(225).chr(187).chr(149) => 'o',
    791                 chr(225).chr(187).chr(158) => 'O', chr(225).chr(187).chr(159) => 'o',
    792                 chr(225).chr(187).chr(166) => 'U', chr(225).chr(187).chr(167) => 'u',
    793                 chr(225).chr(187).chr(172) => 'U', chr(225).chr(187).chr(173) => 'u',
    794                 chr(225).chr(187).chr(182) => 'Y', chr(225).chr(187).chr(183) => 'y',
    795                 // tilde
    796                 chr(225).chr(186).chr(170) => 'A', chr(225).chr(186).chr(171) => 'a',
    797                 chr(225).chr(186).chr(180) => 'A', chr(225).chr(186).chr(181) => 'a',
    798                 chr(225).chr(186).chr(188) => 'E', chr(225).chr(186).chr(189) => 'e',
    799                 chr(225).chr(187).chr(132) => 'E', chr(225).chr(187).chr(133) => 'e',
    800                 chr(225).chr(187).chr(150) => 'O', chr(225).chr(187).chr(151) => 'o',
    801                 chr(225).chr(187).chr(160) => 'O', chr(225).chr(187).chr(161) => 'o',
    802                 chr(225).chr(187).chr(174) => 'U', chr(225).chr(187).chr(175) => 'u',
    803                 chr(225).chr(187).chr(184) => 'Y', chr(225).chr(187).chr(185) => 'y',
    804                 // acute accent
    805                 chr(225).chr(186).chr(164) => 'A', chr(225).chr(186).chr(165) => 'a',
    806                 chr(225).chr(186).chr(174) => 'A', chr(225).chr(186).chr(175) => 'a',
    807                 chr(225).chr(186).chr(190) => 'E', chr(225).chr(186).chr(191) => 'e',
    808                 chr(225).chr(187).chr(144) => 'O', chr(225).chr(187).chr(145) => 'o',
    809                 chr(225).chr(187).chr(154) => 'O', chr(225).chr(187).chr(155) => 'o',
    810                 chr(225).chr(187).chr(168) => 'U', chr(225).chr(187).chr(169) => 'u',
    811                 // dot below
    812                 chr(225).chr(186).chr(160) => 'A', chr(225).chr(186).chr(161) => 'a',
    813                 chr(225).chr(186).chr(172) => 'A', chr(225).chr(186).chr(173) => 'a',
    814                 chr(225).chr(186).chr(182) => 'A', chr(225).chr(186).chr(183) => 'a',
    815                 chr(225).chr(186).chr(184) => 'E', chr(225).chr(186).chr(185) => 'e',
    816                 chr(225).chr(187).chr(134) => 'E', chr(225).chr(187).chr(135) => 'e',
    817                 chr(225).chr(187).chr(138) => 'I', chr(225).chr(187).chr(139) => 'i',
    818                 chr(225).chr(187).chr(140) => 'O', chr(225).chr(187).chr(141) => 'o',
    819                 chr(225).chr(187).chr(152) => 'O', chr(225).chr(187).chr(153) => 'o',
    820                 chr(225).chr(187).chr(162) => 'O', chr(225).chr(187).chr(163) => 'o',
    821                 chr(225).chr(187).chr(164) => 'U', chr(225).chr(187).chr(165) => 'u',
    822                 chr(225).chr(187).chr(176) => 'U', chr(225).chr(187).chr(177) => 'u',
    823                 chr(225).chr(187).chr(180) => 'Y', chr(225).chr(187).chr(181) => 'y',
    824                 // Vowels with diacritic (Chinese, Hanyu Pinyin)
    825                 chr(201).chr(145) => 'a',
    826                 // macron
    827                 chr(199).chr(149) => 'U', chr(199).chr(150) => 'u',
    828                 // acute accent
    829                 chr(199).chr(151) => 'U', chr(199).chr(152) => 'u',
    830                 // caron
    831                 chr(199).chr(141) => 'A', chr(199).chr(142) => 'a',
    832                 chr(199).chr(143) => 'I', chr(199).chr(144) => 'i',
    833                 chr(199).chr(145) => 'O', chr(199).chr(146) => 'o',
    834                 chr(199).chr(147) => 'U', chr(199).chr(148) => 'u',
    835                 chr(199).chr(153) => 'U', chr(199).chr(154) => 'u',
    836                 // grave accent
    837                 chr(199).chr(155) => 'U', chr(199).chr(156) => 'u',
    838             );
    839 
    840             $string = strtr($string, $chars);
     402    /**
     403     * Add backquotes to tables and db-names in SQL queries. Taken from phpMyAdmin.
     404     *
     405     * @access private
     406     * @param mixed $a_name
     407     * @return string|array
     408     */
     409    private function sql_backquote( $a_name ) {
     410
     411
     412        if ( ! empty( $a_name ) && $a_name !== '*' ) {
     413
     414            if ( is_array( $a_name ) ) {
     415
     416                $result = array();
     417
     418                reset( $a_name );
     419
     420                while ( list( $key, $val ) = each( $a_name ) )
     421                    $result[$key] = '`' . $val . '`';
     422
     423                return $result;
     424
     425            } else {
     426
     427                return '`' . $a_name . '`';
     428
     429            }
     430
    841431        } else {
    842             // Assume ISO-8859-1 if not UTF-8
    843             $chars['in'] = chr(128).chr(131).chr(138).chr(142).chr(154).chr(158)
    844                            .chr(159).chr(162).chr(165).chr(181).chr(192).chr(193).chr(194)
    845                            .chr(195).chr(196).chr(197).chr(199).chr(200).chr(201).chr(202)
    846                            .chr(203).chr(204).chr(205).chr(206).chr(207).chr(209).chr(210)
    847                            .chr(211).chr(212).chr(213).chr(214).chr(216).chr(217).chr(218)
    848                            .chr(219).chr(220).chr(221).chr(224).chr(225).chr(226).chr(227)
    849                            .chr(228).chr(229).chr(231).chr(232).chr(233).chr(234).chr(235)
    850                            .chr(236).chr(237).chr(238).chr(239).chr(241).chr(242).chr(243)
    851                            .chr(244).chr(245).chr(246).chr(248).chr(249).chr(250).chr(251)
    852                            .chr(252).chr(253).chr(255);
    853 
    854             $chars['out'] = "EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy";
    855 
    856             $string = strtr($string, $chars['in'], $chars['out']);
    857             $double_chars['in'] = array(chr(140), chr(156), chr(198), chr(208), chr(222), chr(223), chr(230), chr(240), chr(254));
    858             $double_chars['out'] = array('OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th');
    859             $string = str_replace($double_chars['in'], $double_chars['out'], $string);
    860         }
    861 
    862         return $string;
    863     }
     432
     433            return $a_name;
     434
     435        }
     436
     437    }
     438
    864439
    865440    private function trailingslashit($string) {
  • backupsavvychild/trunk/inc/bsv_backupFiles.php

    r1927854 r2236498  
    6060
    6161        $this->source_dir = $_SERVER['DOCUMENT_ROOT'];
    62         $this->dump_dir = 'wpbackitup_tmp';
     62        $this->dump_dir = 'backupsavvy_dump';
    6363        $this->dump_path = $_SERVER['DOCUMENT_ROOT'] . '/'.$this->dump_dir;
    6464
     
    7373
    7474        $method = $this->get_host_option('method');
     75
    7576        $end = '.zip';
    7677        if ( $method == 'tar' ) {
     
    104105        // excluded directories
    105106        $exclude_d = $this->get_host_option('exclude_d');
    106 
    107107        if ( ! $exclude_d ) {
    108108            $exclude_dirs = array($this->dump_path);
    109109        } else {
     110            $exclude_d = explode(',', $exclude_d);
     111            foreach ( $exclude_d as $key => $exclude_dir ) {
     112                $exclude_dir = trim($exclude_dir);
     113                $exclude_dirs[] = $_SERVER['DOCUMENT_ROOT'] . '/'.$exclude_dir;
     114            }
    110115            $exclude_dirs[] = $this->dump_path;
    111116        }
    112117
    113118        // excluded files
    114         $exclude_files = $this->get_host_option('exclude_f');
    115         if(!$exclude_files)
    116             $exclude_files = array();
     119        $exclude_f = $this->get_host_option('exclude_f');
     120        $exclude_files = array();
     121        if($exclude_f) {
     122            $exclude_f = explode(',', $exclude_f);
     123            foreach ( $exclude_f as $key => $exclude_file ) {
     124                $exclude_file = trim($exclude_file);
     125                $exclude_files[] = $_SERVER['DOCUMENT_ROOT'] . '/'.$exclude_file;
     126            }
     127        }
    117128
    118129        $compr = $this->get_host_option('compr');
    119 
    120130        $args = array(
    121131            'source_path'   => $this->source_dir,
  • backupsavvychild/trunk/inc/bsv_compressHandler.php

    r1927854 r2236498  
    113113                        }
    114114
    115                         error_log( 'tar created' );
     115//                      error_log( 'tar created' );
    116116
    117117                    } else {
  • backupsavvychild/trunk/inc/bsv_ftpUpload.php

    r1927854 r2236498  
    44use altayalp\FtpClient\FileFactory;
    55
    6 class bsvFtpUpload {
    7   const AMOUNT_DEFAULT = 2;
    8     private $file_size;
    9     private $chunks;
    10     private $remote_path;
    11     private $file_path;
    12     private $file_name;
    13     private $amount_files;
    14     private $storage;
    15     private $server;
    16 
    17     public function __construct($args) {
    18 
    19     try {
    20       $storage = get_option('backupsavvy_child_storage', false);
    21       if(!$storage)
    22         throw new Exception('No storage settings!');
    23     } catch (Exception $e) {
    24       $e->getMessage();
    25     }
    26 
    27     $this->storage = maybe_unserialize($storage);
    28 
    29     $this->file_path = $args['file_path'];
    30     $this->file_name =  basename($this->file_path);
    31     $this->amount_files = empty($this->storage['amount']) ? self::AMOUNT_DEFAULT : $this->storage['amount'];
    32     $this->remote_path = $this->storage['dir'];
    33 
    34     }
    35 
    36   public static function dump($dump) {
    37       echo '<pre>'.print_r($dump,true). '</pre>';
    38   }
    39 
    40   private function get_server() {
    41     if(!$this->storage)
    42       return false;
    43 
    44     if(!$this->server) {
    45       $server = new FtpServer($this->storage['host']);
    46       $server->login($this->storage['login'], $this->storage['pass']);
    47 
    48       if (empty($this->storage['active'])) {
    49         $server->turnPassive();
    50       }
    51 
    52       $this->server = $server;
    53     }
    54 
    55     return $this->server;
    56   }
    57 
    58 
    59 
    60     public function ftp_exec() {
    61 
    62     $server = $this->get_server();
    63 
    64     $file = FileFactory::build($server);
    65 
    66     $file->upload($this->file_path, $this->remote_path.'/'.$this->file_name);
    67 
    68     if(!$this->cmp_sizes($this->file_path, $this->remote_path.'/'.$this->file_name))
    69       return 'size';
    70 
    71     if(!$this->remove_more_amount())
    72       return false;
    73 
    74     return 'success';
    75     }
    76 
    77     // sort archives by time
    78     private static function cmp_groups($a, $b) {
    79         if ($a["time"] == $b["time"]) {
    80             return 0;
    81         }
    82         return ($a["time"] > $b["time"]) ? -1 : 1;
    83     }
    84 
    85     private function get_base_name($file_name) {
    86       $parts = explode('_', $file_name);
    87         return $parts[0];
    88     }
    89 
    90 
    91     public function get_unique_by_file() {
    92 
    93     }
    94 
    95 
    96   private function remove_more_amount() {
    97 
    98     $mask = '/'.$this->get_base_name($this->file_name).'*';
    99 
    100     $file = fileFactory::build($this->server);
    101 
    102     $list = $file->ls($this->storage['dir'].$mask);
    103 
    104     foreach ($list as $key => $file_name) {
    105       $groups[$this->get_base_name($file_name)][] = array(
    106         'file' => $file_name,
    107         'size' => $file->getSize($file_name),
    108         'time' => $file->getLastMod($file_name),
    109       );
    110     }
    111 
    112     //    sort by time
    113     foreach ($groups as $key => $group) {
    114       usort($groups[$key], array(&$this, 'cmp_groups'));
    115     }
    116 
    117     foreach ( $groups as $key => $group ) {
    118       foreach ( $group as $max => $site ) {
    119         if($max >= $this->amount_files) {
    120           if(!$file->rm($site['file'])) {
    121             error_log('error '.$site['file']);
     6class bsvFtpUpload
     7{
     8    const AMOUNT_DEFAULT = 2;
     9    private $file_size;
     10    private $chunks;
     11    private $remote_path;
     12    private $file_path;
     13    private $file_name;
     14    private $amount_files;
     15    private $storage;
     16    private $server;
     17
     18    public function __construct($args)
     19    {
     20
     21        try {
     22            $storage = get_option('backupsavvy_child_storage', false);
     23            if (!$storage)
     24                throw new Exception('No storage settings!');
     25        } catch (Exception $e) {
     26            $e->getMessage();
     27        }
     28
     29        $settings = maybe_unserialize($storage);
     30        $storage = maybe_unserialize($settings['storage']);
     31        $this->storage = $storage->getStorage('ftp');
     32
     33        $this->file_path = $args['file_path'];
     34        $this->file_name = basename($this->file_path);
     35        $this->amount_files = empty($settings['amount']) ? self::AMOUNT_DEFAULT : $settings['amount'];
     36        $this->remote_path = $this->storage['dir'];
     37
     38    }
     39
     40    public static function dump($dump)
     41    {
     42        echo '<pre>' . print_r($dump, true) . '</pre>';
     43    }
     44
     45    private function get_server()
     46    {
     47        if (!$this->storage)
    12248            return false;
    123           }
    124           unset($groups[$key][$max]);
    125         }
    126       }
    127     }
    128 
    129     return true;
    130   }
    131 
    132   private function cmp_sizes($local, $remote) {
    133 
    134     $file = FileFactory::build($this->server);
    135 
    136     $remote_size = $file->getSize($remote);
    137     $local_size = filesize($local);
    138 
    139     if($remote_size != $local_size)
    140       return false;
    141 
    142     return true;
    143   }
    144 
    145     private function upload_ftp_while($storage) {
    146         $trackErrors = ini_get('track_errors');
    147         ini_set('track_errors', 1);
    148 
    149         $ftp_server = $storage['host'];
    150         $ftp_port = $storage['port'];
    151         $ftp_user = $storage['login'];
    152         $ftp_pass = $storage['pass'];
    153 
    154         $file = $this->file_path;//tobe uploaded
    155         $remote_file = $storage['dir'].'/' . basename($file);
    156 
    157         $id = ftp_connect($ftp_server, $ftp_port);
    158 
    159         $login_result = ftp_login($id, $ftp_user, $ftp_pass);
    160 
    161         $localfile = fopen($file,'rb');
    162         $i = 0;
    163         unlink($_SERVER['DOCUMENT_ROOT'].'/wpbackitup_sql/tmp_ftp_upload.bin');
     49
     50        if (!$this->server) {
     51            $server = new FtpServer($this->storage['host']);
     52            $server->login($this->storage['login'], $this->storage['pass']);
     53
     54            if (empty($this->storage['active'])) {
     55                $server->turnPassive();
     56            }
     57
     58            $this->server = $server;
     59        }
     60
     61        return $this->server;
     62    }
     63
     64
     65    public function ftp_exec()
     66    {
     67
     68        $server = $this->get_server();
     69
     70        $file = FileFactory::build($server);
     71
     72        $result = $file->upload($this->file_path, $this->remote_path . '/' . $this->file_name);
     73
     74        if (!$this->cmp_sizes($this->file_path, $this->remote_path . '/' . $this->file_name))
     75            return 'size';
     76
     77        if (!$this->remove_more_amount())
     78            return false;
     79
     80        return $result;
     81    }
     82
     83    // sort archives by time
     84    private static function cmp_groups($a, $b)
     85    {
     86        if ($a["time"] == $b["time"]) {
     87            return 0;
     88        }
     89        return ($a["time"] > $b["time"]) ? -1 : 1;
     90    }
     91
     92    private function get_base_name($file_name)
     93    {
     94        $parts = explode('_', $file_name);
     95        return $parts[0];
     96    }
     97
     98
     99    private function remove_more_amount()
     100    {
     101
     102        $mask = '/' . $this->get_base_name($this->file_name) . '*';
     103
     104        $file = fileFactory::build($this->server);
     105
     106        $list = $file->ls($this->storage['dir'] . $mask);
     107
     108        foreach ($list as $key => $file_name) {
     109            $groups[$this->get_base_name($file_name)][] = array(
     110                'file' => $file_name,
     111                'size' => $file->getSize($file_name),
     112                'time' => $file->getLastMod($file_name),
     113            );
     114        }
     115
     116        //    sort by time
     117        foreach ($groups as $key => $group) {
     118            usort($groups[$key], array(&$this, 'cmp_groups'));
     119        }
     120
     121        foreach ($groups as $key => $group) {
     122            foreach ($group as $max => $site) {
     123                if ($max >= $this->amount_files) {
     124                    if (!$file->rm($site['file'])) {
     125                        error_log('remove error ' . $site['file']);
     126                        return false;
     127                    }
     128                    unset($groups[$key][$max]);
     129                }
     130            }
     131        }
     132
     133        return true;
     134    }
     135
     136    private function cmp_sizes($local, $remote)
     137    {
     138
     139        $file = FileFactory::build($this->server);
     140
     141        $remote_size = $file->getSize($remote);
     142        $local_size = filesize($local);
     143
     144        if ($remote_size != $local_size)
     145            return false;
     146
     147        return true;
     148    }
     149
     150    private function upload_ftp_while($storage)
     151    {
     152        $trackErrors = ini_get('track_errors');
     153        ini_set('track_errors', 1);
     154
     155        $ftp_server = $storage['host'];
     156        $ftp_port = $storage['port'];
     157        $ftp_user = $storage['login'];
     158        $ftp_pass = $storage['pass'];
     159
     160        $file = $this->file_path;//tobe uploaded
     161        $remote_file = $storage['dir'] . '/' . basename($file);
     162
     163        $id = ftp_connect($ftp_server, $ftp_port);
     164
     165        $login_result = ftp_login($id, $ftp_user, $ftp_pass);
     166
     167        $localfile = fopen($file, 'rb');
     168        $i = 0;
     169        unlink($_SERVER['DOCUMENT_ROOT'] . '/wpbackitup_sql/tmp_ftp_upload.bin');
    164170//      var_dump($localfile);
    165         if($login_result)
    166             ftp_pasv($id, true);
    167         else
    168             error_log('not loged in');
    169 
    170         while( $i < $this->file_size )
    171         {
     171        if ($login_result)
     172            ftp_pasv($id, true);
     173        else
     174            error_log('not loged in');
     175
     176        while ($i < $this->file_size) {
    172177//          $tmpfile = fopen($_SERVER['DOCUMENT_ROOT'].'/wpbackitup_sql/tmp_ftp_upload.bin','ab'); // open local
    173             $tmpfile = fopen($_SERVER['DOCUMENT_ROOT'].'/wpbackitup_sql/tmp_ftp_upload.bin','w'); // open local
    174             fwrite($tmpfile, fread($localfile, $this->chunks));
    175             fclose($tmpfile);
    176 
    177             if(!ftp_put($id, $this->remote_path.'/tmp_ftp_upload.tar.gz', $_SERVER['DOCUMENT_ROOT'].'/wpbackitup_sql/tmp_ftp_upload.bin', FTP_BINARY, $i)) {
    178                 $msg = $php_errormsg;
    179                 ini_set('track_errors', $trackErrors);
    180                 error_log(print_r($msg,true));
    181                 error_log('error');
    182             }
    183             $i += $this->chunks;
    184             // Remember to put $i as last argument above
     178            $tmpfile = fopen($_SERVER['DOCUMENT_ROOT'] . '/wpbackitup_sql/tmp_ftp_upload.bin', 'w'); // open local
     179            fwrite($tmpfile, fread($localfile, $this->chunks));
     180            fclose($tmpfile);
     181
     182            if (!ftp_put($id, $this->remote_path . '/tmp_ftp_upload.tar.gz', $_SERVER['DOCUMENT_ROOT'] . '/wpbackitup_sql/tmp_ftp_upload.bin', FTP_BINARY, $i)) {
     183                $msg = $php_errormsg;
     184                ini_set('track_errors', $trackErrors);
     185                error_log(print_r($msg, true));
     186                error_log('error');
     187            }
     188            $i += $this->chunks;
     189            // Remember to put $i as last argument above
    185190
    186191//          $progress = (100 * round( ($i += $this->chunks)  / $this->file_size, 2 ));
    187192//          file_put_contents('ftp_progress.txt', "Progress: {$progress}%");
    188         }
    189         ini_set('track_errors', $trackErrors);
    190         fclose($localfile);
    191         unlink('ftp_progress.txt');
    192         unlink('tmp_ftp_upload.bin');
    193 
    194         return true;
    195     }
    196 
    197     private function upload_ftp($storage) {
    198 
    199         $ftp_server = $storage['host'];
    200         $ftp_port = $storage['port'];
    201         $ftp_user = $storage['login'];
    202         $ftp_pass = $storage['pass'];
    203 
    204         $file = $this->file_path;//tobe uploaded
    205         $remote_file = basename($file); // path on remote server
    206 
    207         // set up basic connection
    208         $id = ftp_connect($ftp_server, $ftp_port);
    209 
    210         $login_result = ftp_login($id, $ftp_user, $ftp_pass);
    211 
    212         $trackErrors = ini_get('track_errors');
    213         ini_set('track_errors', 1);
    214         if($login_result) {
    215             ftp_set_option($id, FTP_USEPASVADDRESS, true);
    216             ftp_pasv($id, true);
    217 
    218             $current_ftp_dir = trailingslashit( ftp_pwd( $id ) );
    219             ftp_chdir($id, $this->remote_path);
    220             $current_ftp_dir = trailingslashit( ftp_pwd( $id ) );
    221 
    222             $localfile = $_SERVER['DOCUMENT_ROOT'].'/wpbackitup_sql/bizplanhub.tar.gz';
    223             if(!file_exists($_SERVER['DOCUMENT_ROOT'].'/wpbackitup_sql/bizplanhub.tar.gz'))
    224                 error_log('file doesnt exitsts!');
    225 
    226             $files_list = ftp_nlist($id, $storage['dir']);
     193        }
     194        ini_set('track_errors', $trackErrors);
     195        fclose($localfile);
     196        unlink('ftp_progress.txt');
     197        unlink('tmp_ftp_upload.bin');
     198
     199        return true;
     200    }
     201
     202    private function upload_ftp($storage)
     203    {
     204
     205        $ftp_server = $storage['host'];
     206        $ftp_port = $storage['port'];
     207        $ftp_user = $storage['login'];
     208        $ftp_pass = $storage['pass'];
     209
     210        $file = $this->file_path;//tobe uploaded
     211        $remote_file = basename($file); // path on remote server
     212
     213        // set up basic connection
     214        $id = ftp_connect($ftp_server, $ftp_port);
     215
     216        $login_result = ftp_login($id, $ftp_user, $ftp_pass);
     217
     218        $trackErrors = ini_get('track_errors');
     219        ini_set('track_errors', 1);
     220        if ($login_result) {
     221            ftp_set_option($id, FTP_USEPASVADDRESS, true);
     222            ftp_pasv($id, true);
     223
     224            $current_ftp_dir = trailingslashit(ftp_pwd($id));
     225            ftp_chdir($id, $this->remote_path);
     226            $current_ftp_dir = trailingslashit(ftp_pwd($id));
     227
     228            $localfile = $_SERVER['DOCUMENT_ROOT'] . '/wpbackitup_sql/bizplanhub.tar.gz';
     229            if (!file_exists($_SERVER['DOCUMENT_ROOT'] . '/wpbackitup_sql/bizplanhub.tar.gz'))
     230                error_log('file doesnt exitsts!');
     231
     232            $files_list = ftp_nlist($id, $storage['dir']);
    227233//          $info = ftp_systype($id);
    228234
    229             $fp = fopen($_SERVER['DOCUMENT_ROOT'].'/wpbackitup_sql/bizplanhub.tar.gz', 'rb');
     235            $fp = fopen($_SERVER['DOCUMENT_ROOT'] . '/wpbackitup_sql/bizplanhub.tar.gz', 'rb');
    230236//          error_log(print_r($info,true));
    231             ftp_set_option($id, FTP_USEPASVADDRESS, true);
    232             ftp_pasv($id, true);
    233             // upload a file
    234             if (!ftp_put( $id, $remote_file, $_SERVER['DOCUMENT_ROOT'].'/wpbackitup_sql/bizplanhub.tar.gz', FTP_BINARY ) ) {
    235                 // Exception "There was a problem while uploading $file\n";
    236                 $msg = $php_errormsg;
    237                 ini_set('track_errors', $trackErrors);
     237            ftp_set_option($id, FTP_USEPASVADDRESS, true);
     238            ftp_pasv($id, true);
     239            // upload a file
     240            if (!ftp_put($id, $remote_file, $_SERVER['DOCUMENT_ROOT'] . '/wpbackitup_sql/bizplanhub.tar.gz', FTP_BINARY)) {
     241                // Exception "There was a problem while uploading $file\n";
     242                $msg = $php_errormsg;
     243                ini_set('track_errors', $trackErrors);
    238244//              throw new Exception($msg);
    239                 error_log('track_errors_msg: '.print_r($msg,true));
    240             }
    241             $msg = $php_errormsg;
    242             ini_set('track_errors', $trackErrors);
     245                error_log('track_errors_msg: ' . print_r($msg, true));
     246            }
     247            $msg = $php_errormsg;
     248            ini_set('track_errors', $trackErrors);
    243249//          throw new Exception($msg);
    244250//          error_log(print_r($msg,true));
    245             fclose($fp);
    246         } else {
    247             ini_set( 'track_errors', $trackErrors );
    248         }
    249         // close the connection
    250         ftp_close($id);
    251 
    252         return true;
    253     }
     251            fclose($fp);
     252        } else {
     253            ini_set('track_errors', $trackErrors);
     254        }
     255        // close the connection
     256        ftp_close($id);
     257
     258        return true;
     259    }
    254260
    255261}
  • backupsavvychild/trunk/inc/compressInc/Archive.php

    r1927854 r2236498  
    11<?php
    22
    3 namespace habroominc\PHPArchive;
     3namespace splitbrain\PHPArchive;
    44
    55abstract class Archive
  • backupsavvychild/trunk/inc/compressInc/FileInfo.php

    r1927854 r2236498  
    11<?php
    22
    3 namespace habroominc\PHPArchive;
     3namespace splitbrain\PHPArchive;
    44
    55/**
  • backupsavvychild/trunk/readme.txt

    r2127918 r2236498  
    11=== BackupSavvy Child wordpress plugin ===
    22Contributors: pdtasktrack
    3 Donate link: https://www.backupsavvy.com
     3Donate link: http://www.hubroom.com
    44Tags: backup, multi backtup child, savvy backup
    55Requires at least: 4.5
    6 Tested up to: 5.0.2
    7 Stable tag: 1.1
    8 Requires PHP: 5.6
     6Tested up to: 5.3.2
     7Stable tag: 1.2
     8Requires PHP: 7.1
    99
    1010This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
     
    5555 &lt;/fastCgi&gt;
    5656
    57  == Upgrade Notice ==
    58  = 1.0.0 =
    59  * Initial release.
    60  = 1.0.1 =
    61  * Connected to wordpress cms upgrading to version 5.0.2
     57 = Why backups are not uploading to dropbox or aws cloud on windows server? =
     58 1) Download and extract for cacert.pem https://curl.haxx.se/docs/caextract.html
     59 2) Put it on cert folder of yours php version (for example C:\Program files\php\v5.6\extras\ssl\cacert.pem)
     60 3) In your php.ini put this line in this section ("C:\Program files\php\v5.6\php.ini") find and change curl.cainfo:
     61
     62 curl.cainfo = "C:\Program files\php\v5.6\extras\ssl\cacert.pem"
  • backupsavvychild/trunk/settings-page.php

    r1927854 r2236498  
    33    <h1>Secret</h1>
    44    <h2><?php echo get_option('backupsavvy_child_secret', 0); ?></h2>
    5 
    65</div>
  • backupsavvychild/trunk/vendor/altayalp/ftp-client/src/Abstracts/AbstractFtp.php

    r1927854 r2236498  
    106106            // remove directory and subdirectory name
    107107            $file = str_replace("$dir/", '', $file);
    108 //            if ($this->ignoreItem($type, $file, $ignore) !== true && $this->isDirOrFile("$dir/$file") == $type) {
    109             if ($this->ignoreItem($type, $file, $ignore) !== true) {
     108            if ($this->ignoreItem($type, $file, $ignore) !== true && $this->isDirOrFile("$dir/$file") == $type) {
    110109                $fileInfo[] = $file;
    111110            }
  • backupsavvychild/trunk/vendor/altayalp/ftp-client/src/Files/FtpFile.php

    r1927854 r2236498  
    6060    {
    6161        if (! ftp_put($this->session, $remote, $local, $mode)) {
    62           error_log('not_uploaded');
    6362            throw new FileException('File don\'t uploaded');
    6463        }
  • backupsavvychild/trunk/vendor/composer/ClassLoader.php

    r1927854 r2236498  
    280280    public function setApcuPrefix($apcuPrefix)
    281281    {
    282         $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
     282        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
    283283    }
    284284
     
    378378            while (false !== $lastPos = strrpos($subPath, '\\')) {
    379379                $subPath = substr($subPath, 0, $lastPos);
    380                 $search = $subPath.'\\';
     380                $search = $subPath . '\\';
    381381                if (isset($this->prefixDirsPsr4[$search])) {
     382                    $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
    382383                    foreach ($this->prefixDirsPsr4[$search] as $dir) {
    383                         $length = $this->prefixLengthsPsr4[$first][$search];
    384                         if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
     384                        if (file_exists($file = $dir . $pathEnd)) {
    385385                            return $file;
    386386                        }
  • backupsavvychild/trunk/vendor/composer/autoload_classmap.php

    r1927854 r2236498  
    77
    88return array(
     9    'Google_Service_Exception' => $vendorDir . '/google/apiclient/src/Google/Service/Exception.php',
     10    'Google_Service_Resource' => $vendorDir . '/google/apiclient/src/Google/Service/Resource.php',
    911);
  • backupsavvychild/trunk/vendor/composer/autoload_namespaces.php

    r1927854 r2236498  
    77
    88return array(
     9    'Google_Service_' => array($vendorDir . '/google/apiclient-services/src'),
     10    'Google_' => array($vendorDir . '/google/apiclient/src'),
    911);
  • backupsavvychild/trunk/vendor/composer/autoload_psr4.php

    r1927854 r2236498  
    77
    88return array(
     9    'phpseclib\\' => array($vendorDir . '/phpseclib/phpseclib/phpseclib'),
    910    'altayalp\\FtpClient\\' => array($vendorDir . '/altayalp/ftp-client/src'),
     11    'Tightenco\\Collect\\' => array($vendorDir . '/tightenco/collect/src/Collect'),
     12    'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
     13    'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
     14    'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'),
     15    'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
     16    'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
     17    'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
     18    'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
     19    'Kunnu\\Dropbox\\' => array($vendorDir . '/kunalvarma05/dropbox-php-sdk/src/Dropbox'),
     20    'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
     21    'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
     22    'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
     23    'Google\\Auth\\' => array($vendorDir . '/google/auth/src'),
     24    'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
    1025);
  • backupsavvychild/trunk/vendor/composer/autoload_real.php

    r1927854 r2236498  
    4848        $loader->register(true);
    4949
     50        if ($useStaticLoader) {
     51            $includeFiles = Composer\Autoload\ComposerStaticInit207c01eb3afe94e65a4c824ad42e072e::$files;
     52        } else {
     53            $includeFiles = require __DIR__ . '/autoload_files.php';
     54        }
     55        foreach ($includeFiles as $fileIdentifier => $file) {
     56            composerRequire207c01eb3afe94e65a4c824ad42e072e($fileIdentifier, $file);
     57        }
     58
    5059        return $loader;
    5160    }
    5261}
     62
     63function composerRequire207c01eb3afe94e65a4c824ad42e072e($fileIdentifier, $file)
     64{
     65    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
     66        require $file;
     67
     68        $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
     69    }
     70}
  • backupsavvychild/trunk/vendor/composer/autoload_static.php

    r1927854 r2236498  
    77class ComposerStaticInit207c01eb3afe94e65a4c824ad42e072e
    88{
     9    public static $files = array (
     10        '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
     11        'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
     12        'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
     13        '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
     14        'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
     15        '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
     16        '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
     17        '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
     18        'fe62ba7e10580d903cc46d808b5961a4' => __DIR__ . '/..' . '/tightenco/collect/src/Collect/Support/helpers.php',
     19        'caf31cc6ec7cf2241cb6f12c226c3846' => __DIR__ . '/..' . '/tightenco/collect/src/Collect/Support/alias.php',
     20    );
     21
    922    public static $prefixLengthsPsr4 = array (
     23        'p' =>
     24        array (
     25            'phpseclib\\' => 10,
     26        ),
    1027        'a' =>
    1128        array (
    1229            'altayalp\\FtpClient\\' => 19,
    1330        ),
     31        'T' =>
     32        array (
     33            'Tightenco\\Collect\\' => 18,
     34        ),
     35        'S' =>
     36        array (
     37            'Symfony\\Polyfill\\Php72\\' => 23,
     38            'Symfony\\Polyfill\\Mbstring\\' => 26,
     39            'Symfony\\Component\\VarDumper\\' => 28,
     40        ),
     41        'P' =>
     42        array (
     43            'Psr\\Log\\' => 8,
     44            'Psr\\Http\\Message\\' => 17,
     45            'Psr\\Cache\\' => 10,
     46        ),
     47        'M' =>
     48        array (
     49            'Monolog\\' => 8,
     50        ),
     51        'K' =>
     52        array (
     53            'Kunnu\\Dropbox\\' => 14,
     54        ),
     55        'G' =>
     56        array (
     57            'GuzzleHttp\\Psr7\\' => 16,
     58            'GuzzleHttp\\Promise\\' => 19,
     59            'GuzzleHttp\\' => 11,
     60            'Google\\Auth\\' => 12,
     61        ),
     62        'F' =>
     63        array (
     64            'Firebase\\JWT\\' => 13,
     65        ),
    1466    );
    1567
    1668    public static $prefixDirsPsr4 = array (
     69        'phpseclib\\' =>
     70        array (
     71            0 => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib',
     72        ),
    1773        'altayalp\\FtpClient\\' =>
    1874        array (
    1975            0 => __DIR__ . '/..' . '/altayalp/ftp-client/src',
    2076        ),
     77        'Tightenco\\Collect\\' =>
     78        array (
     79            0 => __DIR__ . '/..' . '/tightenco/collect/src/Collect',
     80        ),
     81        'Symfony\\Polyfill\\Php72\\' =>
     82        array (
     83            0 => __DIR__ . '/..' . '/symfony/polyfill-php72',
     84        ),
     85        'Symfony\\Polyfill\\Mbstring\\' =>
     86        array (
     87            0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
     88        ),
     89        'Symfony\\Component\\VarDumper\\' =>
     90        array (
     91            0 => __DIR__ . '/..' . '/symfony/var-dumper',
     92        ),
     93        'Psr\\Log\\' =>
     94        array (
     95            0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
     96        ),
     97        'Psr\\Http\\Message\\' =>
     98        array (
     99            0 => __DIR__ . '/..' . '/psr/http-message/src',
     100        ),
     101        'Psr\\Cache\\' =>
     102        array (
     103            0 => __DIR__ . '/..' . '/psr/cache/src',
     104        ),
     105        'Monolog\\' =>
     106        array (
     107            0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog',
     108        ),
     109        'Kunnu\\Dropbox\\' =>
     110        array (
     111            0 => __DIR__ . '/..' . '/kunalvarma05/dropbox-php-sdk/src/Dropbox',
     112        ),
     113        'GuzzleHttp\\Psr7\\' =>
     114        array (
     115            0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
     116        ),
     117        'GuzzleHttp\\Promise\\' =>
     118        array (
     119            0 => __DIR__ . '/..' . '/guzzlehttp/promises/src',
     120        ),
     121        'GuzzleHttp\\' =>
     122        array (
     123            0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
     124        ),
     125        'Google\\Auth\\' =>
     126        array (
     127            0 => __DIR__ . '/..' . '/google/auth/src',
     128        ),
     129        'Firebase\\JWT\\' =>
     130        array (
     131            0 => __DIR__ . '/..' . '/firebase/php-jwt/src',
     132        ),
     133    );
     134
     135    public static $prefixesPsr0 = array (
     136        'G' =>
     137        array (
     138            'Google_Service_' =>
     139            array (
     140                0 => __DIR__ . '/..' . '/google/apiclient-services/src',
     141            ),
     142            'Google_' =>
     143            array (
     144                0 => __DIR__ . '/..' . '/google/apiclient/src',
     145            ),
     146        ),
     147    );
     148
     149    public static $classMap = array (
     150        'Google_Service_Exception' => __DIR__ . '/..' . '/google/apiclient/src/Google/Service/Exception.php',
     151        'Google_Service_Resource' => __DIR__ . '/..' . '/google/apiclient/src/Google/Service/Resource.php',
    21152    );
    22153
     
    26157            $loader->prefixLengthsPsr4 = ComposerStaticInit207c01eb3afe94e65a4c824ad42e072e::$prefixLengthsPsr4;
    27158            $loader->prefixDirsPsr4 = ComposerStaticInit207c01eb3afe94e65a4c824ad42e072e::$prefixDirsPsr4;
     159            $loader->prefixesPsr0 = ComposerStaticInit207c01eb3afe94e65a4c824ad42e072e::$prefixesPsr0;
     160            $loader->classMap = ComposerStaticInit207c01eb3afe94e65a4c824ad42e072e::$classMap;
    28161
    29162        }, null, ClassLoader::class);
  • backupsavvychild/trunk/vendor/composer/installed.json

    r1927854 r2236498  
    5252            "ssh ftp"
    5353        ]
     54    },
     55    {
     56        "name": "firebase/php-jwt",
     57        "version": "v5.0.0",
     58        "version_normalized": "5.0.0.0",
     59        "source": {
     60            "type": "git",
     61            "url": "https://github.com/firebase/php-jwt.git",
     62            "reference": "9984a4d3a32ae7673d6971ea00bae9d0a1abba0e"
     63        },
     64        "dist": {
     65            "type": "zip",
     66            "url": "https://api.github.com/repos/firebase/php-jwt/zipball/9984a4d3a32ae7673d6971ea00bae9d0a1abba0e",
     67            "reference": "9984a4d3a32ae7673d6971ea00bae9d0a1abba0e",
     68            "shasum": ""
     69        },
     70        "require": {
     71            "php": ">=5.3.0"
     72        },
     73        "require-dev": {
     74            "phpunit/phpunit": " 4.8.35"
     75        },
     76        "time": "2017-06-27T22:17:23+00:00",
     77        "type": "library",
     78        "installation-source": "dist",
     79        "autoload": {
     80            "psr-4": {
     81                "Firebase\\JWT\\": "src"
     82            }
     83        },
     84        "notification-url": "https://packagist.org/downloads/",
     85        "license": [
     86            "BSD-3-Clause"
     87        ],
     88        "authors": [
     89            {
     90                "name": "Neuman Vong",
     91                "email": "neuman+pear@twilio.com",
     92                "role": "Developer"
     93            },
     94            {
     95                "name": "Anant Narayanan",
     96                "email": "anant@php.net",
     97                "role": "Developer"
     98            }
     99        ],
     100        "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
     101        "homepage": "https://github.com/firebase/php-jwt"
     102    },
     103    {
     104        "name": "google/apiclient",
     105        "version": "v2.4.0",
     106        "version_normalized": "2.4.0.0",
     107        "source": {
     108            "type": "git",
     109            "url": "https://github.com/googleapis/google-api-php-client.git",
     110            "reference": "cd3c37998020d91ae4eafca4f26a92da4dabba83"
     111        },
     112        "dist": {
     113            "type": "zip",
     114            "url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/cd3c37998020d91ae4eafca4f26a92da4dabba83",
     115            "reference": "cd3c37998020d91ae4eafca4f26a92da4dabba83",
     116            "shasum": ""
     117        },
     118        "require": {
     119            "firebase/php-jwt": "~2.0||~3.0||~4.0||~5.0",
     120            "google/apiclient-services": "~0.13",
     121            "google/auth": "^1.0",
     122            "guzzlehttp/guzzle": "~5.3.1||~6.0",
     123            "guzzlehttp/psr7": "^1.2",
     124            "monolog/monolog": "^1.17|^2.0",
     125            "php": ">=5.4",
     126            "phpseclib/phpseclib": "~0.3.10||~2.0"
     127        },
     128        "require-dev": {
     129            "cache/filesystem-adapter": "^0.3.2",
     130            "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
     131            "phpcompatibility/php-compatibility": "^9.2",
     132            "phpunit/phpunit": "~4.8.36",
     133            "squizlabs/php_codesniffer": "~2.3",
     134            "symfony/css-selector": "~2.1",
     135            "symfony/dom-crawler": "~2.1"
     136        },
     137        "suggest": {
     138            "cache/filesystem-adapter": "For caching certs and tokens (using Google_Client::setCache)"
     139        },
     140        "time": "2019-09-11T17:38:10+00:00",
     141        "type": "library",
     142        "extra": {
     143            "branch-alias": {
     144                "dev-master": "2.x-dev"
     145            }
     146        },
     147        "installation-source": "dist",
     148        "autoload": {
     149            "psr-0": {
     150                "Google_": "src/"
     151            },
     152            "classmap": [
     153                "src/Google/Service/"
     154            ]
     155        },
     156        "notification-url": "https://packagist.org/downloads/",
     157        "license": [
     158            "Apache-2.0"
     159        ],
     160        "description": "Client library for Google APIs",
     161        "homepage": "http://developers.google.com/api-client-library/php",
     162        "keywords": [
     163            "google"
     164        ]
     165    },
     166    {
     167        "name": "google/apiclient-services",
     168        "version": "v0.121",
     169        "version_normalized": "0.121.0.0",
     170        "source": {
     171            "type": "git",
     172            "url": "https://github.com/googleapis/google-api-php-client-services.git",
     173            "reference": "a33fd9ed19fe4e27f2ccebbf45646f38e7cb95af"
     174        },
     175        "dist": {
     176            "type": "zip",
     177            "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/a33fd9ed19fe4e27f2ccebbf45646f38e7cb95af",
     178            "reference": "a33fd9ed19fe4e27f2ccebbf45646f38e7cb95af",
     179            "shasum": ""
     180        },
     181        "require": {
     182            "php": ">=5.4"
     183        },
     184        "require-dev": {
     185            "phpunit/phpunit": "~4.8"
     186        },
     187        "time": "2019-11-03T00:23:34+00:00",
     188        "type": "library",
     189        "installation-source": "dist",
     190        "autoload": {
     191            "psr-0": {
     192                "Google_Service_": "src"
     193            }
     194        },
     195        "notification-url": "https://packagist.org/downloads/",
     196        "license": [
     197            "Apache-2.0"
     198        ],
     199        "description": "Client library for Google APIs",
     200        "homepage": "http://developers.google.com/api-client-library/php",
     201        "keywords": [
     202            "google"
     203        ]
     204    },
     205    {
     206        "name": "google/auth",
     207        "version": "v1.6.1",
     208        "version_normalized": "1.6.1.0",
     209        "source": {
     210            "type": "git",
     211            "url": "https://github.com/googleapis/google-auth-library-php.git",
     212            "reference": "45635ac69d0b95f38885531d4ebcdfcb2ebb6f36"
     213        },
     214        "dist": {
     215            "type": "zip",
     216            "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/45635ac69d0b95f38885531d4ebcdfcb2ebb6f36",
     217            "reference": "45635ac69d0b95f38885531d4ebcdfcb2ebb6f36",
     218            "shasum": ""
     219        },
     220        "require": {
     221            "firebase/php-jwt": "~2.0|~3.0|~4.0|~5.0",
     222            "guzzlehttp/guzzle": "~5.3.1|~6.0",
     223            "guzzlehttp/psr7": "^1.2",
     224            "php": ">=5.4",
     225            "psr/cache": "^1.0",
     226            "psr/http-message": "^1.0"
     227        },
     228        "require-dev": {
     229            "friendsofphp/php-cs-fixer": "^1.11",
     230            "guzzlehttp/promises": "0.1.1|^1.3",
     231            "phpseclib/phpseclib": "^2",
     232            "phpunit/phpunit": "^4.8.36|^5.7",
     233            "sebastian/comparator": ">=1.2.3"
     234        },
     235        "suggest": {
     236            "phpseclib/phpseclib": "May be used in place of OpenSSL for signing strings or for token management. Please require version ^2."
     237        },
     238        "time": "2019-10-29T20:13:04+00:00",
     239        "type": "library",
     240        "installation-source": "dist",
     241        "autoload": {
     242            "psr-4": {
     243                "Google\\Auth\\": "src"
     244            }
     245        },
     246        "notification-url": "https://packagist.org/downloads/",
     247        "license": [
     248            "Apache-2.0"
     249        ],
     250        "description": "Google Auth Library for PHP",
     251        "homepage": "http://github.com/google/google-auth-library-php",
     252        "keywords": [
     253            "Authentication",
     254            "google",
     255            "oauth2"
     256        ]
     257    },
     258    {
     259        "name": "guzzlehttp/guzzle",
     260        "version": "6.5.0",
     261        "version_normalized": "6.5.0.0",
     262        "source": {
     263            "type": "git",
     264            "url": "https://github.com/guzzle/guzzle.git",
     265            "reference": "dbc2bc3a293ed6b1ae08a3651e2bfd213d19b6a5"
     266        },
     267        "dist": {
     268            "type": "zip",
     269            "url": "https://api.github.com/repos/guzzle/guzzle/zipball/dbc2bc3a293ed6b1ae08a3651e2bfd213d19b6a5",
     270            "reference": "dbc2bc3a293ed6b1ae08a3651e2bfd213d19b6a5",
     271            "shasum": ""
     272        },
     273        "require": {
     274            "ext-json": "*",
     275            "guzzlehttp/promises": "^1.0",
     276            "guzzlehttp/psr7": "^1.6.1",
     277            "php": ">=5.5"
     278        },
     279        "require-dev": {
     280            "ext-curl": "*",
     281            "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
     282            "psr/log": "^1.1"
     283        },
     284        "suggest": {
     285            "ext-intl": "Required for Internationalized Domain Name (IDN) support",
     286            "psr/log": "Required for using the Log middleware"
     287        },
     288        "time": "2019-12-07T18:20:45+00:00",
     289        "type": "library",
     290        "extra": {
     291            "branch-alias": {
     292                "dev-master": "6.5-dev"
     293            }
     294        },
     295        "installation-source": "dist",
     296        "autoload": {
     297            "psr-4": {
     298                "GuzzleHttp\\": "src/"
     299            },
     300            "files": [
     301                "src/functions_include.php"
     302            ]
     303        },
     304        "notification-url": "https://packagist.org/downloads/",
     305        "license": [
     306            "MIT"
     307        ],
     308        "authors": [
     309            {
     310                "name": "Michael Dowling",
     311                "email": "mtdowling@gmail.com",
     312                "homepage": "https://github.com/mtdowling"
     313            }
     314        ],
     315        "description": "Guzzle is a PHP HTTP client library",
     316        "homepage": "http://guzzlephp.org/",
     317        "keywords": [
     318            "client",
     319            "curl",
     320            "framework",
     321            "http",
     322            "http client",
     323            "rest",
     324            "web service"
     325        ]
     326    },
     327    {
     328        "name": "guzzlehttp/promises",
     329        "version": "v1.3.1",
     330        "version_normalized": "1.3.1.0",
     331        "source": {
     332            "type": "git",
     333            "url": "https://github.com/guzzle/promises.git",
     334            "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
     335        },
     336        "dist": {
     337            "type": "zip",
     338            "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
     339            "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
     340            "shasum": ""
     341        },
     342        "require": {
     343            "php": ">=5.5.0"
     344        },
     345        "require-dev": {
     346            "phpunit/phpunit": "^4.0"
     347        },
     348        "time": "2016-12-20T10:07:11+00:00",
     349        "type": "library",
     350        "extra": {
     351            "branch-alias": {
     352                "dev-master": "1.4-dev"
     353            }
     354        },
     355        "installation-source": "dist",
     356        "autoload": {
     357            "psr-4": {
     358                "GuzzleHttp\\Promise\\": "src/"
     359            },
     360            "files": [
     361                "src/functions_include.php"
     362            ]
     363        },
     364        "notification-url": "https://packagist.org/downloads/",
     365        "license": [
     366            "MIT"
     367        ],
     368        "authors": [
     369            {
     370                "name": "Michael Dowling",
     371                "email": "mtdowling@gmail.com",
     372                "homepage": "https://github.com/mtdowling"
     373            }
     374        ],
     375        "description": "Guzzle promises library",
     376        "keywords": [
     377            "promise"
     378        ]
     379    },
     380    {
     381        "name": "guzzlehttp/psr7",
     382        "version": "1.6.1",
     383        "version_normalized": "1.6.1.0",
     384        "source": {
     385            "type": "git",
     386            "url": "https://github.com/guzzle/psr7.git",
     387            "reference": "239400de7a173fe9901b9ac7c06497751f00727a"
     388        },
     389        "dist": {
     390            "type": "zip",
     391            "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
     392            "reference": "239400de7a173fe9901b9ac7c06497751f00727a",
     393            "shasum": ""
     394        },
     395        "require": {
     396            "php": ">=5.4.0",
     397            "psr/http-message": "~1.0",
     398            "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
     399        },
     400        "provide": {
     401            "psr/http-message-implementation": "1.0"
     402        },
     403        "require-dev": {
     404            "ext-zlib": "*",
     405            "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
     406        },
     407        "suggest": {
     408            "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
     409        },
     410        "time": "2019-07-01T23:21:34+00:00",
     411        "type": "library",
     412        "extra": {
     413            "branch-alias": {
     414                "dev-master": "1.6-dev"
     415            }
     416        },
     417        "installation-source": "dist",
     418        "autoload": {
     419            "psr-4": {
     420                "GuzzleHttp\\Psr7\\": "src/"
     421            },
     422            "files": [
     423                "src/functions_include.php"
     424            ]
     425        },
     426        "notification-url": "https://packagist.org/downloads/",
     427        "license": [
     428            "MIT"
     429        ],
     430        "authors": [
     431            {
     432                "name": "Michael Dowling",
     433                "email": "mtdowling@gmail.com",
     434                "homepage": "https://github.com/mtdowling"
     435            },
     436            {
     437                "name": "Tobias Schultze",
     438                "homepage": "https://github.com/Tobion"
     439            }
     440        ],
     441        "description": "PSR-7 message implementation that also provides common utility methods",
     442        "keywords": [
     443            "http",
     444            "message",
     445            "psr-7",
     446            "request",
     447            "response",
     448            "stream",
     449            "uri",
     450            "url"
     451        ]
     452    },
     453    {
     454        "name": "kunalvarma05/dropbox-php-sdk",
     455        "version": "v0.2.1",
     456        "version_normalized": "0.2.1.0",
     457        "source": {
     458            "type": "git",
     459            "url": "https://github.com/kunalvarma05/dropbox-php-sdk.git",
     460            "reference": "27036f20b7eeb59d5e559e03d4280851f6eb789b"
     461        },
     462        "dist": {
     463            "type": "zip",
     464            "url": "https://api.github.com/repos/kunalvarma05/dropbox-php-sdk/zipball/27036f20b7eeb59d5e559e03d4280851f6eb789b",
     465            "reference": "27036f20b7eeb59d5e559e03d4280851f6eb789b",
     466            "shasum": ""
     467        },
     468        "require": {
     469            "guzzlehttp/guzzle": "~6.0",
     470            "tightenco/collect": "^5.2"
     471        },
     472        "require-dev": {
     473            "phpunit/phpunit": "^6.0"
     474        },
     475        "time": "2017-06-26T09:37:16+00:00",
     476        "type": "library",
     477        "installation-source": "dist",
     478        "autoload": {
     479            "psr-4": {
     480                "Kunnu\\Dropbox\\": "src/Dropbox"
     481            }
     482        },
     483        "notification-url": "https://packagist.org/downloads/",
     484        "license": [
     485            "MIT"
     486        ],
     487        "authors": [
     488            {
     489                "name": "Kunal Varma",
     490                "email": "kunalvarma05@gmail.com"
     491            }
     492        ],
     493        "description": "Dropbox PHP API V2 SDK (Unofficial)",
     494        "keywords": [
     495            "api",
     496            "client",
     497            "dropbox",
     498            "php",
     499            "sdk",
     500            "unofficial"
     501        ]
     502    },
     503    {
     504        "name": "monolog/monolog",
     505        "version": "2.0.1",
     506        "version_normalized": "2.0.1.0",
     507        "source": {
     508            "type": "git",
     509            "url": "https://github.com/Seldaek/monolog.git",
     510            "reference": "f9d56fd2f5533322caccdfcddbb56aedd622ef1c"
     511        },
     512        "dist": {
     513            "type": "zip",
     514            "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f9d56fd2f5533322caccdfcddbb56aedd622ef1c",
     515            "reference": "f9d56fd2f5533322caccdfcddbb56aedd622ef1c",
     516            "shasum": ""
     517        },
     518        "require": {
     519            "php": "^7.2",
     520            "psr/log": "^1.0.1"
     521        },
     522        "provide": {
     523            "psr/log-implementation": "1.0.0"
     524        },
     525        "require-dev": {
     526            "aws/aws-sdk-php": "^2.4.9 || ^3.0",
     527            "doctrine/couchdb": "~1.0@dev",
     528            "elasticsearch/elasticsearch": "^6.0",
     529            "graylog2/gelf-php": "^1.4.2",
     530            "jakub-onderka/php-parallel-lint": "^0.9",
     531            "php-amqplib/php-amqplib": "~2.4",
     532            "php-console/php-console": "^3.1.3",
     533            "phpspec/prophecy": "^1.6.1",
     534            "phpunit/phpunit": "^8.3",
     535            "predis/predis": "^1.1",
     536            "rollbar/rollbar": "^1.3",
     537            "ruflin/elastica": ">=0.90 <3.0",
     538            "swiftmailer/swiftmailer": "^5.3|^6.0"
     539        },
     540        "suggest": {
     541            "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
     542            "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
     543            "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
     544            "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
     545            "ext-mbstring": "Allow to work properly with unicode symbols",
     546            "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
     547            "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
     548            "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
     549            "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
     550            "php-console/php-console": "Allow sending log messages to Google Chrome",
     551            "rollbar/rollbar": "Allow sending log messages to Rollbar",
     552            "ruflin/elastica": "Allow sending log messages to an Elastic Search server"
     553        },
     554        "time": "2019-11-13T10:27:43+00:00",
     555        "type": "library",
     556        "extra": {
     557            "branch-alias": {
     558                "dev-master": "2.x-dev"
     559            }
     560        },
     561        "installation-source": "dist",
     562        "autoload": {
     563            "psr-4": {
     564                "Monolog\\": "src/Monolog"
     565            }
     566        },
     567        "notification-url": "https://packagist.org/downloads/",
     568        "license": [
     569            "MIT"
     570        ],
     571        "authors": [
     572            {
     573                "name": "Jordi Boggiano",
     574                "email": "j.boggiano@seld.be",
     575                "homepage": "http://seld.be"
     576            }
     577        ],
     578        "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
     579        "homepage": "http://github.com/Seldaek/monolog",
     580        "keywords": [
     581            "log",
     582            "logging",
     583            "psr-3"
     584        ]
     585    },
     586    {
     587        "name": "phpseclib/phpseclib",
     588        "version": "2.0.23",
     589        "version_normalized": "2.0.23.0",
     590        "source": {
     591            "type": "git",
     592            "url": "https://github.com/phpseclib/phpseclib.git",
     593            "reference": "c78eb5058d5bb1a183133c36d4ba5b6675dfa099"
     594        },
     595        "dist": {
     596            "type": "zip",
     597            "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c78eb5058d5bb1a183133c36d4ba5b6675dfa099",
     598            "reference": "c78eb5058d5bb1a183133c36d4ba5b6675dfa099",
     599            "shasum": ""
     600        },
     601        "require": {
     602            "php": ">=5.3.3"
     603        },
     604        "require-dev": {
     605            "phing/phing": "~2.7",
     606            "phpunit/phpunit": "^4.8.35|^5.7|^6.0",
     607            "sami/sami": "~2.0",
     608            "squizlabs/php_codesniffer": "~2.0"
     609        },
     610        "suggest": {
     611            "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.",
     612            "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.",
     613            "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.",
     614            "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations."
     615        },
     616        "time": "2019-09-17T03:41:22+00:00",
     617        "type": "library",
     618        "installation-source": "dist",
     619        "autoload": {
     620            "files": [
     621                "phpseclib/bootstrap.php"
     622            ],
     623            "psr-4": {
     624                "phpseclib\\": "phpseclib/"
     625            }
     626        },
     627        "notification-url": "https://packagist.org/downloads/",
     628        "license": [
     629            "MIT"
     630        ],
     631        "authors": [
     632            {
     633                "name": "Jim Wigginton",
     634                "email": "terrafrost@php.net",
     635                "role": "Lead Developer"
     636            },
     637            {
     638                "name": "Patrick Monnerat",
     639                "email": "pm@datasphere.ch",
     640                "role": "Developer"
     641            },
     642            {
     643                "name": "Andreas Fischer",
     644                "email": "bantu@phpbb.com",
     645                "role": "Developer"
     646            },
     647            {
     648                "name": "Hans-Jürgen Petrich",
     649                "email": "petrich@tronic-media.com",
     650                "role": "Developer"
     651            },
     652            {
     653                "name": "Graham Campbell",
     654                "email": "graham@alt-three.com",
     655                "role": "Developer"
     656            }
     657        ],
     658        "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.",
     659        "homepage": "http://phpseclib.sourceforge.net",
     660        "keywords": [
     661            "BigInteger",
     662            "aes",
     663            "asn.1",
     664            "asn1",
     665            "blowfish",
     666            "crypto",
     667            "cryptography",
     668            "encryption",
     669            "rsa",
     670            "security",
     671            "sftp",
     672            "signature",
     673            "signing",
     674            "ssh",
     675            "twofish",
     676            "x.509",
     677            "x509"
     678        ]
     679    },
     680    {
     681        "name": "psr/cache",
     682        "version": "1.0.1",
     683        "version_normalized": "1.0.1.0",
     684        "source": {
     685            "type": "git",
     686            "url": "https://github.com/php-fig/cache.git",
     687            "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
     688        },
     689        "dist": {
     690            "type": "zip",
     691            "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8",
     692            "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
     693            "shasum": ""
     694        },
     695        "require": {
     696            "php": ">=5.3.0"
     697        },
     698        "time": "2016-08-06T20:24:11+00:00",
     699        "type": "library",
     700        "extra": {
     701            "branch-alias": {
     702                "dev-master": "1.0.x-dev"
     703            }
     704        },
     705        "installation-source": "dist",
     706        "autoload": {
     707            "psr-4": {
     708                "Psr\\Cache\\": "src/"
     709            }
     710        },
     711        "notification-url": "https://packagist.org/downloads/",
     712        "license": [
     713            "MIT"
     714        ],
     715        "authors": [
     716            {
     717                "name": "PHP-FIG",
     718                "homepage": "http://www.php-fig.org/"
     719            }
     720        ],
     721        "description": "Common interface for caching libraries",
     722        "keywords": [
     723            "cache",
     724            "psr",
     725            "psr-6"
     726        ]
     727    },
     728    {
     729        "name": "psr/http-message",
     730        "version": "1.0.1",
     731        "version_normalized": "1.0.1.0",
     732        "source": {
     733            "type": "git",
     734            "url": "https://github.com/php-fig/http-message.git",
     735            "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
     736        },
     737        "dist": {
     738            "type": "zip",
     739            "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
     740            "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
     741            "shasum": ""
     742        },
     743        "require": {
     744            "php": ">=5.3.0"
     745        },
     746        "time": "2016-08-06T14:39:51+00:00",
     747        "type": "library",
     748        "extra": {
     749            "branch-alias": {
     750                "dev-master": "1.0.x-dev"
     751            }
     752        },
     753        "installation-source": "dist",
     754        "autoload": {
     755            "psr-4": {
     756                "Psr\\Http\\Message\\": "src/"
     757            }
     758        },
     759        "notification-url": "https://packagist.org/downloads/",
     760        "license": [
     761            "MIT"
     762        ],
     763        "authors": [
     764            {
     765                "name": "PHP-FIG",
     766                "homepage": "http://www.php-fig.org/"
     767            }
     768        ],
     769        "description": "Common interface for HTTP messages",
     770        "homepage": "https://github.com/php-fig/http-message",
     771        "keywords": [
     772            "http",
     773            "http-message",
     774            "psr",
     775            "psr-7",
     776            "request",
     777            "response"
     778        ]
     779    },
     780    {
     781        "name": "psr/log",
     782        "version": "1.1.2",
     783        "version_normalized": "1.1.2.0",
     784        "source": {
     785            "type": "git",
     786            "url": "https://github.com/php-fig/log.git",
     787            "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
     788        },
     789        "dist": {
     790            "type": "zip",
     791            "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
     792            "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
     793            "shasum": ""
     794        },
     795        "require": {
     796            "php": ">=5.3.0"
     797        },
     798        "time": "2019-11-01T11:05:21+00:00",
     799        "type": "library",
     800        "extra": {
     801            "branch-alias": {
     802                "dev-master": "1.1.x-dev"
     803            }
     804        },
     805        "installation-source": "dist",
     806        "autoload": {
     807            "psr-4": {
     808                "Psr\\Log\\": "Psr/Log/"
     809            }
     810        },
     811        "notification-url": "https://packagist.org/downloads/",
     812        "license": [
     813            "MIT"
     814        ],
     815        "authors": [
     816            {
     817                "name": "PHP-FIG",
     818                "homepage": "http://www.php-fig.org/"
     819            }
     820        ],
     821        "description": "Common interface for logging libraries",
     822        "homepage": "https://github.com/php-fig/log",
     823        "keywords": [
     824            "log",
     825            "psr",
     826            "psr-3"
     827        ]
     828    },
     829    {
     830        "name": "ralouphie/getallheaders",
     831        "version": "3.0.3",
     832        "version_normalized": "3.0.3.0",
     833        "source": {
     834            "type": "git",
     835            "url": "https://github.com/ralouphie/getallheaders.git",
     836            "reference": "120b605dfeb996808c31b6477290a714d356e822"
     837        },
     838        "dist": {
     839            "type": "zip",
     840            "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
     841            "reference": "120b605dfeb996808c31b6477290a714d356e822",
     842            "shasum": ""
     843        },
     844        "require": {
     845            "php": ">=5.6"
     846        },
     847        "require-dev": {
     848            "php-coveralls/php-coveralls": "^2.1",
     849            "phpunit/phpunit": "^5 || ^6.5"
     850        },
     851        "time": "2019-03-08T08:55:37+00:00",
     852        "type": "library",
     853        "installation-source": "dist",
     854        "autoload": {
     855            "files": [
     856                "src/getallheaders.php"
     857            ]
     858        },
     859        "notification-url": "https://packagist.org/downloads/",
     860        "license": [
     861            "MIT"
     862        ],
     863        "authors": [
     864            {
     865                "name": "Ralph Khattar",
     866                "email": "ralph.khattar@gmail.com"
     867            }
     868        ],
     869        "description": "A polyfill for getallheaders."
     870    },
     871    {
     872        "name": "symfony/polyfill-mbstring",
     873        "version": "v1.13.1",
     874        "version_normalized": "1.13.1.0",
     875        "source": {
     876            "type": "git",
     877            "url": "https://github.com/symfony/polyfill-mbstring.git",
     878            "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f"
     879        },
     880        "dist": {
     881            "type": "zip",
     882            "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f",
     883            "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f",
     884            "shasum": ""
     885        },
     886        "require": {
     887            "php": ">=5.3.3"
     888        },
     889        "suggest": {
     890            "ext-mbstring": "For best performance"
     891        },
     892        "time": "2019-11-27T14:18:11+00:00",
     893        "type": "library",
     894        "extra": {
     895            "branch-alias": {
     896                "dev-master": "1.13-dev"
     897            }
     898        },
     899        "installation-source": "dist",
     900        "autoload": {
     901            "psr-4": {
     902                "Symfony\\Polyfill\\Mbstring\\": ""
     903            },
     904            "files": [
     905                "bootstrap.php"
     906            ]
     907        },
     908        "notification-url": "https://packagist.org/downloads/",
     909        "license": [
     910            "MIT"
     911        ],
     912        "authors": [
     913            {
     914                "name": "Nicolas Grekas",
     915                "email": "p@tchwork.com"
     916            },
     917            {
     918                "name": "Symfony Community",
     919                "homepage": "https://symfony.com/contributors"
     920            }
     921        ],
     922        "description": "Symfony polyfill for the Mbstring extension",
     923        "homepage": "https://symfony.com",
     924        "keywords": [
     925            "compatibility",
     926            "mbstring",
     927            "polyfill",
     928            "portable",
     929            "shim"
     930        ]
     931    },
     932    {
     933        "name": "symfony/polyfill-php72",
     934        "version": "v1.13.1",
     935        "version_normalized": "1.13.1.0",
     936        "source": {
     937            "type": "git",
     938            "url": "https://github.com/symfony/polyfill-php72.git",
     939            "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038"
     940        },
     941        "dist": {
     942            "type": "zip",
     943            "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/66fea50f6cb37a35eea048d75a7d99a45b586038",
     944            "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038",
     945            "shasum": ""
     946        },
     947        "require": {
     948            "php": ">=5.3.3"
     949        },
     950        "time": "2019-11-27T13:56:44+00:00",
     951        "type": "library",
     952        "extra": {
     953            "branch-alias": {
     954                "dev-master": "1.13-dev"
     955            }
     956        },
     957        "installation-source": "dist",
     958        "autoload": {
     959            "psr-4": {
     960                "Symfony\\Polyfill\\Php72\\": ""
     961            },
     962            "files": [
     963                "bootstrap.php"
     964            ]
     965        },
     966        "notification-url": "https://packagist.org/downloads/",
     967        "license": [
     968            "MIT"
     969        ],
     970        "authors": [
     971            {
     972                "name": "Nicolas Grekas",
     973                "email": "p@tchwork.com"
     974            },
     975            {
     976                "name": "Symfony Community",
     977                "homepage": "https://symfony.com/contributors"
     978            }
     979        ],
     980        "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
     981        "homepage": "https://symfony.com",
     982        "keywords": [
     983            "compatibility",
     984            "polyfill",
     985            "portable",
     986            "shim"
     987        ]
     988    },
     989    {
     990        "name": "symfony/var-dumper",
     991        "version": "v4.4.1",
     992        "version_normalized": "4.4.1.0",
     993        "source": {
     994            "type": "git",
     995            "url": "https://github.com/symfony/var-dumper.git",
     996            "reference": "0a89a1dbbedd9fb2cfb2336556dec8305273c19a"
     997        },
     998        "dist": {
     999            "type": "zip",
     1000            "url": "https://api.github.com/repos/symfony/var-dumper/zipball/0a89a1dbbedd9fb2cfb2336556dec8305273c19a",
     1001            "reference": "0a89a1dbbedd9fb2cfb2336556dec8305273c19a",
     1002            "shasum": ""
     1003        },
     1004        "require": {
     1005            "php": "^7.1.3",
     1006            "symfony/polyfill-mbstring": "~1.0",
     1007            "symfony/polyfill-php72": "~1.5"
     1008        },
     1009        "conflict": {
     1010            "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
     1011            "symfony/console": "<3.4"
     1012        },
     1013        "require-dev": {
     1014            "ext-iconv": "*",
     1015            "symfony/console": "^3.4|^4.0|^5.0",
     1016            "symfony/process": "^4.4|^5.0",
     1017            "twig/twig": "^1.34|^2.4|^3.0"
     1018        },
     1019        "suggest": {
     1020            "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).",
     1021            "ext-intl": "To show region name in time zone dump",
     1022            "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
     1023        },
     1024        "time": "2019-11-28T13:33:56+00:00",
     1025        "bin": [
     1026            "Resources/bin/var-dump-server"
     1027        ],
     1028        "type": "library",
     1029        "extra": {
     1030            "branch-alias": {
     1031                "dev-master": "4.4-dev"
     1032            }
     1033        },
     1034        "installation-source": "dist",
     1035        "autoload": {
     1036            "files": [
     1037                "Resources/functions/dump.php"
     1038            ],
     1039            "psr-4": {
     1040                "Symfony\\Component\\VarDumper\\": ""
     1041            },
     1042            "exclude-from-classmap": [
     1043                "/Tests/"
     1044            ]
     1045        },
     1046        "notification-url": "https://packagist.org/downloads/",
     1047        "license": [
     1048            "MIT"
     1049        ],
     1050        "authors": [
     1051            {
     1052                "name": "Nicolas Grekas",
     1053                "email": "p@tchwork.com"
     1054            },
     1055            {
     1056                "name": "Symfony Community",
     1057                "homepage": "https://symfony.com/contributors"
     1058            }
     1059        ],
     1060        "description": "Symfony mechanism for exploring and dumping PHP variables",
     1061        "homepage": "https://symfony.com",
     1062        "keywords": [
     1063            "debug",
     1064            "dump"
     1065        ]
     1066    },
     1067    {
     1068        "name": "tightenco/collect",
     1069        "version": "v5.8.35",
     1070        "version_normalized": "5.8.35.0",
     1071        "source": {
     1072            "type": "git",
     1073            "url": "https://github.com/tightenco/collect.git",
     1074            "reference": "c93a7039e6207ad533a09109838fe80933fcc72c"
     1075        },
     1076        "dist": {
     1077            "type": "zip",
     1078            "url": "https://api.github.com/repos/tightenco/collect/zipball/c93a7039e6207ad533a09109838fe80933fcc72c",
     1079            "reference": "c93a7039e6207ad533a09109838fe80933fcc72c",
     1080            "shasum": ""
     1081        },
     1082        "require": {
     1083            "php": "^7.1.3",
     1084            "symfony/var-dumper": ">=3.4 <5"
     1085        },
     1086        "require-dev": {
     1087            "mockery/mockery": "^1.0",
     1088            "nesbot/carbon": "^1.26.3",
     1089            "phpunit/phpunit": "^7.0"
     1090        },
     1091        "time": "2019-09-17T18:57:01+00:00",
     1092        "type": "library",
     1093        "installation-source": "dist",
     1094        "autoload": {
     1095            "files": [
     1096                "src/Collect/Support/helpers.php",
     1097                "src/Collect/Support/alias.php"
     1098            ],
     1099            "psr-4": {
     1100                "Tightenco\\Collect\\": "src/Collect"
     1101            }
     1102        },
     1103        "notification-url": "https://packagist.org/downloads/",
     1104        "license": [
     1105            "MIT"
     1106        ],
     1107        "authors": [
     1108            {
     1109                "name": "Taylor Otwell",
     1110                "email": "taylorotwell@gmail.com"
     1111            }
     1112        ],
     1113        "description": "Collect - Illuminate Collections as a separate package.",
     1114        "keywords": [
     1115            "collection",
     1116            "laravel"
     1117        ]
    541118    }
    551119]
Note: See TracChangeset for help on using the changeset viewer.