当前位置: 首页>>代码示例>>PHP>>正文


PHP ilUtil::prepareDBString方法代码示例

本文整理汇总了PHP中ilUtil::prepareDBString方法的典型用法代码示例。如果您正苦于以下问题:PHP ilUtil::prepareDBString方法的具体用法?PHP ilUtil::prepareDBString怎么用?PHP ilUtil::prepareDBString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilUtil的用法示例。


在下文中一共展示了ilUtil::prepareDBString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: updateObject

 public function updateObject()
 {
     global $ilAccess;
     if (!$ilAccess->checkAccess('write', '', (int) $_GET['ref_id'])) {
         $this->ilErr->raiseError($this->lng->txt('permission_denied'), $this->ilErr->MESSAGE);
     }
     $this->initSettingsForm('edit');
     if ($this->form_gui->checkInput()) {
         $_POST['Fobject']['title'] = $this->form_gui->getInput('title');
         $_POST['Fobject']['desc'] = $this->form_gui->getInput('desc');
         $_POST['Fobject']['activated'] = $this->form_gui->getInput('activated');
         $_POST['Fobject']['akclassvalue1'] = $this->form_gui->getInput('akclassvalue1');
         $_POST['Fobject']['akclassvalue2'] = $this->form_gui->getInput('akclassvalue2');
         $this->object->setTitle(ilUtil::prepareDBString($_POST['Fobject']['title']));
         $this->object->setDescription(ilUtil::prepareDBString($_POST['Fobject']['desc']));
         $this->object->activated = ilUtil::tf2yn($_POST['Fobject']['activated']);
         // update akclassvalues only if iLinc is active
         if ($this->ilias->getSetting('ilinc_akclassvalues_active')) {
             if ($this->object->getAKClassValue1() != $_POST['Fobject']['akclassvalue1']) {
                 $this->object->setAKClassValue1(ilUtil::prepareDBString($_POST['Fobject']['akclassvalue1']));
             }
             if ($this->object->getAKClassValue2() != $_POST['Fobject']['akclassvalue2']) {
                 $this->object->setAKClassValue2(ilUtil::prepareDBString($_POST['Fobject']['akclassvalue2']));
             }
         }
         // save changes to ilinc server and ilias database
         $success = $this->object->update();
         if ($success == false) {
             $this->ilErr->raiseError($this->object->getErrorMsg(), $this->ilErr->MESSAGE);
         }
         // update all akclassvalues of classes if akclassvalues has changed
         if (array_key_exists('akclassvalue1', $_POST['Fobject']) or array_key_exists('akclassvalue2', $_POST['Fobject'])) {
             if (!$this->object->updateClassrooms()) {
                 ilUtil::sendInfo($this->lng->txt($this->object->getErrorMsg()));
                 $this->form_gui->setValuesByPost();
                 return $this->tpl->setVariable('ADM_CONTENT', $this->form_gui->getHtml());
             }
         }
         ilUtil::sendInfo($this->lng->txt('msg_obj_modified'));
         $this->form_gui->setValuesByPost();
         return $this->tpl->setVariable('ADM_CONTENT', $this->form_gui->getHtml());
     } else {
         $this->form_gui->setValuesByPost();
         return $this->tpl->setVariable('ADM_CONTENT', $this->form_gui->getHtml());
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:46,代码来源:class.ilObjiLincCourseGUI.php

示例2: __getFields

 function __getFields()
 {
     return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'size' => ilUtil::prepareDBString($this->getSize()), 'installation_remarks' => ilUtil::prepareDBString($this->getInstallationRemarks()), 'installation_remarks_language' => ilUtil::prepareDBString($this->getInstallationRemarksLanguageCode()), 'other_platform_requirements' => ilUtil::prepareDBString($this->getOtherPlatformRequirements()), 'other_platform_requirements_language' => ilUtil::prepareDBString($this->getOtherPlatformRequirementsLanguageCode()), 'duration' => ilUtil::prepareDBString($this->getDuration()));
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:4,代码来源:class.ilMDTechnical.php

示例3: __getFields

 function __getFields()
 {
     return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'format' => ilUtil::prepareDBString($this->getFormat()));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:4,代码来源:class.ilMDFormat.php

示例4: __getFields

 function __getFields()
 {
     return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'interactivity_type' => ilUtil::prepareDBString($this->getInteractivityType()), 'learning_resource_type' => ilUtil::prepareDBString($this->getLearningResourceType()), 'interactivity_level' => ilUtil::prepareDBString($this->getInteractivityLevel()), 'semantic_density' => ilUtil::prepareDBString($this->getSemanticDensity()), 'intended_end_user_role' => ilUtil::prepareDBString($this->getIntendedEndUserRole()), 'context' => ilUtil::prepareDBString($this->getContext()), 'difficulty' => ilUtil::prepareDBString($this->getDifficulty()), 'typical_learning_time' => ilUtil::prepareDBString($this->getTypicalLearningTime()));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:4,代码来源:class.ilMDEducational.php

示例5: __getFields

 function __getFields()
 {
     return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'parent_type' => $this->getParentType(), 'parent_id' => $this->getParentId(), 'typical_age_range' => ilUtil::prepareDBString($this->getTypicalAgeRange()), 'typical_age_range_language' => ilUtil::prepareDBString($this->getTypicalAgeRangeLanguageCode()));
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:4,代码来源:class.ilMDTypicalAgeRange.php

示例6: __getFields

 function __getFields()
 {
     return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'costs' => ilUtil::prepareDBString($this->getCosts()), 'copyright_and_other_restrictions' => ilUtil::prepareDBString($this->getCopyrightAndOtherRestrictions()), 'description' => ilUtil::prepareDBString($this->getDescription()), 'description_language' => ilUtil::prepareDBString($this->getDescriptionLanguageCode()));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:4,代码来源:class.ilMDRights.php

示例7: update

 /**
  * update object in db
  * 
  * Note: This is mostly the same as method update in class.ilObject.php.
  *       In addition to updating descriptional properties, we also update the
  *       "type" property. This is needed, because a Null Resource can be converted
  *       into another resource type using a PUT or a MKCOL request by a WebDAV client.
  *
  * @access	public
  * @return	boolean	true on success
  */
 function update()
 {
     parent::update();
     $q = "UPDATE object_data" . " SET" . " type = '" . ilUtil::prepareDBString($this->getType()) . "'" . " WHERE obj_id = '" . $this->getId() . "'";
     $this->ilias->db->query($q);
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:18,代码来源:class.ilObjNull.php

示例8: __getFields

 function __getFields()
 {
     return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'parent_type' => $this->getParentType(), 'parent_id' => $this->getParentId(), 'role' => ilUtil::prepareDBString($this->getRole()), 'date' => ilUtil::prepareDBString($this->getDate()));
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:4,代码来源:class.ilMDContribute.php

示例9: __parseQuotation

 function __parseQuotation()
 {
     if (!strlen($this->getQueryString())) {
         $this->quoted_words[] = '';
         return false;
     }
     $query_str = $this->getQueryString();
     while (preg_match("/\".*?\"/", $query_str, $matches)) {
         $query_str = str_replace($matches[0], '', $query_str);
         $this->quoted_words[] = ilUtil::prepareDBString($matches[0]);
     }
     // Parse the rest
     $words = explode(' ', trim($query_str));
     foreach ($words as $word) {
         if (!strlen(trim($word))) {
             continue;
         }
         $this->quoted_words[] = ilUtil::prepareDBString($word);
     }
     if (!$this->getAllowedWildcards()) {
         // #14768
         foreach ($this->quoted_words as $idx => $word) {
             if (!stristr($word, '\\')) {
                 $word = str_replace('%', '\\%', $word);
                 $word = str_replace('_', '\\_', $word);
             }
             $this->quoted_words[$idx] = $word;
         }
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:30,代码来源:class.ilQueryParser.php

示例10: __getFields

 function __getFields()
 {
     return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'parent_type' => $this->getParentType(), 'parent_id' => $this->getParentId(), 'keyword' => ilUtil::prepareDBString($this->getKeyword()), 'keyword_language' => ilUtil::prepareDBString($this->getKeywordLanguageCode()));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:4,代码来源:class.ilMDKeyword.php

示例11: __parseQuotation

 function __parseQuotation()
 {
     if (!strlen($this->getQueryString())) {
         $this->quoted_words[] = '';
         return false;
     }
     $query_str = $this->getQueryString();
     while (preg_match("/\".*?\"/", $query_str, $matches)) {
         $query_str = str_replace($matches[0], '', $query_str);
         $this->quoted_words[] = ilUtil::prepareDBString($matches[0]);
     }
     // Parse the rest
     $words = explode(' ', trim($query_str));
     foreach ($words as $word) {
         if (!strlen(trim($word))) {
             continue;
         }
         $this->quoted_words[] = ilUtil::prepareDBString($word);
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:20,代码来源:class.ilQueryParser.php

示例12: __getFields

 function __getFields()
 {
     return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'parent_type' => $this->getParentType(), 'parent_id' => $this->getParentId(), 'operating_system_name' => ilUtil::prepareDBString($this->getOperatingSystemName()), 'operating_system_minimum_version' => ilUtil::prepareDBString($this->getOperatingSystemMinimumVersion()), 'operating_system_maximum_version' => ilUtil::prepareDBString($this->getOperatingSystemMaximumVersion()), 'browser_name' => ilUtil::prepareDBString($this->getBrowserName()), 'browser_minimum_version' => ilUtil::prepareDBString($this->getBrowserMinimumVersion()), 'browser_maximum_version' => ilUtil::prepareDBString($this->getBrowserMaximumVersion()), 'or_composite_id' => $this->getOrCompositeId());
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:4,代码来源:class.ilMDRequirement.php

示例13: __getFields

 function __getFields()
 {
     return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'lifecycle_status' => ilUtil::prepareDBString($this->getStatus()), 'meta_version' => ilUtil::prepareDBString($this->getVersion()), 'version_language' => ilUtil::prepareDBString($this->getVersionLanguageCode()));
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:4,代码来源:class.ilMDLifecycle.php

示例14: __getFields

 function __getFields()
 {
     return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'meta_data_scheme' => ilUtil::prepareDBString($this->getMetaDataScheme()), 'language' => ilUtil::prepareDBString($this->getLanguageCode()));
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:4,代码来源:class.ilMDMetaMetadata.php

示例15: __getFields

 function __getFields()
 {
     return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'parent_type' => $this->getParentType(), 'parent_id' => $this->getParentId(), 'catalog' => ilUtil::prepareDBString($this->getCatalog()), 'entry' => ilUtil::prepareDBString($this->getEntry()));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:4,代码来源:class.ilMDIdentifier_.php


注:本文中的ilUtil::prepareDBString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。