- Timestamp:
- Jun 19, 2007 4:04:42 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/module_maker/module.cli.php
r247 r259 11 11 $valid_ops = array('clean', 'var', 'test'); 12 12 13 // Test for a single argument.13 // Test for arguments. 14 14 if (isset($_SERVER['argv'][2]) && isset($_SERVER['argv'][3])) { 15 15 $module_name_singular = $_SERVER['argv'][2]; -
trunk/css/utilities.inc.css
r254 r259 37 37 .sc-hidden { display: none; visibility: hidden; } 38 38 .sc-monospaced { font-family: monaco, courier; font-weight: normal; } 39 .sc-padleft { padding : 0 0 010px; }40 .sc-padright { padding : 0 10px 0 0; }39 .sc-padleft { padding-left: 10px; } 40 .sc-padright { padding-right: 10px; } 41 41 .sc-right { text-align: right; } 42 42 .sc-normal { font-weight: normal; } -
trunk/lib/App.inc.php
r249 r259 597 597 * @return The string representation of $priority. 598 598 */ 599 function logPriorityToString 599 function logPriorityToString($priority) { 600 600 $priorities = array( 601 601 LOG_EMERG => 'emergency', … … 621 621 * 622 622 * @access public 623 * @param string $query_key The keyof the query argument to save.623 * @param mixed $query_key The key (or keys, as an array) of the query argument to save. 624 624 * @param mixed $default If the key is not available, set to this default value. 625 625 * @author Quinn Comendant <quinn@strangecode.com> … … 628 628 function carryQuery($query_key, $default=false) 629 629 { 630 // If not already set, and there is a non-empty value provided in the request... 631 if (!isset($this->_carry_queries[$query_key]) && false !== getFormData($query_key, $default)) { 632 // Copy the value of the specified query argument into the _carry_queries array. 633 $this->_carry_queries[$query_key] = getFormData($query_key, $default); 630 if (!is_array($query_key)) { 631 $query_key = array($query_key); 632 } 633 foreach ($query_key as $k) { 634 // If not already set, and there is a non-empty value provided in the request... 635 if (!isset($this->_carry_queries[$k]) && false !== getFormData($k, $default)) { 636 // Copy the value of the specified query argument into the _carry_queries array. 637 $this->_carry_queries[$k] = getFormData($k, $default); 638 } 639 } 640 } 641 642 /** 643 * dropQuery() is the opposite of carryQuery(). The specified value will not appear in 644 * url()/ohref()/printHiddenSession() modified URLs unless explicitly written in. 645 * 646 * @access public 647 * @param mixed $query_key The key (or keys, as an array) of the query argument to remove. 648 * @author Quinn Comendant <quinn@strangecode.com> 649 * @since 18 Jun 2007 20:57:29 650 */ 651 function dropQuery($query_key, $default=false) 652 { 653 if (!is_array($query_key)) { 654 $query_key = array($query_key); 655 } 656 foreach ($query_key as $k) { 657 if (isset($this->_carry_queries[$query_key])) { 658 // Remove the value of the specified query argument from the _carry_queries array. 659 unset($this->_carry_queries[$query_key]); 660 } 634 661 } 635 662 } -
trunk/lib/Auth_SQL.inc.php
r247 r259 142 142 " . $this->getParam('db_primary_key') . " smallint(11) NOT NULL auto_increment, 143 143 " . $this->getParam('db_username_column') . " varchar(255) NOT NULL default '', 144 userpass varchar(255) NOT NULL default'',145 first_name varchar(255) NOT NULL default'',146 last_name varchar(255) NOT NULL default'',147 email varchar(255) NOT NULL default'',148 login_abuse_exempt enum('true') defaultNULL,149 blocked enum('true') defaultNULL,150 blocked_reason varchar(255) NOT NULL default'',151 abuse_warning_level tinyint(4) NOT NULL default'0',152 seconds_online int(11) NOT NULL default'0',153 last_login_datetime datetime NOT NULL default'0000-00-00 00:00:00',154 last_access_datetime datetime NOT NULL default'0000-00-00 00:00:00',155 last_login_ip varchar(255) NOT NULL default'0.0.0.0',156 added_by_user_id smallint(11) defaultNULL,157 modified_by_user_id smallint(11) defaultNULL,158 added_datetime datetime NOT NULL default'0000-00-00 00:00:00',159 modified_datetime datetime NOT NULL default'0000-00-00 00:00:00',144 userpass VARCHAR(255) NOT NULL DEFAULT '', 145 first_name VARCHAR(255) NOT NULL DEFAULT '', 146 last_name VARCHAR(255) NOT NULL DEFAULT '', 147 email VARCHAR(255) NOT NULL DEFAULT '', 148 login_abuse_exempt ENUM('TRUE') DEFAULT NULL, 149 blocked ENUM('TRUE') DEFAULT NULL, 150 blocked_reason VARCHAR(255) NOT NULL DEFAULT '', 151 abuse_warning_level TINYINT(4) NOT NULL DEFAULT '0', 152 seconds_online INT(11) NOT NULL DEFAULT '0', 153 last_login_datetime DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', 154 last_access_datetime DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', 155 last_login_ip VARCHAR(255) NOT NULL DEFAULT '0.0.0.0', 156 added_by_user_id SMALLINT(11) DEFAULT NULL, 157 modified_by_user_id SMALLINT(11) DEFAULT NULL, 158 added_datetime DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', 159 modified_datetime DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', 160 160 PRIMARY KEY (" . $this->getParam('db_primary_key') . "), 161 161 KEY " . $this->getParam('db_username_column') . " (" . $this->getParam('db_username_column') . "), … … 195 195 } 196 196 $db->query("CREATE TABLE IF NOT EXISTS " . $this->getParam('db_login_table') . " ( 197 " . $this->getParam('db_primary_key') . " smallint(11) NOT NULL default'0',198 login_datetime datetime NOT NULL default'0000-00-00 00:00:00',199 remote_ip_binary char(32) NOT NULL default'',197 " . $this->getParam('db_primary_key') . " SMALLINT(11) NOT NULL DEFAULT '0', 198 login_datetime DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', 199 remote_ip_binary CHAR(32) NOT NULL DEFAULT '', 200 200 KEY " . $this->getParam('db_primary_key') . " (" . $this->getParam('db_primary_key') . "), 201 201 KEY login_datetime (login_datetime), … … 727 727 $str = ''; 728 728 for ($i=0; $i<mb_strlen($pattern); $i++) { 729 $x = mb_substr('bcdfghjklmnprstvwxzBCDFGHJKLMNPRSTVWXZaeiouyAEIOUY0123456789 ', (mt_rand() % 60), 1);729 $x = mb_substr('bcdfghjklmnprstvwxzBCDFGHJKLMNPRSTVWXZaeiouyAEIOUY0123456789!@#%&*-=+.?', (mt_rand() % 71), 1); 730 730 $c = mb_substr('bcdfghjklmnprstvwxz', (mt_rand() % 19), 1); 731 731 $C = mb_substr('bcdfghjklmnprstvwxzBCDFGHJKLMNPRSTVWXZ', (mt_rand() % 38), 1); … … 733 733 $V = mb_substr('aeiouyAEIOUY', (mt_rand() % 12), 1); 734 734 $d = mb_substr('0123456789', (mt_rand() % 10), 1); 735 $str .= $$pattern {$i};735 $str .= $$pattern[$i]; 736 736 } 737 737 return $str; -
trunk/lib/Upload.inc.php
r256 r259 199 199 200 200 // Check The php upload error messages. 201 if (UPLOAD_ERR_INI_SIZE === $files['error'][$i]) { 201 if (UPLOAD_ERR_INI_SIZE === $files['error'][$i]) { // Error code 1 202 202 $this->_raiseMsg(sprintf(_("The file %s failed uploading: it exceeds the maximum allowed upload file size of %s."), $file_name, ini_get('upload_max_filesize')), MSG_ERR, __FILE__, __LINE__); 203 203 $app->logMsg(sprintf('The file %s failed uploading with PHP error UPLOAD_ERR_INI_SIZE (currently %s).', $file_name, ini_get('upload_max_filesize')), LOG_ERR, __FILE__, __LINE__); … … 205 205 continue; 206 206 } 207 if (UPLOAD_ERR_FORM_SIZE === $files['error'][$i]) { 207 if (UPLOAD_ERR_FORM_SIZE === $files['error'][$i]) { // Error code 2 208 208 $this->_raiseMsg(sprintf(_("The file %s failed uploading: it exceeds the maximum allowed upload file size of %s."), $file_name, $_POST['MAX_FILE_SIZE']), MSG_ERR, __FILE__, __LINE__); 209 209 $app->logMsg(sprintf('The file %s failed uploading with PHP error UPLOAD_ERR_FORM_SIZE (currently %s).', $file_name, $_POST['MAX_FILE_SIZE']), LOG_ERR, __FILE__, __LINE__); … … 211 211 continue; 212 212 } 213 if (UPLOAD_ERR_PARTIAL === $files['error'][$i]) { 213 if (UPLOAD_ERR_PARTIAL === $files['error'][$i]) { // Error code 3 214 214 $this->_raiseMsg(sprintf(_("The file %s failed uploading: it was only partially uploaded."), $file_name), MSG_ERR, __FILE__, __LINE__); 215 215 $app->logMsg(sprintf('The file %s failed uploading with PHP error UPLOAD_ERR_PARTIAL.', $file_name), LOG_ERR, __FILE__, __LINE__); … … 217 217 continue; 218 218 } 219 if (UPLOAD_ERR_NO_FILE === $files['error'][$i]) { 219 if (UPLOAD_ERR_NO_FILE === $files['error'][$i]) { // Error code 4 220 220 $this->_raiseMsg(sprintf(_("The file %s failed uploading: no file was uploaded."), $file_name), MSG_ERR, __FILE__, __LINE__); 221 221 $app->logMsg(sprintf('The file %s failed uploading with PHP error UPLOAD_ERR_NO_FILE.', $file_name), LOG_ERR, __FILE__, __LINE__); … … 223 223 continue; 224 224 } 225 if (UPLOAD_ERR_NO_TMP_DIR === $files['error'][$i]) { 225 if (UPLOAD_ERR_NO_TMP_DIR === $files['error'][$i]) { // Error code 6 226 226 $this->_raiseMsg(sprintf(_("The file %s failed uploading: temporary upload directory missing."), $file_name), MSG_ERR, __FILE__, __LINE__); 227 227 $app->logMsg(sprintf('The file %s failed uploading with PHP error UPLOAD_ERR_NO_TMP_DIR.', $file_name), LOG_ERR, __FILE__, __LINE__);
Note: See TracChangeset
for help on using the changeset viewer.