Changeset 992 in ExiteCMS


Ignore:
Timestamp:
10/23/07 12:18:49 (4 years ago)
Author:
hverton
Message:

Added a checkbox to force the update of the category datestamp

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/administration/download_cats.php

    r861 r992  
    8787        $cat_cat_sorting = "download_cat_id DESC"; 
    8888    } 
    89     $cat_datestamp = time(); 
     89    $update_datestamp = isNum($_POST['update_datestamp']) ? true : false; 
    9090    if (cat_not_recursive($cat_id, $cat_sub)) { 
    9191        if (isset($step) && $step == "edit") { 
    92             $result = dbquery("UPDATE ".$db_prefix."download_cats SET download_cat_name='$cat_name', download_cat_description='$cat_description', download_cat_sorting='$cat_sorting', download_cat_cat_sorting='$cat_cat_sorting', download_cat_access='$cat_access', download_cat_image='$cat_image', download_parent='$cat_sub', download_datestamp='$cat_datestamp' WHERE download_cat_id='$cat_id'"); 
     92            $result = dbquery("UPDATE ".$db_prefix."download_cats SET download_cat_name='$cat_name', download_cat_description='$cat_description', download_cat_sorting='$cat_sorting', download_cat_cat_sorting='$cat_cat_sorting', download_cat_access='$cat_access', download_cat_image='$cat_image', download_parent='$cat_sub' ".($update_datestamp ? (", download_datestamp='".time()."'") : "")." WHERE download_cat_id='$cat_id'"); 
    9393        } else { 
    9494            $result = dbquery("INSERT INTO ".$db_prefix."download_cats (download_cat_name, download_cat_description, download_cat_sorting, download_cat_cat_sorting, download_cat_access, download_cat_image, download_parent, download_datestamp) VALUES('$cat_name', '$cat_description', '$cat_sorting', '$cat_cat_sorting', '$cat_access', '$cat_image', '$cat_sub', '".time()."')"); 
  • trunk/includes/templates/admin.download_cats.tpl

    r861 r992  
    112112        </tr> 
    113113        <tr> 
     114            <td width='130' class='tbl'> 
     115            </td> 
     116            <td class='tbl'> 
     117                <input type='checkbox' name='update_datestamp' value='0' /> {$locale.429} 
     118            </td> 
     119        </tr> 
     120        <tr> 
    114121            <td align='center' colspan='2' class='tbl'> 
    115122                <input type='submit' name='save_cat' value='{$locale.432}' class='button' /> 
  • trunk/locale/English/admin/downloads.php

    r861 r992  
    1111$locale['421'] = "Add Download Category"; 
    1212// Add/Edit Download Category Form 
     13$locale['429'] = "Update category timestamp"; 
    1314$locale['430'] = "Category Name:"; 
    1415$locale['431'] = "Category Description:"; 
Note: See TracChangeset for help on using the changeset viewer.