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


PHP PMA_Message::sanitize方法代码示例

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


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

示例1: PMA_getWarningMessages

/**
 * get the warning messages array
 *
 * @return array  $warning_essages
 */
function PMA_getWarningMessages()
{
    $warning_essages = array();
    foreach ($GLOBALS['dbi']->getWarnings() as $warning) {
        $warning_essages[] = PMA_Message::sanitize($warning['Level'] . ': #' . $warning['Code'] . ' ' . $warning['Message']);
    }
    return $warning_essages;
}
开发者ID:hewenhao2008,项目名称:phpmyadmin,代码行数:13,代码来源:insert_edit.lib.php

示例2: PMA_DBI_insert_id

        $insert_id = PMA_DBI_insert_id();
        if ($insert_id != 0) {
            // insert_id is id of FIRST record inserted in one insert, so if we
            // inserted multiple rows, we had to increment this
            if ($total_affected_rows > 0) {
                $insert_id = $insert_id + $total_affected_rows - 1;
            }
            $last_message = PMA_Message::notice(__('Inserted row id: %1$d'));
            $last_message->addParam($insert_id);
            $last_messages[] = $last_message;
        }
        PMA_DBI_free_result($result);
    }
    // end if
    foreach (PMA_DBI_get_warnings() as $warning) {
        $warning_messages[] = PMA_Message::sanitize($warning['Level'] . ': #' . $warning['Code'] . ' ' . $warning['Message']);
    }
    unset($result);
}
unset($single_query, $query);
if ($is_insert && count($value_sets) > 0) {
    $message = PMA_Message::inserted_rows($total_affected_rows);
} else {
    $message = PMA_Message::affected_rows($total_affected_rows);
}
$message->addMessages($last_messages, '<br />');
if (!empty($warning_messages)) {
    $message->addMessages($warning_messages, '<br />');
    $message->isError(true);
}
if (!empty($error_messages)) {
开发者ID:ping199143,项目名称:1ydb,代码行数:31,代码来源:tbl_replace.php

示例3: sanitize

 /**
  * Sanitizes $message
  *
  * @param mixed $message the message(s)
  *
  * @return mixed  the sanitized message(s)
  * @access  public
  * @static
  */
 public static function sanitize($message)
 {
     if (is_array($message)) {
         foreach ($message as $key => $val) {
             $message[$key] = PMA_Message::sanitize($val);
         }
         return $message;
     }
     return htmlspecialchars($message);
 }
开发者ID:yszar,项目名称:linuxwp,代码行数:19,代码来源:Message.class.php

示例4: testSanitize

 /**
  * testing sanitize method
  *
  * @return void
  */
 public function testSanitize()
 {
     $this->object->setString('test&string<>', false);
     $this->assertEquals('test&amp;string&lt;&gt;', PMA_Message::sanitize($this->object));
     $this->assertEquals(array('test&amp;string&lt;&gt;', 'test&amp;string&lt;&gt;'), PMA_Message::sanitize(array($this->object, $this->object)));
 }
开发者ID:hewenhao2008,项目名称:phpmyadmin,代码行数:11,代码来源:PMA_Message_test.php


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