Skip to content

Commit

Permalink
Backwards compatibility update
Browse files Browse the repository at this point in the history
Fixed bug that caused fatal errors on EE versions earlier than 2.8.
  • Loading branch information
mrtopher committed May 28, 2014
1 parent ef349f5 commit 29a3022
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions third_party/dashee/helpers/module_helper.php
Expand Up @@ -10,6 +10,41 @@
* @link http://chrismonnat.com
*/

/**
* Generate CP url for provided module.
*
* @param string $c ignored for backwards compatibility
* @param array $variables additional URL GET variables being passed
* @return string $url
*/
if ( ! function_exists('cp_url'))
{
function cp_url($c, $variables = array())
{
$EE =& get_instance();

$s = 0;
switch($EE->config->item('admin_session_type'))
{
case 's' :
$s = $EE->session->userdata('session_id', 0);
break;
case 'cs' :
$s = $EE->session->userdata('fingerprint', 0);
break;
}

$url = $EE->config->item('cp_url') . '?S=' . $s . AMP . 'D=cp'. AMP . 'C=addons_modules' . AMP . 'M=show_module_cp';

foreach ($variables as $variable => $value)
{
$url .= AMP . $variable . '=' . $value;
}

return $url;
}
}

/**
* Generate URL trailor specifically form form_open() function.
*
Expand Down
2 changes: 1 addition & 1 deletion third_party/dashee/models/dashee_update_model.php
Expand Up @@ -37,7 +37,7 @@ public function __construct()
$this->_site_id = $this->EE->session->userdata('site_id');

$this->_package_name = 'dashEE';
$this->_package_version = '2.0';
$this->_package_version = '2.1';
$this->_extension_version = '1.4';

$this->_module_settings = array(
Expand Down

0 comments on commit 29a3022

Please sign in to comment.