Skip to content

Commit

Permalink
0.8.3 bugfix release
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian Taggart committed Feb 12, 2015
1 parent 46204bd commit 67ab58a
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 35 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Provides a library of additional template tags, 3rd-party libraries, and functio

# Changelog:

## 0.8.3
- Bugfix for mapi_edit_link()
- Tested custom search options

## 0.8.2
- Updated htmLawed
- Updated gitignore
Expand Down
8 changes: 3 additions & 5 deletions core/mapi-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,16 @@ function mapi_query() {
foreach($terms as $term) {
$term = esc_attr(trim(str_replace(array('"', '\'', '%22'), '', $term)));
if(!empty($term)) {
$filtered[] = '"'.$term.'"';
$filtered[] = '"' . $term . '"';
}
}
if(count($filtered) > 0) {
$mapi_do_extend = TRUE;
echo '<script type="text/javascript">var mapi_query = new Array('.implode(',', $filtered).');var mapi_areas = new Array("'.implode('","', $areas).'");</script>';
echo '<script type="text/javascript">var mapi_query = new Array(' . implode(',', $filtered) . ');var mapi_areas = new Array("' . implode('","', $areas) . '");</script>';
}
}
}



/**
* Replaces the GET variable 's' with a nice URL, like 'search'.
*
Expand All @@ -80,7 +78,7 @@ function mapi_nice_search_redirect() {
$search_base = apply_filters('mapi_search_base', $wp_rewrite->search_base);

if(is_search() && !is_admin() && strpos($_SERVER['REQUEST_URI'], "/{$search_base}/") === FALSE) {
wp_redirect(home_url("/{$search_base}/".urlencode(get_query_var('s'))));
wp_redirect(home_url("/{$search_base}/" . urlencode(get_query_var('s'))));
exit();
}
}
Expand Down
4 changes: 2 additions & 2 deletions mindshare-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin URI: https://mindsharelabs.com/downloads/mindshare-theme-api/
Description: Provides a library of additional template tags, 3rd-party libraries, and functions for WordPress themes and additional features for WordPress CMS websites.
Author: Mindshare Studios, Inc
Version: 0.8.2
Version: 0.8.3
Author URI: https://mind.sh/are/
Network: false
*/
Expand Down Expand Up @@ -106,7 +106,7 @@ class Mindshare_API {
*
* @var string
*/
private $class_version = '0.8.2';
private $class_version = '0.8.3';

/**
* Used for automatic updates
Expand Down
65 changes: 37 additions & 28 deletions views/mapi-system-info.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
*/

require_once(MAPI_DIR_PATH.'/core/mapi-utility.php');
require_once(MAPI_DIR_PATH . '/core/mapi-utility.php');

function mapi_system_info() {

Expand All @@ -26,9 +26,9 @@ function mapi_system_info() {

$active_plugins = get_option('active_plugins', array());

$sysinfo = "WordPress Version: ".get_bloginfo('version')."\n";
$sysinfo .= "PHP Version: ".PHP_VERSION."\n";
$sysinfo .= "API Version: ".$mapi."\n";
$sysinfo = "WordPress Version: " . get_bloginfo('version') . "\n";
$sysinfo .= "PHP Version: " . PHP_VERSION . "\n";
$sysinfo .= "API Version: " . $mapi . "\n";

if(class_exists('mysqli')) {
// if the host contains a port we need to split them up
Expand All @@ -38,76 +38,85 @@ function mapi_system_info() {
} else {
$mysqli_link = new mysqli(DB_HOST, DB_USER, DB_PASSWORD);
}
$sysinfo .= "MySQL Version: ".@mysqli_get_server_info($mysqli_link)."\n";
$sysinfo .= "MySQL Version: " . @mysqli_get_server_info($mysqli_link) . "\n";
} else {
$sysinfo .= "MySQL Version: ".@mysql_get_server_info()."\n";
$sysinfo .= "MySQL Version: " . @mysql_get_server_info() . "\n";
}

$sysinfo .= "Web Server: ".$_SERVER['SERVER_SOFTWARE']."\n";
$sysinfo .= "Web Server: " . $_SERVER['SERVER_SOFTWARE'] . "\n";

$sysinfo .= "WordPress URL: ".get_bloginfo('wpurl')."\n";
$sysinfo .= "Home URL: ".get_bloginfo('url')."\n";
$sysinfo .= "WordPress URL: " . get_bloginfo('wpurl') . "\n";
$sysinfo .= "Home URL: " . get_bloginfo('url') . "\n";

$sysinfo .= "PHP cURL Support: ";
if(function_exists('curl_init')) {
$sysinfo .= __('Yes', 'mapi')."\n";
$sysinfo .= __('Yes', 'mapi') . "\n";
} else {
$sysinfo .= __('No', 'mapi')."\n";
$sysinfo .= __('No', 'mapi') . "\n";
}
$sysinfo .= "PHP GD Support: ";
if(function_exists('gd_info')) {
$sysinfo .= __('Yes', 'mapi')."\n";
$sysinfo .= __('Yes', 'mapi') . "\n";
} else {
$sysinfo .= __('No', 'mapi')."\n";
$sysinfo .= __('No', 'mapi') . "\n";
}
$sysinfo .= "PHP Memory Limit: ".ini_get('memory_limit')."\n";
$sysinfo .= "PHP Post Max Size: ".ini_get('post_max_size')."\n";
$sysinfo .= "PHP Upload Max Size: ".ini_get('upload_max_filesize')."\n";
$sysinfo .= "PHP Memory Limit: " . ini_get('memory_limit') . "\n";
$sysinfo .= "PHP Post Max Size: " . ini_get('post_max_size') . "\n";
$sysinfo .= "PHP Upload Max Size: " . ini_get('upload_max_filesize') . "\n";

$sysinfo .= "WP_DEBUG: ";
if(defined('WP_DEBUG')) {
if(WP_DEBUG) {
$sysinfo .= __('Enabled', 'mapi')."\n";
$sysinfo .= __('Enabled', 'mapi') . "\n";
} else {
$sysinfo .= __('Disabled', 'mapi')."\n";
$sysinfo .= __('Disabled', 'mapi') . "\n";
}
} else {
$sysinfo .= __('Not set', 'mapi')."\n";
$sysinfo .= __('Not set', 'mapi') . "\n";
}

$sysinfo .= "Multi-Site Active: ";
if(is_multisite()) {
$sysinfo .= __('Yes', 'mapi')."\n";
$sysinfo .= __('Yes', 'mapi') . "\n";
} else {
$sysinfo .= __('No', 'mapi')."\n";
$sysinfo .= __('No', 'mapi') . "\n";
}

$sysinfo .= "User Operating System: ".$browser['platform']."\n";
$sysinfo .= "User Browser: ".$browser['name'].' '.$browser['version']."\n";
$sysinfo .= "User Agent: ".$browser['user_agent']."\n\n";
$sysinfo .= "User Operating System: " . $browser['platform'] . "\n";
$sysinfo .= "User Browser: " . $browser['name'] . ' ' . $browser['version'] . "\n";
$sysinfo .= "User Agent: " . $browser['user_agent'] . "\n\n";

$sysinfo .= "Active Theme:\n\n- ".$theme->get('Name')." ".$theme->get('Version')."\n ".$theme->get('ThemeURI')."\n\n";
$sysinfo .= "Active Theme:\n\n- " . $theme->get('Name') . " " . $theme->get('Version') . "\n " . $theme->get('ThemeURI') . "\n\n";

$sysinfo .= "Active Plugins:\n\n";

foreach($plugins as $plugin_path => $plugin) {
// Only show active plugins
if(in_array($plugin_path, $active_plugins)) {
$sysinfo .= '- '.$plugin['Name'].' '.$plugin['Version']."\n";
$sysinfo .= '- ' . $plugin['Name'] . ' ' . $plugin['Version'] . "\n";

if(isset($plugin['PluginURI'])) {
$sysinfo .= ' '.$plugin['PluginURI']."\n";
$sysinfo .= ' ' . $plugin['PluginURI'] . "\n";
}

$sysinfo .= "\n";
}
}

if(mapi_check_server() == 'apache' && function_exists('apache_get_modules')) {
$apache_modules = apache_get_modules();
$sysinfo .= "Apache Modules:\n\n";
natcasesort($apache_modules);
foreach($apache_modules as $apache_module) {
$sysinfo .= '- ' . $apache_module . "\n";
}
}

if(is_array($modules)) {
$sysinfo .= "PHP Modules:\n\n";
natcasesort($modules);
foreach($modules as $module) {
$sysinfo .= '- '.$module."\n";
$sysinfo .= '- ' . $module . "\n";
}
}

Expand Down

0 comments on commit 67ab58a

Please sign in to comment.