Skip to content

Commit

Permalink
Merge pull request #4 from knowledgearc/master
Browse files Browse the repository at this point in the history
DS not required in PHP.
  • Loading branch information
coolbung committed Aug 31, 2014
2 parents ad94624 + a7b1cc6 commit af25dfa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
14 changes: 6 additions & 8 deletions code/admin/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@

jimport('joomla.application.component.controller');

if(!defined('DS')) define('DS', DIRECTORY_SEPARATOR);
$front_end = JPATH_SITE.'/components/com_api';

$front_end = JPATH_SITE .DS. 'components' .DS. 'com_api';

JLoader::register( 'APIController', $front_end .DS. 'libraries' .DS. 'controller.php' );
JLoader::register( 'ApiControllerAdmin',$front_end .DS. 'libraries' .DS. 'admin' .DS. 'controller.php' );
JLoader::register( 'APIModel', $front_end .DS. 'libraries' .DS. 'model.php' );
JLoader::register( 'APIView', $front_end .DS. 'libraries' .DS. 'view.php' );
JLoader::register( 'APIController', $front_end.'/libraries/controller.php' );
JLoader::register( 'ApiControllerAdmin',$front_end.'/libraries/admin/controller.php' );
JLoader::register( 'APIModel', $front_end.'/libraries/model.php' );
JLoader::register( 'APIView', $front_end.'/libraries/view.php' );

$app = JFactory::getApplication();

Expand All @@ -37,7 +35,7 @@
$controller = $view;
}

$c_path = JPATH_COMPONENT_ADMINISTRATOR .DS. 'controllers' .DS. strtolower( $controller ) . '.php';
$c_path = JPATH_COMPONENT_ADMINISTRATOR.'/controllers/'.strtolower( $controller ) . '.php';

if ( file_exists( $c_path ) ) {
include_once $c_path;
Expand Down
4 changes: 2 additions & 2 deletions code/admin/install.api.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

//install users for joomla 2.5 plugin and publish it
$installer = new JInstaller;
$result = $installer->install($install_source.DS.'part_info');
$result = $installer->install($install_source.'/part_info');
if (!in_array("part_info", $status)) {
if(JVERSION >= '1.6.0')
{
Expand All @@ -52,7 +52,7 @@

//product hierachy
$installer = new JInstaller;
$result = $installer->install($install_source.DS.'product_hierarchy');
$result = $installer->install($install_source.'/product_hierarchy');
if (!in_array("product_hierarchy", $status)) {
if(JVERSION >= '1.6.0')
{
Expand Down
8 changes: 4 additions & 4 deletions code/install.api.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

//install redshop plugin and publish it
$installer = new JInstaller;
$result = $installer->install($install_source.DS.'redshop');
$result = $installer->install($install_source.'/redshop');
if (!in_array("redshop", $status)) {
if(JVERSION >= '1.6.0')
{
Expand All @@ -55,7 +55,7 @@

//install socialads and publish it
$installer = new JInstaller;
$result = $installer->install($install_source.DS.'socialads');
$result = $installer->install($install_source.'/socialads');
if (!in_array("socialads", $status)) {
if(JVERSION >= '1.6.0')
{
Expand All @@ -80,7 +80,7 @@

//install tienda plugin and publish it
$installer = new JInstaller;
$result = $installer->install($install_source.DS.'tienda');
$result = $installer->install($install_source.'/tienda');
if (!in_array("tienda", $status)) {
if(JVERSION >= '1.6.0')
{
Expand All @@ -105,7 +105,7 @@

//install virtuemart Payment plugin and publish it
$installer = new JInstaller;
$result = $installer->install($install_source.DS.'virtuemart');
$result = $installer->install($install_source.'/virtuemart');
if (!in_array("virtuemart", $status)) {
if(JVERSION >= '1.6.0')
{
Expand Down

0 comments on commit af25dfa

Please sign in to comment.