Changeset 155
- Timestamp:
- 05/03/07 06:38:22
- Files:
-
- FreakAuth/trunk/www/system/application/helpers/freakauth_light_helper.php (modified) (3 diffs)
- FreakAuth/trunk/www/system/application/views/FreakAuth_light/content/login_anchor_guest.php (modified) (1 diff)
- FreakAuth/trunk/www/system/application/views/FreakAuth_light/content/login_anchor_user.php (modified) (1 diff)
- FreakAuth/trunk/www/system/application/views/FreakAuth_light/template/content.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
FreakAuth/trunk/www/system/application/helpers/freakauth_light_helper.php
r154 r155 125 125 * and 126 126 * $obj->config->item('FAL_template_dir').content/login_anchor_user 127 * 127 * 128 * If you use a controller not named "auth" to handle login and logout actions 129 * you must specify the controller/method that handles them when colling this function 130 * ------------------------------------------------------ 131 * usage examples in a view: 132 * ------------------------------------------------------ 133 * <?=loginAnchor('auth/login', 'auth/logout');?> 134 * 135 * @param string $login_uri the controller/method that handles the login action 136 * @param string $logout_uri the controller/method that handles the logout action 128 137 * @param unknown_type $logout_attributes 129 138 * @param unknown_type $login_attributes 130 139 * @return the message in a view 131 140 */ 132 function loginAnchor($log out_attributes = null, $login_attributes = null)141 function loginAnchor($login_uri = null, $logout_uri = null, $logout_attributes = null, $login_attributes = null) 133 142 { 134 143 $obj =& get_instance(); … … 141 150 $data['logout_label'] = $obj->lang->line('FAL_logout_label'); 142 151 $data['logout_attributes'] = $logout_attributes; 152 $data['logout_uri'] = $logout_uri!=null ? $logout_uri : 'auth/logout'; 143 153 return $obj->load->view($tpl_dir.'content/login_anchor_user', $data, true); 144 154 } … … 148 158 $data['login_label'] = $obj->lang->line('FAL_login_label'); 149 159 $data['login_attributes'] = $login_attributes; 160 $data['login_uri'] = $login_uri!=null ? $login_uri : 'auth/index'; 150 161 return $obj->load->view($tpl_dir.'content/login_anchor_guest', $data, true); 151 162 } FreakAuth/trunk/www/system/application/views/FreakAuth_light/content/login_anchor_guest.php
r77 r155 1 <?=$welcome?>! / <?=anchor( 'auth/index', $login_label, $login_attributes)?>1 <?=$welcome?>! / <?=anchor($login_uri, $login_label, $login_attributes)?> FreakAuth/trunk/www/system/application/views/FreakAuth_light/content/login_anchor_user.php
r77 r155 1 <?=$welcome?> <?=getUserName()?> / <?=anchor( 'auth/logout', $logout_label, $logout_attributes)?>1 <?=$welcome?> <?=getUserName()?> / <?=anchor($logout_uri, $logout_label, $logout_attributes)?> FreakAuth/trunk/www/system/application/views/FreakAuth_light/template/content.php
r126 r155 1 1 <div id="browse_crag"> 2 2 <div class="login"> 3 <?=loginAnchor( );?>3 <?=loginAnchor('auth/login', 'auth/logout');?> 4 4 </div> 5 5 </div>
