Skip to content

Commit

Permalink
Updated check conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
coolbung committed Nov 10, 2014
1 parent 2d67035 commit f8512dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions easyblog/easyblog.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public function __construct(&$subject, $config = array())
{
parent::__construct($subject, $config = array());

$easyblog = JPATH_ROOT . '/administrator/components/com_easyblog/easyblog.php';
if (!JFile::exists($easyblog)) {
$easyblog = JPATH_ROOT . '/administrator/components/com_easyblog/easyblog.php';
if (!JFile::exists($easyblog) || JComponentHelper::isEnabled('com_easysocial', true)) {
ApiError::raiseError(404, 'Easyblog not installed');
return;
}
Expand Down
8 changes: 5 additions & 3 deletions users/users/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ function keygen()
$result = $kmodel->save($data);
$key = $result->hash;
//add new key in easysocial table
if(JComponentHelper::isEnabled('com_easysocial', true))
$easyblog = JPATH_ROOT . '/administrator/components/com_easyblog/easyblog.php';
if (JFile::exists($easyblog) && JComponentHelper::isEnabled('com_easysocial', true)) {
{
$this->updateEauth( $user , $key );
}
Expand All @@ -95,9 +96,10 @@ function keygen()
}
return( $obj );
}

/*
* function for update easyblog keys
* /
* function to update Easyblog auth keys
*/
public function updateEauth($user=null,$key=null)
{
require_once JPATH_ADMINISTRATOR.'/components/com_easysocial/includes/foundry.php';
Expand Down

0 comments on commit f8512dc

Please sign in to comment.