Skip to content

Commit e930bab

Browse files
Merge pull request #9 from mrrobot47/update-post-refactor
Update site utility function usage
2 parents dc3acb0 + f3d6496 commit e930bab

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/Admin_Tools_Command.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use \Symfony\Component\Filesystem\Filesystem;
1616
use \Composer\Console\Application;
1717
use \Symfony\Component\Console\Input\ArrayInput;
18+
use function EE\Site\Utils\auto_site_name;
1819

1920
class Admin_Tools_Command extends EE_Command {
2021

@@ -100,7 +101,7 @@ public function install() {
100101
public function up( $args, $assoc_args ) {
101102

102103
EE\Utils\delem_log( 'admin-tools ' . __FUNCTION__ . ' start' );
103-
$args = EE\SiteUtils\auto_site_name( $args, $this->command, __FUNCTION__ );
104+
$args = auto_site_name( $args, $this->command, __FUNCTION__ );
104105
$force = EE\Utils\get_flag_value( $assoc_args, 'force' );
105106
$this->site_data = Site::find( EE\Utils\remove_trailing_slash( $args[0] ) );
106107
if ( ! $this->site_data || ! $this->site_data->site_enabled ) {
@@ -154,7 +155,7 @@ public function up( $args, $assoc_args ) {
154155
public function down( $args, $assoc_args ) {
155156

156157
EE\Utils\delem_log( 'admin-tools ' . __FUNCTION__ . ' start' );
157-
$args = EE\SiteUtils\auto_site_name( $args, $this->command, __FUNCTION__ );
158+
$args = auto_site_name( $args, $this->command, __FUNCTION__ );
158159
$force = EE\Utils\get_flag_value( $assoc_args, 'force' );
159160
$this->site_data = Site::find( EE\Utils\remove_trailing_slash( $args[0] ) );
160161
if ( ! $this->site_data || ! $this->site_data->site_enabled ) {

0 commit comments

Comments
 (0)