コード例 #1
0
ファイル: mod_edit.php プロジェクト: poef/ariadne
 function showDiv($var, $name, $title = '', $extra = '')
 {
     $context = pobject::getContext();
     $me = $context["arCurrentObject"];
     if (edit::getEditMode() && $me->CheckSilent('edit')) {
         $id = edit::registerDataField();
         $prefix = edit::getEditPrefix();
         $vedorVars = edit::getVedorVars($me, $name);
         echo "<div class='editable' id='" . $prefix . $id . "' {$vedorVars} title='{$title}' {$extra}>";
         echo edit::fixEditSource(page::parse($var));
         echo "</div>";
     } else {
         if (!edit::isEmpty($var)) {
             echo page::stripARNameSpace(edit::fixSource(page::parse($var)));
         }
     }
     return $id;
 }