Browse files

Added check to URL to ensure that http:// (or some variation, existed…

…), else added http:// (assumption).
  • Loading branch information...
1 parent 1ecba8a commit 2abe4205976c1eb1fed2c2cfa4f0df9b40d7b927 @wpsmith committed May 20, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 tgm-plugin-activation/class-tgm-plugin-activation.php
View
2 tgm-plugin-activation/class-tgm-plugin-activation.php
@@ -1183,6 +1183,8 @@ protected function _gather_plugin_data() {
$table_data[$i]['status'] = sprintf( '%1$s', __( 'Installed But Not Activated', TGM_Plugin_Activation::$instance->domain ) );
$table_data[$i]['file_path'] = $plugin['file_path'];
+ if ( isset( $plugin['source'] ) && ! preg_match( "~^(?:f|ht)tps?://~i", $plugin['source'] ) )
+ $plugin['source'] = "http://" . $plugin['source'];
$table_data[$i]['url'] = isset( $plugin['source'] ) ? $plugin['source'] : 'repo';
$i++;

0 comments on commit 2abe420

Please sign in to comment.