Skip to content

Commit

Permalink
Issues with the latest VVV release 2.0 changes default wp paths. ref #50
Browse files Browse the repository at this point in the history


Incremented version to 0.2.0
  • Loading branch information
topdown committed Mar 14, 2017
1 parent 5e79d5d commit 6fa80d7
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 46 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ create a `VVV/www/default/dashboard/custom.css` file and add this

mm/dd/yy

03/14/17 version: 0.2.0

* Fixes #50 default path issues with the VVV 2.0
* Removed local.wordpress-trunk.dev as per https://github.com/Varying-Vagrant-Vagrants/VVV/issues/1096
* Removed @ error suppression someone put in the host list instead of proper isset() check

11/08/16 version: 0.1.9

* Fixes #49 PHP Warning: Invalid argument supplied for foreach() hosts-list2.php on line 80
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
define( 'VVV_DASH_BASE', true );
define( 'VVV_WEB_ROOT', '/srv/www' );
define( 'VVV_DASH_ROOT', __DIR__);
define( 'VVV_DASH_VERSION', '0.1.9' );
define( 'VVV_DASH_VERSION', '0.2.0' );
define( 'VVV_DASH_VIEWS', __DIR__ . '/views' );
define('VVV_DASH_HOSTS_DEBUG', false);

Expand Down
6 changes: 3 additions & 3 deletions new-features.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
* Fixes #49 PHP Warning: Invalid argument supplied for foreach() hosts-list2.php on line 80
* Added a host tools page with database tools for each site
* A good start on plugin blueprints
* Fixes #50 default path issues with the VVV 2.0
* Removed local.wordpress-trunk.dev as per https://github.com/Varying-Vagrant-Vagrants/VVV/issues/1096
* Removed @ error suppression someone put in the host list instead of proper isset() check
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.9
0.2.0
28 changes: 13 additions & 15 deletions views/partials/hosts-list2.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* @var $host_info \vvv_dash\hosts_container::get_host_list() loaded from the index.php */

$host_info = ( is_array( $host_info ) ) ? $host_info : false;
?>
<p class="red italic"><span class="bold">NOTE</span>: After creating or changing a host/site purge the Host Cache.
Expand Down Expand Up @@ -51,11 +50,11 @@
<span class="label label-success">Debug On <i class="fa fa-check-circle-o"></i></span>

<?php } else {
if ( isset($host['wp_is_installed']) && $host['wp_is_installed'] == 'true' ) {
if ( isset( $host['wp_is_installed'] ) && $host['wp_is_installed'] == 'true' ) {
?>
<span class="label label-danger">Debug Off <i class="fa fa-times-circle-o"></i></span>
<?php
} elseif ( isset($host['wp_is_installed']) && $host['wp_is_installed'] == 'false' && $host['is_wp_site'] == 'false' ) {
} elseif ( isset( $host['wp_is_installed'] ) && $host['wp_is_installed'] == 'false' && $host['is_wp_site'] == 'false' ) {
?>
<span class="label label-warning">ARCHIVE</span>
<?php
Expand All @@ -68,16 +67,15 @@
</td>
<td class="host"><?php

// @ToDO what the heck is this @ crap Suppressing errors is not acceptable. Not sure who put that there.
echo @$host['domain'];
echo ( isset( $host['domain'] ) ) ? $host['domain'] : 'N/A';

if ( isset( $host['config_settings']['MULTISITE'] ) ) {
echo '<span class="label label-default pull-right sub-site-toggle"><i class="fa fa-server"></i> MS</span>';

$sub_sites = $host_commands->get_sub_sites($host['hostname'], $host['wp_path']);
$sub_sites = (array) json_decode($sub_sites);

if(is_array($sub_sites) && sizeof($sub_sites)) {
$sub_sites = $host_commands->get_sub_sites( $host['hostname'], $host['wp_path'] );
$sub_sites = (array) json_decode( $sub_sites );

if ( is_array( $sub_sites ) && sizeof( $sub_sites ) ) {
echo '<div class="sub-sites" style="margin-top: 5px; display: none;">';
foreach ( $sub_sites as $site ) {
echo '<p><a target="_blank" href="' . $site->url . '">' . $site->url . '</a></p>';
Expand All @@ -97,19 +95,19 @@
?></td>

<td>
<?php if ( isset($host['wp_is_installed']) && ($host['wp_is_installed'] == 'true' || $host['wp_is_installed'] == 'false' && $host['is_wp_site'] == 'true' )) { ?>
<?php if ( isset( $host['wp_is_installed'] ) && ( $host['wp_is_installed'] == 'true' || $host['wp_is_installed'] == 'false' && $host['is_wp_site'] == 'true' ) ) { ?>
<a class="btn btn-primary btn-xs" href="http://<?php echo $host['domain']; ?>/" target="_blank">
<i class="fa fa-external-link"></i> Visit </a>
<?php } ?>
<?php if ( isset($host['wp_is_installed']) && $host['wp_is_installed'] == 'true' ) { ?>
<?php if ( isset( $host['wp_is_installed'] ) && $host['wp_is_installed'] == 'true' ) { ?>
<a class="btn btn-warning btn-xs" href="http://<?php echo $host['domain']; ?>/wp-admin" target="_blank">
<i class="fa fa-wordpress"></i> Admin </a>
<?php } ?>
<?php if ( isset($host['wp_is_installed']) && ($host['wp_is_installed'] == 'true' || $host['wp_is_installed'] == 'false' && $host['is_wp_site'] == 'true' )) { ?>
<?php if ( isset( $host['wp_is_installed'] ) && ( $host['wp_is_installed'] == 'true' || $host['wp_is_installed'] == 'false' && $host['is_wp_site'] == 'true' ) ) { ?>
<a class="btn btn-success btn-xs" href="http://<?php echo $host['domain']; ?>/?XDEBUG_PROFILE" target="_blank">
<i class="fa fa-search-plus"></i> Profiler </a>
<?php } ?>
<?php if ( isset($host['wp_is_installed']) && $host['wp_is_installed'] == 'true' ) { ?>
<?php if ( isset( $host['wp_is_installed'] ) && $host['wp_is_installed'] == 'true' ) { ?>
<a href="./?host=<?php echo $host['domain']; ?>&get_themes=true" class="btn btn-default btn-xs">
<i class="fa fa-paint-brush"></i><span> Themes</span> </a>

Expand All @@ -118,7 +116,7 @@

<?php }

if ( isset($host['wp_is_installed']) && $host['wp_is_installed'] == 'true' ) {
if ( isset( $host['wp_is_installed'] ) && $host['wp_is_installed'] == 'true' ) {
?>
<form class="backup form-inline" action="" method="post">
<input type="hidden" name="host" value="<?php echo $host['domain']; ?>" />
Expand All @@ -133,7 +131,7 @@
<?php
}

if ( isset($host['debug_log']) && file_exists( $host['debug_log'] ) ) { ?>
if ( isset( $host['debug_log'] ) && file_exists( $host['debug_log'] ) ) { ?>
<a href="./?host=<?php echo $host['domain']; ?>&debug_log=true" class="btn btn-danger btn-xs">
<i class="fa fa-exclamation-circle"></i><span> Errors</span></a>
<?php } ?>
Expand Down
52 changes: 26 additions & 26 deletions vvv_dash/hosts/defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,42 +86,42 @@ public function host_list() {
'web_root' => '/srv/www',
'host_path' => '/srv/www/wordpress-default',
'public_dir' => 'wordpress-default',
'wp_path' => '/srv/www/wordpress-default',
'wp_content_path' => '/srv/www/wordpress-default/wp-content',
'wp_path' => '/srv/www/wordpress-default/public_html',
'wp_content_path' => '/srv/www/wordpress-default/public_html/wp-content',
'composer_path' => '',
'wp_config_path' => '/srv/www/wordpress-default/wp-config.php',
'wp_config_path' => '/srv/www/wordpress-default/public_html/wp-config.php',
'env_path' => '',
'debug_log' => '',
'wp_is_installed' => 'true',
'is_wp_site' => 'true',
),

'wordpress-trunk' => array(
'hostname' => 'wordpress-trunk',
'domain' => 'local.wordpress-trunk.dev',
'web_root' => '/srv/www',
'host_path' => '/srv/www/wordpress-trunk',
'public_dir' => 'wordpress-trunk',
'wp_path' => '/srv/www/wordpress-trunk',
'wp_content_path' => '/srv/www/wordpress-trunk/wp-content',
'composer_path' => '',
'wp_config_path' => '/srv/www/wordpress-trunk/wp-config.php',
'env_path' => '',
'debug_log' => '',
'wp_is_installed' => 'true',
'is_wp_site' => 'true',
),
// 'wordpress-trunk' => array(
// 'hostname' => 'wordpress-trunk',
// 'domain' => 'local.wordpress-trunk.dev',
// 'web_root' => '/srv/www',
// 'host_path' => '/srv/www/wordpress-trunk',
// 'public_dir' => 'wordpress-trunk',
// 'wp_path' => '/srv/www/wordpress-trunk',
// 'wp_content_path' => '/srv/www/wordpress-trunk/wp-content',
// 'composer_path' => '',
// 'wp_config_path' => '/srv/www/wordpress-trunk/wp-config.php',
// 'env_path' => '',
// 'debug_log' => '',
// 'wp_is_installed' => 'true',
// 'is_wp_site' => 'true',
// ),

'wordpress-develop' => array(
'hostname' => 'wordpress-develop',
'domain' => 'src.wordpress-develop.dev',
'web_root' => '/srv/www',
'host_path' => '/srv/www/wordpress-develop/src',
'host_path' => '/srv/www/wordpress-develop/public_html/src',
'public_dir' => 'wordpress-develop',
'wp_path' => '/srv/www/wordpress-develop/src',
'wp_content_path' => '/srv/www/wordpress-develop/src/wp-content',
'wp_path' => '/srv/www/wordpress-develop/public_html/src',
'wp_content_path' => '/srv/www/wordpress-develop/public_html/src/wp-content',
'composer_path' => '',
'wp_config_path' => '/srv/www/wordpress-develop/src/wp-config.php',
'wp_config_path' => '/srv/www/wordpress-develop/public_html/src/wp-config.php',
'env_path' => '',
'debug_log' => '',
'wp_is_installed' => 'true',
Expand All @@ -132,12 +132,12 @@ public function host_list() {
'hostname' => 'build.wordpress-develop',
'domain' => 'build.wordpress-develop.dev',
'web_root' => '/srv/www',
'host_path' => '/srv/www/wordpress-develop/build',
'host_path' => '/srv/www/wordpress-develop/public_html/build',
'public_dir' => 'build',
'wp_path' => '/srv/www/wordpress-develop/build',
'wp_content_path' => '/srv/www/wordpress-develop/build/wp-content',
'wp_path' => '/srv/www/wordpress-develop/public_html/build',
'wp_content_path' => '/srv/www/wordpress-develop/public_html/build/wp-content',
'composer_path' => '',
'wp_config_path' => '/srv/www/wordpress-develop/build/wp-config.php',
'wp_config_path' => '/srv/www/wordpress-develop/public_html/build/wp-config.php',
'env_path' => '',
'debug_log' => '',
'wp_is_installed' => 'true',
Expand Down

0 comments on commit 6fa80d7

Please sign in to comment.