admin/controller/marketplace/install.php
(开头部分) 13KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
class ControllerMarketplaceInstall extends Controller {
public function install() {
$this->load->language('marketplace/install');
$json = array();
if (isset($this->request->get['extension_install_id'])) {
$extension_install_id = $this->request->get['extension_install_id'];
} else {
$extension_install_id = 0;
}
if (!$this->user->hasPermission('modify', 'marketplace/install')) {
$json['error'] = $this->language->get('error_permission');
}
// Make sure the file name is stored in the session.
if (!isset($this->session->data['install'])) {
$json['error'] = $this->language->get('error_file');
} elseif (!is_file(DIR_STORAGE . 'marketplace/' . $this->session->data['install'] . '.tmp')) {
$json['error'] = $this->language->get('error_file');
}
if (!$json) {
$json['text'] = $this->language->get('text_unzip');
$json['next'] = str_replace('&', '&', $this->url->link('marketplace/install/unzip', 'user_token=' . $this->session->data['user_token'] . '&extension_install_id=' . $extension_install_id));
}
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode($json));
}
public function unzip() {
$this->load->language('marketplace/install');
$json = array();
if (isset($this->request->get['extension_install_id'])) {
$extension_install_id = $this->request->get['extension_install_id'];
} else {
$extension_install_id = 0;
}
if (!$this->user->hasPermission('modify', 'marketplace/install')) {
$json['error'] = $this->language->get('error_permission');
}
if (!isset($this->session->data['install'])) {
$json['error'] = $this->language->get('error_file');
} elseif (!is_file(DIR_STORAGE . 'marketplace/' . $this->session->data['install'] . '.tmp')) {
$json['error'] = $this->language->get('error_file');
}
// Sanitize the filename
if (!$json) {
$file = DIR_STORAGE . 'marketplace/' . $this->session->data['install'] . '.tmp';
// Unzip the files
后面还有 425 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
