Completed
Push — 1.11.x ( 7ffd51...902ebd )
by José
50:21 queued 21:28
created
main/auth/profile.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -632,7 +632,8 @@
 block discarded – undo
632 632
     unset($user_data['api_key_generate']);
633 633
 
634 634
     foreach ($user_data as $key => $value) {
635
-        if (substr($key, 0, 6) === 'extra_') { //an extra field
635
+        if (substr($key, 0, 6) === 'extra_') {
636
+//an extra field
636 637
            continue;
637 638
         } elseif (strpos($key, 'remove_extra_') !== false) {
638 639
         } else {
Please login to merge, or discard this patch.
src/Chamilo/ThemeBundle/Controller/DefaultController.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,22 +27,26 @@
 block discarded – undo
27 27
     /**
28 28
      * @return \Symfony\Component\HttpFoundation\Response
29 29
      */
30
-    public function dashboardAction() {
30
+    public function dashboardAction()
31
+    {
31 32
         return    $this->render('ChamiloThemeBundle:Default:index.html.twig');
32 33
     }
33 34
 
34 35
     /**
35 36
      * @return \Symfony\Component\HttpFoundation\Response
36 37
      */
37
-    public function uiGeneralAction() {
38
+    public function uiGeneralAction()
39
+    {
38 40
         return $this->render('ChamiloThemeBundle:Default:index.html.twig');
39 41
     }
40 42
 
41
-    public function uiIconsAction() {
43
+    public function uiIconsAction()
44
+    {
42 45
         return $this->render('ChamiloThemeBundle:Default:index.html.twig');
43 46
     }
44 47
 
45
-    public function formAction() {
48
+    public function formAction()
49
+    {
46 50
         $form = $this->createForm(new FormDemoModelType());
47 51
         return $this->render('ChamiloThemeBundle:Default:form.html.twig', array(
48 52
                 'form' => $form->createView()
Please login to merge, or discard this patch.
src/Chamilo/ThemeBundle/Event/SidebarMenuEvent.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,11 +72,14 @@
 block discarded – undo
72 72
     /**
73 73
      * @return MenuItemInterface|null
74 74
      */
75
-    public function getActive() {
75
+    public function getActive()
76
+    {
76 77
 
77 78
         foreach ($this->getItems() as $item) {
78 79
             /** @var $item MenuItemInterface */
79
-            if ($item->isActive()) return $item;
80
+            if ($item->isActive()) {
81
+                return $item;
82
+            }
80 83
         }
81 84
         return null;
82 85
     }
Please login to merge, or discard this patch.
main/lp/scormResource.class.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,8 @@
 block discarded – undo
69 69
                         }
70 70
                     }
71 71
                     //$keep_href = '';
72
-                    if ($element->hasAttributes()) { //in some cases we get here with an empty attributes array
72
+                    if ($element->hasAttributes()) {
73
+//in some cases we get here with an empty attributes array
73 74
                         // TODO: Find when and why we get such a case (empty array).
74 75
                         $attributes = $element->attributes;
75 76
                         foreach ($attributes as $attrib) {
Please login to merge, or discard this patch.
main/reports/reports.lib.php 1 patch
Braces   +16 added lines, -11 removed lines patch added patch discarded remove patch
@@ -13,11 +13,13 @@  discard block
 block discarded – undo
13 13
 
14 14
 
15 15
 // load templates
16
-function reports_loadTemplates() {
16
+function reports_loadTemplates()
17
+{
17 18
 	global $reports_enabled_templates, $reports_template;
18
-	foreach ($reports_enabled_templates as $t)
19
-		require_once 'templates/'.$t.'.reports.php';
20
-}
19
+	foreach ($reports_enabled_templates as $t) {
20
+			require_once 'templates/'.$t.'.reports.php';
21
+	}
22
+	}
21 23
 
22 24
 
23 25
 // clear all reporting data
@@ -148,17 +150,20 @@  discard block
 block discarded – undo
148 150
 }
149 151
  */
150 152
 // return tools ID (parametre is a constant from main_api
151
-function reports_getToolId($tool) {
153
+function reports_getToolId($tool)
154
+{
152 155
 	$tools = array_flip(api_get_tools_lists());
153
-	if (array_key_exists($tool, $tools))
154
-		return $tools[$tool];
155
-	else
156
-		return null;
157
-}
156
+	if (array_key_exists($tool, $tools)) {
157
+			return $tools[$tool];
158
+	} else {
159
+			return null;
160
+	}
161
+	}
158 162
 
159 163
 // return a sql clause returning triplet of (course, $session, $uid) the
160 164
 // current user is authorized to reed
161
-function reports_getVisibilitySQL() {
165
+function reports_getVisibilitySQL()
166
+{
162 167
 	return "select cru.user_id from ".Database::get_main_table(TABLE_MAIN_COURSE_USER).' cru';
163 168
 	// fixme sessions
164 169
 }
Please login to merge, or discard this patch.
main/inc/lib/search/get_terms.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,8 @@  discard block
 block discarded – undo
26 26
  * @param array $specific_fields
27 27
  * @return array $sf_terms
28 28
  */
29
-function get_usual_sf_terms($filter, $specific_fields) {
29
+function get_usual_sf_terms($filter, $specific_fields)
30
+{
30 31
     $sf_terms = array();
31 32
     $dkterms = chamilo_query_simple_query('', 0, 1000, $filter);
32 33
 
@@ -52,7 +53,8 @@  discard block
 block discarded – undo
52 53
 $specific_fields = get_specific_field_list();
53 54
 $sf_terms = array();
54 55
 
55
-if (($cid = api_get_course_id()) != -1) { // with cid
56
+if (($cid = api_get_course_id()) != -1) {
57
+// with cid
56 58
     // course filter
57 59
     $filter[] = chamilo_get_boolean_query(XAPIAN_PREFIX_COURSEID.$cid);
58 60
     // term filter
@@ -63,12 +65,14 @@  discard block
 block discarded – undo
63 65
     }
64 66
 
65 67
     $sf_terms = get_usual_sf_terms($filter, $specific_fields);
66
-} else { // without cid
68
+} else {
69
+// without cid
67 70
     if ($term != '__all__') {
68 71
         $filter[] = chamilo_get_boolean_query($prefix.$term);
69 72
 
70 73
         $sf_terms = get_usual_sf_terms($filter, $specific_fields);
71
-    } else { // no cid and all/any terms
74
+    } else {
75
+// no cid and all/any terms
72 76
         foreach ($specific_fields as $specific_field) {
73 77
             foreach (xapian_get_all_terms(1000, $specific_field['code']) as $raw_term) {
74 78
                 if (count($raw_term['name']) > 1) {
Please login to merge, or discard this patch.
plugin/pens/pens.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,10 @@
 block discarded – undo
28 28
 require_once __DIR__.'/lib/pens.php';
29 29
 require_once __DIR__.'/chamilo_pens.php';
30 30
 
31
-class ChamiloPackageHandler extends PENSPackageHandler {
32
-	public function processPackage($request, $path_to_package) {
31
+class ChamiloPackageHandler extends PENSPackageHandler
32
+{
33
+	public function processPackage($request, $path_to_package)
34
+	{
33 35
 		$server = PENSServer::singleton();
34 36
 		// Moves the package to archive/pens
35 37
 		$path_to_archives = api_get_path(SYS_ARCHIVE_PATH).'pens';
Please login to merge, or discard this patch.
main/inc/lib/grade_model.lib.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * Displays the title + grid
53 53
      */
54 54
 	public function display()
55
-    {
55
+	{
56 56
 		// action links
57 57
 		echo '<div class="actions" style="margin-bottom:20px">';
58 58
         echo '<a href="grade_models.php">'.Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      * GradeModelComponents constructor.
310 310
      */
311 311
 	public function __construct()
312
-    {
312
+	{
313 313
         parent::__construct();
314 314
         $this->table = Database::get_main_table(TABLE_GRADE_MODEL_COMPONENTS);
315 315
 	}
Please login to merge, or discard this patch.
plugin/buycourses/install.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
  * Initialization
10 10
  */
11 11
 require_once __DIR__.'/config.php';
12
-if (!api_is_platform_admin()) {
12
+if (!api_is_platform_admin()) {
13 13
     die ('You must have admin permissions to install plugins');
14 14
 }
15 15
 BuyCoursesPlugin::create()->install();
Please login to merge, or discard this patch.