File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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 ' ;
You can’t perform that action at this time.
0 commit comments