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


PHP asset::build_history方法代码示例

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


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

示例1: _message

 private static function _message($id, $data, $fields, $table)
 {
     $sgsml = new sgsml($data["folder"], "display", array($id), false);
     $message = $sgsml->att["MODULENAME"] . "\n";
     $message .= str_repeat("-", strlen($message) - 1) . "\n\n";
     foreach ($data as $key => $value) {
         if (strlen($value) == 0 or !in_array($key, $fields)) {
             continue;
         }
         $value = trim(asset::build_history($sgsml->fields[$key]["SIMPLE_TYPE"], $value, ""));
         if ($value != "") {
             $message .= $sgsml->fields[$key]["DISPLAYNAME"] . ": " . $value . "\n";
         }
     }
     $url = "http" . (sys_https() ? "s" : "") . "://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER["SCRIPT_NAME"]) . "/index.php?view=details&find=" . $table . "|" . $id;
     return $message . "\n{t}Details{/t}: " . $url;
 }
开发者ID:drognisep,项目名称:Simple-Groupware,代码行数:17,代码来源:notify.php

示例2: build_history

 function build_history($new_data, $old_data)
 {
     $cdata = "";
     $cfields = array();
     $no_history = array("created", "createdby", "lastmodified", "lastmodifiedby", "history", "notification_summary", "dsize", "id");
     foreach ($new_data as $data_key => $data_value) {
         $field = $this->fields[$data_key];
         if (isset($old_data[$data_key]) and strcmp(trim($old_data[$data_key], "|"), trim($data_value, "|")) == 0) {
             unset($new_data[$data_key]);
             continue;
         }
         if (in_array($data_key, $no_history)) {
             continue;
         }
         if (isset($field["SIMPLE_TYPE"]) and (strlen($data_value) > 0 or !empty($old_data[$data_key]))) {
             $data_value = asset::build_history($field["SIMPLE_TYPE"], $data_value, @$old_data[$data_key]);
         }
         if (!empty($field["NO_SEARCH_INDEX"])) {
             $data_value = "";
         }
         if (!empty($field["DISPLAYNAME"])) {
             $key = $field["DISPLAYNAME"];
         } else {
             $key = $data_key;
         }
         if (trim($data_value) != "") {
             $cdata .= $key . ": " . $data_value . "\n";
         }
         $cfields[] = $key;
     }
     $new_data["history"] = str_replace("@fields@", implode(", ", $cfields), $new_data["history"]) . $cdata . "\n";
     return $new_data;
 }
开发者ID:drognisep,项目名称:Simple-Groupware,代码行数:33,代码来源:sgsml.php


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