Changeset 457 for trunk/services


Ignore:
Timestamp:
Jan 20, 2014 9:42:13 PM (10 years ago)
Author:
anonymous
Message:

Removed use of requireAccessClearance(). Adjusted sequence of sslOn() and requireLogin(). Added ACL::requireAllow() method. Added arguments to SortOrder::set(). Changed behavior of Validator::validateStrDate(). Added use of Validator::validateStrDate() to module maker templates.

Location:
trunk/services
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/services/admins.php

    r441 r457  
    2727// require_once dirname(__FILE__) . '/_config.inc.php';
    2828
     29$app->sslOn();
    2930$auth->requireLogin();
    30 $app->sslOn();
    3131
    3232require_once 'codebase/lib/PageNumbers.inc.php';
  • trunk/services/lock.php

    r396 r457  
    2828require_once 'codebase/lib/Lock.inc.php';
    2929
     30$app->sslOn();
    3031$auth->requireLogin();
    31 $app->sslOn();
    3232
    3333if (getFormData('boomerang', false)) {
  • trunk/services/logs.php

    r396 r457  
    44 * For details visit the project site: <http://trac.strangecode.com/codebase/>
    55 * Copyright 2001-2012 Strangecode, LLC
    6  * 
     6 *
    77 * This file is part of The Strangecode Codebase.
    88 *
     
    1111 * Free Software Foundation, either version 3 of the License, or (at your option)
    1212 * any later version.
    13  * 
     13 *
    1414 * The Strangecode Codebase is distributed in the hope that it will be useful, but
    1515 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1616 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
    1717 * details.
    18  * 
     18 *
    1919 * You should have received a copy of the GNU General Public License along with
    2020 * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>.
     
    2727// require_once dirname(__FILE__) . '/_config.inc.php';
    2828
     29$app->sslOn();
    2930$auth->requireLogin();
    30 // $auth->requireAccessClearance(ZONE_ADMIN_APPLOG);
    31 $app->sslOn();
    3231
    3332require_once 'codebase/lib/PageNumbers.inc.php';
     
    6463));
    6564if (getFormData('log', false)) {
    66     $tmp_prefs->set('log_file', getFormData('log'));   
     65    $tmp_prefs->set('log_file', getFormData('log'));
    6766}
    6867
     
    8079switch (getFormData('op')) {
    8180case 'delete' :
    82 //     $auth->requireAccessClearance(ZONE_ADMIN_APPLOG_FUNC_RESET);
    8381    deleteLog($tmp_prefs->get('log_file'));
    8482    $tmp_prefs->set('log_file', $app->getParam('log_filename'));
     
    9290
    9391case 'clear' :
    94 //     $auth->requireAccessClearance(ZONE_ADMIN_APPLOG_FUNC_RESET);
    9592    clearLog($tmp_prefs->get('log_file'));
    9693    if ($app->validBoomerangURL('app_log')) {
     
    103100
    104101case 'archive' :
    105 //     $auth->requireAccessClearance(ZONE_ADMIN_APPLOG_FUNC_RESET);
    106102    if (archiveLog($tmp_prefs->get('log_file'))) {
    107103        // Now flush current log.
  • trunk/services/templates/admin_list.ihtml

    r432 r457  
    22<?php $fv->printErrorMessages(); ?>
    33
    4 <div id="commandbox">
     4<div class="commandbox">
    55    <span class="sc-nowrap commanditem"><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?op=add'); ?>"><?php echo _("Add Administrator"); ?></a></span>
    66    <form action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" method="get" class="sc-form">
     
    3838        <td class="sc-nowrap"><?php echo oTxt($list[$i]['first_name'], true); ?> <?php echo oTxt($list[$i]['last_name'], true); ?> &nbsp;</td>
    3939        <td class="sc-nowrap"><?php echo round($list[$i]['seconds_online'] / 60); ?> &nbsp;</td>
    40         <td class="sc-nowrap"><?php 
     40        <td class="sc-nowrap"><?php
    4141            if ($auth->isLoggedIn($list[$i]['admin_id'])) {
    4242                ?><strong><?php echo date($app->getParam('date_format'), strtotime($list[$i]['last_login_datetime'])) ?></strong><?php
    4343            } else {
    44                 echo '0000-00-00 00:00:00' == $list[$i]['last_login_datetime'] ? '' : date($app->getParam('date_format'), strtotime($list[$i]['last_login_datetime']));
     44                echo Validator::validateStrDate($list[$i]['last_login_datetime']) ? date($app->getParam('date_format'), strtotime($list[$i]['last_login_datetime'])) : '';
    4545            }
    4646        ?> &nbsp;</td>
    4747        <td class="sc-nowrap"><?php echo gethostbyaddr($list[$i]['last_login_ip']); ?> &nbsp;</td>
    48         <td class="sc-nowrap"><?php echo '0000-00-00 00:00:00' == $list[$i]['added_datetime'] ? '' : date($app->getParam('date_format'), strtotime($list[$i]['added_datetime'])); ?> &nbsp;</td>
     48        <td class="sc-nowrap"><?php echo Validator::validateStrDate($list[$i]['added_datetime']) ? date($app->getParam('date_format'), strtotime($list[$i]['added_datetime'])) : ''; ?> &nbsp;</td>
    4949        <td class="sc-nowrap"><?php echo oTxt($list[$i]['added_admin_username'], true); ?> &nbsp;</td>
    50         <td class="sc-nowrap"><?php echo '0000-00-00 00:00:00' == $list[$i]['modified_datetime'] ? '' : date($app->getParam('date_format'), strtotime($list[$i]['modified_datetime'])); ?> &nbsp;</td>
     50        <td class="sc-nowrap"><?php echo Validator::validateStrDate($list[$i]['modified_datetime']) ? date($app->getParam('date_format'), strtotime($list[$i]['modified_datetime'])) : ''; ?> &nbsp;</td>
    5151        <td class="sc-nowrap"><?php echo oTxt($list[$i]['modified_admin_username'], true); ?> &nbsp;</td>
    5252        <td class="sc-padleft sc-nowrap" align="right"><a title="<?php printf(_("Delete %s"), oTxt($list[$i]['username'])) ?>" href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . "?op=del&admin_id=" . $list[$i]['admin_id']); ?>" onclick="javascript:return confirm('<?php printf(_("Are you sure you want to delete the record %s? This action is permanent and cannot be undone."), oTxt($list[$i]['username'])) ?>')"><img src="/admin/i/trash.gif" alt="Delete" width="10" height="10" border="0" /></a> &nbsp;</td>
  • trunk/services/templates/log_list.ihtml

    r320 r457  
    11<form action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" method="get" class="sc-form">
    22<?php $app->printHiddenSession(false); ?>
    3 <div id="commandbox">
     3<div class="commandbox">
    44<?php if (is_array($logs) && !empty($logs)) { ?>
    55    <table>
  • trunk/services/templates/versions_diff.ihtml

    r270 r457  
    1 <div id="commandbox">
     1<div class="commandbox">
    22<?php if (!getFormData('current', false)) { ?>
    33    <span class="sc-nowrap commanditem"><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?op=restore', array('version_id', 'version_title')); ?>"><?php echo _("Restore this saved version"); ?></a></span>
  • trunk/services/templates/versions_view.ihtml

    r365 r457  
    1 <div id="commandbox">
     1<div class="commandbox">
    22<span class="sc-nowrap commanditem"><a href="<?php echo $app->ohref(oTxt($_SERVER['PHP_SELF'])); ?>"><?php echo _("Back to the Versions List"); ?></a></span>
    33<?php if (!getFormData('current', false)) { ?>
  • trunk/services/versions.php

    r396 r457  
    44 * For details visit the project site: <http://trac.strangecode.com/codebase/>
    55 * Copyright 2001-2012 Strangecode, LLC
    6  * 
     6 *
    77 * This file is part of The Strangecode Codebase.
    88 *
     
    1111 * Free Software Foundation, either version 3 of the License, or (at your option)
    1212 * any later version.
    13  * 
     13 *
    1414 * The Strangecode Codebase is distributed in the hope that it will be useful, but
    1515 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1616 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
    1717 * details.
    18  * 
     18 *
    1919 * You should have received a copy of the GNU General Public License along with
    2020 * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>.
     
    2727// require_once dirname(__FILE__) . '/_config.inc.php';
    2828
     29$app->sslOn();
    2930$auth->requireLogin();
    30 $app->sslOn();
    3131
    3232require_once 'codebase/lib/Version.inc.php';
     
    3838
    3939// Since we're using the singleton pattern we can instantiate a Version object earlier with custom parameters.
    40 $version =& Version::getInstance($auth);   
     40$version =& Version::getInstance($auth);
    4141
    4242// Query arguments to retain their values between page requests.
Note: See TracChangeset for help on using the changeset viewer.