Skip to content

Commit

Permalink
#2 fix exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
1stthomas committed May 24, 2021
1 parent c747358 commit 61603d2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 23 deletions.
28 changes: 6 additions & 22 deletions controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ public function __construct(Application $app)

public function getPackageDescription()
{
return tc('ht7_c5_base', 'Ht7 Starter package which installs some new dashboard pages and more.');
return tc(
'ht7_c5_base',
'Ht7 Starter package which installs some new dashboard pages and more.'
);
}

public function getPackageName()
Expand Down Expand Up @@ -94,25 +97,6 @@ public function registerRoutes()

}

/**
* Removes e.g. all single pages coming from this package. If the remove
* DB tables setting was activated, all package database tables will also
* be removed.
*/
public function uninstall()
{
parent::uninstall();

// $request = Request::getInstance();
//
// if ($request->request->get('remove-db-tables')) {
// $db = Database::connection();
// $db->query('SET FOREIGN_KEY_CHECKS=0');
// $db->query('DROP TABLE MeschCmProfessionalGroups');
// $db->query('SET FOREIGN_KEY_CHECKS=1');
// }
}

public function upgrade()
{
parent::upgrade();
Expand All @@ -124,8 +108,8 @@ public function upgrade()
private function installUserGroups()
{
Group::add(
tc('GroupName', 'ht7'),
tc('ht7_c5_base', 'Base Group for ht7 apps.'),
tc('ht7_c5_base-group_name', 'ht7'),
tc('ht7_c5_base', 'Base Group for ht7 applications.'),
false,
$this->pkg
);
Expand Down
3 changes: 3 additions & 0 deletions single_pages/dashboard/ht7.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@
<?php } ?>
</div>
<?php } ?>
</div>
<div>handle:
<?php echo app('helper/ht7/package/base')->getPackageHandle(); ?>
</div>
2 changes: 1 addition & 1 deletion src/Concrete/Services/PackageBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function getPackageHandle($obj = null)
}
} elseif (!is_object($obj)) {
$e = 'The first parameter needs to be an object or null, found '
. gettype($obj);
. gettype($obj) . '.';

throw new \InvalidArgumentException($e);
}
Expand Down

0 comments on commit 61603d2

Please sign in to comment.