- // Translate some data
- $urlData['registered'] = MAKE_DATETIME($urlData['registered'], "2");
- $urlData['views_total'] = TRANSLATE_COMMA($urlData['views_total']);
- $urlData['views_max'] = TRANSLATE_COMMA($urlData['views_max']);
- $urlData['views_allowed'] = TRANSLATE_COMMA($urlData['views_allowed']);
- $urlData['last_locked'] = MAKE_DATETIME($urlData['last_locked'], "2");
-
- // Is the lock reason empty?
- if (empty($urlData['lock_reason'])) {
- // Fix it to three dashes
- $urlData['lock_reason'] = "---";
- } // END - if
-
- // Default is not limited
- $urlData['limited_yes'] = "";
- $urlData['limited_no'] = " checked=\"checked\"";
- $urlData['limited'] = "false";
-
- // Is this URL limited?
- if ($urlData['views_max'] > 0) {
- // Then rewrite form data
- $urlData['limited_yes'] = " checked=\"checked\"";
- $urlData['limited_no'] = "";
- $urlData['limited'] = "true";
+ // Translate some data if present
+ $content = SURFBAR_PREPARE_CONTENT_FOR_TEMPLATE($content);
+
+ // Include fields only for action 'edit'
+ if ($action == 'edit') {
+ // Default is not limited
+ $urlData['limited_y'] = '';
+ $urlData['limited_n'] = ' checked="checked"';
+ $urlData['limited'] = 'false';
+
+ // Is this URL limited?
+ if (SURFBAR_GET_VIEWS_MAX() > 0) {
+ // Then rewrite form data
+ $urlData['limited_y'] = ' checked="checked"';
+ $urlData['limited_n'] = '';
+ $urlData['limited'] = 'true';
+ } // END - if