Browse Source

Fix update legal terms - refs BT#11360

Angel Fernando Quiroz Campos 8 years ago
parent
commit
0ca7d93ecd
1 changed files with 1 additions and 10 deletions
  1. 1 10
      main/inc/lib/legal.lib.php

+ 1 - 10
main/inc/lib/legal.lib.php

@@ -31,14 +31,6 @@ class LegalManager
         $time = time();
 
         if ($last['content'] != $content) {
-            $maxLegalId = Database::getManager()
-                ->createQuery('
-                    SELECT MAX(l.legalId) FROM ChamiloCoreBundle:Legal l
-                ')
-                ->getSingleScalarResult();
-
-            $legalId = $maxLegalId + 1;
-
             $version = intval(LegalManager::get_last_condition_version($language));
             $version++;
             $params = [
@@ -47,8 +39,7 @@ class LegalManager
                 'changes' => $changes,
                 'type' => $type,
                 'version' => intval($version),
-                'date' => $time,
-                'legal_id' => $legalId
+                'date' => $time
             ];
             Database::insert($legal_table, $params);