Skip to content

Commit

Permalink
Save info about required plugins when uploading Theme to Marketplace.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicodim99 committed May 10, 2017
1 parent deaa7ca commit 29c0cd7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cms/include/action_plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
'errors' => array()
);

$action = $_POST['action'];
$plugin = $_POST['plugin'];
$action = $_REQUEST['action'];
$plugin = $_REQUEST['plugin'];

if ($action == 'delete_data')
{
Expand Down
15 changes: 15 additions & 0 deletions cms/include/classes/Cetera/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,21 @@ public function dumpData()
$settings
);
$dump->start($this->getPath().'/'.THEME_DB_DATA);

// записываем зависимости плагинов
$requires = array();
foreach (Plugin::enum() as $p) {
if ($p->isEnabled()) {
$requires[] = array(
'plugin' => $p->name,
'version' => $p->version,
);
}
}

$info = $this->loadInfo();
$info['requires'] = $requires;
$this->saveInfo($info);
}

public function rename($name)
Expand Down

0 comments on commit 29c0cd7

Please sign in to comment.