diff --git a/system/controllers/pluginmanager.php b/system/controllers/pluginmanager.php index 76403838..3b55ab11 100644 --- a/system/controllers/pluginmanager.php +++ b/system/controllers/pluginmanager.php @@ -81,6 +81,9 @@ switch ($action) { r2(U . "pluginmanager", 's', 'Installation success'); } else if (_post('gh_url', '') != '') { $ghUrl = _post('gh_url', ''); + if(!empty($config['github_token']) && !empty($config['github_username'])) { + $ghUrl = str_replace('https://github.com', 'https://'.$config['github_username'].':'.$config['github_token'].'@github.com', $ghUrl); + } $plugin = basename($ghUrl); $file = $cache . $plugin . '.zip'; $fp = fopen($file, 'w+'); @@ -132,6 +135,9 @@ switch ($action) { if ($tipe == 'plugin') { foreach ($json['plugins'] as $plg) { if ($plg['id'] == $plugin) { + if(!empty($config['github_token']) && !empty($config['github_username'])) { + $plg['github'] = str_replace('https://github.com', 'https://'.$config['github_username'].':'.$config['github_token'].'@github.com', $plg['github']); + } $fp = fopen($file, 'w+'); $ch = curl_init($plg['github'] . '/archive/refs/heads/master.zip'); curl_setopt($ch, CURLOPT_POST, 0); @@ -180,6 +186,9 @@ switch ($action) { if ($tipe == 'plugin') { foreach ($json['plugins'] as $plg) { if ($plg['id'] == $plugin) { + if(!empty($config['github_token']) && !empty($config['github_username'])) { + $plg['github'] = str_replace('https://github.com', 'https://'.$config['github_username'].':'.$config['github_token'].'@github.com', $plg['github']); + } $fp = fopen($file, 'w+'); $ch = curl_init($plg['github'] . '/archive/refs/heads/master.zip'); curl_setopt($ch, CURLOPT_POST, 0); @@ -214,6 +223,9 @@ switch ($action) { } else if ($tipe == 'payment') { foreach ($json['payment_gateway'] as $plg) { if ($plg['id'] == $plugin) { + if(!empty($config['github_token']) && !empty($config['github_username'])) { + $plg['github'] = str_replace('https://github.com', 'https://'.$config['github_username'].':'.$config['github_token'].'@github.com', $plg['github']); + } $fp = fopen($file, 'w+'); $ch = curl_init($plg['github'] . '/archive/refs/heads/master.zip'); curl_setopt($ch, CURLOPT_POST, 0); diff --git a/system/lan/english.json b/system/lan/english.json index 283df2cf..25a57913 100644 --- a/system/lan/english.json +++ b/system/lan/english.json @@ -659,9 +659,7 @@ "Voucher_invalid": "Voucher invalid", "Account_Not_Found": "Account Not Found", "Internet_Voucher_Expired": "Internet Voucher Expired", - "": "", "Additional_Billing": "Additional Billing", - "_": "-", "Used_Date": "Used Date", "Filter": "Filter", "Start_time": "Start time", @@ -672,5 +670,8 @@ "balance": "balance", "radius": "radius", "Start_Date": "Start Date", - "End_Date": "End Date" + "End_Date": "End Date", + "New_Version_Notification": "New Version Notification", + "Enabled": "Enabled", + "This_is_to_notify_you_when_new_updates_is_available": "This is to notify you when new updates is available" } \ No newline at end of file diff --git a/ui/ui/app-settings.tpl b/ui/ui/app-settings.tpl index 33ee4e97..3d09c4a8 100644 --- a/ui/ui/app-settings.tpl +++ b/ui/ui/app-settings.tpl @@ -590,13 +590,16 @@
{Lang::T('This is to notify you when new updates is available')}
+{Lang::T('This is to notify you when new updates is available')} +
{Lang::T('Enter the custom tax rate (e.g., 3.75 for 3.75%)')}
To download from private/paid repository, Set your Github Authentication first
+