Permalink
Browse files

helping users who forget to run composer

  • Loading branch information...
1 parent fbb05c6 commit 4e9238ce1918defb00b701418a26c63fe1856828 @cash cash committed Mar 16, 2013
Showing with 10 additions and 3 deletions.
  1. +2 −0 languages/en.php
  2. +2 −0 manifest.xml
  3. +6 −3 start.php
View
@@ -17,6 +17,8 @@
'qa:sniffer:label:line_num' => 'Line Number',
'qa:sniffer:label:severity' => 'Severity',
'qa:sniffer:label:message' => 'Description',
+
+ 'qa:error:composer' => "You must run 'composer install' to use the QA plugin. See the README.",
);
add_translation('en', $english);
View
@@ -13,9 +13,11 @@
<type>elgg_release</type>
<version>1.8</version>
</requires>
+<!--
<requires>
<type>php</type>
<version>5.3</version>
</requires>
+-->
</plugin_manifest>
View
@@ -6,9 +6,12 @@
elgg_register_event_handler('init', 'system', 'qa_init');
function qa_init() {
- require 'vendor/autoload.php';
- elgg_register_admin_menu_item('develop', 'sniffer', 'develop_tools');
- elgg_register_page_handler('qa', 'qa_page_handler');
+ if (include 'vendor/autoload.php') {
+ elgg_register_admin_menu_item('develop', 'sniffer', 'develop_tools');
+ elgg_register_page_handler('qa', 'qa_page_handler');
+ } else {
+ elgg_add_admin_notice('elgg_qa:composre', elgg_echo('qa:error:composer'));
+ }
}
function qa_page_handler($route) {

0 comments on commit 4e9238c

Please sign in to comment.