|
From: Benjamin C. <bc...@us...> - 2002-05-18 02:59:36
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv28161
Modified Files:
attachment.php bug.php include.php index.php newaccount.php
query.php report.php user.php
Log Message:
Moving back to wrap.html from header/footer.html
Index: attachment.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/attachment.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- attachment.php 11 Apr 2002 15:49:58 -0000 1.18
+++ attachment.php 18 May 2002 02:59:32 -0000 1.19
@@ -153,7 +153,7 @@
? number_format(ini_get('upload_max_filesize'))
: number_format(ATTACHMENT_MAX_SIZE)
));
- $t->display('bugattachmentform.html');
+ $t->wrap('bugattachmentform.html', 'addattachment');
}
if (isset($_gv['del'])) {
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- bug.php 16 May 2002 11:01:02 -0000 1.105
+++ bug.php 18 May 2002 02:59:32 -0000 1.106
@@ -33,7 +33,7 @@
'from '.TBL_AUTH_USER.' u, '.TBL_BUG_VOTE." v ".
"where u.user_id = v.user_id and bug_id = $bug_id ".
'order by v.created_date'));
- $t->display('bugvotes.html');
+ $t->wrap('bugvotes.html', 'bugvotes');
}
///
@@ -113,7 +113,7 @@
}
$t->assign('history', $db->getAll(sprintf($QUERY['bug-history'], $bugid)));
- $t->display('bughistory.html');
+ $t->wrap('bughistory.html', 'bughistory');
}
///
@@ -278,10 +278,10 @@
if (($v == 'http://') || ($v == 'https://')) {
$v = '';
- } elseif (($v) && (strtolower(substr($v,0,7)) != 'http://') && (strtolower(substr($v,0,8)) != 'https://') && (strtolower(substr($v,0,6)) != 'ftp://')) {
- $v = 'http://'.$v;
- }
- $url = $v;
+ } elseif (($v) && (strtolower(substr($v,0,7)) != 'http://') && (strtolower(substr($v,0,8)) != 'https://') && (strtolower(substr($v,0,6)) != 'ftp://')) {
+ $v = 'http://'.$v;
+ }
+ $url = $v;
}
if (isset($buginfo[$k]) && stripslashes($buginfo[$k]) != stripslashes($v)) {
@@ -470,7 +470,7 @@
'projectname' => $projectname
));
}
- $t->display('bugform.html');
+ $t->wrap('bugform.html', 'enterbug');
}
function show_bug_printable($bugid) {
@@ -496,7 +496,7 @@
.' from '.TBL_COMMENT.' c, '.TBL_AUTH_USER
." where bug_id = $bugid and c.created_by = user_id order by c.created_date"));
- $t->display('bugdisplay-printable.html');
+ $t->wrap('bugdisplay-printable.html', 'viewbug');
}
///
@@ -587,7 +587,7 @@
." where bug_id = $bugid and c.created_by = user_id order by c.created_date")
));
- $t->display('bugdisplay.html');
+ $t->wrap('bugdisplay.html', 'viewbug');
}
function show_projects() {
@@ -616,7 +616,7 @@
break;
default :
$t->assign('projects', $projects);
- $t->display('projectlist.html');
+ $t->wrap('projectlist.html', 'enterbug');
}
}
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -r1.116 -r1.117
--- include.php 9 May 2002 02:53:14 -0000 1.116
+++ include.php 18 May 2002 02:59:32 -0000 1.117
@@ -107,12 +107,12 @@
return Smarty::fetch($_smarty_tpl_file, $_smarty_cache_id, $_smarty_compile_id, $_smarty_display);
}
- function wrap($template, $title = '', $dir = '') {
+ function wrap($template, $title = '') {
global $TITLE, $_gv, $_pv;
$this->assign(array(
'content_template' => $template,
- 'page_title' => isset($TITLE[$title]) ? $TITLE[$title] : ''
+ 'page_title' => isset($TITLE[$title]) ? $TITLE[$title] : $title
));
// Use a popup wrap?
@@ -122,8 +122,11 @@
} else {
$wrap = 'wrap.html';
}
-
- $this->display($dir . $wrap);
+ if (($dir = dirname($template)) != '.') {
+ $this->display("$dir/$wrap");
+ } else {
+ $this->display($wrap);
+ }
}
}
Index: index.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/index.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- index.php 5 May 2002 16:33:12 -0000 1.31
+++ index.php 18 May 2002 02:59:32 -0000 1.32
@@ -137,6 +137,6 @@
" and changed_field = 'status' and new_value = 'Closed'".
' and b.project_id = p.project_id order by h.created_date desc', 0, 5)));
-$t->display('index.html');
+$t->wrap('index.html', 'home');
?>
Index: newaccount.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/newaccount.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- newaccount.php 11 Apr 2002 07:32:25 -0000 1.30
+++ newaccount.php 18 May 2002 02:59:32 -0000 1.31
@@ -29,7 +29,7 @@
global $db, $t, $_pv, $STRING, $now, $u;
if (NEW_ACCOUNTS_DISABLED) {
- $t->display('newaccount-disabled.html');
+ $t->wrap('newaccount-disabled.html');
return;
}
@@ -73,16 +73,16 @@
mail($_pv['email'], $STRING['newacctsubject'], sprintf($STRING['newacctmessage'],
$password), sprintf("From: %s\nContent-Type: text/plain; charset=%s\nContent-Transfer-Encoding: 8bit\n",ADMIN_EMAIL, $STRING['lang_charset']));
- $t->display('newaccountsuccess.html');
+ $t->wrap('newaccountsuccess.html', 'accountcreated');
}
function show_form($error = '') {
global $t, $_pv;
if (NEW_ACCOUNTS_DISABLED) {
- $t->display('newaccount-disabled.html');
+ $t->wrap('newaccount-disabled.html');
} else {
- $t->display('newaccount.html');
+ $t->wrap('newaccount.html', 'newaccount');
}
}
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- query.php 8 May 2002 12:59:13 -0000 1.72
+++ query.php 18 May 2002 02:59:32 -0000 1.73
@@ -42,9 +42,9 @@
$t->assign('queries',
$db->getAll("select * from ".TBL_SAVED_QUERY." where user_id = '$u'"));
}
- $t->display('queryform.html');
+ $t->wrap('queryform.html', 'bugquery');
} else { // or show the simple one
- $t->display('queryform-simple.html');
+ $t->wrap('queryform-simple.html', 'bugquery');
}
}
@@ -275,7 +275,7 @@
$order, $sort), $llimit, $selrange)));
sorting_headers($me, $headers, $order, $sort, "page=$page");
- $t->display('buglist.html');
+ $t->wrap('buglist.html', 'buglist');
}
$reportedby = !empty($_gv['reportedby']) ? $_gv['reportedby'] : 0;
Index: report.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/report.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- report.php 3 Apr 2002 19:08:47 -0000 1.25
+++ report.php 18 May 2002 02:59:32 -0000 1.26
@@ -59,7 +59,7 @@
));
$db->setOption('optimize', 'portability');
- $t->display('report.html');
+ $t->wrap('report.html', 'reporting');
}
function new_bugs_by_date($date_range) {
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/user.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- user.php 24 Apr 2002 07:06:23 -0000 1.25
+++ user.php 18 May 2002 02:59:32 -0000 1.26
@@ -63,7 +63,8 @@
}
$db->query("update ".TBL_AUTH_USER." set password = '$mpassword' where user_id = $u");
- $t->display('passwordchanged.html');
+ $t->assign('changetext', $STRING['password_changed']);
+ $t->wrap('changessaved.html', 'changessaved');
}
// Save changes to a user's preferences
@@ -86,7 +87,8 @@
$db->query("update ".TBL_USER_PREF.' '.@join(', ', $updates).
" where user_id = $u");
}
- $t->display('preferenceschanged.html');
+ $t->assign('changetext', $STRING['prefs_changed']);
+ $t->wrap('changessaved.html', 'changessaved');
}
@@ -117,7 +119,7 @@
'preferences' => $preferences
));
- $t->display('user.html');
+ $t->wrap('user.html', 'preferences');
}
$perm->check_group('User');
|