Changeset 128 for branches/2.0singleton/lib/PageNumbers.inc.php
- Timestamp:
- May 26, 2006 9:29:19 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0singleton/lib/PageNumbers.inc.php
r111 r128 137 137 function calculate() 138 138 { 139 $app =& App::getInstance(); 140 139 141 if (!$this->set_per_page_initialized) { 140 App::logMsg(sprintf('set_per_page not initialized'), LOG_ERR, __FILE__, __LINE__);142 $app->logMsg(sprintf('set_per_page not initialized'), LOG_ERR, __FILE__, __LINE__); 141 143 } 142 144 if (!$this->set_page_number_initialized) { 143 App::logMsg(sprintf('set_page_number not initialized'), LOG_ERR, __FILE__, __LINE__);145 $app->logMsg(sprintf('set_page_number not initialized'), LOG_ERR, __FILE__, __LINE__); 144 146 } 145 147 if (!$this->set_total_items_initialized) { 146 App::logMsg(sprintf('set_total_items not initialized'), LOG_ERR, __FILE__, __LINE__);148 $app->logMsg(sprintf('set_total_items not initialized'), LOG_ERR, __FILE__, __LINE__); 147 149 } 148 150 … … 189 191 function getLimitSQL() 190 192 { 193 $app =& App::getInstance(); 194 191 195 if (is_numeric($this->first_item) && is_numeric($this->_per_page)) { 192 196 return ' LIMIT ' . DB::escapeString($this->first_item) . ', ' . DB::escapeString($this->_per_page) . ' '; 193 197 } else { 194 App::logMsg(sprintf('Could not find SQL to LIMIT by %s %s.', $this->first_item, $this->_per_page), LOG_WARNING, __FILE__, __LINE__);198 $app->logMsg(sprintf('Could not find SQL to LIMIT by %s %s.', $this->first_item, $this->_per_page), LOG_WARNING, __FILE__, __LINE__); 195 199 return ''; 196 200 } … … 204 208 function printPerPageLinks($query_key='per_page') 205 209 { 210 $app =& App::getInstance(); 211 206 212 $sp = ''; 207 213 for ($i=0; $i<sizeof($this->per_page_options); $i++) { … … 209 215 printf('%s<a href="%s">%s</a>', 210 216 $sp, 211 App::oHREF($_SERVER['PHP_SELF'] . '?' . $query_key . '=' . $this->per_page_options[$i]),217 $app->oHREF($_SERVER['PHP_SELF'] . '?' . $query_key . '=' . $this->per_page_options[$i]), 212 218 $this->per_page_options[$i] 213 219 ); … … 220 226 221 227 /** 222 * Outputs an App::oHREF compatible url that goes to the page $page_number.228 * Outputs an $app->oHREF compatible url that goes to the page $page_number. 223 229 * Depends on $this->base_url to build the url onto. This is used in the 224 230 * page_number.ihtml template. … … 232 238 function getPageNumURL($page_number, $carry_args=null) 233 239 { 234 return App::oHREF($this->url_base . $page_number, $carry_args); 240 $app =& App::getInstance(); 241 242 return $app->oHREF($this->url_base . $page_number, $carry_args); 235 243 } 236 244 function printPageNumURL($page_number, $carry_args=null)
Note: See TracChangeset
for help on using the changeset viewer.