mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-01-27 00:33:34 +00:00
fix remaining apigen errors (duplicate function names etc)
This commit is contained in:
parent
7cadfc9463
commit
404d9ab449
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* A script for returning a feed (currently Atom) of recent changes to a calendar collection
|
||||
*
|
||||
* @package davical
|
||||
* @subpackage feed
|
||||
* @author Leho Kraav <leho@kraav.com>
|
||||
* @author Andrew McMillan <andrew@morphoss.com>
|
||||
* @license GPL v2 or later
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* iSchedule administration helper
|
||||
*
|
||||
* @package iSchedule administration helper.
|
||||
* @package davical
|
||||
* @subpackage iSchedule
|
||||
* @author Andrew McMillan <andrew@morphoss.com>
|
||||
* @copyright Catalyst .Net Ltd, Morphoss Ltd <http://www.morphoss.com/>
|
||||
|
||||
@ -201,12 +201,12 @@ try {
|
||||
}
|
||||
}
|
||||
catch( Exception $e ) {
|
||||
class FakeSession {
|
||||
class setupFakeSession {
|
||||
function AllowedTo() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
$session = new FakeSession(1);
|
||||
$session = new setupFakeSession(1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* Atom feed of recent changes to a calendar collection
|
||||
*
|
||||
* @package davical
|
||||
* @subpackage feed
|
||||
* @author Andrew McMillan <andrew@morphoss.com>
|
||||
* @license GPL v2 or later
|
||||
*/
|
||||
|
||||
require_once("XMLDocument.php");
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ if ( count($qry_filters) != 1 ) $qry_filters = false;
|
||||
*
|
||||
* @return boolean True if the check succeeded, false otherwise.
|
||||
*/
|
||||
function apply_filter( $filters, $item ) {
|
||||
function calquery_apply_filter( $filters, $item ) {
|
||||
global $session, $c, $request;
|
||||
|
||||
if ( count($filters) == 0 ) return true;
|
||||
@ -334,7 +334,7 @@ $qry = new AwlQuery( $sql, $params );
|
||||
if ( $qry->Exec("calquery",__LINE__,__FILE__) && $qry->rows() > 0 ) {
|
||||
while( $dav_object = $qry->Fetch() ) {
|
||||
try {
|
||||
if ( !$need_post_filter || apply_filter( $qry_filters, $dav_object ) ) {
|
||||
if ( !$need_post_filter || calquery_apply_filter( $qry_filters, $dav_object ) ) {
|
||||
if ( $bound_from != $target_collection->dav_name() ) {
|
||||
$dav_object->dav_name = str_replace( $bound_from, $target_collection->dav_name(), $dav_object->dav_name);
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ if ( is_array($qry_filters) ) {
|
||||
*
|
||||
* @return boolean True if the check succeeded, false otherwise.
|
||||
*/
|
||||
function apply_filter( $filters, $item, $filter_type) {
|
||||
function cardquery_apply_filter( $filters, $item, $filter_type) {
|
||||
global $session, $c, $request;
|
||||
|
||||
if ( count($filters) == 0 ) return true;
|
||||
@ -316,7 +316,7 @@ if ( isset($c->strict_result_ordering) && $c->strict_result_ordering ) $sql .= "
|
||||
$qry = new AwlQuery( $sql, $params );
|
||||
if ( $qry->Exec("cardquery",__LINE__,__FILE__) && $qry->rows() > 0 ) {
|
||||
while( $address_object = $qry->Fetch() ) {
|
||||
if ( !$need_post_filter || apply_filter( $post_filters, $address_object, $qry_filters_combination ) ) {
|
||||
if ( !$need_post_filter || cardquery_apply_filter( $post_filters, $address_object, $qry_filters_combination ) ) {
|
||||
if ( $bound_from != $target_collection->dav_name() ) {
|
||||
$address_object->dav_name = str_replace( $bound_from, $target_collection->dav_name(), $address_object->dav_name);
|
||||
}
|
||||
@ -334,4 +334,4 @@ if ( $qry->Exec("cardquery",__LINE__,__FILE__) && $qry->rows() > 0 ) {
|
||||
}
|
||||
$multistatus = new XMLElement( "multistatus", $responses, $reply->GetXmlNsArray() );
|
||||
|
||||
$request->XMLResponse( 207, $multistatus );
|
||||
$request->XMLResponse( 207, $multistatus );
|
||||
|
||||
@ -182,7 +182,7 @@ $privilege_xlate = array(
|
||||
);
|
||||
|
||||
/**
|
||||
* privilege_format_function is for formatting the binary privileges from the
|
||||
* collection_privilege_format_function is for formatting the binary privileges from the
|
||||
* database, including localising them. This is a hook function for a browser
|
||||
* column object, so it takes three parameters:
|
||||
* @param mixed $value The value of the column.
|
||||
@ -190,7 +190,7 @@ $privilege_xlate = array(
|
||||
* @param dbrow $row The row object we read from the database.
|
||||
* @return string The formatted privileges.
|
||||
*/
|
||||
function privilege_format_function( $value, $column, $row ) {
|
||||
function collection_privilege_format_function( $value, $column, $row ) {
|
||||
global $privilege_xlate;
|
||||
|
||||
$privs = bits_to_privilege($value);
|
||||
@ -405,7 +405,7 @@ if ( $editor->Available() ) {
|
||||
}
|
||||
}
|
||||
|
||||
function edit_grant_row( $row_data ) {
|
||||
function edit_grant_row_collection( $row_data ) {
|
||||
global $grantrow, $id, $privilege_xlate, $privilege_names;
|
||||
global $btn_all, $btn_all_title, $btn_rw, $btn_rw_title, $btn_read, $btn_read_title;
|
||||
global $btn_fb, $btn_fb_title, $btn_sd, $btn_sd_title, $btn_ss, $btn_ss_title;
|
||||
@ -464,7 +464,7 @@ EOTEMPLATE;
|
||||
$browser->AddHidden( 'principal_link', "'<a href=\"$rowurl' || to_principal || '\">' || to_principal || '</a>'" );
|
||||
$browser->AddHidden( 'grant_privileges', 'privileges' );
|
||||
$browser->AddColumn( 'displayname', translate('Display Name') );
|
||||
$browser->AddColumn( 'privs', translate('Privileges'), '', '', 'privileges', '', '', 'privilege_format_function' );
|
||||
$browser->AddColumn( 'privs', translate('Privileges'), '', '', 'privileges', '', '', 'collection_privilege_format_function' );
|
||||
$browser->AddColumn( 'members', translate('Has Members'), '', '', 'has_members_list(principal_id)' );
|
||||
|
||||
if ( $can_write_collection ) {
|
||||
@ -489,11 +489,11 @@ EOTEMPLATE;
|
||||
|
||||
if ( $can_write_collection ) {
|
||||
if ( isset($_GET['edit_grant']) ) {
|
||||
$browser->MatchedRow('to_principal', $_GET['edit_grant'], 'edit_grant_row');
|
||||
$browser->MatchedRow('to_principal', $_GET['edit_grant'], 'edit_grant_row_collection');
|
||||
}
|
||||
else {
|
||||
$extra_row = array( 'to_principal' => -1 );
|
||||
$browser->MatchedRow('to_principal', -1, 'edit_grant_row');
|
||||
$browser->MatchedRow('to_principal', -1, 'edit_grant_row_collection');
|
||||
$extra_row = (object) $extra_row;
|
||||
$browser->AddRow($extra_row);
|
||||
}
|
||||
|
||||
@ -426,7 +426,7 @@ EOTEMPLATE;
|
||||
|
||||
|
||||
/**
|
||||
* privilege_format_function is for formatting the binary privileges from the
|
||||
* principal_privilege_format_function is for formatting the binary privileges from the
|
||||
* database, including localising them. This is a hook function for a browser
|
||||
* column object, so it takes three parameters:
|
||||
* @param mixed $value The value of the column.
|
||||
@ -434,7 +434,7 @@ EOTEMPLATE;
|
||||
* @param dbrow $row The row object we read from the database.
|
||||
* @return string The formatted privileges.
|
||||
*/
|
||||
function privilege_format_function( $value, $column, $row ) {
|
||||
function principal_privilege_format_function( $value, $column, $row ) {
|
||||
global $privilege_xlate;
|
||||
|
||||
$privs = bits_to_privilege($value,'*');
|
||||
@ -624,7 +624,7 @@ function grant_row_editor() {
|
||||
}
|
||||
|
||||
|
||||
function edit_grant_row( $row_data ) {
|
||||
function edit_grant_row_principal( $row_data ) {
|
||||
global $id, $grantrow;
|
||||
|
||||
$orig_to_id = intval($row_data->to_principal);
|
||||
@ -665,7 +665,7 @@ function principal_grants_browser() {
|
||||
$browser->AddHidden( 'principal_link', "'<a href=\"$rowurl' || to_principal || '\">' || to_principal || '</a>'" );
|
||||
$browser->AddHidden( 'grant_privileges', 'privileges' );
|
||||
$browser->AddColumn( 'displayname', translate('Display Name') );
|
||||
$browser->AddColumn( 'privs', translate('Privileges'), '', '', 'privileges', '', '', 'privilege_format_function' );
|
||||
$browser->AddColumn( 'privs', translate('Privileges'), '', '', 'privileges', '', '', 'principal_privilege_format_function' );
|
||||
$browser->AddColumn( 'members', translate('Has Members'), '', '', 'has_members_list(principal_id)' );
|
||||
|
||||
if ( $can_write_principal ) {
|
||||
@ -690,12 +690,12 @@ function principal_grants_browser() {
|
||||
|
||||
if ( $can_write_principal ) {
|
||||
if ( isset($_GET['edit_grant']) ) {
|
||||
$browser->MatchedRow('to_principal', $_GET['edit_grant'], 'edit_grant_row');
|
||||
$browser->MatchedRow('to_principal', $_GET['edit_grant'], 'edit_grant_row_principal');
|
||||
}
|
||||
else if ( isset($id ) ) {
|
||||
$browser->RowFormat( '<tr class="r%d">', '</tr>', '#even' );
|
||||
$extra_row = array( 'to_principal' => -1 );
|
||||
$browser->MatchedRow('to_principal', -1, 'edit_grant_row');
|
||||
$browser->MatchedRow('to_principal', -1, 'edit_grant_row_principal');
|
||||
$extra_row = (object) $extra_row;
|
||||
$browser->AddRow($extra_row);
|
||||
}
|
||||
@ -795,7 +795,7 @@ function access_ticket_browser() {
|
||||
$browser->AddColumn( 'ticket_id', translate('Ticket ID'), '', '' );
|
||||
$browser->AddColumn( 'target', translate('Target'), '', '<td style="white-space:nowrap;">%s</td>', "COALESCE(d.dav_name,c.dav_name)" );
|
||||
$browser->AddColumn( 'expires', translate('Expires'), '', '', 'TO_CHAR(expires,\'YYYY-MM-DD HH:MI:SS\')');
|
||||
$browser->AddColumn( 'privs', translate('Privileges'), '', '', 'privileges', '', '', 'privilege_format_function' );
|
||||
$browser->AddColumn( 'privs', translate('Privileges'), '', '', 'privileges', '', '', 'principal_privilege_format_function' );
|
||||
$delurl = $c->base_url . '/admin.php?action=edit&t=principal&id='.$id.'&ticket_id=##URL:ticket_id##&subaction=delete_ticket';
|
||||
$browser->AddColumn( 'delete', translate('Action'), 'center', '', "'<a class=\"submit\" href=\"$delurl\">".translate('Delete')."</a>'" );
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user