changeset 377 | bb3e6c3bd4f4 |
parent 375 | 8d0e3a5a6990 |
child 378 | c1c7fa6b329f |
376:66732bd4532c | 377:bb3e6c3bd4f4 |
---|---|
892 $this->sql('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary,page_text) VALUES(\'security\', \'admin_auth_bad\', '.time().', \''.enano_date('d M Y h:i a').'\', \''.$db->escape($username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\', ' . intval($level) . ')'); |
892 $this->sql('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary,page_text) VALUES(\'security\', \'admin_auth_bad\', '.time().', \''.enano_date('d M Y h:i a').'\', \''.$db->escape($username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\', ' . intval($level) . ')'); |
893 else |
893 else |
894 $this->sql('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary) VALUES(\'security\', \'auth_bad\', '.time().', \''.enano_date('d M Y h:i a').'\', \''.$db->escape($username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\')'); |
894 $this->sql('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary) VALUES(\'security\', \'auth_bad\', '.time().', \''.enano_date('d M Y h:i a').'\', \''.$db->escape($username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\')'); |
895 |
895 |
896 // Do we also need to increment the lockout countdown? |
896 // Do we also need to increment the lockout countdown? |
897 if ( $policy != 'disable' && !defined('IN_ENANO_INSTALL') ) |
897 if ( @$policy != 'disable' && !defined('IN_ENANO_INSTALL') ) |
898 { |
898 { |
899 $ipaddr = $db->escape($_SERVER['REMOTE_ADDR']); |
899 $ipaddr = $db->escape($_SERVER['REMOTE_ADDR']); |
900 // increment fail count |
900 // increment fail count |
901 $this->sql('INSERT INTO '.table_prefix.'lockout(ipaddr, timestamp, action) VALUES(\'' . $ipaddr . '\', ' . time() . ', \'credential\');'); |
901 $this->sql('INSERT INTO '.table_prefix.'lockout(ipaddr, timestamp, action) VALUES(\'' . $ipaddr . '\', ' . time() . ', \'credential\');'); |
902 $fails++; |
902 $fails++; |
1164 { |
1164 { |
1165 $this->theme = ( isset($_GET['theme']) && isset($template->named_theme_list[$_GET['theme']])) ? $_GET['theme'] : $template->default_theme; |
1165 $this->theme = ( isset($_GET['theme']) && isset($template->named_theme_list[$_GET['theme']])) ? $_GET['theme'] : $template->default_theme; |
1166 $this->style = ( isset($_GET['style']) && file_exists(ENANO_ROOT.'/themes/'.$this->theme . '/css/'.$_GET['style'].'.css' )) ? $_GET['style'] : substr($template->named_theme_list[$this->theme]['default_style'], 0, strlen($template->named_theme_list[$this->theme]['default_style'])-4); |
1166 $this->style = ( isset($_GET['style']) && file_exists(ENANO_ROOT.'/themes/'.$this->theme . '/css/'.$_GET['style'].'.css' )) ? $_GET['style'] : substr($template->named_theme_list[$this->theme]['default_style'], 0, strlen($template->named_theme_list[$this->theme]['default_style'])-4); |
1167 } |
1167 } |
1168 $this->user_id = 1; |
1168 $this->user_id = 1; |
1169 // This is a VERY special case we are allowing. It lets the installer create languages using the Enano API. |
|
1169 if ( !defined('ENANO_ALLOW_LOAD_NOLANG') ) |
1170 if ( !defined('ENANO_ALLOW_LOAD_NOLANG') ) |
1170 { |
1171 { |
1171 // This is a VERY special case we are allowing. It lets the installer create languages using the Enano API. |
1172 $language = ( isset($_GET['lang']) && preg_match('/^[a-z0-9_]+$/', @$_GET['lang']) ) ? $_GET['lang'] : intval(getConfig('default_language')); |
1172 $language = intval(getConfig('default_language')); |
|
1173 $lang = new Language($language); |
1173 $lang = new Language($language); |
1174 } |
1174 } |
1175 } |
1175 } |
1176 |
1176 |
1177 /** |
1177 /** |
3118 { |
3118 { |
3119 foreach ( $this->perms as $i => $p ) |
3119 foreach ( $this->perms as $i => $p ) |
3120 { |
3120 { |
3121 if ( isset($perm[$i]) ) |
3121 if ( isset($perm[$i]) ) |
3122 { |
3122 { |
3123 if ( $is_everyone && !$this->acl_defaults_used[$i] ) |
3123 if ( $is_everyone && !@$this->acl_defaults_used[$i] ) |
3124 continue; |
3124 continue; |
3125 // Decide precedence |
3125 // Decide precedence |
3126 if ( isset($this->acl_defaults_used[$i]) ) |
3126 if ( isset($this->acl_defaults_used[$i]) ) |
3127 { |
3127 { |
3128 //echo "$i: default in use, overriding to: {$perm[$i]}<br />"; |
3128 //echo "$i: default in use, overriding to: {$perm[$i]}<br />"; |