Skip to content

Commit 5482b76

Browse files
committed
2 parents 0832403 + 0d501fd commit 5482b76

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-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: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ function keygen()
7575

7676
$result = $kmodel->save($data);
7777
$key = $result->hash;
78+
7879
//add new key in easysocial table
79-
if(JComponentHelper::isEnabled('com_easysocial', true))
80+
$easyblog = JPATH_ROOT . '/administrator/components/com_easyblog/easyblog.php';
81+
if (JFile::exists($easyblog) && JComponentHelper::isEnabled('com_easysocial', true)) {
8082
{
8183
$this->updateEauth( $user , $key );
8284
}
@@ -95,9 +97,10 @@ function keygen()
9597
}
9698
return( $obj );
9799
}
100+
98101
/*
99-
* function for update easyblog keys
100-
* /
102+
* function to update Easyblog auth keys
103+
*/
101104
public function updateEauth($user=null,$key=null)
102105
{
103106
require_once JPATH_ADMINISTRATOR.'/components/com_easysocial/includes/foundry.php';

0 commit comments

Comments
 (0)