Skip to content

Commit e36ea8c

Browse files
Merge pull request #24 from styladev/1383_pluginVersionEndpoint2
#1383N: created endpoint for plugin version
2 parents 56fb969 + 6095f34 commit e36ea8c

File tree

1 file changed

+9
-0
lines changed
  • app/code/community/Styla/Connect/Controller

1 file changed

+9
-0
lines changed

app/code/community/Styla/Connect/Controller/Router.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,19 @@ public function match(Zend_Controller_Request_Http $request)
1313
}
1414

1515
$frontName = $this->_getFrontName($path);
16+
1617
if (!$frontName) {
1718
return false;
1819
}
1920

21+
if ($frontName == 'styla-plugin-version'){
22+
$styla_version_arr = array();
23+
$styla_version_config = (Array) Mage::getConfig()->getModuleConfig('Styla_Connect')->version;
24+
$styla_version_arr['version'] = $styla_version_config[0];
25+
echo json_encode($styla_version_arr);
26+
exit;
27+
}
28+
2029
$magazine = Mage::getModel('styla_connect/magazine')->loadByFrontName($frontName);
2130

2231
if (!$magazine || !$magazine->isActive()) {

0 commit comments

Comments
 (0)