MDL-32329 fixed missing phpdoc and improved coding style
authorDavid Mudrak <david@moodle.com>
Wed, 30 May 2012 08:32:48 +0000 (10:32 +0200)
committerDavid Mudrak <david@moodle.com>
Wed, 30 May 2012 08:35:28 +0000 (10:35 +0200)
Credit goes to Aparup Banerjee for spotting this during the integration
review.

admin/renderer.php

index d3ac14c..9b689a6 100644 (file)
@@ -112,6 +112,7 @@ class core_admin_renderer extends plugin_renderer_base {
      *
      * @param double|string|int $version Moodle on-disk version
      * @param array $failed list of plugins with unsatisfied dependecies
      *
      * @param double|string|int $version Moodle on-disk version
      * @param array $failed list of plugins with unsatisfied dependecies
+     * @param moodle_url $reloadurl URL of the page to recheck the dependencies
      * @return string HTML
      */
     public function unsatisfied_dependencies_page($version, array $failed, moodle_url $reloadurl) {
      * @return string HTML
      */
     public function unsatisfied_dependencies_page($version, array $failed, moodle_url $reloadurl) {
@@ -682,8 +683,10 @@ class core_admin_renderer extends plugin_renderer_base {
 
                 $statusisboring = in_array($statuscode, array(
                         plugin_manager::PLUGIN_STATUS_NODB, plugin_manager::PLUGIN_STATUS_UPTODATE));
 
                 $statusisboring = in_array($statuscode, array(
                         plugin_manager::PLUGIN_STATUS_NODB, plugin_manager::PLUGIN_STATUS_UPTODATE));
-                $dependenciesok = $pluginman->are_dependencies_satisfied(
-                        $plugin->get_other_required_plugins()) && $plugin->is_core_dependency_satisfied($version);
+
+                $coredependency = $plugin->is_core_dependency_satisfied($version);
+                $otherpluginsdependencies = $pluginman->are_dependencies_satisfied($plugin->get_other_required_plugins());
+                $dependenciesok = $coredependency && $otherpluginsdependencies;
 
                 if ($options['xdep']) {
                     // we want to see only plugins with failed dependencies
 
                 if ($options['xdep']) {
                     // we want to see only plugins with failed dependencies