Revision: 5905
Author:
ph...@designhive.com
Date: Sat Sep 27 12:27:13 2014 UTC
Log: Consistency
https://code.google.com/p/textpattern/source/detail?r=5905
Modified:
/development/4.x/textpattern/include/import/import_wp.php
/development/4.x/textpattern/include/txp_admin.php
/development/4.x/textpattern/include/txp_category.php
/development/4.x/textpattern/include/txp_css.php
/development/4.x/textpattern/include/txp_discuss.php
/development/4.x/textpattern/include/txp_file.php
/development/4.x/textpattern/include/txp_form.php
/development/4.x/textpattern/include/txp_image.php
/development/4.x/textpattern/include/txp_import.php
/development/4.x/textpattern/include/txp_link.php
/development/4.x/textpattern/include/txp_list.php
/development/4.x/textpattern/include/txp_log.php
/development/4.x/textpattern/include/txp_page.php
/development/4.x/textpattern/include/txp_plugin.php
/development/4.x/textpattern/include/txp_prefs.php
/development/4.x/textpattern/include/txp_section.php
/development/4.x/textpattern/include/txp_tag.php
/development/4.x/textpattern/index.php
/development/4.x/textpattern/lib/txplib_misc.php
/development/4.x/textpattern/lib/txplib_publish.php
/development/4.x/textpattern/lib/txplib_wrapper.php
/development/4.x/textpattern/publish/atom.php
/development/4.x/textpattern/publish/rss.php
/development/4.x/textpattern/publish/taghandlers.php
/development/4.x/textpattern/publish.php
/development/4.x/textpattern/setup/index.php
=======================================
--- /development/4.x/textpattern/include/import/import_wp.php Wed Apr 16
12:20:52 2014 UTC
+++ /development/4.x/textpattern/include/import/import_wp.php Sat Sep 27
12:27:13 2014 UTC
@@ -98,28 +98,28 @@
// Convert the built-in WordPress roles to their Textpattern
equivalent.
switch ($key) {
// Publisher.
- case 'administrator' :
+ case 'administrator':
$user['privs'] = 1;
break;
// Managing editor.
- case 'editor' :
+ case 'editor':
$user['privs'] = 2;
break;
// Staff writer.
- case 'author' :
+ case 'author':
$user['privs'] = 4;
break;
// Freelancer.
- case 'contributor' :
+ case 'contributor':
$user['privs'] = 5;
break;
// None.
- case 'subscriber' :
- default :
+ case 'subscriber':
+ default:
$user['privs'] = 0;
break;
}
@@ -162,11 +162,11 @@
}
switch ($category['type']) {
- case 'post_tag' :
- case 'category' :
+ case 'post_tag':
+ case 'category':
$category['type'] = 'article';
break;
- case 'link_category' :
+ case 'link_category':
$category['type'] = 'link';
break;
}
@@ -199,25 +199,25 @@
while ($article = mysql_fetch_array($article_query)) {
// Convert WordPress article status to Textpattern equivalent.
switch ($article['Status']) {
- case 'draft' :
+ case 'draft':
$article['Status'] = 1;
break;
// Hidden.
- case 'private' :
+ case 'private':
$article['Status'] = 2;
break;
- case 'pending' :
+ case 'pending':
$article['Status'] = 3;
break;
// Live.
- case 'publish' :
+ case 'publish':
$article['Status'] = 4;
break;
- default :
+ default:
$article['Status'] = $insert_with_status;
break;
}
@@ -225,13 +225,13 @@
// Convert WordPress comment status to Textpattern equivalent.
switch ($article['Annotate']) {
// On.
- case 'open' :
+ case 'open':
$article['Annotate'] = 1;
break;
// Off.
- case 'closed' :
- case 'registered_only' :
+ case 'closed':
+ case 'registered_only':
$article['Annotate'] = 0;
break;
}
=======================================
--- /development/4.x/textpattern/include/txp_admin.php Fri May 2 19:07:58
2014 UTC
+++ /development/4.x/textpattern/include/txp_admin.php Sat Sep 27 12:27:13
2014 UTC
@@ -656,7 +656,7 @@
}
switch ($method) {
- case 'delete' :
+ case 'delete':
$assign_assets = ps('assign_assets');
@@ -672,7 +672,7 @@
break;
- case 'changeprivilege' :
+ case 'changeprivilege':
if (change_user_group($names, ps('privs'))) {
$changed = $names;
@@ -681,7 +681,7 @@
break;
- case 'resetpassword' :
+ case 'resetpassword':
foreach ($names as $name) {
$passwd = generate_password(PASSWORD_LENGTH);
=======================================
--- /development/4.x/textpattern/include/txp_category.php Wed Apr 16
12:20:52 2014 UTC
+++ /development/4.x/textpattern/include/txp_category.php Sat Sep 27
12:27:13 2014 UTC
@@ -417,13 +417,13 @@
}
} else {
switch ($event) {
- case 'link' :
+ case 'link':
$rs2 = safe_rows_start('category, count(*) as
num', 'txp_link', "1 group by category");
break;
- case 'image' :
+ case 'image':
$rs2 = safe_rows_start('category, count(*) as
num', 'txp_image', "1 group by category");
break;
- case 'file' :
+ case 'file':
$rs2 = safe_rows_start('category, count(*) as
num', 'txp_file', "1 group by category");
break;
}
@@ -443,16 +443,16 @@
// Format count.
switch ($event) {
- case 'article' :
+ case 'article':
$url
= 'index.php?event=list'.a.'search_method=categories'.a.'crit='.$name;
break;
- case 'link' :
+ case 'link':
$url
= 'index.php?event=link'.a.'search_method=category'.a.'crit='.$name;
break;
- case 'image' :
+ case 'image':
$url
= 'index.php?event=image'.a.'search_method=category'.a.'crit='.$name;
break;
- case 'file' :
+ case 'file':
$url
= 'index.php?event=file'.a.'search_method=category'.a.'crit='.$name;
break;
}
=======================================
--- /development/4.x/textpattern/include/txp_css.php Wed Apr 16 12:20:52
2014 UTC
+++ /development/4.x/textpattern/include/txp_css.php Sat Sep 27 12:27:13
2014 UTC
@@ -43,19 +43,19 @@
));
switch (strtolower($step)) {
- case '' :
+ case '':
css_edit();
break;
- case 'pour' :
+ case 'pour':
css_edit();
break;
- case 'css_save' :
+ case 'css_save':
css_save();
break;
- case 'css_delete' :
+ case 'css_delete':
css_delete();
break;
- case 'css_edit' :
+ case 'css_edit':
css_edit();
break;
}
=======================================
--- /development/4.x/textpattern/include/txp_discuss.php Fri May 2
19:07:58 2014 UTC
+++ /development/4.x/textpattern/include/txp_discuss.php Sat Sep 27
12:27:13 2014 UTC
@@ -131,31 +131,31 @@
$dir = ($dir == 'asc') ? 'asc' : 'desc';
switch ($sort) {
- case 'id' :
+ case 'id':
$sort_sql = 'txp_discuss.discussid '.$dir;
break;
- case 'ip' :
+ case 'ip':
$sort_sql = 'txp_discuss.ip '.$dir;
break;
- case 'name' :
+ case 'name':
$sort_sql = '
txp_discuss.name '.$dir;
break;
- case 'email' :
+ case 'email':
$sort_sql = 'txp_discuss.email '.$dir;
break;
- case 'website' :
+ case 'website':
$sort_sql = 'txp_discuss.web '.$dir;
break;
- case 'message' :
+ case 'message':
$sort_sql = 'txp_discuss.message '.$dir;
break;
- case 'status' :
+ case 'status':
$sort_sql = 'txp_discuss.visible '.$dir;
break;
- case 'parent' :
+ case 'parent':
$sort_sql = 'txp_discuss.parentid '.$dir;
break;
- default :
+ default:
$sort = 'date';
$sort_sql = 'txp_discuss.posted '.$dir;
break;
@@ -355,19 +355,19 @@
$dmessage = ($visible == SPAM) ? short_preview($message) :
$message;
switch ($visible) {
- case VISIBLE :
+ case VISIBLE:
$comment_status = gTxt('visible');
$row_class = 'visible';
break;
- case SPAM :
+ case SPAM:
$comment_status = gTxt('spam');
$row_class = 'spam';
break;
- case MODERATE :
+ case MODERATE:
$comment_status = gTxt('unmoderated');
$row_class = 'moderate';
break;
- default :
+ default:
break;
}
=======================================
--- /development/4.x/textpattern/include/txp_file.php Mon Jun 23 19:21:47
2014 UTC
+++ /development/4.x/textpattern/include/txp_file.php Sat Sep 27 12:27:13
2014 UTC
@@ -124,25 +124,25 @@
}
switch ($sort) {
- case 'id' :
+ case 'id':
$sort_sql = '
txp_file.id '.$dir;
break;
- case 'description' :
+ case 'description':
$sort_sql = 'txp_file.description '.$dir.', txp_file.filename
desc';
break;
- case 'category' :
+ case 'category':
$sort_sql = 'txp_category.title '.$dir.', txp_file.filename
desc';
break;
- case 'title' :
+ case 'title':
$sort_sql = 'txp_file.title '.$dir.', txp_file.filename desc';
break;
- case 'downloads' :
+ case 'downloads':
$sort_sql = 'txp_file.downloads '.$dir.', txp_file.filename
desc';
break;
- case 'author' :
+ case 'author':
$sort_sql = 'txp_users.RealName '.$dir.',
txp_file.id asc';
break;
- default :
+ default:
$sort = 'filename';
$sort_sql = 'txp_file.filename '.$dir;
break;
@@ -512,26 +512,26 @@
$key = '';
switch ($method) {
- case 'delete' :
+ case 'delete':
return file_delete($selected);
break;
- case 'changecategory' :
+ case 'changecategory':
$val = ps('category');
if (in_array($val, $categories)) {
$key = 'category';
}
break;
- case 'changeauthor' :
+ case 'changeauthor':
$val = ps('author');
if (in_array($val, $all_file_authors)) {
$key = 'author';
}
break;
- case 'changecount' :
+ case 'changecount':
$key = 'downloads';
$val = 0;
break;
- case 'changestatus' :
+ case 'changestatus':
$key = 'status';
$val = ps('status');
@@ -540,7 +540,7 @@
$selected = array();
}
break;
- default :
+ default:
$key = '';
$val = '';
break;
=======================================
--- /development/4.x/textpattern/include/txp_form.php Wed Apr 16 12:20:52
2014 UTC
+++ /development/4.x/textpattern/include/txp_form.php Sat Sep 27 12:27:13
2014 UTC
@@ -75,22 +75,22 @@
));
switch (strtolower($step)) {
- case "" :
+ case "":
form_edit();
break;
- case "form_edit" :
+ case "form_edit":
form_edit();
break;
- case "form_create" :
+ case "form_create":
form_create();
break;
- case "form_delete" :
+ case "form_delete":
form_delete();
break;
- case "form_multi_edit" :
+ case "form_multi_edit":
form_multi_edit();
break;
- case "form_save" :
+ case "form_save":
form_save();
break;
}
=======================================
--- /development/4.x/textpattern/include/txp_image.php Sun May 4 07:59:03
2014 UTC
+++ /development/4.x/textpattern/include/txp_image.php Sat Sep 27 12:27:13
2014 UTC
@@ -92,22 +92,22 @@
}
switch ($sort) {
- case 'name' :
+ case 'name':
$sort_sql = 'name '.$dir;
break;
- case 'thumbnail' :
+ case 'thumbnail':
$sort_sql = 'thumbnail '.$dir.', id asc';
break;
- case 'category' :
+ case 'category':
$sort_sql = 'category '.$dir.', id asc';
break;
- case 'date' :
+ case 'date':
$sort_sql = 'date '.$dir.', id asc';
break;
- case 'author' :
+ case 'author':
$sort_sql = 'author '.$dir.', id asc';
break;
- default :
+ default:
$sort = 'id';
$sort_sql = 'id '.$dir;
break;
@@ -412,22 +412,22 @@
$key = '';
switch ($method) {
- case 'delete' :
+ case 'delete':
return image_delete($selected);
break;
- case 'changecategory' :
+ case 'changecategory':
$val = ps('category');
if (in_array($val, $categories)) {
$key = 'category';
}
break;
- case 'changeauthor' :
+ case 'changeauthor':
$val = ps('author');
if (in_array($val, $all_image_authors)) {
$key = 'author';
}
break;
- default :
+ default:
$key = '';
$val = '';
break;
=======================================
--- /development/4.x/textpattern/include/txp_import.php Wed Apr 16 12:20:52
2014 UTC
+++ /development/4.x/textpattern/include/txp_import.php Sat Sep 27 12:27:13
2014 UTC
@@ -174,7 +174,7 @@
@ini_set('max_execution_time', 300 + intval($ini_time));
switch ($import_tool) {
- case 'mtdb' :
+ case 'mtdb':
$out = doImportMTDB(
$importdblogin,
$importdb,
@@ -187,7 +187,7 @@
);
rebuild_tree('root', 1, 'article');
break;
- case 'mt' :
+ case 'mt':
$file = check_import_file();
if (!empty($file)) {
$out = doImportMT(
@@ -202,7 +202,7 @@
$out = 'Import file not found';
}
break;
- case 'b2' :
+ case 'b2':
$out = doImportB2(
$importdblogin,
$importdb,
@@ -213,7 +213,7 @@
$default_comment_invite
);
break;
- case 'wp' :
+ case 'wp':
$out = doImportWP(
$importdblogin,
$importdb,
@@ -227,7 +227,7 @@
);
rebuild_tree('root', 1, 'article');
break;
- case 'blogger' :
+ case 'blogger':
$file = check_import_file();
if (!empty($file)) {
$out = doImportBLOGGER(
=======================================
--- /development/4.x/textpattern/include/txp_link.php Sun May 4 07:59:03
2014 UTC
+++ /development/4.x/textpattern/include/txp_link.php Sat Sep 27 12:27:13
2014 UTC
@@ -71,25 +71,25 @@
$dir = ($dir == 'desc') ? 'desc' : 'asc';
switch ($sort) {
- case 'id' :
+ case 'id':
$sort_sql = 'id '.$dir;
break;
- case 'description' :
+ case 'description':
$sort_sql = 'description '.$dir.', id asc';
break;
- case 'url' :
+ case 'url':
$sort_sql = 'url '.$dir.', id asc';
break;
- case 'category' :
+ case 'category':
$sort_sql = 'category '.$dir.', id asc';
break;
- case 'date' :
+ case 'date':
$sort_sql = 'date '.$dir.', id asc';
break;
- case 'author' :
+ case 'author':
$sort_sql = 'author '.$dir.', id asc';
break;
- default :
+ default:
$sort = 'name';
$sort_sql = 'linksort '.$dir.', id asc';
break;
@@ -523,7 +523,7 @@
$key = '';
switch ($method) {
- case 'delete' :
+ case 'delete':
if (!has_privs('link.delete')) {
if (has_privs('link.delete.own')) {
$selected = safe_column('id', 'txp_link', 'id IN
('.join(',', $selected).') AND author=\''.doSlash($txp_user).'\'' );
@@ -543,19 +543,19 @@
$key = '';
break;
- case 'changecategory' :
+ case 'changecategory':
$val = ps('category');
if (in_array($val, $categories)) {
$key = 'category';
}
break;
- case 'changeauthor' :
+ case 'changeauthor':
$val = ps('author');
if (in_array($val, $all_link_authors)) {
$key = 'author';
}
break;
- default :
+ default:
$key = '';
$val = '';
break;
=======================================
--- /development/4.x/textpattern/include/txp_list.php Tue Jun 24 09:22:58
2014 UTC
+++ /development/4.x/textpattern/include/txp_list.php Sat Sep 27 12:27:13
2014 UTC
@@ -96,37 +96,37 @@
$sesutats = array_flip($statuses);
switch ($sort) {
- case 'id' :
+ case 'id':
$sort_sql = 'textpattern.ID '.$dir;
break;
- case 'title' :
+ case 'title':
$sort_sql = 'textpattern.Title '.$dir.', textpattern.Posted
desc';
break;
- case 'expires' :
+ case 'expires':
$sort_sql = 'textpattern.Expires '.$dir;
break;
- case 'section' :
+ case 'section':
$sort_sql = 'section.title '.$dir.', textpattern.Posted desc';
break;
- case 'category1' :
+ case 'category1':
$sort_sql = 'category1.title '.$dir.', textpattern.Posted
desc';
break;
- case 'category2' :
+ case 'category2':
$sort_sql = 'category2.title '.$dir.', textpattern.Posted
desc';
break;
- case 'status' :
+ case 'status':
$sort_sql = 'textpattern.Status '.$dir.', textpattern.Posted
desc';
break;
- case 'author' :
+ case 'author':
$sort_sql = 'user.RealName '.$dir.', textpattern.Posted desc';
break;
- case 'comments' :
+ case 'comments':
$sort_sql = 'textpattern.comments_count '.$dir.',
textpattern.Posted desc';
break;
- case 'lastmod' :
+ case 'lastmod':
$sort_sql = 'textpattern.LastMod '.$dir.', textpattern.Posted
desc';
break;
- default :
+ default:
$sort = 'posted';
$sort_sql = 'textpattern.Posted '.$dir;
break;
@@ -566,7 +566,7 @@
switch ($edit_method) {
// Delete.
- case 'delete' :
+ case 'delete':
if (!has_privs('article.delete')) {
if (has_privs('article.delete.own')) {
$allowed = safe_column_num(
@@ -591,7 +591,7 @@
return list_list();
break;
// Change author.
- case 'changeauthor' :
+ case 'changeauthor':
$value = ps('AuthorID');
if (has_privs('article.edit') && in_array($value,
$all_authors, true)) {
$field = 'AuthorID';
@@ -599,33 +599,33 @@
break;
// Change category1.
- case 'changecategory1' :
+ case 'changecategory1':
$value = ps('Category1');
if (in_array($value, $categories, true)) {
$field = 'Category1';
}
break;
// Change category2.
- case 'changecategory2' :
+ case 'changecategory2':
$value = ps('Category2');
if (in_array($value, $categories, true)) {
$field = 'Category2';
}
break;
// Change comment status.
- case 'changecomments' :
+ case 'changecomments':
$field = 'Annotate';
$value = (int) ps('Annotate');
break;
// Change section.
- case 'changesection' :
+ case 'changesection':
$value = ps('Section');
if (in_array($value, $all_sections, true)) {
$field = 'Section';
}
break;
// Change status.
- case 'changestatus' :
+ case 'changestatus':
$value = (int) ps('Status');
if (array_key_exists($value, $statuses)) {
$field = 'Status';
=======================================
--- /development/4.x/textpattern/include/txp_log.php Fri May 2 19:07:58
2014 UTC
+++ /development/4.x/textpattern/include/txp_log.php Sat Sep 27 12:27:13
2014 UTC
@@ -87,25 +87,25 @@
safe_delete('txp_log', "time < date_sub(now(), interval
$expire_logs_after day)");
switch ($sort) {
- case 'ip' :
+ case 'ip':
$sort_sql = 'ip '.$dir;
break;
- case 'host' :
+ case 'host':
$sort_sql = 'host '.$dir;
break;
- case 'page' :
+ case 'page':
$sort_sql = 'page '.$dir;
break;
- case 'refer' :
+ case 'refer':
$sort_sql = 'refer '.$dir;
break;
- case 'method' :
+ case 'method':
$sort_sql = 'method '.$dir;
break;
- case 'status' :
+ case 'status':
$sort_sql = 'status '.$dir;
break;
- default :
+ default:
$sort = 'time';
$sort_sql = 'time '.$dir;
break;
=======================================
--- /development/4.x/textpattern/include/txp_page.php Wed Apr 16 12:20:52
2014 UTC
+++ /development/4.x/textpattern/include/txp_page.php Sat Sep 27 12:27:13
2014 UTC
@@ -42,19 +42,19 @@
));
switch (strtolower($step)) {
- case "" :
+ case "":
page_edit();
break;
- case "page_edit" :
+ case "page_edit":
page_edit();
break;
- case "page_save" :
+ case "page_save":
page_save();
break;
- case "page_delete" :
+ case "page_delete":
page_delete();
break;
- case "page_new" :
+ case "page_new":
page_new();
break;
}
=======================================
--- /development/4.x/textpattern/include/txp_plugin.php Thu Sep 11 20:55:23
2014 UTC
+++ /development/4.x/textpattern/include/txp_plugin.php Sat Sep 27 12:27:13
2014 UTC
@@ -626,7 +626,7 @@
$where = "name IN ('".join("','", doSlash($selected))."')";
switch ($method) {
- case 'delete' :
+ case 'delete':
foreach ($selected as $name) {
if (safe_field('flags', 'txp_plugin', "name
='".doSlash($name)."'") & PLUGIN_LIFECYCLE_NOTIFY) {
load_plugin($name, true);
@@ -639,7 +639,7 @@
// Remove plugin's l10n strings.
safe_delete('txp_lang', "owner IN ('".join("','",
doSlash($selected))."')");
break;
- case 'changestatus' :
+ case 'changestatus':
foreach ($selected as $name) {
if (safe_field('flags', 'txp_plugin', "name
='".doSlash($name)."'") & PLUGIN_LIFECYCLE_NOTIFY) {
$status = safe_field('status', 'txp_plugin', "name
='".doSlash($name)."'");
@@ -650,7 +650,7 @@
}
safe_update('txp_plugin', 'status = (1-status)', $where);
break;
- case 'changeorder' :
+ case 'changeorder':
$order = min(max(intval(ps('order')), 1), 9);
safe_update('txp_plugin', 'load_order = '.$order, $where);
break;
=======================================
--- /development/4.x/textpattern/include/txp_prefs.php Wed Apr 16 12:20:52
2014 UTC
+++ /development/4.x/textpattern/include/txp_prefs.php Sat Sep 27 12:27:13
2014 UTC
@@ -41,11 +41,11 @@
));
switch (strtolower($step)) {
- case "" :
- case "prefs_list" :
+ case "":
+ case "prefs_list":
prefs_list();
break;
- case "prefs_save" :
+ case "prefs_save":
prefs_save();
break;
}
@@ -287,13 +287,13 @@
{
$class = '';
switch ($size) {
- case INPUT_MEDIUM :
+ case INPUT_MEDIUM:
$class = 'input-medium';
break;
- case INPUT_SMALL :
+ case INPUT_SMALL:
$class = 'input-small';
break;
- case INPUT_XSMALL :
+ case INPUT_XSMALL:
$class = 'input-xsmall';
break;
}
@@ -687,11 +687,11 @@
$modifier = strtolower( substr($val, -1) );
switch ($modifier) {
// The 'G' modifier is available since PHP 5.1.0
- case 'g' :
+ case 'g':
$val *= 1024;
- case 'm' :
+ case 'm':
$val *= 1024;
- case 'k' :
+ case 'k':
$val *= 1024;
}
if ($val > 1) {
=======================================
--- /development/4.x/textpattern/include/txp_section.php Mon Jun 23
19:36:50 2014 UTC
+++ /development/4.x/textpattern/include/txp_section.php Sat Sep 27
12:27:13 2014 UTC
@@ -89,25 +89,25 @@
$dir = ($dir == 'asc') ? 'asc' : 'desc';
switch ($sort) {
- case 'title' :
+ case 'title':
$sort_sql = 'title '.$dir;
break;
- case 'page' :
+ case 'page':
$sort_sql = 'page '.$dir;
break;
- case 'css' :
+ case 'css':
$sort_sql = 'css '.$dir;
break;
- case 'in_rss' :
+ case 'in_rss':
$sort_sql = 'in_rss '.$dir;
break;
- case 'on_frontpage' :
+ case 'on_frontpage':
$sort_sql = 'on_frontpage '.$dir;
break;
- case 'searchable' :
+ case 'searchable':
$sort_sql = 'searchable '.$dir;
break;
- case 'article_count' :
+ case 'article_count':
$sort_sql = 'article_count '.$dir;
break;
default:
@@ -791,30 +791,30 @@
$key = $val = '';
switch ($edit_method) {
- case 'delete' :
+ case 'delete':
return section_delete();
break;
- case 'changepage' :
+ case 'changepage':
$val = ps('uses_page');
if (in_array($val, $all_pages, true)) {
$key = 'page';
}
break;
- case 'changecss' :
+ case 'changecss':
$val = ps('css');
if (in_array($val, $all_styles, true)) {
$key = 'css';
}
break;
- case 'changeonfrontpage' :
+ case 'changeonfrontpage':
$key = 'on_frontpage';
$val = (int) ps('on_frontpage');
break;
- case 'changesyndicate' :
+ case 'changesyndicate':
$key = 'in_rss';
$val = (int) ps('in_rss');
break;
- case 'changesearchable' :
+ case 'changesearchable':
$key = 'searchable';
$val = (int) ps('searchable');
break;
=======================================
--- /development/4.x/textpattern/include/txp_tag.php Thu May 22 21:14:05
2014 UTC
+++ /development/4.x/textpattern/include/txp_tag.php Sat Sep 27 12:27:13
2014 UTC
@@ -1597,18 +1597,18 @@
$urlinfo['path'].gTxt('file_download').'/'.$id.($filename ? '/'.urlencode($filename) : '');
switch ($type) {
- case 'textile' :
+ case 'textile':
$link = ($linktext) ? $linktext : $filename;
$desc = ($desc) ? ' ('.$desc.')' : '';
$out .= $this->tdb('"'.$link.$desc.'":'.$url);
break;
- case 'html' :
+ case 'html':
$link = ($linktext) ? $linktext : $filename;
$desc = ($desc) ? ' title="'.$desc.'"' : '';
$out .= $this->tdb(href($link, $url, $desc));
break;
- case 'textpattern' :
- default :
+ case 'textpattern':
+ default:
$atts = array('id' => $id);
$link = ($linktext) ?
$linktext : '<txp:file_download_name />';
$out .= $this->build($atts, $link);
@@ -1845,7 +1845,7 @@
$url = imagesrcurl($id, $ext);
switch ($type) {
- case 'textile' :
+ case 'textile':
$alternate = ($alt) ? ' ('.$alt.')' : '';
$modifiers = '';
@@ -1871,7 +1871,7 @@
(($wrap) ? $wrap : '') . '!'. (($wrap) ? '' :
$modifiers) .$url.$alternate.'!'
);
break;
- case 'html' :
+ case 'html':
$alternate = ' alt="'.txpspecialchars($alt).'"';
$cap = ($caption) ? '
title="'.txpspecialchars($caption).'"' : '';
$cls = ($class) ? ' class="'.$class.'"' : '';
@@ -1884,7 +1884,7 @@
($wraptag ? "</$wraptag>" : '')
);
break;
- case 'textpattern' :
+ case 'textpattern':
default:
$atts = array(
'class' => $class,
=======================================
--- /development/4.x/textpattern/index.php Wed Apr 16 16:28:09 2014 UTC
+++ /development/4.x/textpattern/index.php Sat Sep 27 12:27:13 2014 UTC
@@ -124,11 +124,11 @@
if (!defined('PROTOCOL')) {
switch (serverSet('HTTPS')) {
- case '' :
- case 'off' : // ISAPI with IIS.
+ case '':
+ case 'off': // ISAPI with IIS.
define('PROTOCOL', 'http://');
break;
- default :
+ default:
define('PROTOCOL', 'https://');
break;
}
=======================================
--- /development/4.x/textpattern/lib/txplib_misc.php Wed Apr 16 17:12:08
2014 UTC
+++ /development/4.x/textpattern/lib/txplib_misc.php Sat Sep 27 12:27:13
2014 UTC
@@ -795,13 +795,13 @@
$gd_info = gd_info();
switch ($image_type) {
- case '.gif' :
+ case '.gif':
return ($gd_info['GIF Create Support'] == true);
break;
- case '.png' :
+ case '.png':
return ($gd_info['PNG Support'] == true);
break;
- case '.jpg' :
+ case '.jpg':
return (!empty($gd_info['JPEG Support']) |
| !empty($gd_info['JPG Support']));
break;
}
@@ -2488,10 +2488,10 @@
if (preg_match_all('@(\w+)\s*=\s*(?:"((?:[^"]|"")*)"|\'((?:[^\']|
\'\')*)\'|([^\s\'"/>]+))@s', $text, $match, PREG_SET_ORDER)) {
foreach ($match as $m) {
switch (count($m)) {
- case 3 :
+ case 3:
$val = str_replace('""', '"', $m[2]);
break;
- case 4 :
+ case 4:
$val = str_replace("''", "'", $m[3]);
if (strpos($m[3], '<txp:') !== false) {
@@ -2501,7 +2501,7 @@
}
break;
- case 5 :
+ case 5:
$val = $m[4];
trigger_error(gTxt('attribute_values_must_be_quoted'),
E_USER_WARNING);
break;
@@ -3379,35 +3379,35 @@
switch ($err_code) {
// Value: 0; There is no error, the file uploaded with success.
- case UPLOAD_ERR_OK :
+ case UPLOAD_ERR_OK:
$msg = '';
break;
// Value: 1; The uploaded file exceeds the upload_max_filesize
directive in php.ini.
- case UPLOAD_ERR_INI_SIZE :
+ case UPLOAD_ERR_INI_SIZE:
$msg = gTxt('upload_err_ini_size');
break;
// Value: 2; The uploaded file exceeds the MAX_FILE_SIZE directive
that was specified in the HTML form.
- case UPLOAD_ERR_FORM_SIZE :
+ case UPLOAD_ERR_FORM_SIZE:
$msg = gTxt('upload_err_form_size');
break;
// Value: 3; The uploaded file was only partially uploaded.
- case UPLOAD_ERR_PARTIAL :
+ case UPLOAD_ERR_PARTIAL:
$msg = gTxt('upload_err_partial');
break;
// Value: 4; No file was uploaded.
- case UPLOAD_ERR_NO_FILE :
+ case UPLOAD_ERR_NO_FILE:
$msg = gTxt('upload_err_no_file');
break;
// Value: 6; Missing a temporary folder. Introduced in PHP 4.3.10
and PHP 5.0.3.
- case UPLOAD_ERR_NO_TMP_DIR :
+ case UPLOAD_ERR_NO_TMP_DIR:
$msg = gTxt('upload_err_tmp_dir');
break;
// Value: 7; Failed to write file to disk. Introduced in PHP 5.1.0.
- case UPLOAD_ERR_CANT_WRITE :
+ case UPLOAD_ERR_CANT_WRITE:
$msg = gTxt('upload_err_cant_write');
break;
// Value: 8; File upload stopped by extension. Introduced in PHP
5.2.0.
- case UPLOAD_ERR_EXTENSION :
+ case UPLOAD_ERR_EXTENSION:
$msg = gTxt('upload_err_extension');
break;
}
@@ -5421,14 +5421,14 @@
$url_title = urlencode($url_title);
switch ($permlink_mode) {
- case 'section_id_title' :
+ case 'section_id_title':
if ($prefs['attach_titles_to_permalinks']) {
$out = hu."$section/$thisid/$url_title";
} else {
$out = hu."$section/$thisid/";
}
break;
- case 'year_month_day_title' :
+ case 'year_month_day_title':
list($y, $m, $d) = explode("-", date("Y-m-d", $posted));
$out = hu."$y/$m/$d/$url_title";
break;
@@ -5439,13 +5439,13 @@
$out = hu."$thisid/";
}
break;
- case 'section_title' :
+ case 'section_title':
$out = hu."$section/$url_title";
break;
- case 'title_only' :
+ case 'title_only':
$out = hu."$url_title";
break;
- case 'messy' :
+ case 'messy':
$out = hu."index.php?id=$thisid";
break;
}
=======================================
--- /development/4.x/textpattern/lib/txplib_publish.php Wed Apr 16 17:12:08
2014 UTC
+++ /development/4.x/textpattern/lib/txplib_publish.php Sat Sep 27 12:27:13
2014 UTC
@@ -195,13 +195,13 @@
$ids = array_map('intval', do_list($id));
$id = (!$id) ? '' : " and ID IN (".join(',', $ids).")";
switch ($time) {
- case 'any' :
+ case 'any':
$time = "";
break;
- case 'future' :
+ case 'future':
$time = " and Posted > now()";
break;
- default :
+ default:
$time = " and Posted <= now()";
}
@@ -307,19 +307,19 @@
// Attributes with special treatment.
switch ($atts['sortby']) {
- case 'Posted' :
+ case 'Posted':
$threshold
= 'from_unixtime('.doSlash($thisarticle['posted']).')';
$threshold_type = 'cooked';
break;
- case 'Expires' :
+ case 'Expires':
$threshold
= 'from_unixtime('.doSlash($thisarticle['expires']).')';
$threshold_type = 'cooked';
break;
- case 'LastMod' :
+ case 'LastMod':
$threshold
= 'from_unixtime('.doSlash($thisarticle['modified']).')';
$threshold_type = 'cooked';
break;
- default :
+ default:
// Retrieve current threshold value per sort column from
$thisarticle.
$acm = array_flip(article_column_map());
$key = $acm[$atts['sortby']];
=======================================
--- /development/4.x/textpattern/lib/txplib_wrapper.php Wed Apr 16 17:12:08
2014 UTC
+++ /development/4.x/textpattern/lib/txplib_wrapper.php Sat Sep 27 12:27:13
2014 UTC
@@ -946,13 +946,13 @@
public function format_field($field, $format, $textile)
{
switch ($format) {
- case LEAVE_TEXT_UNTOUCHED :
+ case LEAVE_TEXT_UNTOUCHED:
$html = trim($field);
break;
- case CONVERT_LINEBREAKS :
+ case CONVERT_LINEBREAKS:
$html = nl2br(trim($field));
break;
- case USE_TEXTILE :
+ case USE_TEXTILE:
$html = $textile->TextileThis($field);
break;
}
=======================================
--- /development/4.x/textpattern/publish/atom.php Wed Apr 16 17:12:08 2014
UTC
+++ /development/4.x/textpattern/publish/atom.php Sat Sep 27 12:27:13 2014
UTC
@@ -277,13 +277,13 @@
}
} elseif ($category) {
switch ($area) {
- case 'link' :
+ case 'link':
if (safe_field('id', 'txp_category', "name
= '$category' and type = 'link'") == false) {
txp_die(gTxt('404_not_found'), '404');
}
break;
- case 'article' :
- default :
+ case 'article':
+ default:
if (safe_field('id', 'txp_category', "name in
('".join("','", $category)."') and type = 'article'") == false) {
txp_die(gTxt('404_not_found'), '404');
}
=======================================
--- /development/4.x/textpattern/publish/rss.php Wed Apr 16 13:53:35 2014
UTC
+++ /development/4.x/textpattern/publish/rss.php Sat Sep 27 12:27:13 2014
UTC
@@ -202,13 +202,13 @@
}
} elseif ($category) {
switch ($area) {
- case 'link' :
+ case 'link':
if (safe_field('id', 'txp_category', "name
= '$category' and type = 'link'") == false) {
txp_die(gTxt('404_not_found'), '404');
}
break;
- case 'article' :
- default :
+ case 'article':
+ default:
if (safe_field('id', 'txp_category', "name in
('".join("','", $category)."') and type = 'article'") == false) {
txp_die(gTxt('404_not_found'), '404');
}
=======================================
--- /development/4.x/textpattern/publish/taghandlers.php Wed Apr 16
17:12:08 2014 UTC
+++ /development/4.x/textpattern/publish/taghandlers.php Sat Sep 27
12:27:13 2014 UTC
@@ -622,13 +622,13 @@
if (!$where && !$filters) {
foreach ($context_list as $ctxt) {
switch ($ctxt) {
- case 'category' :
+ case 'category':
// ...the global category in the URL.
if ($context == 'link' && !empty($c)) {
$where[] = "category = '".doSlash($c)."'";
}
break;
- case 'author' :
+ case 'author':
// ...the global author in the URL.
if ($context == 'link' && !empty($pretext['author'])) {
$where[] = "author
= '".doSlash($pretext['author'])."'";
@@ -3247,7 +3247,7 @@
if (!$where && !$filters) {
foreach ($context_list as $ctxt) {
switch ($ctxt) {
- case 'article' :
+ case 'article':
// ...the article image field.
if ($thisarticle
&& !empty($thisarticle['article_image'])) {
$items = do_list($thisarticle['article_image']);
@@ -3269,13 +3269,13 @@
}
}
break;
- case 'category' :
+ case 'category':
// ...the global category in the URL.
if ($context == 'image' && !empty($c)) {
$where[] = "category = '".doSlash($c)."'";
}
break;
- case 'author' :
+ case 'author':
// ...the global author in the URL.
if ($context == 'image' && !empty($pretext['author']))
{
$where[] = "author
= '".doSlash($pretext['author'])."'";
@@ -4111,11 +4111,11 @@
if ($value !== null) {
switch ($match) {
- case '' :
+ case '':
case 'exact':
$cond = ($thisarticle[$name] == $value);
break;
- case 'any' :
+ case 'any':
$values = do_list($value);
$cond = false;
$cf_contents = ($separator) ? do_list($thisarticle[$name],
$separator) : $thisarticle[$name];
@@ -4132,7 +4132,7 @@
}
}
break;
- case 'all' :
+ case 'all':
$values = do_list($value);
$num_values = count($values);
$term_count = 0;
@@ -4146,7 +4146,7 @@
}
$cond = ($term_count == $num_values) ? true : false;
break;
- case 'pattern' :
+ case 'pattern':
// Cannot guarantee that a fixed delimiter won't break
preg_match (and preg_quote doesn't help) so
// dynamically assign the delimiter based on the first
entry in $dlmPool that is NOT in the value attribute.
// This minimises (does not eliminate) the possibility of
a TXP-initiated preg_match error, while still
@@ -4156,7 +4156,7 @@
$dlm = (count($dlm) > 0) ? $dlm[0].$value.$dlm[0] : $value;
$cond = preg_match($dlm, $thisarticle[$name]);
break;
- default :
+ default:
trigger_error(gTxt('invalid_attribute_value',
array('{name}' => 'value')), E_USER_NOTICE);
$cond = false;
}
@@ -4343,13 +4343,13 @@
if (!$where && !$filters) {
foreach ($context_list as $ctxt) {
switch ($ctxt) {
- case 'category' :
+ case 'category':
// ...the global category in the URL.
if ($context == 'file' && !empty($c)) {
$where[] = "category = '".doSlash($c)."'";
}
break;
- case 'author' :
+ case 'author':
// ...the global author in the URL.
if ($context == 'file' && !empty($pretext['author'])) {
$where[] = "author
= '".doSlash($pretext['author'])."'";
=======================================
--- /development/4.x/textpattern/publish.php Wed Apr 16 10:21:49 2014 UTC
+++ /development/4.x/textpattern/publish.php Sat Sep 27 12:27:13 2014 UTC
@@ -87,11 +87,11 @@
if (!defined('PROTOCOL')) {
switch (serverSet('HTTPS')) {
- case '' :
+ case '':
case 'off': // ISAPI with IIS.
define('PROTOCOL', 'http://');
break;
- default :
+ default:
define('PROTOCOL', 'https://');
break;
}
@@ -240,13 +240,13 @@
// Deal with error.
if (isset($file_error)) {
switch ($file_error) {
- case 403 :
+ case 403:
txp_die(gTxt('403_forbidden'), '403');
break;
- case 404 :
+ case 404:
txp_die(gTxt('404_not_found'), '404');
break;
- default :
+ default:
txp_die(gTxt('500_internal_server_error'), '500');
break;
}
@@ -318,23 +318,23 @@
// First we sniff out some of the preset URL schemes.
if (strlen($u1)) {
switch ($u1) {
- case 'atom' :
+ case 'atom':
include txpath.'/publish/atom.php';
$out['feed'] = 'atom';
break;
- case 'rss' :
+ case 'rss':
include txpath.'/publish/rss.php';
$out['feed'] = 'rss';
break;
// urldecode(strtolower(urlencode())) looks ugly but is
the only way to
// make it multibyte-safe without breaking
backwards-compatibility.
- case urldecode(strtolower(urlencode(gTxt('section')))) :
+ case urldecode(strtolower(urlencode(gTxt('section')))):
$out['s'] = (ckEx('section', $u2)) ? $u2 : ''; $is_404
= empty($out['s']);
break;
- case urldecode(strtolower(urlencode(gTxt('category')))) :
+ case urldecode(strtolower(urlencode(gTxt('category')))):
if ($u3) {
$out['context'] = validContext($u2);
$out['c'] = $u3;
@@ -346,7 +346,7 @@
$is_404 = empty($out['c']);
break;
- case urldecode(strtolower(urlencode(gTxt('author')))) :
+ case urldecode(strtolower(urlencode(gTxt('author')))):
if ($u3) {
$out['context'] = validContext($u2);
$out['author'] = $u3;
@@ -359,13 +359,13 @@
break;
// AuthorID gets resolved from Name further down.
- case
urldecode(strtolower(urlencode(gTxt('file_download')))) :
+ case
urldecode(strtolower(urlencode(gTxt('file_download')))):
$out['s'] = 'file_download';
$out['id'] = (!empty($u2)) ? $u2 : '';
$out['filename'] = (!empty($u3)) ? $u3 : '';
break;
- default :
+ default:
// Then see if the prefs-defined permlink scheme is
usable.
switch ($permlink_mode) {
@@ -835,13 +835,13 @@
$id = (!$id) ? '' : " and ID IN (".join(',', $ids).")";
switch ($time) {
- case 'any' :
+ case 'any':
$time = "";
break;
- case 'future' :
+ case 'future':
$time = " and Posted > now()";
break;
- default :
+ default:
$time = " and Posted <= now()";
}
=======================================
--- /development/4.x/textpattern/setup/index.php Thu Sep 11 21:50:08 2014
UTC
+++ /development/4.x/textpattern/setup/index.php Sat Sep 27 12:27:13 2014
UTC
@@ -98,19 +98,19 @@
eod;
switch ($step) {
- case "" :
+ case "":
chooseLang();
break;
- case "getDbInfo" :
+ case "getDbInfo":
getDbInfo();
break;
- case "getTxpLogin" :
+ case "getTxpLogin":
getTxpLogin();
break;
- case "printConfig" :
+ case "printConfig":
printConfig();
break;
- case "createTxp" :
+ case "createTxp":
createTxp();
}
?>