Changeset 767
- Timestamp:
- Jun 7, 2022 6:41:24 AM (23 months ago)
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1dev/lib/FormValidator.inc.php
r584 r767 452 452 function validateStrDate($form_name, $msg='') 453 453 { 454 if ( ($timestamp = strtotime(getFormData($form_name))) === -1) {454 if (false === strtotime($val)) { 455 455 $this->addError($form_name, $msg); 456 456 logMsg(sprintf('The string date %s is not valid.', getFormData($form_name)), LOG_DEBUG, __FILE__, __LINE__); -
trunk/bin/module_maker/skel/admin.php
r718 r767 203 203 ********************************************************************/ 204 204 205 $nav->set(' body_id', '%NAME_PLURAL%');205 $nav->set('id', '%NAME_PLURAL%'); 206 206 207 207 include 'header.ihtml'; -
trunk/docs/coding_standards.txt
r334 r767 11 11 Essential reading: 12 12 http://pear.php.net/manual/en/standards.php 13 14 15 ===================================================================== 16 General guidelines 17 ===================================================================== 18 19 - Respect these coding styles. 20 - Don't add npm dependencies if you can avoid it. If a new dependency is unavoidable, be mindful of its size, freshness and added value. 21 - Use Svelte for all UI needs. 22 - Try to not shoehorn your code into existing functions or components. 23 - Simple is better. OOP is not inevitable. Simple functions often work as well, if not better. 24 - If you must use OOP, avoid inheritance as much as possible, no one likes digging several layers of abstraction. 25 - Comment the code. What, why, how, just make your intent clear. 13 26 14 27 … … 45 58 46 59 Use an indent of 4 spaces, with no tabs. Code and especially comments should 47 usually be wrapped <= 80 characters. Exceptions are made in the case where 60 usually be wrapped <= 80 characters. Exceptions are made in the case where 48 61 code readability is significantly improved with longer lines. 49 62 … … 224 237 { 225 238 $app =& App::getInstance(); 226 239 227 240 // If an array, check values recursively. 228 241 if (is_array($email)) { … … 284 297 All code should work with register_globals = Off. This means using 285 298 $_REQUEST, $_GET, $_POST, $_COOKIE, $_SESSION, $_SERVER, and $_ENV 286 to access all request, get, post, cookie, session, server, and 299 to access all request, get, post, cookie, session, server, and 287 300 environment data, respectively. 288 301 -
trunk/lib/App.inc.php
r763 r767 88 88 'site_version' => '', // Version of this application (set automatically during start() if site_version_file is used). 89 89 'site_version_file' => 'docs/version.txt', // File containing version number of this app, relative to the include path. 90 'template_ext' => 'ihtml', // Legacy template file send in .ihtml, newer sites use .inc.html or .inc.php. 90 91 91 92 // The location the user will go if the system doesn't know where else to send them. -
trunk/lib/Email.inc.php
r759 r767 37 37 'subject' => 'Your account has been activated', 38 38 )); 39 $email->setTemplate('email_registration_confirm. ihtml');39 $email->setTemplate('email_registration_confirm.eml'); 40 40 // $email->setString('Or you can pass your message body as a string, also with {VARIABLES}.'); 41 41 $email->replace(array( -
trunk/lib/Validator.inc.php
r737 r767 404 404 } 405 405 406 $timestamp = strtotime($val); 407 if (!$timestamp || $timestamp < 1) { 406 if (false === strtotime($val)) { 408 407 $app->logMsg(sprintf('%s (line %s) failed: %s', __METHOD__, __LINE__, getDump($val)), $type, $file, $line); 409 408 return false; -
trunk/services/admins.php
r762 r767 208 208 *****************************************************************************/ 209 209 210 $nav->set(' body_id', 'admins');211 212 include 'header. ihtml';210 $nav->set('id', 'admins'); 211 212 include 'header.' . $app->getParam('template_ext'); 213 213 $app->carryQuery($locally_carried_queries); 214 214 include 'codebase/services/templates/' . $main_template; 215 include 'footer. ihtml';215 include 'footer.' . $app->getParam('template_ext'); 216 216 217 217 /******************************************************************** -
trunk/services/lock.php
r762 r767 71 71 72 72 // Templates. 73 include 'header. ihtml';73 include 'header.' . $app->getParam('template_ext'); 74 74 // $lock->printErrorHTML(); 75 75 include 'lock.ihtml'; 76 include 'footer. ihtml';76 include 'footer.' . $app->getParam('template_ext'); 77 77 -
trunk/services/login.php
r762 r767 70 70 } 71 71 } else { 72 $app->raiseMsg(_("Log in failed, please try again."), MSG_NOTICE, __FILE__, __LINE__);73 $app->logMsg(sprintf('User %s failed log in (encrypted password: %s)', $frm['username'], $auth->encryptPassword($frm['password'])), LOG_NOTICE, __FILE__, __LINE__);72 $app->raiseMsg(_("Log in failed, please try again."), MSG_NOTICE, __FILE__, __LINE__); 73 $app->logMsg(sprintf('User %s failed log in (encrypted password: %s)', $frm['username'], $auth->encryptPassword($frm['password'])), LOG_NOTICE, __FILE__, __LINE__); 74 74 } 75 75 } 76 76 77 77 // Titles and navigation header. 78 $nav->add(_("Log in"));78 $nav->add(_("Log in")); 79 79 $nav->set('id', 'login'); 80 80 81 81 // Templates. 82 include 'header. ihtml';82 include 'header.' . $app->getParam('template_ext'); 83 83 include 'login_form.ihtml'; 84 include 'footer. ihtml';84 include 'footer.' . $app->getParam('template_ext'); 85 85 -
trunk/services/logs.php
r763 r767 148 148 $page->calculate(); 149 149 150 include 'header. ihtml';150 include 'header.' . $app->getParam('template_ext'); 151 151 if ('output' == $main_template) { 152 152 printLog($tmp_prefs->get('log_file')); … … 154 154 include $main_template; 155 155 } 156 include 'footer. ihtml';156 include 'footer.' . $app->getParam('template_ext'); 157 157 158 158 -
trunk/services/password.php
r763 r767 90 90 91 91 // Templates. 92 include 'header. ihtml';92 include 'header.' . $app->getParam('template_ext'); 93 93 include 'password.ihtml'; 94 include 'footer. ihtml';94 include 'footer.' . $app->getParam('template_ext'); 95 95 -
trunk/services/reset_password.php
r763 r767 90 90 $nav->set('id', 'reset_password'); 91 91 92 include 'header. ihtml';92 include 'header.' . $app->getParam('template_ext'); 93 93 include 'reset_password.ihtml'; 94 include 'footer. ihtml';94 include 'footer.' . $app->getParam('template_ext'); 95 95 -
trunk/services/versions.php
r762 r767 142 142 *****************************************************************************/ 143 143 144 include 'header. ihtml';144 include 'header.' . $app->getParam('template_ext'); 145 145 include 'codebase/services/templates/' . $main_template; 146 include 'footer. ihtml';146 include 'footer.' . $app->getParam('template_ext'); 147 147
Note: See TracChangeset
for help on using the changeset viewer.