This file is indexed.

/usr/share/doc/rt4-doc-html/RT/SearchBuilder.html is in rt4-doc-html 4.4.2-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<ul id="index">
  <li><a href="#NAME">NAME</a></li>
  <li><a href="#SYNOPSIS">SYNOPSIS</a></li>
  <li><a href="#DESCRIPTION">DESCRIPTION</a></li>
  <li><a href="#METHODS">METHODS</a>
    <ul>
      <li><a href="#LimitToEnabled">LimitToEnabled</a></li>
      <li><a href="#LimitToDeleted">LimitToDeleted</a></li>
      <li><a href="#FindAllRows">FindAllRows</a></li>
      <li><a href="#LimitCustomField">LimitCustomField</a></li>
      <li><a href="#RecordClass">RecordClass</a></li>
      <li><a href="#RegisterCustomFieldJoin">RegisterCustomFieldJoin</a></li>
      <li><a href="#JoinForLookupType">_JoinForLookupType</a></li>
      <li><a href="#CustomFieldJoin">_CustomFieldJoin</a></li>
      <li><a href="#Limit-PARAMHASH">Limit PARAMHASH</a></li>
      <li><a href="#ItemsOrderBy">ItemsOrderBy</a></li>
      <li><a href="#ItemsArrayRef">ItemsArrayRef</a></li>
      <li><a href="#ColumnMapClassName">ColumnMapClassName</a></li>
      <li><a href="#NewItem">NewItem</a></li>
      <li><a href="#NotSetDateToNullFunction">NotSetDateToNullFunction</a></li>
    </ul>
  </li>
</ul>

<h1 id="NAME"><a href="#___top">NAME</a></h1>

<pre><code>  RT::SearchBuilder - a baseclass for RT collection objects</code></pre>

<h1 id="SYNOPSIS"><a href="#___top">SYNOPSIS</a></h1>

<h1 id="DESCRIPTION"><a href="#___top">DESCRIPTION</a></h1>

<h1 id="METHODS"><a href="#___top">METHODS</a></h1>

<h2 id="LimitToEnabled"><a href="#___top">LimitToEnabled</a></h2>

<p>Only find items that haven&#39;t been disabled</p>

<h2 id="LimitToDeleted"><a href="#___top">LimitToDeleted</a></h2>

<p>Only find items that have been deleted.</p>

<h2 id="FindAllRows"><a href="#___top">FindAllRows</a></h2>

<p>Find all matching rows, regardless of whether they are disabled or not</p>

<h2 id="LimitCustomField"><a href="#___top">LimitCustomField</a></h2>

<p>Takes a paramhash of key/value pairs with the following keys:</p>

<dl>

<dt id="CUSTOMFIELD---CustomField-id.-Optional">CUSTOMFIELD - CustomField id. Optional</dt>
<dd>

</dd>
<dt id="OPERATOR---The-usual-Limit-operators">OPERATOR - The usual Limit operators</dt>
<dd>

</dd>
<dt id="VALUE---The-value-to-compare-against">VALUE - The value to compare against</dt>
<dd>

</dd>
</dl>

<h2 id="RecordClass"><a href="#___top">RecordClass</a></h2>

<p>Returns class name of records in this collection. This generic implementation just strips trailing &#39;s&#39;.</p>

<h2 id="RegisterCustomFieldJoin"><a href="#___top">RegisterCustomFieldJoin</a></h2>

<p>Takes a pair of arguments, the first a class name and the second a callback function. The class will be used to call <a href="../RT/Record.html#CustomFieldLookupType">&quot;CustomFieldLookupType&quot; in RT::Record</a>. The callback will be called when limiting a collection of the caller&#39;s class by a CF of the passed class&#39;s lookup type.</p>

<p>The callback is passed a single argument, the current collection object (<code>$self</code>).</p>

<p>An example from <a href="../../../rt/latest/RT/Tickets.html">RT::Tickets</a>:</p>

<pre><code>    __PACKAGE__-&gt;RegisterCustomFieldJoin(
        &quot;RT::Transaction&quot; =&gt; sub { $_[0]-&gt;JoinTransactions }
    );</code></pre>

<p>Returns true on success, undef on failure.</p>

<h2 id="JoinForLookupType"><a href="#___top">_JoinForLookupType</a></h2>

<p>Takes an <a href="../RT/CustomField.html">RT::CustomField</a> LookupType and joins this collection as appropriate to reach the object records to which LookupType applies. The object records will be of the class returned by <a href="../RT/CustomField.html#ObjectTypeFromLookupType">&quot;ObjectTypeFromLookupType&quot; in RT::CustomField</a>.</p>

<p>Returns the join alias suitable for further limiting against object properties.</p>

<p>Returns undef on failure.</p>

<p>Used by <a href="#CustomFieldJoin">&quot;_CustomFieldJoin&quot;</a>.</p>

<h2 id="CustomFieldJoin"><a href="#___top">_CustomFieldJoin</a></h2>

<p>Factor out the Join of custom fields so we can use it for sorting too</p>

<h2 id="Limit-PARAMHASH"><a href="#___top">Limit PARAMHASH</a></h2>

<p>This Limit sub calls SUPER::Limit, but defaults &quot;CASESENSITIVE&quot; to 1, thus making sure that by default lots of things don&#39;t do extra work trying to match lower(colname) agaist lc($val);</p>

<p>We also force VALUE to <code>NULL</code> when the OPERATOR is <code>IS</code> or <code>IS NOT</code>. This ensures that we don&#39;t pass invalid SQL to the database or allow SQL injection attacks when we pass through user specified values.</p>

<h2 id="ItemsOrderBy"><a href="#___top">ItemsOrderBy</a></h2>

<p>If it has a SortOrder attribute, sort the array by SortOrder. Otherwise, if it has a &quot;Name&quot; attribute, sort alphabetically by Name Otherwise, just give up and return it in the order it came from the db.</p>

<h2 id="ItemsArrayRef"><a href="#___top">ItemsArrayRef</a></h2>

<p>Return this object&#39;s ItemsArray, in the order that ItemsOrderBy sorts it.</p>

<h2 id="ColumnMapClassName"><a href="#___top">ColumnMapClassName</a></h2>

<p>ColumnMap needs a Collection name to load the correct list display. Depluralization is hard, so provide an easy way to correct the naive algorithm that this code uses.</p>

<h2 id="NewItem"><a href="#___top">NewItem</a></h2>

<p>Returns a new item based on <a href="#RecordClass">&quot;RecordClass&quot;</a> using the current user.</p>

<h2 id="NotSetDateToNullFunction"><a href="#___top">NotSetDateToNullFunction</a></h2>

<p>Takes a paramhash with an optional FIELD key whose value is the name of a date column. If no FIELD is provided, a literal <code>?</code> placeholder is used so the caller can fill in the field later.</p>

<p>Returns a SQL function which evaluates to <code>NULL</code> if the FIELD is set to the Unix epoch; otherwise it evaluates to FIELD. This is useful because RT currently stores unset dates as a Unix epoch timestamp instead of NULL, but NULLs are often more desireable.</p>

<a href="./../">&larr; Back to index</a>