Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

# [#30416] duplicate alias in banner manager on pressing save as copy

  • Loading branch information...
commit dba18d18d14e467196b3aa72a0e18f8917fda16b 1 parent 5c51f56
@infograf768 infograf768 authored
View
31 administrator/components/com_banners/models/banner.php
@@ -515,4 +515,35 @@ protected function prepareTable($table)
// Increment the content version number.
$table->version++;
}
+
+ /**
+ * Method to save the form data.
+ *
+ * @param array The form data.
+ *
+ * @return boolean True on success.
+ * @since 1.6
+ */
+
+ public function save($data)
+ {
+ $app = JFactory::getApplication();
+
+ // Alter the name for save as copy
+ if ($app->input->get('task') == 'save2copy')
+ {
+ list($name, $alias) = $this->generateNewTitle($data['catid'], $data['alias'], $data['name']);
+ $data['name'] = $name;
+ $data['alias'] = $alias;
+ $data['state'] = 0;
+ }
+
+ if (parent::save($data))
+ {
+ return true;
+ }
+
+ return false;
+ }
+
}
View
3  installation/CHANGELOG
@@ -25,6 +25,9 @@ $ -> Language fix or change
- -> Removed
! -> Note3
+05-Apr-2013 Jean-Marie Simonet
+ # [#30416] duplicate alias in banner manager on pressing save as copy
+
04-Apr-2013 Mark Dexter
# Reverting [#30430] Severe bug with "com_content" component routing.
Please sign in to comment.
Something went wrong with that request. Please try again.