Exemplo n.º 1
0
 public function action_copy()
 {
     $from_locale = core::get('from_locale', i18n::$locale_default);
     $to_locale = core::get('to_locale');
     $type = core::get('type');
     if (Model_Content::copy($from_locale, $to_locale, $type)) {
         Alert::set(Alert::SUCCESS, sprintf(__('Missing %s copied from %s to %s'), $type, $from_locale, $to_locale));
     } else {
         Alert::set(Alert::INFO, sprintf(__('We can not copy the %s since the locale %s already has existing %s'), $type, $to_locale, $type));
     }
     HTTP::redirect(Route::url('oc-panel', array('controller' => 'content', 'action' => 'list')) . '?type=' . $type . '&locale_select=' . $to_locale);
 }