Пример #1
0
 public function proc_edit()
 {
     $text = system::checkVar(system::POST('minitext'), isText);
     $id = system::checkVar(system::POST('minitext_id'), isInt);
     $key = ormPages::getPrefix() . '/minitext/' . $id;
     if ($text && $id && reg::existKey($key)) {
         if (reg::setKey($key, $text)) {
             system::json(array('error' => 0));
             system::stop();
         }
     }
     system::json(array('error' => 1, 'errorInfo' => lang::get('STRUCTURE_MINITEXT_ERROR')));
     system::stop();
 }