Mercurial > hg > fapweb
changeset 900:b147f99934f6
Add screen width.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 27 Nov 2014 08:18:54 +0200 |
parents | 0cc1d87cdca1 |
children | dfa1277786c1 |
files | faptool.php |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/faptool.php Thu Nov 27 07:45:38 2014 +0200 +++ b/faptool.php Thu Nov 27 08:18:54 2014 +0200 @@ -311,6 +311,7 @@ stReloadSettings(); // Set some globals for our benefit +$setWidth = 75; $setEntryPath = stGetSetting("entryPath"); $setPreviewPath = stGetSetting("previewPath"); $setPreviewURL = stGetSetting("previewURL"); @@ -348,9 +349,8 @@ foreach (stExecSQL("SELECT * FROM compos WHERE cpath <> '' AND cpath IS NOT NULL") as $compo) if (stFetchSQLColumn("SELECT COUNT(*) FROM entries WHERE compo_id=".$compo["id"]) > 0) { - $width = 75; printf( - "==%'=-".($width-2)."s\n". + "==%'=-".($setWidth-2)."s\n". "PrevType : %s\n", sprintf("[ #%03d - %s ]", $compo["id"], substr($compo["name"], 0, 40)), $previewTypeList[$compo["preview_type"]][0]); @@ -358,12 +358,12 @@ printf(" %-3s | %-3s | %-40s |\n", "#ID", "FLG", "Entry name/author"); - echo str_repeat("-", $width)."\n"; + echo str_repeat("-", $setWidth)."\n"; foreach (stExecSQL("SELECT * FROM entries WHERE compo_id=".$compo["id"]) as $entry) wtHandleEntryPreview($compo, $entry, $mode); - echo str_repeat("=", $width)."\n\n"; + echo str_repeat("=", $setWidth)."\n\n"; } break;