Changeset 3431 for extensions/CommentEditor/classes/ce_plugin.class.php
- Timestamp:
- Jun 18, 2009, 9:29:00 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/CommentEditor/classes/ce_plugin.class.php
r3426 r3431 9 9 */ 10 10 class CE_Plugin { 11 12 private static $url_prefix = null; 13 14 15 function CE_Plugin() { 16 if (null == self::$url_prefix) { 17 self::$url_prefix = get_root_url() . 'index.php?' . CE_ACTION . '='; 18 } 19 } 11 20 12 21 /* ************************ */ … … 26 35 $comment['U_ID'] = $this->getCommentId($comment['U_DELETE']); 27 36 28 $comment['DATE'] .= ' - <a href="' . $this->getEditUrlPrefix() . $comment['U_ID'] . '">'; 37 $comment['DATE'] .= ' - <a href="' . $this->getEditUrlPrefix(); 38 $comment['DATE'] .= $comment['U_ID'] . '">'; 29 39 $comment['DATE'] .= 'Edit'; 30 40 $comment['DATE'] .= '</a>'; … … 132 142 } else if (isset($_POST['freeauthorck'])) { 133 143 // Free author 134 $new_author = $comment->validateAuthor(trim(stripslashes($_POST['freeauthor']))); 144 $new_author = trim(stripslashes($_POST['freeauthor'])); 145 $new_author = $comment->validateAuthor($new_author); 135 146 $comment->setInfo('author', $new_author); 136 147 } … … 158 169 } 159 170 // allow plugins to notify what's going on 160 trigger_action( 'user_comment_insertion', array_merge($comment_array, array('action'=>$comment_action))); 171 trigger_action( 'user_comment_insertion', 172 array_merge($comment_array, array('action'=>$comment_action))); 161 173 if ($comment_action=='reject') { 162 174 $this->displayError($infos); … … 213 225 global $template; 214 226 $template->set_filenames(array('ce_message'=>$this->getTemplate('message.tpl'))); 215 $template->block_html_head('', '<link rel="stylesheet" type="text/css" href="'.CE_STYLE.'">', $smarty, $repeat); 227 $template->block_html_head( '', 228 '<link rel="stylesheet" type="text/css" href="'.CE_STYLE.'">', 229 $smarty, $repeat); 216 230 $begin = 'PLUGIN_INDEX_CONTENT_BEFORE'; 217 231 $template->assign('message', $message_array); … … 225 239 226 240 $template->set_filenames(array('ce_edit'=>$this->getTemplate())); 227 $template->block_html_head('', '<link rel="stylesheet" type="text/css" href="'.CE_STYLE.'">', $smarty, $repeat); 241 $template->block_html_head( '', 242 '<link rel="stylesheet" type="text/css" href="'.CE_STYLE.'">', 243 $smarty, $repeat); 228 244 $begin = 'PLUGIN_INDEX_CONTENT_BEFORE'; 229 245 $end = 'PLUGIN_INDEX_CONTENT_AFTER'; … … 245 261 246 262 function getEditUrlPrefix() { 247 return get_root_url() . 'index.php?' . CE_ACTION . '='. CE_ACTION_EDIT . '&' . CE_ID . '=';263 return self::$url_prefix . CE_ACTION_EDIT . '&' . CE_ID . '='; 248 264 } 249 265 250 266 function getUpdateUrlPrefix() { 251 return get_root_url() . 'index.php?' . CE_ACTION . '='. CE_ACTION_UPDATE;267 return self::$url_prefix . CE_ACTION_UPDATE; 252 268 } 253 269
Note: See TracChangeset
for help on using the changeset viewer.