34 + } |
30 + } |
35 + } |
31 + } |
36 } |
32 } |
37 else { |
33 else { |
38 if (isset($_SERVER['argv'])) { |
34 if (isset($_SERVER['argv'])) { |
39 @@ -792,6 +806,7 @@ |
35 @@ -1628,6 +1643,7 @@ |
40 } |
36 } |
41 } |
37 } |
42 // Prevent multiple slashes to avoid cross site requests via the FAPI. |
38 // Prevent multiple slashes to avoid cross site requests via the Form API. |
43 + if (substr($uri, 0, 1) == "/") |
39 + if (substr($uri, 0, 1) == "/") |
44 $uri = '/'. ltrim($uri, '/'); |
40 $uri = '/' . ltrim($uri, '/'); |
45 |
41 |
46 return $uri; |
42 return $uri; |
47 Index: sites/default/default.settings.php |
|
48 --- sites/default/default.settings.php.orig 2007-12-20 10:35:10 +0100 |
|
49 +++ sites/default/default.settings.php 2008-04-09 20:47:32 +0200 |
|
50 @@ -126,6 +126,24 @@ |
|
51 # $base_url = 'http://www.example.com'; // NO trailing slash! |
|
52 |
|
53 /** |
|
54 + * Local Base URL (optional). |
|
55 + * |
|
56 + * If you are running Drupal behind a reverse proxy, $base_url (see above) |
|
57 + * usually points to the URL of the reverse proxy. Drupal uses this for |
|
58 + * all sorts of external URLs. In order to correctly calculate sub-URLs |
|
59 + * below $base_url for embedded HTML forms, Drupal also has to know the |
|
60 + * URL on the local/origin server under which Drupal is contacted by the |
|
61 + * reverse proxy. This is what $base_url_local is for. |
|
62 + * |
|
63 + * Examples: |
|
64 + * $base_url_local = 'http://www.example.com:8080/drupal'; |
|
65 + * |
|
66 + * It is not allowed to have a trailing slash; Drupal will add it |
|
67 + * for you. |
|
68 + */ |
|
69 +# $base_url_local = 'http://www.example.com:8080/drupal'; // NO trailing slash! |
|
70 + |
|
71 +/** |
|
72 * PHP settings: |
|
73 * |
|
74 * To see what PHP settings are possible, including whether they can |
|
75 |
|
76 ----------------------------------------------------------------------------- |
|
77 |
|
78 1. Support HTTP Proxies (mainly for update checks, RSS fetching, etc) |
|
79 http://drupal.org/node/7881 |
|
80 http://drupal.org/files/issues/proxy_11.patch |
|
81 (post-adjusted and improved by RSE) |
|
82 |
|
83 2. Fix CSS Cache Building Procedure |
|
84 http://drupal.org/node/275381 |
|
85 http://drupal.org/files/issues/drupal-css-cache-building.patch |
|
86 (created by RSE) |
|
87 |
|
88 Index: includes/common.inc |
43 Index: includes/common.inc |
89 --- includes/common.inc.orig 2008-04-09 23:11:44 +0200 |
44 --- includes/common.inc.orig 2008-04-09 23:11:44 +0200 |
90 +++ includes/common.inc 2008-06-26 20:16:16 +0200 |
45 +++ includes/common.inc 2008-06-26 20:16:16 +0200 |
91 @@ -439,13 +439,27 @@ |
46 @@ -848,9 +848,14 @@ |
92 case 'http': |
|
93 $port = isset($uri['port']) ? $uri['port'] : 80; |
|
94 $host = $uri['host'] . ($port != 80 ? ':'. $port : ''); |
|
95 - $fp = @fsockopen($uri['host'], $port, $errno, $errstr, 15); |
|
96 + if (variable_get('proxy_server', '') != '') { |
|
97 + $proxy_server = variable_get('proxy_server', ''); |
|
98 + $proxy_port = variable_get('proxy_port', 8080); |
|
99 + $fp = @fsockopen($proxy_server, $proxy_port, $errno, $errstr, 15); |
|
100 + } |
|
101 + else { |
|
102 + $fp = @fsockopen($uri['host'], $port, $errno, $errstr, 15); |
|
103 + } |
|
104 break; |
|
105 case 'https': |
|
106 // Note: Only works for PHP 4.3 compiled with OpenSSL. |
|
107 $port = isset($uri['port']) ? $uri['port'] : 443; |
|
108 $host = $uri['host'] . ($port != 443 ? ':'. $port : ''); |
|
109 - $fp = @fsockopen('ssl://'. $uri['host'], $port, $errno, $errstr, 20); |
|
110 + if (variable_get('proxy_server', '') != '') { |
|
111 + $proxy_server = variable_get('proxy_server', ''); |
|
112 + $proxy_port = variable_get('proxy_port', 8080); |
|
113 + $fp = @fsockopen($proxy_server, $proxy_port, $errno, $errstr, 15); |
|
114 + } |
|
115 + else { |
|
116 + $fp = @fsockopen('ssl://'. $uri['host'], $port, $errno, $errstr, 20); |
|
117 + } |
|
118 break; |
|
119 default: |
|
120 $result->error = 'invalid schema '. $uri['scheme']; |
|
121 @@ -462,9 +476,14 @@ |
|
122 } |
47 } |
123 |
48 |
124 // Construct the path to act on. |
49 // Construct the path to act on. |
125 - $path = isset($uri['path']) ? $uri['path'] : '/'; |
50 - $path = isset($uri['path']) ? $uri['path'] : '/'; |
126 - if (isset($uri['query'])) { |
51 - if (isset($uri['query'])) { |
127 - $path .= '?'. $uri['query']; |
52 - $path .= '?' . $uri['query']; |
128 + if (variable_get('proxy_server', '') != '') { |
53 + if (variable_get('proxy_server', '') != '') { |
129 + $path = $url; |
54 + $path = $url; |
130 + } |
55 + } |
131 + else { |
56 + else { |
132 + $path = isset($uri['path']) ? $uri['path'] : '/'; |
57 + $path = isset($uri['path']) ? $uri['path'] : '/'; |
133 + if (isset($uri['query'])) { |
58 + if (isset($uri['query'])) { |
134 + $path .= '?'. $uri['query']; |
59 + $path .= '?'. $uri['query']; |
135 + } |
60 + } |
136 } |
61 } |
137 |
62 |
138 // Create HTTP request. |
63 // Merge the default headers. |
139 @@ -482,6 +501,14 @@ |
64 @@ -872,6 +877,14 @@ |
140 $defaults['Authorization'] = 'Authorization: Basic '. base64_encode($uri['user'] . (!empty($uri['pass']) ? ":". $uri['pass'] : '')); |
65 $options['headers']['Authorization'] = 'Basic ' . base64_encode($uri['user'] . (isset($uri['pass']) ? ':' . $uri['pass'] : '')); |
141 } |
66 } |
142 |
67 |
143 + // If the proxy server required a username then attempt to authenticate with it |
68 + // If the proxy server required a username then attempt to authenticate with it |
144 + if (variable_get('proxy_username', '') != '') { |
69 + if (variable_get('proxy_username', '') != '') { |
145 + $username = variable_get('proxy_username', ''); |
70 + $username = variable_get('proxy_username', ''); |
146 + $password = variable_get('proxy_password', ''); |
71 + $password = variable_get('proxy_password', ''); |
147 + $auth_string = base64_encode($username . ($password != '' ? ':'. $password : '')); |
72 + $auth_string = base64_encode($username . ($password != '' ? ':'. $password : '')); |
148 + $defaults['Proxy-Authorization'] = 'Proxy-Authorization: Basic '. $auth_string ."\r\n"; |
73 + $defaults['Proxy-Authorization'] = 'Proxy-Authorization: Basic '. $auth_string ."\r\n"; |
149 + } |
74 + } |
150 + |
75 + |
151 foreach ($headers as $header => $value) { |
76 // If the database prefix is being used by SimpleTest to run the tests in a copied |
152 $defaults[$header] = $header .': '. $value; |
77 // database then set the user-agent header to the database prefix so that any |
153 } |
78 // calls to other Drupal pages will run the SimpleTest prefixed database. The |
154 Index: modules/system/system.admin.inc |
79 Index: modules/system/system.admin.inc |
155 --- modules/system/system.admin.inc.orig 2008-03-25 12:58:16 +0100 |
80 --- modules/system/system.admin.inc.orig 2008-03-25 12:58:16 +0100 |
156 +++ modules/system/system.admin.inc 2008-04-24 11:43:07 +0200 |
81 +++ modules/system/system.admin.inc 2008-04-24 11:43:07 +0200 |
157 @@ -1363,6 +1363,65 @@ |
82 @@ -1766,6 +1766,124 @@ |
158 } |
83 } |
159 |
84 |
160 /** |
85 /** |
161 + * Form builder; Configure the site proxy settings. |
86 + * Form builder; Configure the site proxy settings. |
162 + * |
87 + * |
215 + } |
140 + } |
216 + } |
141 + } |
217 +} |
142 +} |
218 + |
143 + |
219 +/** |
144 +/** |
|
145 + * Form builder; Configure the site proxy settings. |
|
146 + * |
|
147 + * @ingroup forms |
|
148 + * @see system_settings_form() |
|
149 + */ |
|
150 +function system_proxy_settings() { |
|
151 + |
|
152 + $form['forward_proxy'] = array( |
|
153 + '#type' => 'fieldset', |
|
154 + '#title' => t('Forward proxy settings'), |
|
155 + '#description' => t('The proxy server used when Drupal needs to connect to other sites on the Internet.'), |
|
156 + ); |
|
157 + $form['forward_proxy']['proxy_server'] = array( |
|
158 + '#type' => 'textfield', |
|
159 + '#title' => t('Proxy host name'), |
|
160 + '#default_value' => variable_get('proxy_server', ''), |
|
161 + '#description' => t('The host name of the proxy server, eg. localhost. If this is empty Drupal will connect directly to the internet.') |
|
162 + ); |
|
163 + $form['forward_proxy']['proxy_port'] = array( |
|
164 + '#type' => 'textfield', |
|
165 + '#title' => t('Proxy port number'), |
|
166 + '#default_value' => variable_get('proxy_port', 8080), |
|
167 + '#description' => t('The port number of the proxy server, eg. 8080'), |
|
168 + ); |
|
169 + $form['forward_proxy']['proxy_username'] = array( |
|
170 + '#type' => 'textfield', |
|
171 + '#title' => t('Proxy username'), |
|
172 + '#default_value' => variable_get('proxy_username', ''), |
|
173 + '#description' => t('The username used to authenticate with the proxy server.'), |
|
174 + ); |
|
175 + $form['forward_proxy']['proxy_password'] = array( |
|
176 + '#type' => 'textfield', |
|
177 + '#title' => t('Proxy password'), |
|
178 + '#default_value' => variable_get('proxy_password', ''), |
|
179 + '#description' => t('The password used to connect to the proxy server. This is kept as plain text.', '') |
|
180 + ); |
|
181 + $form['#validate'][] = 'system_proxy_settings_validate'; |
|
182 + |
|
183 + return system_settings_form($form); |
|
184 +} |
|
185 + |
|
186 +/** |
|
187 + * Validate the submitted proxy form. |
|
188 + */ |
|
189 +function system_proxy_settings_validate($form, &$form_state) { |
|
190 + // Validate the proxy settings |
|
191 + $form_state['values']['proxy_server'] = trim($form_state['values']['proxy_server']); |
|
192 + if ($form_state['values']['proxy_server'] != '') { |
|
193 + // TCP allows the port to be between 0 and 65536 inclusive |
|
194 + if (!is_numeric($form_state['values']['proxy_port'])) { |
|
195 + form_set_error('proxy_port', t('The proxy port is invalid. It must be a number between 0 and 65535.')); |
|
196 + } |
|
197 + elseif ($form_state['values']['proxy_port'] < 0 || $form_state['values']['proxy_port'] >= 65536) { |
|
198 + form_set_error('proxy_port', t('The proxy port is invalid. It must be between 0 and 65535.')); |
|
199 + } |
|
200 + } |
|
201 +} |
|
202 + |
|
203 +/** |
220 * Form builder; Configure the site file handling. |
204 * Form builder; Configure the site file handling. |
221 * |
205 * |
222 * @ingroup forms |
206 * @ingroup forms |
223 Index: modules/system/system.module |
207 Index: modules/system/system.module |
224 --- modules/system/system.module.orig 2008-04-09 23:11:49 +0200 |
208 --- modules/system/system.module.orig 2008-04-09 23:11:49 +0200 |
225 +++ modules/system/system.module 2008-04-24 11:43:47 +0200 |
209 +++ modules/system/system.module 2008-04-24 11:43:47 +0200 |
226 @@ -55,7 +55,7 @@ |
210 @@ -723,6 +723,14 @@ |
227 $output .= '<li>'. t('support for enabling and disabling <a href="@themes">themes</a>, which determine the design and presentation of your site. Drupal comes packaged with several core themes and additional contributed themes are available at the <a href="@drupal-themes">Drupal.org theme page</a>.', array('@themes' => url('admin/build/themes'), '@drupal-themes' => 'http://drupal.org/project/themes')) .'</li>'; |
211 'access arguments' => array('access administration pages'), |
228 $output .= '<li>'. t('a robust <a href="@cache-settings">caching system</a> that allows the efficient re-use of previously-constructed web pages and web page components. Drupal stores the pages requested by anonymous users in a compressed format; depending on your site configuration and the amount of your web traffic tied to anonymous visitors, Drupal\'s caching system may significantly increase the speed of your site.', array('@cache-settings' => url('admin/settings/performance'))) .'</li>'; |
|
229 $output .= '<li>'. t('a set of routine administrative operations that rely on a correctly-configured <a href="@cron">cron maintenance task</a> to run automatically. A number of other modules, including the feed aggregator, ping module and search also rely on <a href="@cron">cron maintenance tasks</a>. For more information, see the online handbook entry for <a href="@handbook">configuring cron jobs</a>.', array('@cron' => url('admin/reports/status'), '@handbook' => 'http://drupal.org/cron')) .'</li>'; |
|
230 - $output .= '<li>'. t('basic configuration options for your site, including <a href="@date-settings">date and time settings</a>, <a href="@file-system">file system settings</a>, <a href="@clean-url">clean URL support</a>, <a href="@site-info">site name and other information</a>, and a <a href="@site-maintenance">site maintenance</a> function for taking your site temporarily off-line.', array('@date-settings' => url('admin/settings/date-time'), '@file-system' => url('admin/settings/file-system'), '@clean-url' => url('admin/settings/clean-urls'), '@site-info' => url('admin/settings/site-information'), '@site-maintenance' => url('admin/settings/site-maintenance'))) .'</li></ul>'; |
|
231 + $output .= '<li>'. t('basic configuration options for your site, including <a href="@date-settings">date and time settings</a>, <a href="@file-system">file system settings</a>, <a href="@clean-url">clean URL support</a>, <a href="@proxy-server">proxy server settings</a>, a href="@site-info">site name and other information</a>, and a <a href="@site-maintenance">site maintenance</a> function for taking your site temporarily off-line.', array('@date-settings' => url('admin/settings/date-time'), '@file-system' => url('admin/settings/file-system'), '@clean-url' => url('admin/settings/clean-urls'), '@site-info' => url('admin/settings/site-information'), '@site-maintenance' => url('admin/settings/site-maintenance'))) .'</li></ul>'; |
|
232 $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@system">System module</a>.', array('@system' => 'http://drupal.org/handbook/modules/system/')) .'</p>'; |
|
233 return $output; |
|
234 case 'admin': |
|
235 @@ -406,6 +406,14 @@ |
|
236 'access arguments' => array('administer site configuration'), |
|
237 'file' => 'system.admin.inc', |
212 'file' => 'system.admin.inc', |
238 ); |
213 ); |
239 + $items['admin/settings/proxy'] = array( |
214 + $items['admin/settings/proxy'] = array( |
240 + 'title' => 'Proxy server', |
215 + 'title' => 'Proxy server', |
241 + 'description' => 'Configure settings when the site is behind a proxy server.', |
216 + 'description' => 'Configure settings when the site is behind a proxy server.', |
242 + 'page callback' => 'drupal_get_form', |
217 + 'page callback' => 'drupal_get_form', |
243 + 'page arguments' => array('system_proxy_settings'), |
218 + 'page arguments' => array('system_proxy_settings'), |
244 + 'access arguments' => array('administer site configuration'), |
219 + 'access arguments' => array('administer site configuration'), |
245 + 'file' => 'system.admin.inc', |
220 + 'file' => 'system.admin.inc', |
246 + ); |
221 + ); |
247 $items['admin/settings/file-system'] = array( |
222 $items['admin/config/media/file-system'] = array( |
248 'title' => 'File system', |
223 'title' => 'File system', |
249 'description' => 'Tell Drupal where to store uploaded files and how they are accessed.', |
224 'description' => 'Tell Drupal where to store uploaded files and how they are accessed.', |
250 |
225 Index: includes/install.core.inc |
251 ----------------------------------------------------------------------------- |
226 --- includes/install.core.inc.orig 2012-08-01 18:27:42.000000000 +0200 |
252 |
227 +++ includes/install.core.inc 2012-08-22 21:55:27.582420660 +0200 |
253 Disable "Update notifications" check by default during installation. |
228 @@ -1771,7 +1771,7 @@ |
254 |
229 1 => st('Check for updates automatically'), |
255 Index: install.php |
230 2 => st('Receive e-mail notifications'), |
256 --- install.php.orig 2008-02-08 23:00:45 +0100 |
231 ), |
257 +++ install.php 2008-05-09 13:18:09 +0200 |
232 - '#default_value' => array(1, 2), |
258 @@ -1069,7 +1069,7 @@ |
|
259 '#type' => 'checkboxes', |
|
260 '#title' => st('Update notifications'), |
|
261 '#options' => array(1 => st('Check for updates automatically')), |
|
262 - '#default_value' => array(1), |
|
263 + '#default_value' => array(), |
233 + '#default_value' => array(), |
264 '#description' => st('With this option enabled, Drupal will notify you when new releases are available. This will significantly enhance your site\'s security and is <strong>highly recommended</strong>. This requires your site to periodically send anonymous information on its installed components to <a href="@drupal">drupal.org</a>. For more information please see the <a href="@update">update notification information</a>.', array('@drupal' => 'http://drupal.org', '@update' => 'http://drupal.org/handbook/modules/update')), |
234 '#description' => st('The system will notify you when updates and important security releases are available for installed components. Anonymous information about your site is sent to <a href="@drupal">Drupal.org</a>.', array('@drupal' => 'http://drupal.org')), |
265 '#weight' => 15, |
235 '#weight' => 15, |
266 ); |
236 ); |
267 |
237 Index: sites/default/default.settings.php |
268 ----------------------------------------------------------------------------- |
238 --- sites/default/default.settings.php.orig 2012-08-01 18:27:42.000000000 +0200 |
269 |
239 +++ sites/default/default.settings.php 2012-08-22 21:39:06.793031214 +0200 |
270 No need to always expand the "Menu settings" on node edit pages. |
240 @@ -257,6 +257,24 @@ |
271 |
241 # $base_url = 'http://www.example.com'; // NO trailing slash! |
272 Index: modules/menu/menu.module |
|
273 --- modules/menu/menu.module.orig 2008-04-09 23:11:48 +0200 |
|
274 +++ modules/menu/menu.module 2008-05-16 20:03:48 +0200 |
|
275 @@ -366,7 +366,7 @@ |
|
276 '#title' => t('Menu settings'), |
|
277 '#access' => user_access('administer menu'), |
|
278 '#collapsible' => TRUE, |
|
279 - '#collapsed' => FALSE, |
|
280 + '#collapsed' => TRUE, |
|
281 '#tree' => TRUE, |
|
282 '#weight' => -2, |
|
283 '#attributes' => array('class' => 'menu-item-form'), |
|
284 |
|
285 ----------------------------------------------------------------------------- |
|
286 |
|
287 Use a larger text-area on node edit pages. |
|
288 |
|
289 Index: modules/node/node.pages.inc |
|
290 --- modules/node/node.pages.inc.orig 2008-02-27 20:44:44 +0100 |
|
291 +++ modules/node/node.pages.inc 2008-05-16 20:06:45 +0200 |
|
292 @@ -287,7 +287,8 @@ |
|
293 '#type' => 'textarea', |
|
294 '#title' => check_plain($label), |
|
295 '#default_value' => $include ? $node->body : ($node->teaser . $node->body), |
|
296 - '#rows' => 20, |
|
297 + '#rows' => 30, |
|
298 + '#cols' => 80, |
|
299 '#required' => ($word_count > 0), |
|
300 ); |
|
301 |
|
302 ----------------------------------------------------------------------------- |
|
303 |
|
304 Avoid incorrect ordering of BLOG entries by removing the |
|
305 db_rewrite_sql() calls which seem to introduce a wrong ordering. |
|
306 |
|
307 Index: modules/blog/blog.module |
|
308 --- modules/blog/blog.module.orig 2008-05-19 09:27:35 +0200 |
|
309 +++ modules/blog/blog.module 2008-07-29 21:20:42 +0200 |
|
310 @@ -182,13 +182,13 @@ |
|
311 * Helper function to determine if a user has blog posts already. |
|
312 */ |
|
313 function _blog_post_exists($account) { |
|
314 - return (bool)db_result(db_query_range(db_rewrite_sql("SELECT 1 FROM {node} n WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1"), $account->uid, 0, 1)); |
|
315 + return (bool)db_result(db_query_range("SELECT 1 FROM {node} n WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1", $account->uid, 0, 1)); |
|
316 } |
|
317 |
242 |
318 /** |
243 /** |
319 * Implementation of hook_block(). |
244 + * Local Base URL (optional). |
|
245 + * |
|
246 + * If you are running Drupal behind a reverse proxy, $base_url (see above) |
|
247 + * usually points to the URL of the reverse proxy. Drupal uses this for |
|
248 + * all sorts of external URLs. In order to correctly calculate sub-URLs |
|
249 + * below $base_url for embedded HTML forms, Drupal also has to know the |
|
250 + * URL on the local/origin server under which Drupal is contacted by the |
|
251 + * reverse proxy. This is what $base_url_local is for. |
|
252 + * |
|
253 + * Examples: |
|
254 + * $base_url_local = 'http://www.example.com:8080/drupal'; |
|
255 + * |
|
256 + * It is not allowed to have a trailing slash; Drupal will add it |
|
257 + * for you. |
|
258 + */ |
|
259 +# $base_url_local = 'http://www.example.com:8080/drupal'; // NO trailing slash! |
|
260 + |
|
261 +/** |
|
262 * PHP settings: |
320 * |
263 * |
321 - * Displays the most recent 10 blog titles. |
264 * To see what PHP settings are possible, including whether they can be set at |
322 + * Displays the most recent 5 blog titles. |
|
323 */ |
|
324 function blog_block($op = 'list', $delta = 0) { |
|
325 global $user; |
|
326 @@ -198,7 +198,7 @@ |
|
327 } |
|
328 else if ($op == 'view') { |
|
329 if (user_access('access content')) { |
|
330 - $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC"), 0, 10); |
|
331 + $result = db_query_range("SELECT n.nid, n.title, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC", 0, 5); |
|
332 if ($node_title_list = node_title_list($result)) { |
|
333 $block['content'] = $node_title_list; |
|
334 $block['content'] .= theme('more_link', url('blog'), t('Read the latest blog entries.')); |
|
335 Index: modules/blog/blog.pages.inc |
|
336 --- modules/blog/blog.pages.inc.orig 2009-09-14 17:08:00 +0200 |
|
337 +++ modules/blog/blog.pages.inc 2009-09-19 08:53:18 +0200 |
|
338 @@ -25,7 +25,7 @@ |
|
339 |
|
340 $output = theme('item_list', $items); |
|
341 |
|
342 - $result = pager_query(db_rewrite_sql("SELECT n.nid, n.sticky, n.created FROM {node} n WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC"), variable_get('default_nodes_main', 10), 0, NULL, $account->uid); |
|
343 + $result = pager_query("SELECT n.nid, n.sticky, n.created FROM {node} n WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC", variable_get('default_nodes_main', 10), 0, NULL, $account->uid); |
|
344 $has_posts = FALSE; |
|
345 |
|
346 while ($node = db_fetch_object($result)) { |
|
347 @@ -64,7 +64,7 @@ |
|
348 |
|
349 $output = theme('item_list', $items); |
|
350 |
|
351 - $result = pager_query(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC"), variable_get('default_nodes_main', 10)); |
|
352 + $result = pager_query("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC", variable_get('default_nodes_main', 10)); |
|
353 $has_posts = FALSE; |
|
354 |
|
355 while ($node = db_fetch_object($result)) { |
|
356 @@ -87,7 +87,7 @@ |
|
357 * Menu callback; displays an RSS feed containing recent blog entries of a given user. |
|
358 */ |
|
359 function blog_feed_user($account) { |
|
360 - $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.created DESC"), $account->uid, 0, variable_get('feed_default_items', 10)); |
|
361 + $result = db_query_range("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.created DESC", $account->uid, 0, variable_get('feed_default_items', 10)); |
|
362 $channel['title'] = t("!name's blog", array('!name' => $account->name)); |
|
363 $channel['link'] = url('blog/'. $account->uid, array('absolute' => TRUE)); |
|
364 |
|
365 @@ -102,7 +102,7 @@ |
|
366 * Menu callback; displays an RSS feed containing recent blog entries of all users. |
|
367 */ |
|
368 function blog_feed_last() { |
|
369 - $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC"), 0, variable_get('feed_default_items', 10)); |
|
370 + $result = db_query_range("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC", 0, variable_get('feed_default_items', 10)); |
|
371 $channel['title'] = t('!site_name blogs', array('!site_name' => variable_get('site_name', 'Drupal'))); |
|
372 $channel['link'] = url('blog', array('absolute' => TRUE)); |
|
373 |
|