Diff
checker
文本
文本
图像
文档
Excel
文件夹
Legal
Enterprise
桌面版
定价
登录
下载 Diffchecker 桌面版
比较文本
查找两个文本文件之间的差异
工具
历史
实时编辑器
隐藏空白更改
折叠未更改行
关闭换行
视图
拆分
统一
比对精度
智能
单词
字符
文本样式
更改外观
语法高亮
选择语法
忽略
文本转换
转到第一个差异
编辑输入
Diffchecker Desktop
运行Diffchecker最安全的方式。获取Diffchecker桌面应用:您的差异永远不会离开您的电脑!
获取桌面版
Untitled diff
创建于
11年前
差异永不过期
清除
导出
分享
解释
0 删除
行
总计
删除
字符
总计
删除
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
60 行
全部复制
3 添加
行
总计
添加
字符
总计
添加
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
60 行
全部复制
<?php
<?php
/**
/**
* A (fake) pager plugin that wraps around the actual pager.
* A (fake) pager plugin that wraps around the actual pager.
*
*
* @ingroup views_pager_plugins
* @ingroup views_pager_plugins
*/
*/
class views_php_plugin_pager extends views_php_plugin_wrapper {
class views_php_plugin_pager extends views_php_plugin_wrapper {
/**
/**
* Perform any needed actions just prior to the query executing.
* Perform any needed actions just prior to the query executing.
*/
*/
复制
已复制
复制
已复制
public function pre_execute(
$query) {
public function pre_execute(
&
$query) {
$this->wrapped->pre_execute($query);
$this->wrapped->pre_execute($query);
foreach (array(/*'argument',*/ 'field', 'filter', 'sort', /*'relationship'*/) as $type) {
foreach (array(/*'argument',*/ 'field', 'filter', 'sort', /*'relationship'*/) as $type) {
foreach ($this->wrapped->view->$type as $id => $handler) {
foreach ($this->wrapped->view->$type as $id => $handler) {
if (is_callable(array($handler, 'php_pre_execute'))) {
if (is_callable(array($handler, 'php_pre_execute'))) {
$handler->php_pre_execute();
$handler->php_pre_execute();
}
}
}
}
}
}
$this->wrapped->view->query->set_limit(0);
$this->wrapped->view->query->set_limit(0);
$this->wrapped->view->query->set_offset(0);
$this->wrapped->view->query->set_offset(0);
}
}
/**
/**
* Perform any needed actions just after the query executing.
* Perform any needed actions just after the query executing.
*/
*/
public function post_execute(&$result) {
public function post_execute(&$result) {
foreach (array(/*'argument',*/ 'field', 'filter', 'sort', /*'relationship'*/) as $type) {
foreach (array(/*'argument',*/ 'field', 'filter', 'sort', /*'relationship'*/) as $type) {
foreach ($this->wrapped->view->$type as $id => $handler) {
foreach ($this->wrapped->view->$type as $id => $handler) {
if (is_callable(array($handler, 'php_post_execute'))) {
if (is_callable(array($handler, 'php_post_execute'))) {
$handler->php_post_execute();
$handler->php_post_execute();
}
}
}
}
}
}
复制
已复制
复制
已复制
$this->wrapped->total_items = count($this->wrapped->view->result);
/*
$this->wrapped->total_items = count($this->wrapped->view->result);
$this->wrapped->update_page_info();
$this->wrapped->update_page_info();
$item_per_page = $this->wrapped->get_items_per_page();
$item_per_page = $this->wrapped->get_items_per_page();
if ($item_per_page > 0) {
if ($item_per_page > 0) {
$offset = $this->wrapped->get_current_page() * $item_per_page + $this->wrapped->get_offset();
$offset = $this->wrapped->get_current_page() * $item_per_page + $this->wrapped->get_offset();
$this->wrapped->view->result = array_slice($this->wrapped->view->result, $offset, $item_per_page);
$this->wrapped->view->result = array_slice($this->wrapped->view->result, $offset, $item_per_page);
复制
已复制
复制
已复制
}
}
*/
$this->wrapped->post_execute($result);
$this->wrapped->post_execute($result);
}
}
/**
/**
* Execute the count query, which will be done just prior to the query
* Execute the count query, which will be done just prior to the query
* itself being executed.
* itself being executed.
*/
*/
function execute_count_query(&$count_query) {
function execute_count_query(&$count_query) {
$this->wrapped->execute_count_query($count_query);
$this->wrapped->execute_count_query($count_query);
}
}
}
}
已保存差异
原始文本
打开文件
<?php /** * A (fake) pager plugin that wraps around the actual pager. * * @ingroup views_pager_plugins */ class views_php_plugin_pager extends views_php_plugin_wrapper { /** * Perform any needed actions just prior to the query executing. */ public function pre_execute($query) { $this->wrapped->pre_execute($query); foreach (array(/*'argument',*/ 'field', 'filter', 'sort', /*'relationship'*/) as $type) { foreach ($this->wrapped->view->$type as $id => $handler) { if (is_callable(array($handler, 'php_pre_execute'))) { $handler->php_pre_execute(); } } } $this->wrapped->view->query->set_limit(0); $this->wrapped->view->query->set_offset(0); } /** * Perform any needed actions just after the query executing. */ public function post_execute(&$result) { foreach (array(/*'argument',*/ 'field', 'filter', 'sort', /*'relationship'*/) as $type) { foreach ($this->wrapped->view->$type as $id => $handler) { if (is_callable(array($handler, 'php_post_execute'))) { $handler->php_post_execute(); } } } $this->wrapped->total_items = count($this->wrapped->view->result); $this->wrapped->update_page_info(); $item_per_page = $this->wrapped->get_items_per_page(); if ($item_per_page > 0) { $offset = $this->wrapped->get_current_page() * $item_per_page + $this->wrapped->get_offset(); $this->wrapped->view->result = array_slice($this->wrapped->view->result, $offset, $item_per_page); } $this->wrapped->post_execute($result); } /** * Execute the count query, which will be done just prior to the query * itself being executed. */ function execute_count_query(&$count_query) { $this->wrapped->execute_count_query($count_query); } }
更改后文本
打开文件
<?php /** * A (fake) pager plugin that wraps around the actual pager. * * @ingroup views_pager_plugins */ class views_php_plugin_pager extends views_php_plugin_wrapper { /** * Perform any needed actions just prior to the query executing. */ public function pre_execute(&$query) { $this->wrapped->pre_execute($query); foreach (array(/*'argument',*/ 'field', 'filter', 'sort', /*'relationship'*/) as $type) { foreach ($this->wrapped->view->$type as $id => $handler) { if (is_callable(array($handler, 'php_pre_execute'))) { $handler->php_pre_execute(); } } } $this->wrapped->view->query->set_limit(0); $this->wrapped->view->query->set_offset(0); } /** * Perform any needed actions just after the query executing. */ public function post_execute(&$result) { foreach (array(/*'argument',*/ 'field', 'filter', 'sort', /*'relationship'*/) as $type) { foreach ($this->wrapped->view->$type as $id => $handler) { if (is_callable(array($handler, 'php_post_execute'))) { $handler->php_post_execute(); } } } /* $this->wrapped->total_items = count($this->wrapped->view->result); $this->wrapped->update_page_info(); $item_per_page = $this->wrapped->get_items_per_page(); if ($item_per_page > 0) { $offset = $this->wrapped->get_current_page() * $item_per_page + $this->wrapped->get_offset(); $this->wrapped->view->result = array_slice($this->wrapped->view->result, $offset, $item_per_page); } */ $this->wrapped->post_execute($result); } /** * Execute the count query, which will be done just prior to the query * itself being executed. */ function execute_count_query(&$count_query) { $this->wrapped->execute_count_query($count_query); } }
查找差异