Skip to content

Commit f8512dc

Browse files
committed
Updated check conditions
1 parent 2d67035 commit f8512dc

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

easyblog/easyblog.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ public function __construct(&$subject, $config = array())
1616
{
1717
parent::__construct($subject, $config = array());
1818

19-
$easyblog = JPATH_ROOT . '/administrator/components/com_easyblog/easyblog.php';
20-
if (!JFile::exists($easyblog)) {
19+
$easyblog = JPATH_ROOT . '/administrator/components/com_easyblog/easyblog.php';
20+
if (!JFile::exists($easyblog) || JComponentHelper::isEnabled('com_easysocial', true)) {
2121
ApiError::raiseError(404, 'Easyblog not installed');
2222
return;
2323
}

users/users/login.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ function keygen()
7676
$result = $kmodel->save($data);
7777
$key = $result->hash;
7878
//add new key in easysocial table
79-
if(JComponentHelper::isEnabled('com_easysocial', true))
79+
$easyblog = JPATH_ROOT . '/administrator/components/com_easyblog/easyblog.php';
80+
if (JFile::exists($easyblog) && JComponentHelper::isEnabled('com_easysocial', true)) {
8081
{
8182
$this->updateEauth( $user , $key );
8283
}
@@ -95,9 +96,10 @@ function keygen()
9596
}
9697
return( $obj );
9798
}
99+
98100
/*
99-
* function for update easyblog keys
100-
* /
101+
* function to update Easyblog auth keys
102+
*/
101103
public function updateEauth($user=null,$key=null)
102104
{
103105
require_once JPATH_ADMINISTRATOR.'/components/com_easysocial/includes/foundry.php';

0 commit comments

Comments
 (0)