Merge lp:~quam-plures-core/quam-plures/qp5_final_branch into lp:quam-plures

Proposed by EdB
Status: Merged
Merged at revision: 7663
Proposed branch: lp:~quam-plures-core/quam-plures/qp5_final_branch
Merge into: lp:quam-plures
Diff against target: 2497 lines (+864/-454)
44 files modified
admin.php (+3/-3)
blog2.php (+0/-42)
blog3.php (+0/-42)
blog4.php (+0/-42)
qp_config/_admin.php (+72/-7)
qp_inc/_application.php (+3/-3)
qp_inc/_core/__core.init.php (+25/-48)
qp_inc/_core/_param.funcs.php (+5/-0)
qp_inc/_core/model/__core.install.php (+2/-32)
qp_inc/_core/ui/results/_results.class.php (+12/-6)
qp_inc/blogs/blogs.ctrl.php (+1/-1)
qp_inc/blogs/model/_blog.class.php (+3/-3)
qp_inc/files/file_settings.ctrl.php (+48/-16)
qp_inc/files/files.ctrl.php (+2/-2)
qp_inc/files/model/_file.class.php (+3/-0)
qp_inc/files/model/_file.funcs.php (+5/-4)
qp_inc/files/model/_filelist.class.php (+5/-2)
qp_inc/files/model/_fileroot.class.php (+3/-3)
qp_inc/files/model/_filerootcache.class.php (+1/-1)
qp_inc/files/upload.ctrl.php (+124/-42)
qp_inc/files/views/_file_browse.view.php (+2/-2)
qp_inc/files/views/_file_browse_set.form.php (+1/-1)
qp_inc/files/views/_file_list.inc.php (+1/-1)
qp_inc/files/views/_file_settings.form.php (+32/-59)
qp_inc/generic/model/_genericelement.class.php (+1/-1)
qp_inc/generic/views/_generic_category.form.php (+1/-1)
qp_inc/plugins/_plugin.class.php (+11/-0)
qp_inc/plugins/_plugin.funcs.php (+2/-1)
qp_inc/plugins/model/_plugins_admin.class.php (+1/-0)
qp_inc/sessions/_sessions.init.php (+3/-6)
qp_inc/settings/model/_generalsettings.class.php (+9/-1)
qp_inc/templates/model/_template.class.php (+3/-0)
qp_inc/tools/views/_system_list.view.php (+2/-20)
qp_inc/users/model/_user.class.php (+28/-7)
qp_inc/users/model/_user.funcs.php (+37/-12)
qp_inc/users/model/_usersettings.class.php (+1/-1)
qp_inc/users/users.ctrl.php (+11/-0)
qp_inc/users/views/_user.form.php (+46/-20)
qp_inc/users/views/_user_list.view.php (+37/-10)
qp_install/_create_items.php (+9/-9)
qp_install/_functions_dbupgrade.php (+297/-0)
qp_plugins/smilies_plugin/_smilies.plugin.php (+6/-1)
qp_srvc/profile_update.php (+4/-1)
qp_srvc/register.php (+2/-1)
To merge this branch: bzr merge lp:~quam-plures-core/quam-plures/qp5_final_branch
Reviewer Review Type Date Requested Status
Quam Plures Core Team Pending
Review via email: mp+156414@code.launchpad.net

Description of the change

the last of the "monster" series. after this we're back to business as usual :)

To post a comment you must log in.
7667. By EdB

more stuff ... not sure what but it fixes problems

7668. By EdB

updating release date to today

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'admin.php'
--- admin.php 2013-03-18 19:20:42 +0000
+++ admin.php 2013-04-18 18:37:26 +0000
@@ -79,10 +79,10 @@
79 if( ! $admin_template || ! file_exists( sprintf( $admin_template_path, $admin_template ) ) )79 if( ! $admin_template || ! file_exists( sprintf( $admin_template_path, $admin_template ) ) )
80 {80 {
81 // even the default template does not exist!81 // even the default template does not exist!
82 // set 'wind' as the admin template if it exists82 // set 'earth' as the admin template if it exists
83 if( file_exists( sprintf( $admin_template_path, 'wind' ) ) )83 if( file_exists( sprintf( $admin_template_path, 'earth' ) ) )
84 {84 {
85 $admin_template = 'wind';85 $admin_template = 'earth';
86 }86 }
87 else87 else
88 {88 {
8989
=== removed file 'blog2.php'
--- blog2.php 2013-03-08 20:58:52 +0000
+++ blog2.php 1970-01-01 00:00:00 +0000
@@ -1,42 +0,0 @@
1<?php
2/**
3 * Stub File Template
4 *
5 * This file is used to create a new stub file when a blog is created. If the value of $blog
6 * is not NNN then this file was created; only stubfile.template.php has that value of $blog.
7 *
8 * @author {@link http://wonderwinds.com/ Ed Bennett}
9 * @copyright (c) 2010 by {@link http://quamplures.net/ the Quam Plures project}
10 * @license http://www.gnu.org/licenses/gpl.txt GNU General Public License v3
11 * @package templates
12 */
13
14// select which blog
15$blog = 2;
16
17// retricts posts to published, hides drafts
18$show_statuses = array();
19
20// ignore before, unix timestamp or 'now'
21$timestamp_min = '';
22
23// ignore after, unix timestamp or 'now'
24$timestamp_max = 'now';
25
26// force a template?
27# $template = 'custom';
28
29// change order?
30# $order = 'ASC';
31
32/**
33 * Load the configuration minimum
34 */
35require_once dirname(__FILE__).'/qp_config/_config.php';
36
37/**
38 * Main initialization, with the identified $blog
39 */
40require $inc_path.'_blog_main.inc.php';
41
42?>
430
=== removed file 'blog3.php'
--- blog3.php 2013-03-08 20:58:52 +0000
+++ blog3.php 1970-01-01 00:00:00 +0000
@@ -1,42 +0,0 @@
1<?php
2/**
3 * Stub File Template
4 *
5 * This file is used to create a new stub file when a blog is created. If the value of $blog
6 * is not NNN then this file was created; only stubfile.template.php has that value of $blog.
7 *
8 * @author {@link http://wonderwinds.com/ Ed Bennett}
9 * @copyright (c) 2010 by {@link http://quamplures.net/ the Quam Plures project}
10 * @license http://www.gnu.org/licenses/gpl.txt GNU General Public License v3
11 * @package templates
12 */
13
14// select which blog
15$blog = 3;
16
17// retricts posts to published, hides drafts
18$show_statuses = array();
19
20// ignore before, unix timestamp or 'now'
21$timestamp_min = '';
22
23// ignore after, unix timestamp or 'now'
24$timestamp_max = 'now';
25
26// force a template?
27# $template = 'custom';
28
29// change order?
30# $order = 'ASC';
31
32/**
33 * Load the configuration minimum
34 */
35require_once dirname(__FILE__).'/qp_config/_config.php';
36
37/**
38 * Main initialization, with the identified $blog
39 */
40require $inc_path.'_blog_main.inc.php';
41
42?>
430
=== removed file 'blog4.php'
--- blog4.php 2013-03-08 20:58:52 +0000
+++ blog4.php 1970-01-01 00:00:00 +0000
@@ -1,42 +0,0 @@
1<?php
2/**
3 * Stub File Template
4 *
5 * This file is used to create a new stub file when a blog is created. If the value of $blog
6 * is not NNN then this file was created; only stubfile.template.php has that value of $blog.
7 *
8 * @author {@link http://wonderwinds.com/ Ed Bennett}
9 * @copyright (c) 2010 by {@link http://quamplures.net/ the Quam Plures project}
10 * @license http://www.gnu.org/licenses/gpl.txt GNU General Public License v3
11 * @package templates
12 */
13
14// select which blog
15$blog = 4;
16
17// retricts posts to published, hides drafts
18$show_statuses = array();
19
20// ignore before, unix timestamp or 'now'
21$timestamp_min = '';
22
23// ignore after, unix timestamp or 'now'
24$timestamp_max = 'now';
25
26// force a template?
27# $template = 'custom';
28
29// change order?
30# $order = 'ASC';
31
32/**
33 * Load the configuration minimum
34 */
35require_once dirname(__FILE__).'/qp_config/_config.php';
36
37/**
38 * Main initialization, with the identified $blog
39 */
40require $inc_path.'_blog_main.inc.php';
41
42?>
430
=== modified file 'qp_config/_admin.php'
--- qp_config/_admin.php 2013-03-22 21:28:25 +0000
+++ qp_config/_admin.php 2013-04-18 18:37:26 +0000
@@ -24,6 +24,8 @@
24 * - 2 if you want to be able to cross-post among multiple blogs/categories24 * - 2 if you want to be able to cross-post among multiple blogs/categories
25 * - 3 if you want to be able to change main cat among blogs25 * - 3 if you want to be able to change main cat among blogs
26 * Note: #3 moves the posts from one blog to another, so use with caution.26 * Note: #3 moves the posts from one blog to another, so use with caution.
27 *
28 * @global integer $allow_cross_posting
27 */29 */
28$allow_cross_posting = 1;30$allow_cross_posting = 1;
2931
@@ -32,6 +34,8 @@
32 *34 *
33 * Automatically balance unmatched tags in posts and comments. Choose35 * Automatically balance unmatched tags in posts and comments. Choose
34 * the formatting options for your posts: 0 to disable, 1 to enable36 * the formatting options for your posts: 0 to disable, 1 to enable
37 *
38 * @global bool $balance_tags
35 */39 */
36$balance_tags = 1;40$balance_tags = 1;
3741
@@ -40,30 +44,38 @@
40 *44 *
41 * Default of 1 messages sent via the message form will be checked against45 * Default of 1 messages sent via the message form will be checked against
42 * the antispam blacklist. Set it to 0 if you like spam I guess.46 * the antispam blacklist. Set it to 0 if you like spam I guess.
47 *
48 * @global bool $antispam_on_message_form
43 */49 */
44$antispam_on_message_form = 1;50$antispam_on_message_form = 1;
4551
46/**52/**
53 * Cookie Expired
54 *
55 * Expired-time, used to erase comment meta data cookies. Default is 24 hours ago.
56 *
57 * @global integer $cookie_expired
58 */
59$cookie_expired = time() - 86400;
60
61/**
47 * Cookies Expire62 * Cookies Expire
48 *63 *
49 * Expiration for comment meta data cookies, in seconds. Set this to 0 if you wish64 * Expiration for comment meta data cookies, in seconds. Set this to 0 if you wish
50 * to use non-permanent cookies (erased when browser is closed). Default is one65 * to use non-permanent cookies (erased when browser is closed). Default is one
51 * year from now.66 * year from now.
67 *
68 * @global integer $cookie_expires
52 */69 */
53$cookie_expires = time() + 31536000;70$cookie_expires = time() + 31536000;
5471
55/**72/**
56 * Cookie Expired
57 *
58 * Expired-time, used to erase comment meta data cookies. Default is 24 hours ago.
59 */
60$cookie_expired = time() - 86400;
61
62/**
63 * Cron Timeout Delay73 * Cron Timeout Delay
64 *74 *
65 * Seconds after which a scheduled task is considered to be timed out, default is75 * Seconds after which a scheduled task is considered to be timed out, default is
66 * 30 minutes.76 * 30 minutes.
77 *
78 * @global integer $cron_timeout_delay
67 */79 */
68$cron_timeout_delay = 1800;80$cron_timeout_delay = 1800;
6981
@@ -72,6 +84,8 @@
72 *84 *
73 * This controls how many items by section (comments, drafts, recent edits)85 * This controls how many items by section (comments, drafts, recent edits)
74 * are displayed on the dashboard page.86 * are displayed on the dashboard page.
87 *
88 * @global integer $dash_disp_num
75 */89 */
76$dash_disp_num = 5;90$dash_disp_num = 5;
7791
@@ -83,6 +97,8 @@
83 * - 1 = yes97 * - 1 = yes
84 * - 2 = yes and potentially die() to display debug info (needed before redirects,98 * - 2 = yes and potentially die() to display debug info (needed before redirects,
85 * e-g message_send.php)99 * e-g message_send.php)
100 *
101 * @global integer $debug
86 */102 */
87$debug = 0;103$debug = 0;
88104
@@ -92,6 +108,8 @@
92 * Display elements that are different on each request (Page processing time, ...)108 * Display elements that are different on each request (Page processing time, ...)
93 * Set this to true to prevent displaying minor changing elements (like time) in109 * Set this to true to prevent displaying minor changing elements (like time) in
94 * order not to have artificial content changes.110 * order not to have artificial content changes.
111 *
112 * @global bool $debug_obhandler
95 */113 */
96$debug_obhandler = false;114$debug_obhandler = false;
97115
@@ -101,6 +119,8 @@
101 * $debug always applies to anyone logged in. Set this to 1 if you want debug info119 * $debug always applies to anyone logged in. Set this to 1 if you want debug info
102 * displayed when you are not logged in (for troubleshooting what a visitor sees).120 * displayed when you are not logged in (for troubleshooting what a visitor sees).
103 * Default is 0. possible values: 0 = no, 1 = yes121 * Default is 0. possible values: 0 = no, 1 = yes
122 *
123 * @global bool $debug_visitors
104 */124 */
105$debug_visitors = 0;125$debug_visitors = 0;
106126
@@ -108,6 +128,8 @@
108 * XMLRPC logging128 * XMLRPC logging
109 *129 *
110 * Set this to 1 to log XMLRPC calls received by this server (into /qp_srvc/xmlrpc.log).130 * Set this to 1 to log XMLRPC calls received by this server (into /qp_srvc/xmlrpc.log).
131 *
132 * @global bool $debug_xmlrpc_logging
111 */133 */
112$debug_xmlrpc_logging = 0;134$debug_xmlrpc_logging = 0;
113135
@@ -118,6 +140,8 @@
118 * do not allow changes to the 'admin' or 'demouser' or 'demoblogger' or 'demospecial'140 * do not allow changes to the 'admin' or 'demouser' or 'demoblogger' or 'demospecial'
119 * accounts/groups, blog media directories can only be configured to be inside of141 * accounts/groups, blog media directories can only be configured to be inside of
120 * {@link $media_path}.142 * {@link $media_path}.
143 *
144 * @global bool $demo_mode
121 */145 */
122$demo_mode = false;146$demo_mode = false;
123147
@@ -126,6 +150,8 @@
126 *150 *
127 * File extensions that the admin will not be able to enable via the admin interface151 * File extensions that the admin will not be able to enable via the admin interface
128 * (Global settings => files).152 * (Global settings => files).
153 *
154 * @global array $forbidden_upload_exts
129 */155 */
130$forbidden_upload_exts = array(156$forbidden_upload_exts = array(
131 'cgi',157 'cgi',
@@ -148,6 +174,8 @@
148 * The admin can configure the regular expression for valid file names in the Settings174 * The admin can configure the regular expression for valid file names in the Settings
149 * interface. However if this is set to non empty, the admin will not be able to175 * interface. However if this is set to non empty, the admin will not be able to
150 * customize these values.176 * customize these values.
177 *
178 * @global string $force_regexp_filename
151 */179 */
152$force_regexp_filename = '';180$force_regexp_filename = '';
153181
@@ -157,6 +185,8 @@
157 * The admin can configure the regular expression for valid dir names in the Settings185 * The admin can configure the regular expression for valid dir names in the Settings
158 * interface. However if this is set to non empty, the admin will not be able to186 * interface. However if this is set to non empty, the admin will not be able to
159 * customize these values.187 * customize these values.
188 *
189 * @global string $force_regexp_dirname
160 */190 */
161$force_regexp_dirname = '';191$force_regexp_dirname = '';
162192
@@ -166,6 +196,8 @@
166 * The "home" button on the top right of the navbar is the only use of this. By196 * The "home" button on the top right of the navbar is the only use of this. By
167 * default this is the base url, and unless you do a complex installation there197 * default this is the base url, and unless you do a complex installation there
168 * is no need to change it.198 * is no need to change it.
199 *
200 * @global string $home_url
169 */201 */
170$home_url = $app_baseurl;202$home_url = $app_baseurl;
171203
@@ -182,15 +214,32 @@
182 *214 *
183 * @todo generate a random instance name at install and have it saved in the global215 * @todo generate a random instance name at install and have it saved in the global
184 * params in the DB216 * params in the DB
217 *
218 * @global string $instance_name
185 */219 */
186$instance_name = 'quamplures';220$instance_name = 'quamplures';
187221
188/**222/**
223 * Lock user's ID and nickname
224 *
225 * Setting this to 'true' will mean a user can not change their login ID or nickname.
226 * They will still be able to change their "known as" - just not their nickname
227 * or login :) Useful if you need continuity over time for all your users (for example
228 * when this app is the gateway to a forum or chatroom or other 3rd party with a
229 * login requirement).
230 *
231 * @global bool $lock_id_and_nick
232 */
233$lock_id_and_nick = false;
234
235/**
189 * Minimum Comment Interval236 * Minimum Comment Interval
190 *237 *
191 * This is the minimum interval in seconds between consecutive comments from the238 * This is the minimum interval in seconds between consecutive comments from the
192 * same IP. Increasing this can slow down spam attacks, and piss off real visitors239 * same IP. Increasing this can slow down spam attacks, and piss off real visitors
193 * if too high.240 * if too high.
241 *
242 * @global integer $minimum_comment_interval
194 */243 */
195$minimum_comment_interval = 30;244$minimum_comment_interval = 30;
196245
@@ -202,6 +251,8 @@
202 *251 *
203 * This is legacy code that needs to be reverse-engineered, completely figured out,252 * This is legacy code that needs to be reverse-engineered, completely figured out,
204 * and either fixed or killed. As-is this is crap - EdB.253 * and either fixed or killed. As-is this is crap - EdB.
254 *
255 * @global array $posttypes_locked_IDs
205 */256 */
206$posttypes_locked_IDs = array( 1000, 1500, 1520, 1530, 1570, 2000 );257$posttypes_locked_IDs = array( 1000, 1500, 1520, 1530, 1570, 2000 );
207258
@@ -214,6 +265,8 @@
214 *265 *
215 * This is legacy code that needs to be reverse-engineered, completely figured out,266 * This is legacy code that needs to be reverse-engineered, completely figured out,
216 * and either fixed or killed. As-is this is crap - EdB.267 * and either fixed or killed. As-is this is crap - EdB.
268 *
269 * @global array $posttypes_reserved_IDs
217 */270 */
218$posttypes_reserved_IDs = array( 3000, 4000, 5000 );271$posttypes_reserved_IDs = array( 3000, 4000, 5000 );
219272
@@ -225,6 +278,8 @@
225 * and getfile.php will check the User permisssion to view files. HOWEVER this will278 * and getfile.php will check the User permisssion to view files. HOWEVER this will
226 * not prevent users from hitting directly into the media folder with their web279 * not prevent users from hitting directly into the media folder with their web
227 * browser. You still need to restrict access to the media folder from your webserver.280 * browser. You still need to restrict access to the media folder from your webserver.
281 *
282 * @global bool $public_access_to_media
228 */283 */
229$public_access_to_media = true;284$public_access_to_media = true;
230285
@@ -234,6 +289,8 @@
234 * Default of 1 means a comment can not be left without the commenter providing289 * Default of 1 means a comment can not be left without the commenter providing
235 * a name and email address. Set this to 0 to allow anonymous comments (without290 * a name and email address. Set this to 0 to allow anonymous comments (without
236 * name & email address).291 * name & email address).
292 *
293 * @global bool $require_name_email
237 */294 */
238$require_name_email = 1;295$require_name_email = 1;
239296
@@ -242,6 +299,8 @@
242 *299 *
243 * Admins can configure max file upload size, but they won't be able to set it higher300 * Admins can configure max file upload size, but they won't be able to set it higher
244 * than this "max max" value.301 * than this "max max" value.
302 *
303 * @global integer $upload_maxmaxkb
245 */304 */
246$upload_maxmaxkb = 10000;305$upload_maxmaxkb = 10000;
247306
@@ -263,6 +322,8 @@
263 * tag URL "marker", you won't be able to access either the post or the tag page,322 * tag URL "marker", you won't be able to access either the post or the tag page,
264 * depending on the value of this setting. And no, that doesn't make sense to me323 * depending on the value of this setting. And no, that doesn't make sense to me
265 * either :/324 * either :/
325 *
326 * @global bool $tags_dash_fix
266 */327 */
267$tags_dash_fix = 0;328$tags_dash_fix = 0;
268329
@@ -270,6 +331,8 @@
270 * XHTML use Strict331 * XHTML use Strict
271 *332 *
272 * Set this to true if you want to enforce XHTML strict validation333 * Set this to true if you want to enforce XHTML strict validation
334 *
335 * @global bool $xhtml_use_strict
273 */336 */
274$xhtml_use_strict = false;337$xhtml_use_strict = false;
275338
@@ -277,6 +340,8 @@
277 * XHTML validate comments340 * XHTML validate comments
278 *341 *
279 * Do we want to use XHTML validation for comments?342 * Do we want to use XHTML validation for comments?
343 *
344 * @global bool $xhtml_validate_comments
280 */345 */
281$xhtml_validate_comments = true;346$xhtml_validate_comments = true;
282347
283348
=== modified file 'qp_inc/_application.php'
--- qp_inc/_application.php 2013-03-22 21:28:25 +0000
+++ qp_inc/_application.php 2013-04-18 18:37:26 +0000
@@ -19,16 +19,16 @@
19$app_homepage = 'http://quamplures.net/';19$app_homepage = 'http://quamplures.net/';
2020
21// The fileset version: incremented at whatever rate feels good :)21// The fileset version: incremented at whatever rate feels good :)
22$files_version = '1.20';22$files_version = '1.50';
2323
24// The database version, incrememented by 1 with each change in upgrade_dbase_tables()24// The database version, incrememented by 1 with each change in upgrade_dbase_tables()
25$app_db_version = 43;25$app_db_version = 70;
2626
27// This way the version tells us the files and the database :)27// This way the version tells us the files and the database :)
28$app_version = $files_version.'.'.$app_db_version;28$app_version = $files_version.'.'.$app_db_version;
2929
30// The application's release date (ISO) for major (quarterly) releases30// The application's release date (ISO) for major (quarterly) releases
31$app_date = '2013-03-21';31$app_date = '2013-04-18';
3232
33// Displayed on the login screen33// Displayed on the login screen
34$app_banner = '<a href="'.$app_homepage.'"><img src="'.$rsc_url.'logo.jpg" width="337" height="76" alt="'.$app_name.'" /></a>';34$app_banner = '<a href="'.$app_homepage.'"><img src="'.$rsc_url.'logo.jpg" width="337" height="76" alt="'.$app_name.'" /></a>';
3535
=== modified file 'qp_inc/_core/__core.init.php'
--- qp_inc/_core/__core.init.php 2013-03-22 21:28:25 +0000
+++ qp_inc/_core/__core.init.php 2013-04-18 18:37:26 +0000
@@ -29,64 +29,42 @@
29$app_db_config['aliases'] = array(29$app_db_config['aliases'] = array(
30 'T_antispam' => $app_db_tableprefix.'antispam',30 'T_antispam' => $app_db_tableprefix.'antispam',
31 'T_blogs' => $app_db_tableprefix.'blogs',31 'T_blogs' => $app_db_tableprefix.'blogs',
32 'T_blog_groups' => $app_db_tableprefix.'bloggroups',32 'T_blog_groups' => $app_db_tableprefix.'blog_groups',
33 'T_blog_settings' => $app_db_tableprefix.'coll_settings',33 'T_blog_settings' => $app_db_tableprefix.'blog_settings',
34 'T_blog_users' => $app_db_tableprefix.'blogusers',34 'T_blog_users' => $app_db_tableprefix.'blog_users',
35 'T_categories' => $app_db_tableprefix.'categories',35 'T_categories' => $app_db_tableprefix.'categories',
36 'T_collections' => $app_db_tableprefix.'collections',36 'T_collections' => $app_db_tableprefix.'collections',
37 'T_comments' => $app_db_tableprefix.'comments',37 'T_comments' => $app_db_tableprefix.'comments',
38 'T_cron_log' => $app_db_tableprefix.'cron__log',38 'T_cron_log' => $app_db_tableprefix.'cron_log',
39 'T_cron_task' => $app_db_tableprefix.'cron__task',39 'T_cron_task' => $app_db_tableprefix.'cron_task',
40 'T_files' => $app_db_tableprefix.'files',40 'T_files' => $app_db_tableprefix.'files',
41 'T_filetypes' => $app_db_tableprefix.'filetypes',41 'T_filetypes' => $app_db_tableprefix.'filetypes',
42 'T_groups' => $app_db_tableprefix.'groups',42 'T_groups' => $app_db_tableprefix.'groups',
43 'T_items' => $app_db_tableprefix.'items__item',43 'T_items' => $app_db_tableprefix.'items',
44 'T_item_cats' => $app_db_tableprefix.'postcats',44 'T_item_cats' => $app_db_tableprefix.'item_cats',
45 'T_item_colls' => $app_db_tableprefix.'item_colls',45 'T_item_colls' => $app_db_tableprefix.'item_colls',
46 'T_item_prerendering' => $app_db_tableprefix.'items__prerendering',46 'T_item_prerendering' => $app_db_tableprefix.'item_prerendering',
47 'T_item_status' => $app_db_tableprefix.'items__status',47 'T_item_status' => $app_db_tableprefix.'item_status',
48 'T_item_tags' => $app_db_tableprefix.'items__itemtag',48 'T_item_tags' => $app_db_tableprefix.'item_tags',
49 'T_item_types' => $app_db_tableprefix.'items__type',49 'T_item_types' => $app_db_tableprefix.'item_types',
50 'T_item_versions' => $app_db_tableprefix.'items__version',50 'T_item_versions' => $app_db_tableprefix.'item_versions',
51 'T_links' => $app_db_tableprefix.'links',51 'T_links' => $app_db_tableprefix.'links',
52 'T_locales' => $app_db_tableprefix.'locales',52 'T_locales' => $app_db_tableprefix.'locales',
53 'T_plugins' => $app_db_tableprefix.'plugins',53 'T_plugins' => $app_db_tableprefix.'plugins',
54 'T_plugin_events' => $app_db_tableprefix.'pluginevents',54 'T_plugin_events' => $app_db_tableprefix.'plugin_events',
55 'T_plugin_settings' => $app_db_tableprefix.'pluginsettings',55 'T_plugin_settings' => $app_db_tableprefix.'plugin_settings',
56 'T_plugin_usersettings' => $app_db_tableprefix.'pluginusersettings',56 'T_plugin_usersettings' => $app_db_tableprefix.'plugin_usersettings',
57 'T_settings' => $app_db_tableprefix.'settings',57 'T_settings' => $app_db_tableprefix.'settings',
58 'T_subscriptions' => $app_db_tableprefix.'subscriptions',58 'T_subscriptions' => $app_db_tableprefix.'subscriptions',
59 'T_tags' => $app_db_tableprefix.'items__tag',59 'T_tags' => $app_db_tableprefix.'tags',
60 'T_templates' => $app_db_tableprefix.'templates__template',60 'T_templates' => $app_db_tableprefix.'templates',
61 'T_template_containers' => $app_db_tableprefix.'templates__container',61 'T_template_containers' => $app_db_tableprefix.'template_containers',
62 'T_users' => $app_db_tableprefix.'users',62 'T_users' => $app_db_tableprefix.'users',
63 'T_user_cyberspace' => $app_db_tableprefix.'user_cyberspace',63 'T_user_cyberspace' => $app_db_tableprefix.'user_cyberspace',
64 'T_user_realworld' => $app_db_tableprefix.'user_realworld',64 'T_user_realworld' => $app_db_tableprefix.'user_realworld',
65 'T_plugin_sharedfields' => $app_db_tableprefix.'plugin_sharedfields',65 'T_user_settings' => $app_db_tableprefix.'user_settings',
66 'T_plugin_sharedvalues' => $app_db_tableprefix.'plugin_sharedvalues',66 'T_widgets' => $app_db_tableprefix.'widgets',
67 'T_user_settings' => $app_db_tableprefix.'usersettings',67);
68 'T_widgets' => $app_db_tableprefix.'widget',
69 'T_coll_group_perms' => $app_db_tableprefix.'bloggroups', // old, going away
70 'T_coll_settings' => $app_db_tableprefix.'coll_settings', // old, going away
71 'T_coll_user_perms' => $app_db_tableprefix.'blogusers', // old, going away
72 'T_cron__log' => $app_db_tableprefix.'cron__log', // old, going away
73 'T_cron__task' => $app_db_tableprefix.'cron__task', // old, going away
74 'T_items__item' => $app_db_tableprefix.'items__item', // old, going away
75 'T_postcats' => $app_db_tableprefix.'postcats', // old, going away
76 'T_items__prerendering' => $app_db_tableprefix.'items__prerendering', // old, going away
77 'T_items__status' => $app_db_tableprefix.'items__status', // old, going away
78 'T_items__itemtag' => $app_db_tableprefix.'items__itemtag', // old, going away
79 'T_items__type' => $app_db_tableprefix.'items__type', // old, going away
80 'T_items__version' => $app_db_tableprefix.'items__version', // old, going away
81 'T_pluginevents' => $app_db_tableprefix.'pluginevents', // old, going away
82 'T_pluginsettings' => $app_db_tableprefix.'pluginsettings', // old, going away
83 'T_pluginusersettings' => $app_db_tableprefix.'pluginusersettings', // old, going away
84 'T_items__tag' => $app_db_tableprefix.'items__tag', // old, going away
85 'T_templates__template' => $app_db_tableprefix.'templates__template', // old, going away
86 'T_templates__container' => $app_db_tableprefix.'templates__container', // old, going away
87 'T_usersettings' => $app_db_tableprefix.'usersettings', // old, going away
88 'T_widget' => $app_db_tableprefix.'widget', // old, going away
89 );
9068
91// Controller mappings69// Controller mappings
92$ctrl_mappings = array(70$ctrl_mappings = array(
@@ -452,7 +430,7 @@
452 // we have blog files430 // we have blog files
453 $entries['file_manager']['entries']['fm_view_blog'] = array(431 $entries['file_manager']['entries']['fm_view_blog'] = array(
454 'text' => T_('View BLOG Files').'&hellip;',432 'text' => T_('View BLOG Files').'&hellip;',
455 'href' => $admin_url.'?ctrl=files&amp;root=collection_'.$blog_id,433 'href' => $admin_url.'?ctrl=files&amp;root=blog_'.$blog_id,
456 );434 );
457 if( empty( $Blog ) )435 if( empty( $Blog ) )
458 {436 {
@@ -498,7 +476,7 @@
498 // we have blog files476 // we have blog files
499 $entries['file_manager']['entries']['fm_add_blog'] = array(477 $entries['file_manager']['entries']['fm_add_blog'] = array(
500 'text' => T_('Upload BLOG Files').'&hellip;',478 'text' => T_('Upload BLOG Files').'&hellip;',
501 'href' => $admin_url.'?ctrl=upload&amp;root=collection_'.$blog_id,479 'href' => $admin_url.'?ctrl=upload&amp;root=blog_'.$blog_id,
502 );480 );
503 if( empty( $Blog ) )481 if( empty( $Blog ) )
504 {482 {
@@ -683,7 +661,7 @@
683 // current user's profile661 // current user's profile
684 $entries['userprefs']['entries']['userprof'] = array(662 $entries['userprefs']['entries']['userprof'] = array(
685 'text' => T_('Your Profile').'&hellip;',663 'text' => T_('Your Profile').'&hellip;',
686 'href' => get_user_profile_url(),664 'href' => get_user_profile_url( $current_User->ID ),
687 );665 );
688666
689 if( $current_User->check_perm( 'users', 'edit' ) )667 if( $current_User->check_perm( 'users', 'edit' ) )
@@ -765,13 +743,12 @@
765 ),743 ),
766 );744 );
767745
768
769 if( ! $current_User->check_perm( 'admin', 'visible' ) )746 if( ! $current_User->check_perm( 'admin', 'visible' ) )
770 {747 {
771 // user can not access admin, replace admin link with profile link748 // user can not access admin, replace admin link with profile link
772 $entries['abswitch']['text'] = '<strong>'.$current_User->login.'</strong>';749 $entries['abswitch']['text'] = '<strong>'.$current_User->login.'</strong>';
773 $entries['abswitch']['title'] = T_('Edit your user profile');750 $entries['abswitch']['title'] = T_('Edit your user profile');
774 $entries['abswitch']['href'] = get_user_profile_url();751 $entries['abswitch']['href'] = get_user_profile_url( $current_User->ID );
775 $entries['abswitch']['class'] = '';752 $entries['abswitch']['class'] = '';
776753
777 if( $subs_url = get_user_subs_url() )754 if( $subs_url = get_user_subs_url() )
778755
=== modified file 'qp_inc/_core/_param.funcs.php'
--- qp_inc/_core/_param.funcs.php 2013-03-23 18:54:25 +0000
+++ qp_inc/_core/_param.funcs.php 2013-04-18 18:37:26 +0000
@@ -387,6 +387,10 @@
387 */387 */
388function param_check_number( $var, $err_msg, $required = false )388function param_check_number( $var, $err_msg, $required = false )
389{389{
390 // first get the param even as a string to avoid red-death errors
391 param( $var, 'string', $required ? true : '' );
392
393 // if it is empty and that's okay then we're done? wait it might be a string ... which might be okay anyway
390 if( empty( $GLOBALS[$var] ) && ! $required )394 if( empty( $GLOBALS[$var] ) && ! $required )
391 {395 {
392 // empty is OK396 // empty is OK
@@ -395,6 +399,7 @@
395399
396 if( ! preg_match( '#^[0-9]+$#', $GLOBALS[$var] ) )400 if( ! preg_match( '#^[0-9]+$#', $GLOBALS[$var] ) )
397 {401 {
402 // forget_param( 'link_ID' );
398 param_error( $var, $err_msg );403 param_error( $var, $err_msg );
399 return false;404 return false;
400 }405 }
401406
=== modified file 'qp_inc/_core/model/__core.install.php'
--- qp_inc/_core/model/__core.install.php 2013-03-22 21:28:25 +0000
+++ qp_inc/_core/model/__core.install.php 2013-04-18 18:37:26 +0000
@@ -55,7 +55,7 @@
55 blog_tagline VARCHAR(250) NULL default '',55 blog_tagline VARCHAR(250) NULL default '',
56 blog_description VARCHAR(250) NULL default '',56 blog_description VARCHAR(250) NULL default '',
57 blog_longdesc TEXT NULL DEFAULT NULL,57 blog_longdesc TEXT NULL DEFAULT NULL,
58 blog_locale VARCHAR(20) NOT NULL DEFAULT 'en-EU',58 blog_locale VARCHAR(20) NOT NULL DEFAULT 'en-US',
59 blog_access_type VARCHAR(10) NOT NULL DEFAULT 'index.php',59 blog_access_type VARCHAR(10) NOT NULL DEFAULT 'index.php',
60 blog_siteurl VARCHAR(120) NOT NULL default '',60 blog_siteurl VARCHAR(120) NOT NULL default '',
61 blog_urlname VARCHAR(255) NOT NULL DEFAULT 'urlname',61 blog_urlname VARCHAR(255) NOT NULL DEFAULT 'urlname',
@@ -202,7 +202,7 @@
202 'T_files' => array( 'Creating files table',202 'T_files' => array( 'Creating files table',
203 "CREATE TABLE T_files (203 "CREATE TABLE T_files (
204 file_ID INT(11) unsigned not null AUTO_INCREMENT,204 file_ID INT(11) unsigned not null AUTO_INCREMENT,
205 file_root_type ENUM('absolute','user','collection','shared','templates') not null default 'absolute',205 file_root_type ENUM('absolute','user','blog','shared','templates') not null default 'absolute',
206 file_root_ID INT(11) unsigned not null default 0,206 file_root_ID INT(11) unsigned not null default 0,
207 file_path VARCHAR(255) not null default '',207 file_path VARCHAR(255) not null default '',
208 file_title VARCHAR(255),208 file_title VARCHAR(255),
@@ -565,36 +565,6 @@
565 UNIQUE wi_order( wi_widget_blog_ID, wi_sco_name, wi_order )565 UNIQUE wi_order( wi_widget_blog_ID, wi_sco_name, wi_order )
566 ) ENGINE = innodb DEFAULT CHARSET = $db_storage_charset" ),566 ) ENGINE = innodb DEFAULT CHARSET = $db_storage_charset" ),
567567
568 /**
569 * This table holds info about fields a plugin might want to access and
570 * use. The only time it gets called is on a plugin's settings page
571 * for the various bits that make a plugin field be a plugin field
572 */
573 'T_plugin_sharedfields' => array( 'Creating table for User field definitions',
574 "CREATE TABLE T_plugin_sharedfields (
575 psf_fieldname VARCHAR(16) NOT NULL,
576 psf_label VARCHAR(255) NOT NULL,
577 psf_type VARCHAR(255) NOT NULL, -- probably only 'text', maybe 'checkbox', 'select' is crazy talk!
578 psf_note VARCHAR(255) NOT NULL,
579 psf_validate VARCHAR(255) NOT NULL, -- make sure a url is a url ... for example
580 PRIMARY KEY ( psf_fieldname )
581 ) ENGINE = innodb DEFAULT CHARSET = $db_storage_charset" ),
582
583 /**
584 * This table holds user-specific info for any shared plugin field. When on a
585 * plugin's settings page it gets accessed to find then store info about a
586 * user. The plugin then stores the fact that some info about the user
587 * is stored in this table for the rest of QP to do it's thing with.
588 */
589 'T_plugin_sharedvalues' => array( 'Creating table for User fields',
590 "CREATE TABLE T_plugin_sharedvalues (
591 psv_ID INT(10) unsigned NOT NULL auto_increment,
592 psv_user_ID INT(10) unsigned NOT NULL,
593 psv_psf_fieldname VARCHAR(32) NOT NULL,
594 psv_userfieldvalue VARCHAR(255) NOT NULL,
595 PRIMARY KEY ( psv_ID )
596 ) ENGINE = innodb DEFAULT CHARSET = $db_storage_charset" ),
597
598);568);
599569
600?>570?>
601571
=== modified file 'qp_inc/_core/ui/results/_results.class.php'
--- qp_inc/_core/ui/results/_results.class.php 2013-03-22 21:28:25 +0000
+++ qp_inc/_core/ui/results/_results.class.php 2013-04-18 18:37:26 +0000
@@ -92,9 +92,13 @@
92 */92 */
93 var $current_Obj;93 var $current_Obj;
94 /**94 /**
95 * Definitions for each column:95 * Definitions for each column
96 *
97 * Possible definitions for each column are:
96 * - th98 * - th
99 * - th_class
97 * - td100 * - td
101 * - td_class
98 * - order: SQL column name(s) to sort by (delimited by comma)102 * - order: SQL column name(s) to sort by (delimited by comma)
99 * - order_objects_callback: a PHP callback function (can be array( $Object, $method )).103 * - order_objects_callback: a PHP callback function (can be array( $Object, $method )).
100 * This gets three params: $a, $b, $desc. $a and $b are instantiated objects104 * This gets three params: $a, $b, $desc. $a and $b are instantiated objects
@@ -104,8 +108,7 @@
104 * This gets three params: $a, $b, $desc. $a and $b are DB row objects, $desc108 * This gets three params: $a, $b, $desc. $a and $b are DB row objects, $desc
105 * is either 'ASC' or 'DESC'. The function has to return -1, 0 or 1, according109 * is either 'ASC' or 'DESC'. The function has to return -1, 0 or 1, according
106 * to if the $a < $b, $a == $b or $a > $b.110 * to if the $a < $b, $a == $b or $a > $b.
107 * - td_class111 * @var array something goes here
108 * @var foo
109 */112 */
110 var $cols;113 var $cols;
111 /**114 /**
@@ -191,11 +194,14 @@
191 * Constructor194 * Constructor
192 *195 *
193 * @param string SQL query196 * @param string SQL query
194 * @param string prefix to differentiate page/order params when multiple Results appear one same page197 * @param string prefix to differentiate page/order params when multiple Results
195 * @param string default ordering of columns (special syntax) if not specified in the URL params198 * appear one same page
199 * @param string default ordering of columns (special syntax) if not specified
200 * in the URL params
196 * - example: -A-- will sort in ascending order on 2nd column201 * - example: -A-- will sort in ascending order on 2nd column
197 * - example: ---D will sort in descending order on 4th column202 * - example: ---D will sort in descending order on 4th column
198 * @param integer number of lines displayed on one page (0 to disable paging; null to use $UserSettings/results_per_page)203 * @param integer number of lines displayed on one page (0 to disable paging;
204 * null to use $UserSettings/results_per_page)
199 * @param string SQL to get the total count of results205 * @param string SQL to get the total count of results
200 * @param boolean206 * @param boolean
201 * @param string|integer SQL query used to count the total # of rows207 * @param string|integer SQL query used to count the total # of rows
202208
=== modified file 'qp_inc/blogs/blogs.ctrl.php'
--- qp_inc/blogs/blogs.ctrl.php 2013-03-12 06:26:03 +0000
+++ qp_inc/blogs/blogs.ctrl.php 2013-04-18 18:37:26 +0000
@@ -86,7 +86,7 @@
86 {86 {
87 // okay good, continue87 // okay good, continue
88 $file_imploded = implode( '', $file_loaded );88 $file_imploded = implode( '', $file_loaded );
89 $stub_filename = 'blog'.$edited_Blog->urlname.'.php';89 $stub_filename = $edited_Blog->urlname.'.php';
90 $new_file = $basepath.$stub_filename;90 $new_file = $basepath.$stub_filename;
91 $f = @fopen( $new_file, 'w' );91 $f = @fopen( $new_file, 'w' );
92 if( $f == false )92 if( $f == false )
9393
=== modified file 'qp_inc/blogs/model/_blog.class.php'
--- qp_inc/blogs/model/_blog.class.php 2013-03-12 21:17:25 +0000
+++ qp_inc/blogs/model/_blog.class.php 2013-04-18 18:37:26 +0000
@@ -1089,7 +1089,7 @@
1089 {1089 {
1090 global $dispatcher;1090 global $dispatcher;
10911091
1092 return $dispatcher.'?ctrl=files&amp;root='.FileRoot::gen_ID( 'collection', $this->ID );1092 return $dispatcher.'?ctrl=files&amp;root='.FileRoot::gen_ID( 'blog', $this->ID );
1093 }1093 }
10941094
10951095
@@ -1133,7 +1133,7 @@
11331133
1134 if( ! $Settings->get( 'fm_enable_roots_blog' ) )1134 if( ! $Settings->get( 'fm_enable_roots_blog' ) )
1135 {1135 {
1136 // User directories are disabled1136 // blog directories are disabled
1137 return false;1137 return false;
1138 }1138 }
11391139
@@ -1208,7 +1208,7 @@
12081208
1209 if( ! $Settings->get( 'fm_enable_roots_blog' ) )1209 if( ! $Settings->get( 'fm_enable_roots_blog' ) )
1210 {1210 {
1211 // User directories are disabled1211 // blog directories are disabled
1212 return false;1212 return false;
1213 }1213 }
12141214
12151215
=== modified file 'qp_inc/files/file_settings.ctrl.php'
--- qp_inc/files/file_settings.ctrl.php 2013-03-22 21:28:25 +0000
+++ qp_inc/files/file_settings.ctrl.php 2013-04-18 18:37:26 +0000
@@ -29,9 +29,17 @@
29 {29 {
30 $Settings->delete_array( array(30 $Settings->delete_array( array(
31 'fm_enable_roots_blog',31 'fm_enable_roots_blog',
32 'fm_blog_limit_files',
33 'fm_blog_limit_bytes',
32 'fm_enable_roots_user',34 'fm_enable_roots_user',
35 'fm_user_limit_files',
36 'fm_user_limit_bytes',
33 'fm_enable_roots_shared',37 'fm_enable_roots_shared',
38 'fm_shared_limit_files',
39 'fm_shared_limit_bytes',
34 'fm_enable_roots_templates',40 'fm_enable_roots_templates',
41 'fm_templates_limit_files',
42 'fm_templates_limit_bytes',
35 'fm_enable_create_dir',43 'fm_enable_create_dir',
36 'fm_default_chmod_dir',44 'fm_default_chmod_dir',
37 'fm_enable_create_file',45 'fm_enable_create_file',
@@ -51,18 +59,48 @@
51 }59 }
52 else60 else
53 {61 {
54 // Filemanager settings62 // "Accessible file roots" settings
63 // ... blog folders
55 param( 'fm_enable_roots_blog', 'integer', 0 );64 param( 'fm_enable_roots_blog', 'integer', 0 );
56 $Settings->set( 'fm_enable_roots_blog', $fm_enable_roots_blog );65 $Settings->set( 'fm_enable_roots_blog', $fm_enable_roots_blog );
66 param_check_number( 'fm_blog_limit_files', sprintf( T_('"%s file limit" must be numbers only'), 'blog' ) );
67 $Settings->set( 'fm_blog_limit_files', $fm_blog_limit_files );
68 param_check_number( 'fm_blog_limit_bytes', sprintf( T_('"%s dir size" must be numbers only'), 'blog' ) );
69 $Settings->set( 'fm_blog_limit_bytes', $fm_blog_limit_bytes );
70 // ... user folders
57 param( 'fm_enable_roots_user', 'integer', 0 );71 param( 'fm_enable_roots_user', 'integer', 0 );
58 $Settings->set( 'fm_enable_roots_user', $fm_enable_roots_user );72 $Settings->set( 'fm_enable_roots_user', $fm_enable_roots_user );
73 param_check_number( 'fm_user_limit_files', sprintf( T_('"%s file limit" must be numbers only'), 'user' ) );
74 $Settings->set( 'fm_user_limit_files', $fm_user_limit_files );
75 param_check_number( 'fm_user_limit_bytes', sprintf( T_('"%s dir size" must be numbers only'), 'user' ) );
76 $Settings->set( 'fm_user_limit_bytes', $fm_user_limit_bytes );
77 // ... shared folders
59 param( 'fm_enable_roots_shared', 'integer', 0 );78 param( 'fm_enable_roots_shared', 'integer', 0 );
60 $Settings->set( 'fm_enable_roots_shared', $fm_enable_roots_shared );79 $Settings->set( 'fm_enable_roots_shared', $fm_enable_roots_shared );
80 param_check_number( 'fm_shared_limit_files', sprintf( T_('"%s file limit" must be numbers only'), 'shared' ) );
81 $Settings->set( 'fm_shared_limit_files', $fm_shared_limit_files );
82 param_check_number( 'fm_shared_limit_bytes', sprintf( T_('"%s dir size" must be numbers only'), 'shared' ) );
83 $Settings->set( 'fm_shared_limit_bytes', $fm_shared_limit_bytes );
84 // ... template folders
61 param( 'fm_enable_roots_templates', 'integer', 0 );85 param( 'fm_enable_roots_templates', 'integer', 0 );
62 $Settings->set( 'fm_enable_roots_templates', $fm_enable_roots_templates );86 $Settings->set( 'fm_enable_roots_templates', $fm_enable_roots_templates );
87 param_check_number( 'fm_templates_limit_files', sprintf( T_('"%s file limit" must be numbers only'), 'template' ) );
88 $Settings->set( 'fm_templates_limit_files', $fm_templates_limit_files );
89 param_check_number( 'fm_templates_limit_bytes', sprintf( T_('"%s dir size" must be numbers only'), 'template' ) );
90 $Settings->set( 'fm_templates_limit_bytes', $fm_templates_limit_bytes );
91
92 // "File creation options" settings
63 param( 'fm_enable_create_dir', 'integer', 0 );93 param( 'fm_enable_create_dir', 'integer', 0 );
64 $Settings->set( 'fm_enable_create_dir', $fm_enable_create_dir );94 $Settings->set( 'fm_enable_create_dir', $fm_enable_create_dir );
65 // Default dir CHMOD95 param( 'fm_enable_create_file', 'integer', 0 );
96 $Settings->set( 'fm_enable_create_file', $fm_enable_create_file );
97 param( 'upload_enabled', 'integer', 0 );
98 $Settings->set( 'upload_enabled', $upload_enabled );
99 param_integer_range( 'upload_maxkb', 1, $upload_maxmaxkb, T_('Maximum allowed filesize must be between %d and %d KB.') );
100 $Settings->set( 'upload_maxkb', $upload_maxkb ); // upload limit
101
102 // "File creation options" settings
103 // ... default dir CHMOD
66 if( param( 'fm_default_chmod_dir', 'string', NULL ) !== NULL )104 if( param( 'fm_default_chmod_dir', 'string', NULL ) !== NULL )
67 {105 {
68 if( ! preg_match('~^[0-7]{3}$~', $fm_default_chmod_dir) )106 if( ! preg_match('~^[0-7]{3}$~', $fm_default_chmod_dir) )
@@ -71,9 +109,7 @@
71 }109 }
72 $Settings->set( 'fm_default_chmod_dir', $fm_default_chmod_dir );110 $Settings->set( 'fm_default_chmod_dir', $fm_default_chmod_dir );
73 }111 }
74 param( 'fm_enable_create_file', 'integer', 0 );112 // ... default files CHMOD
75 $Settings->set( 'fm_enable_create_file', $fm_enable_create_file );
76 // Default files CHMOD
77 if( param( 'fm_default_chmod_file', 'string', NULL ) !== NULL )113 if( param( 'fm_default_chmod_file', 'string', NULL ) !== NULL )
78 {114 {
79 if( ! preg_match('~^[0-7]{3}$~', $fm_default_chmod_file) )115 if( ! preg_match('~^[0-7]{3}$~', $fm_default_chmod_file) )
@@ -82,23 +118,19 @@
82 }118 }
83 $Settings->set( 'fm_default_chmod_file', $fm_default_chmod_file );119 $Settings->set( 'fm_default_chmod_file', $fm_default_chmod_file );
84 }120 }
85 // Upload121 // ... valid folder and file name
86 param( 'upload_enabled', 'integer', 0 );122 param( 'regexp_dirname', 'string', '' );
87 $Settings->set( 'upload_enabled', $upload_enabled );123 if( param_check_isregexp( 'regexp_dirname', T_('Valid dirname pattern is not a regular expression!') ) )
88 param_integer_range( 'upload_maxkb', 1, $upload_maxmaxkb, T_('Maximum allowed filesize must be between %d and %d KB.') );124 {
89 $Settings->set( 'upload_maxkb', $upload_maxkb );125 $Settings->set( 'regexp_dirname', $regexp_dirname );
90 // Advanced settings126 }
91 param( 'regexp_filename', 'string', '' );127 param( 'regexp_filename', 'string', '' );
92 if( param_check_isregexp( 'regexp_filename', T_('Valid filename pattern is not a regular expression!') ) )128 if( param_check_isregexp( 'regexp_filename', T_('Valid filename pattern is not a regular expression!') ) )
93 {129 {
94 $Settings->set( 'regexp_filename', $regexp_filename );130 $Settings->set( 'regexp_filename', $regexp_filename );
95 }131 }
96 param( 'regexp_dirname', 'string', '' );
97 if( param_check_isregexp( 'regexp_dirname', T_('Valid dirname pattern is not a regular expression!') ) )
98 {
99 $Settings->set( 'regexp_dirname', $regexp_dirname );
100 }
101132
133 // wrap it up, ship it out
102 if( ! $Messages->count('error') )134 if( ! $Messages->count('error') )
103 {135 {
104 if( $Settings->dbupdate() )136 if( $Settings->dbupdate() )
105137
=== modified file 'qp_inc/files/files.ctrl.php'
--- qp_inc/files/files.ctrl.php 2013-03-22 21:28:25 +0000
+++ qp_inc/files/files.ctrl.php 2013-04-18 18:37:26 +0000
@@ -190,7 +190,7 @@
190if( empty( $fm_FileRoot ) && ! empty( $Blog ) )190if( empty( $fm_FileRoot ) && ! empty( $Blog ) )
191{191{
192 // Still not set a root, try to get it for the current Blog192 // Still not set a root, try to get it for the current Blog
193 $fm_FileRoot = & $FileRootCache->get_by_type_and_ID( 'collection', $Blog->ID );193 $fm_FileRoot = & $FileRootCache->get_by_type_and_ID( 'blog', $Blog->ID );
194 if( ! $fm_FileRoot || ! isset( $available_Roots[$fm_FileRoot->ID] ) )194 if( ! $fm_FileRoot || ! isset( $available_Roots[$fm_FileRoot->ID] ) )
195 {195 {
196 // Root not found or not in list of available ones196 // Root not found or not in list of available ones
@@ -775,7 +775,7 @@
775775
776 // fp> TODO: this block should move to a general level776 // fp> TODO: this block should move to a general level
777 // Try to go to the right blog:777 // Try to go to the right blog:
778 if( $fm_Filelist->get_root_type() == 'collection' )778 if( $fm_Filelist->get_root_type() == 'blog' )
779 {779 {
780 set_working_blog( $fm_Filelist->get_root_ID() );780 set_working_blog( $fm_Filelist->get_root_ID() );
781 // Load the blog we're in781 // Load the blog we're in
782782
=== modified file 'qp_inc/files/model/_file.class.php'
--- qp_inc/files/model/_file.class.php 2013-03-22 21:28:25 +0000
+++ qp_inc/files/model/_file.class.php 2013-04-18 18:37:26 +0000
@@ -1646,6 +1646,9 @@
16461646
1647 /**1647 /**
1648 * Generate the IMG THUMBNAIL tag with all the alt & title if available1648 * Generate the IMG THUMBNAIL tag with all the alt & title if available
1649 *
1650 * @todo (3086) EdB> this needs to be params instead of ordered bits
1651 * @todo (3086) EdB> this really needs params/bits for setting alt and title
1649 */1652 */
1650 function get_thumb_imgtag( $size_name = 'fit-80x80', $class = '', $align = '' )1653 function get_thumb_imgtag( $size_name = 'fit-80x80', $class = '', $align = '' )
1651 {1654 {
16521655
=== modified file 'qp_inc/files/model/_file.funcs.php'
--- qp_inc/files/model/_file.funcs.php 2013-03-22 21:28:25 +0000
+++ qp_inc/files/model/_file.funcs.php 2013-04-18 18:37:26 +0000
@@ -151,6 +151,7 @@
151 *151 *
152 * This checks if there's a _adminUI.class.php in there.152 * This checks if there's a _adminUI.class.php in there.
153 *153 *
154 * @todo (3086) EdB> this is ignoring the setting for default admin template :(
154 * @return array List of directory names that hold admin templates or false, if155 * @return array List of directory names that hold admin templates or false, if
155 * the admin templates directory does not exist.156 * the admin templates directory does not exist.
156 */157 */
@@ -181,14 +182,14 @@
181 }182 }
182 // lets alphabetize them183 // lets alphabetize them
183 sort( $r );184 sort( $r );
184 // if we have "wind" put it first so we default to that185 // if we have "earth" put it first so we default to that
185 if( in_array( 'wind', $r ) )186 if( in_array( 'earth', $r ) )
186 {187 {
187 $r_clone = array();188 $r_clone = array();
188 $r_clone[] = 'wind';189 $r_clone[] = 'earth';
189 foreach( $r as $v )190 foreach( $r as $v )
190 {191 {
191 if( $v != 'wind' )192 if( $v != 'earth' )
192 {193 {
193 $r_clone[] = $v;194 $r_clone[] = $v;
194 }195 }
195196
=== modified file 'qp_inc/files/model/_filelist.class.php'
--- qp_inc/files/model/_filelist.class.php 2013-03-18 19:20:42 +0000
+++ qp_inc/files/model/_filelist.class.php 2013-04-18 18:37:26 +0000
@@ -1166,9 +1166,12 @@
11661166
11671167
1168 /**1168 /**
1169 * Get Current Working Directory
1170 *
1169 * Returns cwd, where the accessible directories (below root) are clickable1171 * Returns cwd, where the accessible directories (below root) are clickable
1170 *1172 *
1171 * @return string cwd as clickable html1173 * @param boolean true hides most of the dir path, leaving only the "clickable" part
1174 * @return string current working directory (cwd) as clickable html
1172 */1175 */
1173 function get_cwd_clickable( $clickableOnly = true )1176 function get_cwd_clickable( $clickableOnly = true )
1174 {1177 {
@@ -1177,7 +1180,7 @@
1177 return ' -- '.T_('No directory.').' -- ';1180 return ' -- '.T_('No directory.').' -- ';
1178 }1181 }
11791182
1180 // Get the part of the path which is not clickable:1183 // Get the part of the path which is not clickable
1181 $r = substr( $this->_FileRoot->ads_path, 0, strrpos( substr( $this->_FileRoot->ads_path, 0, -1 ), '/' ) + 1 );1184 $r = substr( $this->_FileRoot->ads_path, 0, strrpos( substr( $this->_FileRoot->ads_path, 0, -1 ), '/' ) + 1 );
11821185
1183 // get the part that is clickable1186 // get the part that is clickable
11841187
=== modified file 'qp_inc/files/model/_fileroot.class.php'
--- qp_inc/files/model/_fileroot.class.php 2013-03-22 21:28:25 +0000
+++ qp_inc/files/model/_fileroot.class.php 2013-04-18 18:37:26 +0000
@@ -89,7 +89,7 @@
89 $this->ads_url = $User->get_media_url();89 $this->ads_url = $User->get_media_url();
90 return;90 return;
9191
92 case 'collection':92 case 'blog':
93 $BlogCache = & get_Cache( 'BlogCache' );93 $BlogCache = & get_Cache( 'BlogCache' );
94 $Blog = & $BlogCache->get_by_ID( $root_in_type_ID );94 $Blog = & $BlogCache->get_by_ID( $root_in_type_ID );
95 $this->name = $Blog->get( 'shortname' );95 $this->name = $Blog->get( 'shortname' );
@@ -156,7 +156,7 @@
156 case 'user':156 case 'user':
157 return NT_('User roots');157 return NT_('User roots');
158158
159 case 'collection':159 case 'blog':
160 return NT_('Blog roots');160 return NT_('Blog roots');
161161
162 default:162 default:
@@ -172,8 +172,8 @@
172 switch( $root_type )172 switch( $root_type )
173 {173 {
174 case 'user':174 case 'user':
175 case 'blog':
175 case 'shared':176 case 'shared':
176 case 'collection':
177 case 'templates':177 case 'templates':
178 return $root_type.'_'.$root_in_type_ID;178 return $root_type.'_'.$root_in_type_ID;
179 }179 }
180180
=== modified file 'qp_inc/files/model/_filerootcache.class.php'
--- qp_inc/files/model/_filerootcache.class.php 2013-03-22 21:28:25 +0000
+++ qp_inc/files/model/_filerootcache.class.php 2013-04-18 18:37:26 +0000
@@ -53,7 +53,7 @@
53 $bloglist = $BlogCache->load_user_blogs( 'blog_media_browse', $current_User->ID );53 $bloglist = $BlogCache->load_user_blogs( 'blog_media_browse', $current_User->ID );
54 foreach( $bloglist as $blog_ID )54 foreach( $bloglist as $blog_ID )
55 {55 {
56 if( $Root = & $this->get_by_type_and_ID( 'collection', $blog_ID, true ) )56 if( $Root = & $this->get_by_type_and_ID( 'blog', $blog_ID, true ) )
57 {57 {
58 $r[$Root->ID] = & $Root;58 $r[$Root->ID] = & $Root;
59 }59 }
6060
=== modified file 'qp_inc/files/upload.ctrl.php'
--- qp_inc/files/upload.ctrl.php 2013-03-12 21:17:25 +0000
+++ qp_inc/files/upload.ctrl.php 2013-04-18 18:37:26 +0000
@@ -210,6 +210,75 @@
210// Remember failed files (and the error messages)210// Remember failed files (and the error messages)
211$failedFiles = array();211$failedFiles = array();
212212
213// This next section will check if we have any file or byte restrictions,
214// and if so see if we will even bother trying to upload.
215if( isset( $_FILES ) && count( $_FILES ) )
216{
217 // Some files have been uploaded
218 global $upload_maxmaxkb;
219 $files_allowed = 99;
220 $bytes_allowed = $upload_maxmaxkb;
221 $uploading_denied = false;
222
223 // easiest first check is if we even have limits
224 $files_lim = $Settings->get( 'fm_'.$fm_FileRoot->type.'_limit_files' );
225 $bytes_lim = $Settings->get( 'fm_'.$fm_FileRoot->type.'_limit_bytes' );
226
227 if( $files_lim != '' || $bytes_lim != '' )
228 {
229 // we have a limit of some kind, so we deal with it
230 $fm_Filelist = new Filelist( $fm_FileRoot, $ads_list_path );
231 $fm_Filelist->load();
232 $files = $fm_Filelist->_total_files;
233 $bytes = $fm_Filelist->_total_bytes;
234
235 // have we reached or exceeded our file count limit?
236 if( $files_lim != '' )
237 {
238 if( $files >= $files_lim )
239 {
240 // yes: error message, get out
241 $Messages->add( sprintf( T_('This folder has reached the limit for number of files (%s) - uploading not allowed.'), $files_lim ), 'error' );
242 $uploading_denied = true;
243 }
244 else
245 {
246 $files_allowed = $files_lim - $files;
247 }
248 }
249
250 // have we reached or exceeded our byte count limit?
251 if( $bytes_lim != '' )
252 {
253 $bytes_lim = ( $bytes_lim * 1024 );
254 if( $bytes >= $bytes_lim )
255 {
256 // yes: error message, get out
257 $bytes_lim_kb = number_format( $bytes_lim );
258 $Messages->add( sprintf( T_('This folder has reached the limit for total bytes (%s) - uploading not allowed.'), $bytes_lim_kb ), 'error' );
259 $uploading_denied = true;
260 }
261 else
262 {
263 $bytes_allowed = $bytes_lim - $bytes;
264 }
265 }
266 }
267}
268
269// If we reached any limits we display the error message and call it a day
270if( $Messages->count('error') )
271{
272 $AdminUI->disp_html_head();
273 // Display title, menu, messages, etc. (Note: messages MUST be displayed AFTER the actions)
274 $AdminUI->disp_body_top();
275 $AdminUI->disp_global_footer();
276 exit(0);
277}
278
279// We have $files_allowed and $bytes_allowed. These are either real limits or
280// crazy-high high falsies. We will apply our limits after each upload ...
281
213// Process uploaded files282// Process uploaded files
214if( isset( $_FILES ) && count( $_FILES ) )283if( isset( $_FILES ) && count( $_FILES ) )
215{284{
@@ -222,6 +291,22 @@
222291
223 foreach( $_FILES['uploadfile']['name'] as $lKey => $lName )292 foreach( $_FILES['uploadfile']['name'] as $lKey => $lName )
224 {293 {
294 // check if our limits have been broken, if so abort out
295 if( ! $files_allowed )
296 {
297 // yes: error message, get out
298 $Messages->add( sprintf( T_('This folder has reached the limit for number of files (%s) - uploading &laquo;%s&raquo; cancelled.'), $files_lim, $lName ), 'error' );
299 continue; // abort upload for this file
300 }
301 // have we reached or exceeded our byte count limit?
302 if( $bytes_allowed < 1 )
303 {
304 // yes: error message, get out
305 $bytes_lim_kb = number_format( $bytes_lim );
306 $Messages->add( sprintf( T_('This folder has reached the limit for total bytes (%s) - uploading &laquo;%s&raquo; cancelled.'), $bytes_lim_kb, $lName ), 'error' );
307 continue; // abort upload for this file
308 }
309
225 if( empty( $lName ) )310 if( empty( $lName ) )
226 {311 {
227 // No file name312 // No file name
@@ -231,73 +316,69 @@
231 || ! empty( $uploadfile_desc[$lKey] )316 || ! empty( $uploadfile_desc[$lKey] )
232 || ! empty( $uploadfile_name[$lKey] ) )317 || ! empty( $uploadfile_name[$lKey] ) )
233 {318 {
234 // User specified params but NO file!!!319 // User specified params but no file; remember the file as failed when additional info provided
235 // Remember the file as failed when additional info provided.
236 $failedFiles[$lKey] = T_( 'Please select a local file to upload.' );320 $failedFiles[$lKey] = T_( 'Please select a local file to upload.' );
237 }321 }
238 // Abort upload for this file322 continue; // abort upload for this file
239 continue;
240 }323 }
241324
242 if( $Settings->get( 'upload_maxkb' )325 if( $Settings->get( 'upload_maxkb' )
243 && $_FILES['uploadfile']['size'][$lKey] > $Settings->get( 'upload_maxkb' )*1024 )326 && $_FILES['uploadfile']['size'][$lKey] > $Settings->get( 'upload_maxkb' )*1024 )
244 {327 {
245 // bigger than defined by blog328 // bigger than defined by blog
246 $failedFiles[$lKey] = sprintf(329 $failedFiles[$lKey] = sprintf( T_('The file is too large: %s but the maximum allowed is %s.'),
247 T_('The file is too large: %s but the maximum allowed is %s.'),
248 bytesreadable( $_FILES['uploadfile']['size'][$lKey] ),330 bytesreadable( $_FILES['uploadfile']['size'][$lKey] ),
249 bytesreadable( $Settings->get( 'upload_maxkb' )*1024 ) );331 bytesreadable( $Settings->get( 'upload_maxkb' )*1024 ) );
250 // Abort upload for this file332 continue; // abort upload for this file
251 continue;
252 }333 }
253334
254 if( $_FILES['uploadfile']['error'][$lKey] )335 if( $_FILES['uploadfile']['error'][$lKey] )
255 {336 {
256 // PHP has detected an error!337 // PHP has detected an error :: http://php.net/manual/en/features.file-upload.errors.php
257 switch( $_FILES['uploadfile']['error'][$lKey] )338 switch( $_FILES['uploadfile']['error'][$lKey] )
258 {339 {
340 case UPLOAD_ERR_INI_SIZE:
341 $failedFiles[$lKey] = T_('The file exceeds the upload_max_filesize directive in php.ini.');
342 continue; // abort upload for this file
343
259 case UPLOAD_ERR_FORM_SIZE:344 case UPLOAD_ERR_FORM_SIZE:
260 // The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form345 // The uploaded file exceeds the MAX_FILE_SIZE directive that was specified
261 // This can easily be changed, so we do not use it.. file size gets checked for real just above346 // in the html form. This can easily be changed, so we do not use it. File
347 // size gets checked for real just before this switch
262 break;348 break;
263349
264 case UPLOAD_ERR_INI_SIZE: // bigger than allowed in php.ini
265 $failedFiles[$lKey] = T_('The file exceeds the upload_max_filesize directive in php.ini.');
266 // Abort upload for this file
267 continue;
268
269 case UPLOAD_ERR_PARTIAL:350 case UPLOAD_ERR_PARTIAL:
270 $failedFiles[$lKey] = T_('The file was only partially uploaded.');351 $failedFiles[$lKey] = T_('The file was only partially uploaded.');
271 // Abort upload for this file352 continue; // abort upload for this file
272 continue;
273353
274 case UPLOAD_ERR_NO_FILE:354 case UPLOAD_ERR_NO_FILE:
275 // Is probably the same as empty( $lName ) before
276 $failedFiles[$lKey] = T_('No file was uploaded.');355 $failedFiles[$lKey] = T_('No file was uploaded.');
277 // Abort upload for this file356 continue; // abort upload for this file
278 continue;
279357
280 case 6: // numerical value of UPLOAD_ERR_NO_TMP_DIR358 case UPLOAD_ERR_NO_TMP_DIR:
281 # (min_php: 4.3.10, 5.0.3) case UPLOAD_ERR_NO_TMP_DIR:
282 // Missing a temporary folder.
283 $failedFiles[$lKey] = T_('Missing a temporary folder (upload_tmp_dir in php.ini).');359 $failedFiles[$lKey] = T_('Missing a temporary folder (upload_tmp_dir in php.ini).');
284 // Abort upload for this file360 continue; // abort upload for this file
285 continue;361
362 case UPLOAD_ERR_CANT_WRITE:
363 $failedFiles[$lKey] = T_('Failed to write file to disk.');
364 continue; // abort upload for this file
365
366 case UPLOAD_ERR_EXTENSION:
367 $failedFiles[$lKey] = T_('A PHP extension stopped the file upload.');
368 continue; // abort upload for this file
286369
287 default:370 default:
288 $failedFiles[$lKey] = T_('Unknown error.').' #'.$_FILES['uploadfile']['error'][$lKey];371 $failedFiles[$lKey] = T_('Unknown error.').' #'.$_FILES['uploadfile']['error'][$lKey];
289 // Abort upload for this file:372 continue; // abort upload for this file
290 continue;
291 }373 }
292 }374 }
293375
294 if( !is_uploaded_file( $_FILES['uploadfile']['tmp_name'][$lKey] ) )376 if( ! is_uploaded_file( $_FILES['uploadfile']['tmp_name'][$lKey] ) )
295 {377 {
296 // Ensure that a malicious user hasn't tried to trick the script into working378 // Ensure that a malicious user hasn't tried to trick the script into
297 // on files upon which it should not be working379 // working on files upon which it should not be working
298 $failedFiles[$lKey] = T_('The file does not seem to be a valid upload! It may exceed the upload_max_filesize directive in php.ini.');380 $failedFiles[$lKey] = T_('The file does not seem to be a valid upload! It may exceed the upload_max_filesize directive in php.ini.');
299 // Abort upload for this file381 continue; // abort upload for this file
300 continue;
301 }382 }
302383
303 // If new name on server is specified check the extension and use the new name384 // If new name on server is specified check the extension and use the new name
@@ -325,8 +406,7 @@
325 {406 {
326 // Not a file name or not an allowed extension407 // Not a file name or not an allowed extension
327 $failedFiles[$lKey] = $error_filename;408 $failedFiles[$lKey] = $error_filename;
328 // Abort upload for this file409 continue; // abort upload for this file
329 continue;
330 }410 }
331411
332 // Get File object for requested target location412 // Get File object for requested target location
@@ -335,12 +415,11 @@
335415
336 if( $newFile->exists() )416 if( $newFile->exists() )
337 {417 {
338 // The file already exists in the target location!418 // The file already exists in the target location
339 // @todo (0000) Rename/Overwriting (save as filename_<numeric_extension> and419 // @todo (0000) Rename/Overwriting (save as filename_<numeric_extension> and
340 // provide interface to confirm, rename or overwrite)420 // provide interface to confirm, rename or overwrite)
341 $failedFiles[$lKey] = sprintf( T_('The file &laquo;%s&raquo; already exists.'), $newFile->dget( 'name' ) );421 $failedFiles[$lKey] = sprintf( T_('The file &laquo;%s&raquo; already exists.'), $newFile->dget( 'name' ) );
342 // Abort upload for this file422 continue; // abort upload for this file
343 continue;
344 }423 }
345424
346 // Trigger plugin event425 // Trigger plugin event
@@ -352,7 +431,7 @@
352 'size' => & $_FILES['uploadfile']['size'][$lKey],431 'size' => & $_FILES['uploadfile']['size'][$lKey],
353 ) ) )432 ) ) )
354 {433 {
355 // Plugin returned 'false'. Abort file upload434 // Plugin returned 'false' ... abort upload for this file
356 continue;435 continue;
357 }436 }
358437
@@ -360,8 +439,7 @@
360 if( ! @move_uploaded_file( $_FILES['uploadfile']['tmp_name'][$lKey], $newFile->get_full_path() ) )439 if( ! @move_uploaded_file( $_FILES['uploadfile']['tmp_name'][$lKey], $newFile->get_full_path() ) )
361 {440 {
362 $failedFiles[$lKey] = T_('An unknown error occurred when moving the uploaded file on the server.');441 $failedFiles[$lKey] = T_('An unknown error occurred when moving the uploaded file on the server.');
363 // Abort upload for this file442 continue; // abort upload for this file
364 continue;
365 }443 }
366444
367 // change to default chmod settings445 // change to default chmod settings
@@ -482,6 +560,10 @@
482 // Store File object into DB560 // Store File object into DB
483 $newFile->dbsave();561 $newFile->dbsave();
484562
563 // subtract this file from $files_allowed and $bytes_allowed
564 $files_allowed = $files_allowed - 1;
565 $bytes_allowed = $bytes_allowed - $_FILES['uploadfile']['size'][$lKey];
566
485 $Plugins->trigger_event( 'AfterFileSave', array(567 $Plugins->trigger_event( 'AfterFileSave', array(
486 'newFile' => & $newFile568 'newFile' => & $newFile
487 ) );569 ) );
488570
=== modified file 'qp_inc/files/views/_file_browse.view.php'
--- qp_inc/files/views/_file_browse.view.php 2013-03-18 19:20:42 +0000
+++ qp_inc/files/views/_file_browse.view.php 2013-04-18 18:37:26 +0000
@@ -303,10 +303,10 @@
303 echo '<div class="toolbaritem">';303 echo '<div class="toolbaritem">';
304 $Form = new Form( NULL, 'fmbar_quick_upload', 'post', 'none', 'multipart/form-data' );304 $Form = new Form( NULL, 'fmbar_quick_upload', 'post', 'none', 'multipart/form-data' );
305 $Form->begin_form();305 $Form->begin_form();
306 $Form->hidden_ctrl();306 $Form->hidden( 'ctrl', 'upload' );
307 $Form->hidden( 'upload_quickmode', 1 );307 $Form->hidden( 'upload_quickmode', 1 );
308 // The following is mainly a hint to the browser.308 // The following is mainly a hint to the browser.
309 $Form->hidden( 'MAX_FILE_SIZE', $Settings->get( 'upload_maxkb' )*1024 );309 $Form->hidden( 'MAX_FILE_SIZE', $Settings->get( 'upload_maxkb' ) * 1024 );
310 $Form->hiddens_by_key( get_memorized('ctrl') );310 $Form->hiddens_by_key( get_memorized('ctrl') );
311 echo '<div>';311 echo '<div>';
312 echo '<input name="uploadfile[]" type="file" size="10" />';312 echo '<input name="uploadfile[]" type="file" size="10" />';
313313
=== modified file 'qp_inc/files/views/_file_browse_set.form.php'
--- qp_inc/files/views/_file_browse_set.form.php 2013-03-18 19:20:42 +0000
+++ qp_inc/files/views/_file_browse_set.form.php 2013-04-18 18:37:26 +0000
@@ -22,7 +22,7 @@
22{22{
23 echo '<p class="note">'.T_('See also:').' ';23 echo '<p class="note">'.T_('See also:').' ';
2424
25 if( $fm_FileRoot->type == 'collection' )25 if( $fm_FileRoot->type == 'blog' )
26 {26 {
27 echo T_('Blog Settings').' &gt; '.T_('General').' &gt; <a href="?ctrl=blog_settings&tab=general&blog='.$fm_FileRoot->in_type_ID.'">'27 echo T_('Blog Settings').' &gt; '.T_('General').' &gt; <a href="?ctrl=blog_settings&tab=general&blog='.$fm_FileRoot->in_type_ID.'">'
28 .T_('Media directory location').'</a> &bull; ';28 .T_('Media directory location').'</a> &bull; ';
2929
=== modified file 'qp_inc/files/views/_file_list.inc.php'
--- qp_inc/files/views/_file_list.inc.php 2013-03-22 21:28:25 +0000
+++ qp_inc/files/views/_file_list.inc.php 2013-04-18 18:37:26 +0000
@@ -459,7 +459,7 @@
459 $title_options = array();459 $title_options = array();
460 $caption_options = array();460 $caption_options = array();
461461
462 if( $mode != 'upload' && ( $fm_Filelist->get_root_type() == 'collection' || ! empty( $Blog ) ) )462 if( $mode != 'upload' && ( $fm_Filelist->get_root_type() == 'blog' || ! empty( $Blog ) ) )
463 {463 {
464 // We are browsing files for a blog464 // We are browsing files for a blog
465 // fp> TODO: use current as default but let user choose into which blog he wants to post465 // fp> TODO: use current as default but let user choose into which blog he wants to post
466466
=== modified file 'qp_inc/files/views/_file_settings.form.php'
--- qp_inc/files/views/_file_settings.form.php 2013-03-22 21:28:25 +0000
+++ qp_inc/files/views/_file_settings.form.php 2013-04-18 18:37:26 +0000
@@ -66,79 +66,52 @@
66 return $r;66 return $r;
67}67}
6868
69
70/**
71 * Javascript to init hidden/shown state of a fastform field based on a checkbox
72 *
73 * EXPERIMENTAL
74 * Will be moved to another file, I'm leaving it here for a short period, in order to provide context
75 *
76 * @param string form field id as used when creating it with the Form class
77 * @param string DOM id
78 */
79function JS_showhide_ffield_on_checkbox( $field_id, $checkbox_id )
80{
81 return '<script type="text/javascript">
82 document.getElementById("ffield_'.$field_id.'").style.display = (document.getElementById("'.$checkbox_id.'").checked ? "" : "none")
83 </script>';
84}
85
86
87/**
88 * Javascript hide/show all DOM elements with a particular class based on current checkbox
89 *
90 * EXPERIMENTAL
91 * Will be moved to another file, I'm leaving it here for a short period, in order to provide context
92 *
93 * @param string DOM class name
94 */
95function JS_showhide_class_on_this( $class )
96{
97 return 'if( this.checked )
98 {
99 jQuery(".'.$class.'").show();
100 }
101 else
102 {
103 jQuery(".'.$class.'").hide();
104 }';
105}
106
107
108/**
109 * Javascript hide/show a fastform field based on current checkbox
110 *
111 * EXPERIMENTAL
112 * Will be moved to another file, I'm leaving it here for a short period, in order to provide context
113 *
114 * @param string DOM id
115 */
116function JS_showhide_ffield_on_this( $field_id )
117{
118 return 'document.getElementById("ffield_'.$field_id.'").style.display = (this.checked ? "" : "none")';
119}
120
121$Form = new Form( NULL, 'files_checkchanges' );69$Form = new Form( NULL, 'files_checkchanges' );
122$Form->begin_form( 'fform', T_('File Settings') );70$Form->begin_form( 'fform', T_('File Settings') );
123$Form->hidden_ctrl();71$Form->hidden_ctrl();
124$Form->hidden( 'action', 'update' );72$Form->hidden( 'action', 'update' );
12573
126$Form->begin_fieldset( T_('Accessible file roots'), array( 'id' => 'ffset_fileroots', 'class' => 'additional_file_settings' ) );74$Form->begin_fieldset( T_('Accessible file roots'), array( 'id' => 'ffset_fileroots', 'class' => 'additional_file_settings' ) );
127$Form->checkbox( 'fm_enable_roots_blog', $Settings->get( 'fm_enable_roots_blog' ), T_('Enable blog directories'), T_('Check to enable root directories for blogs.' ) );75$Form->checkbox_input( 'fm_enable_roots_blog', $Settings->get( 'fm_enable_roots_blog' ), T_('Enable blog directories'),
128$Form->checkbox( 'fm_enable_roots_user', $Settings->get( 'fm_enable_roots_user' ), T_('Enable user directories'), T_('Check to enable root directories for users.' ) );76 array( 'note' => T_('Check to enable root directories for blogs.'),
129$Form->checkbox( 'fm_enable_roots_shared', $Settings->get( 'fm_enable_roots_shared' ), T_('Enable shared directory'), T_('Check to enable shared root directory.' ) );77 'onclick' => 'document.getElementById("fm_blog_limits").style.display = (this.checked==true ? "" : "none") ;' ) );
130$Form->checkbox( 'fm_enable_roots_templates', $Settings->get( 'fm_enable_roots_templates' ), T_('Enable templates directory'), T_('Check to enable root directory for templates.' ) ); // fp> note: meaning may change to 1 dir per (installed) template78echo '<div id="fm_blog_limits">';
79$Form->text_input( 'fm_blog_limit_files', $Settings->get( 'fm_blog_limit_files' ), 3, T_('blog file limit'), T_('This limits how many files a blog folder can have. Leave empty for no limit.') );
80$Form->text_input( 'fm_blog_limit_bytes', $Settings->get( 'fm_blog_limit_bytes' ), 6, T_('blog dir size'), T_('KB. This limits how many kilobytes a blog folder can have. Leave empty for no limit.' ) );
81echo '</div>';
82$Form->checkbox_input( 'fm_enable_roots_user', $Settings->get( 'fm_enable_roots_user' ), T_('Enable user directories'),
83 array( 'note' => T_('Check to enable root directories for users.' ),
84 'onclick' => 'document.getElementById("fm_user_limits").style.display = (this.checked==true ? "" : "none") ;' ) );
85echo '<div id="fm_user_limits">';
86$Form->text_input( 'fm_user_limit_files', $Settings->get( 'fm_user_limit_files' ), 3, T_('user file limit'), T_('This limits how many files a user folder can have. Leave empty for no limit.') );
87$Form->text_input( 'fm_user_limit_bytes', $Settings->get( 'fm_user_limit_bytes' ), 6, T_('user dir size'), T_('KB. This limits how many kilobytes a user folder can have. Leave empty for no limit.' ) );
88echo '</div>';
89$Form->checkbox_input( 'fm_enable_roots_shared', $Settings->get( 'fm_enable_roots_shared' ), T_('Enable shared directory'),
90 array( 'note' => T_('Check to enable shared root directory.' ),
91 'onclick' => 'document.getElementById("fm_shared_limits").style.display = (this.checked==true ? "" : "none") ;' ) );
92echo '<div id="fm_shared_limits">';
93$Form->text_input( 'fm_shared_limit_files', $Settings->get( 'fm_shared_limit_files' ), 3, T_('shared file limit'), T_('This limits how many files a shared folder can have. Leave empty for no limit.') );
94$Form->text_input( 'fm_shared_limit_bytes', $Settings->get( 'fm_shared_limit_bytes' ), 6, T_('shared dir size'), T_('KB. This limits how many kilobytes a shared folder can have. Leave empty for no limit.' ) );
95echo '</div>';
96$Form->checkbox_input( 'fm_enable_roots_templates', $Settings->get( 'fm_enable_roots_templates' ), T_('Enable templates directory'),
97 array( 'note' => T_('Check to enable root directory for templates.' ),
98 'onclick' => 'document.getElementById("fm_templates_limits").style.display = (this.checked==true ? "" : "none") ;' ) );
99echo '<div id="fm_templates_limits">';
100$Form->text_input( 'fm_templates_limit_files', $Settings->get( 'fm_templates_limit_files' ), 3, T_('template file limit'), T_('This limits how many files a template folder can have. Leave empty for no limit.') );
101$Form->text_input( 'fm_templates_limit_bytes', $Settings->get( 'fm_templates_limit_bytes' ), 6, T_('template dir size'), T_('KB. This limits how many kilobytes a template folder can have. Leave empty for no limit.' ) );
102echo '</div>';
131$Form->end_fieldset();103$Form->end_fieldset();
132104
133$Form->begin_fieldset( T_('File creation options'), array( 'id' => 'ffset_filecreate', 'class' => 'additional_file_settings' ) );105$Form->begin_fieldset( T_('File creation options'), array( 'id' => 'ffset_filecreate', 'class' => 'additional_file_settings' ) );
134$Form->checkbox( 'fm_enable_create_dir', $Settings->get( 'fm_enable_create_dir' ), T_('Enable creation of folders'), T_('Check to enable creation of directories.' ) );106$Form->checkbox( 'fm_enable_create_dir', $Settings->get( 'fm_enable_create_dir' ), T_('Enable creation of folders'), T_('Check to enable creation of directories.' ) );
135$Form->checkbox( 'fm_enable_create_file', $Settings->get( 'fm_enable_create_file' ), T_('Enable creation of files'), T_('Check to enable creation of files.' ) );107$Form->checkbox( 'fm_enable_create_file', $Settings->get( 'fm_enable_create_file' ), T_('Enable creation of files'), T_('Check to enable creation of files.' ) );
136$Form->checkbox_input( 'upload_enabled', $Settings->get( 'upload_enabled' ), T_('Enable upload of files'), array(108$Form->checkbox_input( 'upload_enabled', $Settings->get( 'upload_enabled' ), T_('Enable upload of files'), array(
137 'note' => T_('Check to allow uploading files in general.' ), 'onclick' => JS_showhide_ffield_on_this('upload_maxkb') ) );109 'note' => T_('Check to allow uploading files in general.' ),
110 'onclick' => 'document.getElementById("upload_maxkb_div").style.display = (this.checked==true ? "" : "none") ;' ) );
111echo '<div id="upload_maxkb_div">';
138$Form->text_input( 'upload_maxkb', $Settings->get( 'upload_maxkb' ), 6, T_('Maximum upload filesize'),112$Form->text_input( 'upload_maxkb', $Settings->get( 'upload_maxkb' ), 6, T_('Maximum upload filesize'),
139 sprintf( /* TRANS: first %s is setting/var name, second is file name, third is limit value */ T_('KB. This cannot be higher than your PHP/Webserver setting and the limit of %s (in %s), which is currently %s!'), '$upload_maxmaxkb', '/qp_config/_advanced.php', $upload_maxmaxkb.' '.T_('KB') ), array( 'maxlength' => 7, 'required' => true ) );113 sprintf( /* TRANS: first %s is setting/var name, second is file name, third is limit value */ T_('KB. This cannot be higher than your PHP/Webserver setting and the limit of %s (in %s), which is currently %s!'), '$upload_maxmaxkb', '/qp_config/_advanced.php', $upload_maxmaxkb.' '.T_('KB') ), array( 'maxlength' => 7, 'required' => true ) );
140// Javascript to init hidden/shown state:114echo '</div>';
141echo JS_showhide_ffield_on_checkbox( 'upload_maxkb', 'upload_enabled' );
142$Form->end_fieldset();115$Form->end_fieldset();
143116
144$Form->begin_fieldset( T_('Advanced options'), array( 'id' => 'ffset_fileadvanced', 'class' => 'additional_file_settings' ) );117$Form->begin_fieldset( T_('Advanced options'), array( 'id' => 'ffset_fileadvanced', 'class' => 'additional_file_settings' ) );
145118
=== modified file 'qp_inc/generic/model/_genericelement.class.php'
--- qp_inc/generic/model/_genericelement.class.php 2013-03-18 19:20:42 +0000
+++ qp_inc/generic/model/_genericelement.class.php 2013-04-18 18:37:26 +0000
@@ -79,8 +79,8 @@
79 $Form->global_icon( T_('Cancel editing!'), 'close', regenerate_url( 'action' ), T_('cancel') );79 $Form->global_icon( T_('Cancel editing!'), 'close', regenerate_url( 'action' ), T_('cancel') );
80 }80 }
81 $Form->begin_form( 'fform', $creating ? T_('New element') : T_('Element') );81 $Form->begin_form( 'fform', $creating ? T_('New element') : T_('Element') );
82 $Form->hidden_ctrl();
83 $Form->hidden( 'action', $creating ? 'create' : 'update' );82 $Form->hidden( 'action', $creating ? 'create' : 'update' );
83 $Form->hidden( 'ctrl', $ctrl );
84 $Form->hiddens_by_key( get_memorized( 'action, ctrl' ) );84 $Form->hiddens_by_key( get_memorized( 'action, ctrl' ) );
85 $Form->text_input( $this->dbprefix.'name', $this->name, $edited_name_maxlen, T_('name'), '', array( 'required' => true ) );85 $Form->text_input( $this->dbprefix.'name', $this->name, $edited_name_maxlen, T_('name'), '', array( 'required' => true ) );
86 if( $creating )86 if( $creating )
8787
=== modified file 'qp_inc/generic/views/_generic_category.form.php'
--- qp_inc/generic/views/_generic_category.form.php 2013-03-18 19:20:42 +0000
+++ qp_inc/generic/views/_generic_category.form.php 2013-04-18 18:37:26 +0000
@@ -22,8 +22,8 @@
22$Form = new Form( NULL, 'form' );22$Form = new Form( NULL, 'form' );
23$Form->global_icon( T_('Cancel editing!'), 'close', regenerate_url( 'action' ), T_('cancel') );23$Form->global_icon( T_('Cancel editing!'), 'close', regenerate_url( 'action' ), T_('cancel') );
24$Form->begin_form( 'fform', $creating ? T_('New category') : T_('Category') );24$Form->begin_form( 'fform', $creating ? T_('New category') : T_('Category') );
25$Form->hidden_ctrl();
26$Form->hidden( 'action', $creating ? 'create' : 'update' );25$Form->hidden( 'action', $creating ? 'create' : 'update' );
26$Form->hidden( 'ctrl', $ctrl );
27$Form->hiddens_by_key( get_memorized( 'action, ctrl' ) );27$Form->hiddens_by_key( get_memorized( 'action, ctrl' ) );
2828
29$Form->begin_fieldset( T_('Properties') );29$Form->begin_fieldset( T_('Properties') );
3030
=== modified file 'qp_inc/plugins/_plugin.class.php'
--- qp_inc/plugins/_plugin.class.php 2013-03-22 21:28:25 +0000
+++ qp_inc/plugins/_plugin.class.php 2013-04-18 18:37:26 +0000
@@ -809,6 +809,17 @@
809809
810810
811 /**811 /**
812 * Event handler: Turns on "extended profile" feature
813 *
814 * Give it a true to give each user a second page of profile options
815 */
816 function ActivateExtendedProfile( $activate = false )
817 {
818 return false;
819 }
820
821
822 /**
812 * Event handler: Gets invoked in /admin.php after the menu structure is built823 * Event handler: Gets invoked in /admin.php after the menu structure is built
813 *824 *
814 * Gets invoked in /admin.php for every backoffice page after the menu structure825 * Gets invoked in /admin.php for every backoffice page after the menu structure
815826
=== modified file 'qp_inc/plugins/_plugin.funcs.php'
--- qp_inc/plugins/_plugin.funcs.php 2013-03-12 06:26:03 +0000
+++ qp_inc/plugins/_plugin.funcs.php 2013-04-18 18:37:26 +0000
@@ -925,7 +925,8 @@
925 if( isset( $meta['valid_pattern'] ) )925 if( isset( $meta['valid_pattern'] ) )
926 {926 {
927 $param_pattern = is_array( $meta['valid_pattern'] ) ? $meta['valid_pattern']['pattern'] : $meta['valid_pattern'];927 $param_pattern = is_array( $meta['valid_pattern'] ) ? $meta['valid_pattern']['pattern'] : $meta['valid_pattern'];
928 if( ! preg_match( $param_pattern, $value ) )928 // checking for not empty values is a lazy solution to an unrequired field making an "error" even though it works correctly
929 if( ! preg_match( $param_pattern, $value ) && $value != '' )
929 {930 {
930 $param_error = is_array( $meta['valid_pattern'] ) ? $meta['valid_pattern']['error'] : sprintf(T_('The value is invalid. It must match the regular expression &laquo;%s&raquo;.'), $param_pattern);931 $param_error = is_array( $meta['valid_pattern'] ) ? $meta['valid_pattern']['error'] : sprintf(T_('The value is invalid. It must match the regular expression &laquo;%s&raquo;.'), $param_pattern);
931 param_error( $param_name, $param_error );932 param_error( $param_name, $param_error );
932933
=== modified file 'qp_inc/plugins/model/_plugins_admin.class.php'
--- qp_inc/plugins/model/_plugins_admin.class.php 2013-03-18 19:20:42 +0000
+++ qp_inc/plugins/model/_plugins_admin.class.php 2013-04-18 18:37:26 +0000
@@ -81,6 +81,7 @@
81 if( empty( $supported_events ) )81 if( empty( $supported_events ) )
82 {82 {
83 $supported_events = array(83 $supported_events = array(
84 'ActivateExtendedProfile' => 'Turns on "extended profile" feature',
84 'AdminAfterPageFooter' => 'This gets called after the backoffice HTML footer has been displayed.',85 'AdminAfterPageFooter' => 'This gets called after the backoffice HTML footer has been displayed.',
85 'AdminDisplayEditorButton' => 'Display action buttons on the edit screen(s)',86 'AdminDisplayEditorButton' => 'Display action buttons on the edit screen(s)',
86 'AdminDisplayCommentToolbar' => 'Display a toolbar on the admin-side feedback form',87 'AdminDisplayCommentToolbar' => 'Display a toolbar on the admin-side feedback form',
8788
=== modified file 'qp_inc/sessions/_sessions.init.php'
--- qp_inc/sessions/_sessions.init.php 2013-03-22 21:28:25 +0000
+++ qp_inc/sessions/_sessions.init.php 2013-04-18 18:37:26 +0000
@@ -27,15 +27,12 @@
2727
28// Aliases for table names28// Aliases for table names
29$app_db_config['aliases']['T_basedomains'] = $app_db_tableprefix.'basedomains';29$app_db_config['aliases']['T_basedomains'] = $app_db_tableprefix.'basedomains';
30$app_db_config['aliases']['T_goals'] = $app_db_tableprefix.'track__goal';30$app_db_config['aliases']['T_goals'] = $app_db_tableprefix.'goals';
31$app_db_config['aliases']['T_goal_hits'] = $app_db_tableprefix.'track__goalhit';31$app_db_config['aliases']['T_goal_hits'] = $app_db_tableprefix.'goal_hits';
32$app_db_config['aliases']['T_hitlog'] = $app_db_tableprefix.'hitlog';32$app_db_config['aliases']['T_hitlog'] = $app_db_tableprefix.'hitlog';
33$app_db_config['aliases']['T_keyphrases'] = $app_db_tableprefix.'track__keyphrase';33$app_db_config['aliases']['T_keyphrases'] = $app_db_tableprefix.'keyphrases';
34$app_db_config['aliases']['T_sessions'] = $app_db_tableprefix.'sessions';34$app_db_config['aliases']['T_sessions'] = $app_db_tableprefix.'sessions';
35$app_db_config['aliases']['T_useragents'] = $app_db_tableprefix.'useragents';35$app_db_config['aliases']['T_useragents'] = $app_db_tableprefix.'useragents';
36$app_db_config['aliases']['T_track__goal'] = $app_db_tableprefix.'track__goal'; // old, going away
37$app_db_config['aliases']['T_track__goalhit'] = $app_db_tableprefix.'track__goalhit'; // old, going away
38$app_db_config['aliases']['T_track__keyphrase'] = $app_db_tableprefix.'track__keyphrase'; // old, going away
3936
40// Controller mappings37// Controller mappings
41$ctrl_mappings['stats'] = 'sessions/stats.ctrl.php';38$ctrl_mappings['stats'] = 'sessions/stats.ctrl.php';
4239
=== modified file 'qp_inc/settings/model/_generalsettings.class.php'
--- qp_inc/settings/model/_generalsettings.class.php 2013-03-12 06:26:03 +0000
+++ qp_inc/settings/model/_generalsettings.class.php 2013-04-18 18:37:26 +0000
@@ -58,7 +58,7 @@
58 'newusers_canregister' => '0',58 'newusers_canregister' => '0',
59 'newusers_level' => '1',59 'newusers_level' => '1',
60 // "Display options" section60 // "Display options" section
61 'default_admin_template' => 'wind',61 'default_admin_template' => 'earth',
62 // "Email validation" section62 // "Email validation" section
63 'newusers_mustvalidate' => '1',63 'newusers_mustvalidate' => '1',
64 'newusers_revalidate_emailchg' => '0',64 'newusers_revalidate_emailchg' => '0',
@@ -80,9 +80,17 @@
80 // GLOBAL SETTINGS -> FILES80 // GLOBAL SETTINGS -> FILES
81 // "Accessible file roots" section81 // "Accessible file roots" section
82 'fm_enable_roots_blog' => '1',82 'fm_enable_roots_blog' => '1',
83 'fm_blog_limit_files' => '',
84 'fm_blog_limit_bytes' => '',
83 'fm_enable_roots_user' => '1',85 'fm_enable_roots_user' => '1',
86 'fm_user_limit_files' => '',
87 'fm_user_limit_bytes' => '',
84 'fm_enable_roots_shared' => '0',88 'fm_enable_roots_shared' => '0',
89 'fm_shared_limit_files' => '',
90 'fm_shared_limit_bytes' => '',
85 'fm_enable_roots_templates' => '0',91 'fm_enable_roots_templates' => '0',
92 'fm_templates_limit_files' => '',
93 'fm_templates_limit_bytes' => '',
86 // "File creation options" section94 // "File creation options" section
87 'fm_enable_create_dir' => '1',95 'fm_enable_create_dir' => '1',
88 'fm_enable_create_file' => '1',96 'fm_enable_create_file' => '1',
8997
=== modified file 'qp_inc/templates/model/_template.class.php'
--- qp_inc/templates/model/_template.class.php 2013-03-22 21:28:25 +0000
+++ qp_inc/templates/model/_template.class.php 2013-04-18 18:37:26 +0000
@@ -194,6 +194,9 @@
194 * Compare discovered containers to database info194 * Compare discovered containers to database info
195 *195 *
196 * Called when reloading a template196 * Called when reloading a template
197 *
198 * @todo (3085) EdB> There seems to be a bug in here that leaves mention of a
199 * container that was removed when doing a reload.
197 */200 */
198 function db_compare_containers()201 function db_compare_containers()
199 {202 {
200203
=== modified file 'qp_inc/tools/views/_system_list.view.php'
--- qp_inc/tools/views/_system_list.view.php 2013-03-18 19:20:42 +0000
+++ qp_inc/tools/views/_system_list.view.php 2013-04-18 18:37:26 +0000
@@ -39,19 +39,8 @@
39// Version check39// Version check
40$app_timestamp = mysql2timestamp( $app_date );40$app_timestamp = mysql2timestamp( $app_date );
41$app_date = date_i18n( locale_datefmt(), $app_timestamp );41$app_date = date_i18n( locale_datefmt(), $app_timestamp );
4242$ver_val = sprintf( T_('%s released on %s'), $app_version, $app_date );
43$bzr_revno = get_bzr_revision();43init_system_check( sprintf( T_('%s version'), $app_name ), $ver_val );
44if( $bzr_revno )
45{
46 /* TRANS: First %s: App version, second %s: release date, third %d: Bazaar revision number */
47 $ver_val = sprintf( T_( '%s released on %s &mdash; Bazaar revision %d' ), $app_version, $app_date, $bzr_revno );
48}
49else
50{
51 /* TRANS: First %s: App version, second %s: release date */
52 $ver_val = sprintf( T_( '%s released on %s' ), $app_version, $app_date );
53}
54init_system_check( sprintf( T_( '%s version' ), $app_name ), $ver_val );
5544
56// age check45// age check
57$app_age = ( $localtimenow - $app_timestamp ) / 3600 / 24 / 30; // approx age in months46$app_age = ( $localtimenow - $app_timestamp ) / 3600 / 24 / 30; // approx age in months
@@ -63,13 +52,6 @@
63{52{
64 disp_system_check( 'warning', sprintf( T_('This version is aging. You may want to check for newer releases on').' <a href="'.$app_homepage.'">'.$app_name.'</a>.' ) );53 disp_system_check( 'warning', sprintf( T_('This version is aging. You may want to check for newer releases on').' <a href="'.$app_homepage.'">'.$app_name.'</a>.' ) );
65}54}
66elseif( $bzr_revno )
67{
68 disp_system_check( 'ok', sprintf( /* TRANS: %d: Bazaar revision number */
69 T_( 'This is a development version and not an official release, but it should be mostly operational.<br />'
70 .'If you report bugs in this version, mention that you are using the development version with '
71 .'<strong>Bazaar revision number %d</strong>.' ), $bzr_revno ) );
72}
73else55else
74{56{
75 disp_system_check( 'ok' );57 disp_system_check( 'ok' );
7658
=== modified file 'qp_inc/users/model/_user.class.php'
--- qp_inc/users/model/_user.class.php 2013-03-22 21:28:25 +0000
+++ qp_inc/users/model/_user.class.php 2013-04-18 18:37:26 +0000
@@ -903,13 +903,34 @@
903 'align' => '',903 'align' => '',
904 ), $params );904 ), $params );
905905
906 $FileCache = & get_Cache( 'FileCache' );906
907 $Avatar = & $FileCache->get_by_ID( $this->avatar_ID, false, false );907 global $DB;
908908 $query = 'SELECT file_path FROM T_files WHERE file_root_type = \'user\' AND file_ID = '.$this->avatar_ID;
909 return array(909 if( $file_name = $DB->get_var( $query ) )
910 'tag' => $Avatar->get_thumb_imgtag( $params['size'], $params['class'], $params['align'] ),910 {
911 'root' => $Avatar->_FileRoot->ID,911 $FileCache = & get_Cache( 'FileCache' );
912 );912 $Avatar = & $FileCache->get_by_root_and_path( 'user', $this->ID, $file_name );
913 return array(
914 'tag' => $Avatar->get_thumb_imgtag( $params['size'], $params['class'], $params['align'] ),
915 'root' => $Avatar->_FileRoot->ID,
916 );
917 }
918 elseif( is_null( $file_name ) )
919 {
920 // avatar file must have been deleted is all I can think of
921 $UserCache = & get_Cache( 'UserCache' );
922 $edited_User = & $UserCache->get_by_ID( $this->ID, false );
923 $edited_User->set( 'avatar_file_ID', NULL, true );
924 $edited_User->dbupdate();
925 // return an empty array as avatar
926 return array( 'tag' => '', 'root' => '' );
927 }
928 else
929 {
930 // this is a total mystery ... no file name but not null?
931 debug_die( 'file id '.$this->avatar_ID.' not found but file_name not null ... which is crazy' );
932 }
933
913 }934 }
914935
915936
916937
=== modified file 'qp_inc/users/model/_user.funcs.php'
--- qp_inc/users/model/_user.funcs.php 2013-03-22 21:28:25 +0000
+++ qp_inc/users/model/_user.funcs.php 2013-04-18 18:37:26 +0000
@@ -276,7 +276,7 @@
276276
277277
278/**278/**
279 * Template tag: Output a link to the backoffice279 * Template tag: Display a link to the backoffice
280 *280 *
281 * Usually provided in templates in order for newbies to find the admin interface281 * Usually provided in templates in order for newbies to find the admin interface
282 * more easily...282 * more easily...
@@ -284,9 +284,10 @@
284 * @todo (2140) EdB> change to array of params284 * @todo (2140) EdB> change to array of params
285 * @param string To be displayed before the link.285 * @param string To be displayed before the link.
286 * @param string To be displayed after the link.286 * @param string To be displayed after the link.
287 * @param string The page/controller to link to inside of {@link $admin_url}
288 * @param string Text for the link.287 * @param string Text for the link.
289 * @param string Title for the link.288 * @param string Title for the link.
289 * @param string The page/controller to link to inside of {@link $admin_url}
290 * @param string the returned string if the user should not see the admin link
290 */291 */
291function user_admin_link( $before = '', $after = '', $link_text = '', $link_title = '#', $not_visible = '' )292function user_admin_link( $before = '', $after = '', $link_text = '', $link_title = '#', $not_visible = '' )
292{293{
@@ -295,16 +296,16 @@
295296
296297
297/**298/**
298 * Template tag: Get a link to the backoffice299 * Get a link to the backoffice
299 *300 *
300 * Usually provided in templates in order for newbies to find the admin interface301 * Usually provided in templates in order for newbies to find the admin interface
301 * more easily...302 * more easily...
302 *303 *
303 * @param string To be displayed before the link.304 * @param string To be displayed before the link.
304 * @param string To be displayed after the link.305 * @param string To be displayed after the link.
305 * @param string The page/controller to link to inside of {@link $admin_url}
306 * @param string Text for the link.306 * @param string Text for the link.
307 * @param string Title for the link.307 * @param string Title for the link.
308 * @param string The returned string if the user should not see the admin link
308 * @return string309 * @return string
309 */310 */
310function get_user_admin_link( $before = '', $after = '', $link_text = '', $link_title = '#', $not_visible = '' )311function get_user_admin_link( $before = '', $after = '', $link_text = '', $link_title = '#', $not_visible = '' )
@@ -343,19 +344,30 @@
343344
344/**345/**
345 * Template tag: Display a link to user profile346 * Template tag: Display a link to user profile
347 *
348 * @param string To be displayed before the link.
349 * @param string To be displayed after the link.
350 * @param string Text for the link.
351 * @param string Title for the link.
352 * @param integer The ID of the user we want a profile link for
346 */353 */
347function user_profile_link( $before = '', $after = '', $link_text = '', $link_title = '#' )354function user_profile_link( $before = '', $after = '', $link_text = '', $link_title = '#', $user_id = '#' )
348{355{
349 echo get_user_profile_link( $before, $after, $link_text, $link_title );356 echo get_user_profile_link( $before, $after, $link_text, $link_title, $user_id );
350}357}
351358
352359
353/**360/**
354 * Template tag: Get a link to user profile361 * Get a link to user profile
355 *362 *
363 * @param string To be displayed before the link.
364 * @param string To be displayed after the link.
365 * @param string Text for the link.
366 * @param string Title for the link.
367 * @param integer The ID of the user we want a profile for
356 * @return string|false368 * @return string|false
357 */369 */
358function get_user_profile_link( $before = '', $after = '', $link_text = '', $link_title = '#' )370function get_user_profile_link( $before = '', $after = '', $link_text = '', $link_title = '#', $user_id = '#' )
359{371{
360 global $current_User;372 global $current_User;
361373
@@ -372,10 +384,20 @@
372 {384 {
373 $link_text = str_replace( '%s', $current_User->login, $link_text );385 $link_text = str_replace( '%s', $current_User->login, $link_text );
374 }386 }
375 if( $link_title == '#' ) $link_title = T_('Edit your profile');387
388 if( $link_title == '#' )
389 {
390 $link_title = T_('Edit your profile');
391 }
392
393 if( $user_id == '#' )
394 {
395 $user_id = $current_User->ID;
396 }
397
376398
377 $r = $before399 $r = $before
378 .'<a href="'.get_user_profile_url().'" title="'.$link_title.'">'400 .'<a href="'.get_user_profile_url( $user_id ).'" title="'.$link_title.'">'
379 .sprintf( $link_text, $current_User->login )401 .sprintf( $link_text, $current_User->login )
380 .'</a>'402 .'</a>'
381 .$after;403 .$after;
@@ -386,8 +408,11 @@
386408
387/**409/**
388 * Get URL to edit user profile410 * Get URL to edit user profile
411 *
412 * @param integer The ID of the user we want a profile for
413 * @return string The link to profile, either in admin or public with redirect
389 */414 */
390function get_user_profile_url()415function get_user_profile_url( $user_id )
391{416{
392 global $admin_url;417 global $admin_url;
393 global $Blog;418 global $Blog;
@@ -401,7 +426,7 @@
401 }426 }
402 else427 else
403 {428 {
404 $url = url_add_param( $Blog->gen_blogurl(), 'disp=profile&amp;redirect_to='.rawurlencode( $ReqURI ) );429 $url = url_add_param( $Blog->gen_blogurl(), 'disp=profile&amp;user_ID='.$user_id.'&amp;redirect_to='.rawurlencode( $ReqURI ) );
405 }430 }
406431
407 return $url;432 return $url;
408433
=== modified file 'qp_inc/users/model/_usersettings.class.php'
--- qp_inc/users/model/_usersettings.class.php 2013-03-22 21:28:25 +0000
+++ qp_inc/users/model/_usersettings.class.php 2013-04-18 18:37:26 +0000
@@ -35,7 +35,7 @@
35 'fm_allowfiltering' => 'simple',35 'fm_allowfiltering' => 'simple',
36 'blogperms_layout' => 'default', // selected view in blog (user/group) perms36 'blogperms_layout' => 'default', // selected view in blog (user/group) perms
37 'login_multiple_sessions' => 1, // allow multiple concurrent sessions? (PARAMOUNT ON DEMO SERVER)37 'login_multiple_sessions' => 1, // allow multiple concurrent sessions? (PARAMOUNT ON DEMO SERVER)
38 'results_per_page' => 20,38 'results_per_page' => 50,
39 'num_admin_blogs' => 10,39 'num_admin_blogs' => 10,
40 );40 );
4141
4242
=== modified file 'qp_inc/users/users.ctrl.php'
--- qp_inc/users/users.ctrl.php 2013-03-22 21:28:25 +0000
+++ qp_inc/users/users.ctrl.php 2013-04-18 18:37:26 +0000
@@ -169,6 +169,17 @@
169 }169 }
170}170}
171171
172// add menu options if a plugin needs them and we are on a user page
173global $Plugins;
174
175if( $Plugins->trigger_event_first_true( 'ActivateExtendedProfile' ) && isset( $user_ID ) )
176{
177 $AdminUI->add_menu_entries( 'users', array(
178 'profile' => array( 'text' => 'Profile', 'href' => $dispatcher.'?ctrl=users&amp;user_ID='.$user_ID ),
179 'users_ext' => array( 'text' => 'Extended Profile', 'href' => $dispatcher.'?ctrl=users&amp;x=1&amp;user_ID='.$user_ID )
180 ) );
181}
182
172// Perform actions, if there were no errors183// Perform actions, if there were no errors
173if( ! $Messages->count('error') )184if( ! $Messages->count('error') )
174{185{
175186
=== modified file 'qp_inc/users/views/_user.form.php'
--- qp_inc/users/views/_user.form.php 2013-03-18 19:20:42 +0000
+++ qp_inc/users/views/_user.form.php 2013-04-18 18:37:26 +0000
@@ -20,6 +20,7 @@
20global $AdminUI;20global $AdminUI;
21global $current_User;21global $current_User;
22global $edited_User;22global $edited_User;
23global $lock_id_and_nick;
23global $Plugins;24global $Plugins;
24global $Settings;25global $Settings;
25global $UserSettings;26global $UserSettings;
@@ -112,14 +113,29 @@
112if( $action != 'view_user' )113if( $action != 'view_user' )
113{114{
114 // We can edit the values115 // We can edit the values
115 $Form->text_input( 'edited_user_login', $edited_User->login, 20, T_('Login'), '', array( 'required' => true ) );116 if( $lock_id_and_nick && ( ! $current_User->ID === 1 ) )
117 {
118 // lock is set and user #1 is not out there ... no editing allowed
119 $Form->info( T_('Login'), $edited_User->get( 'login' ) );
120 $Form->hidden( 'edited_user_login', $edited_User->login );
121 }
122 else
123 {
124 $Form->text_input( 'edited_user_login', $edited_User->login, 20, T_('Login'), '', array( 'required' => true ) );
125 }
116 $Form->text_input( 'edited_user_firstname', $edited_User->firstname, 20, T_('First name'), '', array( 'maxlength' => 50 ) );126 $Form->text_input( 'edited_user_firstname', $edited_User->firstname, 20, T_('First name'), '', array( 'maxlength' => 50 ) );
117 $Form->text_input( 'edited_user_lastname', $edited_User->lastname, 20, T_('Last name'), '', array( 'maxlength' => 50 ) );127 $Form->text_input( 'edited_user_lastname', $edited_User->lastname, 20, T_('Last name'), '', array( 'maxlength' => 50 ) );
118 $Form->text_input( 'edited_user_nickname', $edited_User->nickname, 20, T_('Nickname'), '', array( 'maxlength' => 50, 'required' => true ) );128 if( $lock_id_and_nick && ( ! $current_User->ID === 1 ) )
129 {
130 // lock is set and user #1 is not out there ... no editing allowed
131 $Form->info( T_('Nickname'), $edited_User->get( 'nickname' ) );
132 $Form->hidden( 'edited_user_nickname', $edited_User->nickname );
133 }
134 else
135 {
136 $Form->text_input( 'edited_user_nickname', $edited_User->nickname, 20, T_('Nickname'), '', array( 'maxlength' => 50, 'required' => true ) );
137 }
119 $Form->select( 'edited_user_idmode', $edited_User->get( 'idmode' ), array( &$edited_User, 'callback_optionsForIdMode' ), T_('Identity shown') );138 $Form->select( 'edited_user_idmode', $edited_User->get( 'idmode' ), array( &$edited_User, 'callback_optionsForIdMode' ), T_('Identity shown') );
120 $Form->checkbox( 'edited_user_showonline', $edited_User->get( 'showonline' ), T_('Show online'), T_('Check this to be displayed as online when visiting the site.') );
121 $Form->checkbox( 'edited_user_set_login_multiple_sessions', $UserSettings->get( 'login_multiple_sessions', $edited_User->ID), T_('Multiple sessions'),
122 T_('Check this if you want to log in from different computers/browsers at the same time. Otherwise, logging in from a new computer/browser will disconnect you on the previous one.') );
123}139}
124else140else
125{141{
@@ -129,17 +145,14 @@
129 $Form->info( T_('Last name'), $edited_User->get( 'lastname' ) );145 $Form->info( T_('Last name'), $edited_User->get( 'lastname' ) );
130 $Form->info( T_('Nickname'), $edited_User->get( 'nickname' ) );146 $Form->info( T_('Nickname'), $edited_User->get( 'nickname' ) );
131 $Form->info( T_('Identity shown'), $edited_User->get( 'preferredname' ) );147 $Form->info( T_('Identity shown'), $edited_User->get( 'preferredname' ) );
132 $Form->info( T_('Show online'), ( $edited_User->get( 'showonline' ) ) ? T_('yes') : T_('no') );
133 $Form->info( T_('Multiple sessions'), ( $UserSettings->get( 'login_multiple_sessions', $edited_User->ID ) ? T_('Allowed') : T_('Forbidden') ) );
134}148}
135$Form->end_fieldset();
136149
137// "Extended Identity" section
138ob_start();150ob_start();
139$Form->begin_fieldset( T_('Extended Identity') );
140ob_start();151ob_start();
141$Plugins->restart();152$Plugins->restart();
142while( $loop_Plugin = & $Plugins->get_next() )153// $edited_User->ID is 0 if we are copying/creating, so the avatar and biography
154// bits can't be added at this point. too lazy to really fix it is the thing ...
155while( $loop_Plugin = & $Plugins->get_next() && $edited_User->ID )
143{156{
144 if( $loop_Plugin->UserSettings )157 if( $loop_Plugin->UserSettings )
145 {158 {
@@ -154,7 +167,7 @@
154 // get avatar info167 // get avatar info
155 $avatar_info = $edited_User->get_avatar( array(168 $avatar_info = $edited_User->get_avatar( array(
156 'size' => 'crop-64x64',169 'size' => 'crop-64x64',
157 'class' => 'floatleft',170 'class' => 'floatleft'
158 ) );171 ) );
159 $avatar_tag = $avatar_info['tag']; // '' if no avatar172 $avatar_tag = $avatar_info['tag']; // '' if no avatar
160 $avatar_root = $avatar_info['root']; // '' if no avatar173 $avatar_root = $avatar_info['root']; // '' if no avatar
@@ -179,7 +192,6 @@
179 }192 }
180 $Form->info( T_( 'Avatar' ), $avatar_tag );193 $Form->info( T_( 'Avatar' ), $avatar_tag );
181 }194 }
182
183 // biography field195 // biography field
184 if( $l_name == 'use_biography' )196 if( $l_name == 'use_biography' )
185 {197 {
@@ -187,13 +199,17 @@
187 {199 {
188 $Form->textarea( 'edited_user_biography', $edited_User->get( 'biography' ), 5, T_('Biography'), T_('This is called for by a plugin so we do not know what it is used for.'), 50, 'large' );200 $Form->textarea( 'edited_user_biography', $edited_User->get( 'biography' ), 5, T_('Biography'), T_('This is called for by a plugin so we do not know what it is used for.'), 50, 'large' );
189 }201 }
202 else
203 {
204 $Form->info( T_('Biography'), $edited_User->get( 'biography' ), T_('This is called for by a plugin so we do not know what it is used for.') );
205 }
190 }206 }
191 }207 }
192 }208 }
193 }209 }
194}210}
195$has_contents = strlen( ob_get_contents() );211$has_contents = strlen( ob_get_contents() );
196$Form->end_fieldset();212//$Form->end_fieldset();
197if( $has_contents )213if( $has_contents )
198{214{
199 ob_end_flush();215 ob_end_flush();
@@ -206,6 +222,22 @@
206 ob_end_clean();222 ob_end_clean();
207}223}
208224
225if( $action != 'view_user' )
226{
227 // We can edit the values
228 if( $lock_id_and_nick && ( ! $current_User->ID === 1 ) )
229 $Form->checkbox( 'edited_user_showonline', $edited_User->get( 'showonline' ), T_('Show online'), T_('Check this to be displayed as online when visiting the site.') );
230 $Form->checkbox( 'edited_user_set_login_multiple_sessions', $UserSettings->get( 'login_multiple_sessions', $edited_User->ID), T_('Multiple sessions'),
231 T_('Check this if you want to log in from different computers/browsers at the same time. Otherwise, logging in from a new computer/browser will disconnect you on the previous one.') );
232}
233else
234{
235 // display only
236 $Form->info( T_('Show online'), ( $edited_User->get( 'showonline' ) ) ? T_('yes') : T_('no') );
237 $Form->info( T_('Multiple sessions'), ( $UserSettings->get( 'login_multiple_sessions', $edited_User->ID ) ? T_('Allowed') : T_('Forbidden') ) );
238}
239$Form->end_fieldset();
240
209// "Password" section241// "Password" section
210if( $action != 'view_user' )242if( $action != 'view_user' )
211{243{
@@ -236,19 +268,14 @@
236 // We can edit the values268 // We can edit the values
237 $Form->select( 'edited_user_locale', $edited_User->get( 'locale' ), 'locale_options_return', T_('Preferred locale'), T_('Preferred locale for admin interface, notifications, etc.'));269 $Form->select( 'edited_user_locale', $edited_User->get( 'locale' ), 'locale_options_return', T_('Preferred locale'), T_('Preferred locale for admin interface, notifications, etc.'));
238 $Form->select_input_array( 'edited_user_admin_template', $value_admin_template, get_admin_templates(), T_('Admin template'), T_('The template defines how the backoffice appears to you.') );270 $Form->select_input_array( 'edited_user_admin_template', $value_admin_template, get_admin_templates(), T_('Admin template'), T_('The template defines how the backoffice appears to you.') );
239
240 // To display or hide icon legend271 // To display or hide icon legend
241 $Form->checkbox( 'edited_user_legend', $UserSettings->get( 'display_icon_legend', $edited_User->ID ), T_('Display icon legend'), T_('Display a legend at the bottom of every page including all action icons used on that page.') );272 $Form->checkbox( 'edited_user_legend', $UserSettings->get( 'display_icon_legend', $edited_User->ID ), T_('Display icon legend'), T_('Display a legend at the bottom of every page including all action icons used on that page.') );
242
243 // To activate or deactivate bozo validator273 // To activate or deactivate bozo validator
244 $Form->checkbox( 'edited_user_bozo', $UserSettings->get( 'control_form_abortions', $edited_User->ID ), T_('Control form closing'), T_('This will alert you if you fill in data into a form and try to leave the form before submitting the data.') );274 $Form->checkbox( 'edited_user_bozo', $UserSettings->get( 'control_form_abortions', $edited_User->ID ), T_('Control form closing'), T_('This will alert you if you fill in data into a form and try to leave the form before submitting the data.') );
245
246 // To activate focus on first form input text275 // To activate focus on first form input text
247 $Form->checkbox( 'edited_user_focusonfirst', $UserSettings->get( 'focus_on_first_input', $edited_User->ID ), T_('Focus on first field'), T_('The focus will automatically go to the first input text field.') );276 $Form->checkbox( 'edited_user_focusonfirst', $UserSettings->get( 'focus_on_first_input', $edited_User->ID ), T_('Focus on first field'), T_('The focus will automatically go to the first input text field.') );
248
249 // Number of results per page277 // Number of results per page
250 $Form->text( 'edited_user_results_per_page', $UserSettings->get( 'results_per_page', $edited_User->ID ), 3, T_('Results per page'), T_('Number of rows displayed in results tables.') );278 $Form->text( 'edited_user_results_per_page', $UserSettings->get( 'results_per_page', $edited_User->ID ), 3, T_('Results per page'), T_('Number of rows displayed in results tables.') );
251
252 // Number of blogs to display in the admin279 // Number of blogs to display in the admin
253 $Form->text( 'edited_user_num_admin_blogs', $UserSettings->get( 'num_admin_blogs', $edited_User->ID ), 2, T_('Blog menu length'), T_('Number of blogs displayed in the admin console before using a select box') );280 $Form->text( 'edited_user_num_admin_blogs', $UserSettings->get( 'num_admin_blogs', $edited_User->ID ), 2, T_('Blog menu length'), T_('Number of blogs displayed in the admin console before using a select box') );
254}281}
@@ -263,7 +290,6 @@
263$Form->end_fieldset();290$Form->end_fieldset();
264291
265// "Plugin options" section292// "Plugin options" section
266
267if( $action != 'view_user' )293if( $action != 'view_user' )
268{294{
269 // We can edit the values295 // We can edit the values
270296
=== modified file 'qp_inc/users/views/_user_list.view.php'
--- qp_inc/users/views/_user_list.view.php 2013-03-18 19:20:42 +0000
+++ qp_inc/users/views/_user_list.view.php 2013-04-18 18:37:26 +0000
@@ -16,11 +16,11 @@
16global $Settings;16global $Settings;
17global $usedgroups;17global $usedgroups;
1818
19// query which groups have users (in order to prevent deletion of groups which have users)19// query which groups have users (to prevent deletion of groups which have users)
20$usedgroups = $DB->get_col( 'SELECT grp_ID20$usedgroups = $DB->get_col( 'SELECT grp_ID
21 FROM T_groups21 FROM T_groups
22 INNER JOIN T_users ON user_grp_ID = grp_ID22 INNER JOIN T_users ON user_grp_ID = grp_ID
23 GROUP BY grp_ID');23 GROUP BY grp_ID' );
2424
25// Query user list25// Query user list
26$keywords = param( 'keywords', 'string', '', true );26$keywords = param( 'keywords', 'string', '', true );
@@ -37,12 +37,14 @@
37 }37 }
38}38}
3939
40$sql = "SELECT T_users.*, grp_ID, grp_name, COUNT(blog_ID) AS nb_blogs40$sql = "SELECT T_users.*, grp_ID, grp_name,
41 FROM T_users RIGHT JOIN T_groups ON user_grp_ID = grp_ID41 COUNT(blog_ID) AS nb_blogs
42 LEFT JOIN T_blogs on user_ID = blog_owner_user_ID42 FROM T_users
43 WHERE $where_clause 143 RIGHT JOIN T_groups ON user_grp_ID = grp_ID
44 GROUP BY user_ID, grp_ID44 LEFT JOIN T_blogs on user_ID = blog_owner_user_ID
45 ORDER BY grp_name, *";45 WHERE $where_clause 1
46 GROUP BY user_ID, grp_ID
47 ORDER BY grp_name, *";
4648
47$count_sql = 'SELECT COUNT(*)49$count_sql = 'SELECT COUNT(*)
48 FROM T_users50 FROM T_users
@@ -111,10 +113,20 @@
111 'td' => '$user_firstname$ $user_lastname$',113 'td' => '$user_firstname$ $user_lastname$',
112);114);
113115
116// User #1 can see all ...
117if( $current_User->ID === '1' )
118{
119 $Results->cols[] = array(
120 'th' => T_('Email'),
121 'td_class' => 'shrinkwrap',
122 'td' => '%user_mailto( #user_email# )%',
123 );
124}
125
114$Results->cols[] = array(126$Results->cols[] = array(
115 'th' => T_('Email'),127 'th' => T_('Message'),
116 'td_class' => 'shrinkwrap',128 'td_class' => 'shrinkwrap',
117 'td' => '%user_mailto( #user_email# )%',129 'td' => '%user_message( #user_allow_msgform#, #user_email# , #user_ID#, #user_nickname# )%',
118);130);
119131
120$Results->cols[] = array(132$Results->cols[] = array(
@@ -244,4 +256,19 @@
244 return action_icon( T_('Email').': '.$email, 'email', 'mailto:'.$email, T_('Email') );256 return action_icon( T_('Email').': '.$email, 'email', 'mailto:'.$email, T_('Email') );
245}257}
246258
259/**
260 * dummy docblock
261 */
262function user_message( $allow_form, $email, $ID, $nickname )
263{
264 if( $allow_form === '0' )
265 {
266 return '&nbsp;';
267 }
268
269 $form_url = url_add_param( '', 'recipient_id='.$ID.'&amp;redirect_to='.rawurlencode( url_rel_to_same_host( regenerate_url( '', '', '', '&' ), '' ) ) );
270
271 return action_icon( sprintf( T_('Send email to %s'), $nickname ), 'email', $form_url );
272}
273
247?>274?>
248275
=== modified file 'qp_install/_create_items.php'
--- qp_install/_create_items.php 2013-03-22 21:28:25 +0000
+++ qp_install/_create_items.php 2013-04-18 18:37:26 +0000
@@ -132,7 +132,7 @@
132$edited_Item = new Item();132$edited_Item = new Item();
133$edited_Item->insert( 1, T_('artists-paint-pots-2'), 'This shows the simplest attachment possible: the file name became the file\'s title, alt text, description, and post title.', $now, $cat_yellowstone, array(), 'published','en-US' );133$edited_Item->insert( 1, T_('artists-paint-pots-2'), 'This shows the simplest attachment possible: the file name became the file\'s title, alt text, description, and post title.', $now, $cat_yellowstone, array(), 'published','en-US' );
134// attach an image to the item134// attach an image to the item
135$edit_File = new File( 'collection', 4, 'artists-paint-pots-2.jpg' );135$edit_File = new File( 'blog', 4, 'artists-paint-pots-2.jpg' );
136$edit_File->link_to_Item( $edited_Item );136$edit_File->link_to_Item( $edited_Item );
137// add meta data for this image (only once per image!)137// add meta data for this image (only once per image!)
138$query = "UPDATE T_files SET file_title = 'artists-paint-pots-2', file_alt = 'artists-paint-pots-2', file_desc = 'artists-paint-pots-2' WHERE file_ID = {$edit_File->ID}";138$query = "UPDATE T_files SET file_title = 'artists-paint-pots-2', file_alt = 'artists-paint-pots-2', file_desc = 'artists-paint-pots-2' WHERE file_ID = {$edit_File->ID}";
@@ -162,7 +162,7 @@
162$edited_Item = new Item();162$edited_Item = new Item();
163$edited_Item->insert( 1, T_('Photo of Biscuit Basin'), 'This shows a customized "file title" field, which became the alt text and description and item title.', $now, $cat_yellowstone, array(), 'published','en-US' );163$edited_Item->insert( 1, T_('Photo of Biscuit Basin'), 'This shows a customized "file title" field, which became the alt text and description and item title.', $now, $cat_yellowstone, array(), 'published','en-US' );
164// attach an image to the item164// attach an image to the item
165$edit_File = new File( 'collection', 4, 'biscuit-basin.jpg' );165$edit_File = new File( 'blog', 4, 'biscuit-basin.jpg' );
166$edit_File->link_to_Item( $edited_Item );166$edit_File->link_to_Item( $edited_Item );
167// add meta data for this image (only once per image!)167// add meta data for this image (only once per image!)
168$query = "UPDATE T_files SET file_title = 'Photo of Biscuit Basin', file_alt = 'Photo of Biscuit Basin', file_desc = 'Photo of Biscuit Basin' WHERE file_ID = {$edit_File->ID}";168$query = "UPDATE T_files SET file_title = 'Photo of Biscuit Basin', file_alt = 'Photo of Biscuit Basin', file_desc = 'Photo of Biscuit Basin' WHERE file_ID = {$edit_File->ID}";
@@ -212,7 +212,7 @@
212$edited_Item = new Item();212$edited_Item = new Item();
213$edited_Item->insert( 1, T_('Emerald Pool, Yellowstone NP'), 'This image has all three attributes set to unique values, then this post was created with a unique title and content, then the image was attached to the post.', $now, $cat_yellowstone, array(), 'published','en-US' );213$edited_Item->insert( 1, T_('Emerald Pool, Yellowstone NP'), 'This image has all three attributes set to unique values, then this post was created with a unique title and content, then the image was attached to the post.', $now, $cat_yellowstone, array(), 'published','en-US' );
214// attach an image to the item214// attach an image to the item
215$edit_File = new File( 'collection', 4, 'emerald-pool-in-yellowstone.jpg' );215$edit_File = new File( 'blog', 4, 'emerald-pool-in-yellowstone.jpg' );
216$edit_File->link_to_Item( $edited_Item );216$edit_File->link_to_Item( $edited_Item );
217// add meta data for this image (only once per image!)217// add meta data for this image (only once per image!)
218$query = "UPDATE T_files SET file_title = 'Emerald Pool, Yellowstone', file_alt = 'Photo of Emerald Pool in Yellowstone', file_desc = 'This is the \"description/caption\" field for the file name \"emerald-pool-in-yellowstone.jpg\"' WHERE file_ID = {$edit_File->ID}";218$query = "UPDATE T_files SET file_title = 'Emerald Pool, Yellowstone', file_alt = 'Photo of Emerald Pool in Yellowstone', file_desc = 'This is the \"description/caption\" field for the file name \"emerald-pool-in-yellowstone.jpg\"' WHERE file_ID = {$edit_File->ID}";
@@ -258,7 +258,7 @@
258$edited_Item = new Item();258$edited_Item = new Item();
259$edited_Item->insert( 1, T_('Mammoth Hot Springs'), '', $now, $cat_yellowstone, array(), 'published','en-US' );259$edited_Item->insert( 1, T_('Mammoth Hot Springs'), '', $now, $cat_yellowstone, array(), 'published','en-US' );
260// attach an image to the item260// attach an image to the item
261$edit_File = new File( 'collection', 4, 'mammoth-hot-springs.jpg' );261$edit_File = new File( 'blog', 4, 'mammoth-hot-springs.jpg' );
262$edit_File->link_to_Item( $edited_Item );262$edit_File->link_to_Item( $edited_Item );
263// add meta data for this image (only once per image!)263// add meta data for this image (only once per image!)
264$query = "UPDATE T_files SET file_title = 'Mammoth Hot Springs', file_alt = 'Mammoth Hot Springs', file_desc = 'Free Stock Photo of Mammoth Hot Springs - Yellowstone - Travel, from public-domain-photos.com' WHERE file_ID = {$edit_File->ID}";264$query = "UPDATE T_files SET file_title = 'Mammoth Hot Springs', file_alt = 'Mammoth Hot Springs', file_desc = 'Free Stock Photo of Mammoth Hot Springs - Yellowstone - Travel, from public-domain-photos.com' WHERE file_ID = {$edit_File->ID}";
@@ -317,7 +317,7 @@
317$edited_Item = new Item();317$edited_Item = new Item();
318$edited_Item->insert( 1, T_('Morning Glory Pool'), 'This photo has some text like a normal blog post might.', $now, $cat_yellowstone, array(), 'published','en-US' );318$edited_Item->insert( 1, T_('Morning Glory Pool'), 'This photo has some text like a normal blog post might.', $now, $cat_yellowstone, array(), 'published','en-US' );
319// attach an image to the item319// attach an image to the item
320$edit_File = new File( 'collection', 4, 'morning-glory-pool.jpg' );320$edit_File = new File( 'blog', 4, 'morning-glory-pool.jpg' );
321$edit_File->link_to_Item( $edited_Item );321$edit_File->link_to_Item( $edited_Item );
322// add meta data for this image (only once per image!)322// add meta data for this image (only once per image!)
323$query = "UPDATE T_files SET file_title = 'Morning Glory Pool', file_alt = 'Morning Glory Pool', file_desc = 'Free Stock Photo of Morning Glory Pool - Yellowstone - Travel, from public-domain-photos.com' WHERE file_ID = {$edit_File->ID}";323$query = "UPDATE T_files SET file_title = 'Morning Glory Pool', file_alt = 'Morning Glory Pool', file_desc = 'Free Stock Photo of Morning Glory Pool - Yellowstone - Travel, from public-domain-photos.com' WHERE file_ID = {$edit_File->ID}";
@@ -362,13 +362,13 @@
362$edited_Item = new Item();362$edited_Item = new Item();
363$edited_Item->insert( 1, T_('2 pics in one post'), 'This post shows how you can attach more than one image to a post. All of the Yellowstone photos came from <a href="http://www.public-domain-photos.com/travel/yellowstone">Public-Domain-Photos</a>.', $now, $cat_yellowstone, array(), 'published','en-US' );363$edited_Item->insert( 1, T_('2 pics in one post'), 'This post shows how you can attach more than one image to a post. All of the Yellowstone photos came from <a href="http://www.public-domain-photos.com/travel/yellowstone">Public-Domain-Photos</a>.', $now, $cat_yellowstone, array(), 'published','en-US' );
364// attach an image to the item364// attach an image to the item
365$edit_File = new File( 'collection', 4, 'mammoth-hot-springs.jpg' );365$edit_File = new File( 'blog', 4, 'mammoth-hot-springs.jpg' );
366$edit_File->link_to_Item( $edited_Item );366$edit_File->link_to_Item( $edited_Item );
367// add meta data for this image (only once per image!)367// add meta data for this image (only once per image!)
368$query = "UPDATE T_files SET file_title = 'Mammoth Hot Springs', file_alt = 'Mammoth Hot Springs', file_desc = 'Mammoth Hot Springs.' WHERE file_ID = {$edit_File->ID}";368$query = "UPDATE T_files SET file_title = 'Mammoth Hot Springs', file_alt = 'Mammoth Hot Springs', file_desc = 'Mammoth Hot Springs.' WHERE file_ID = {$edit_File->ID}";
369$DB->query( $query );369$DB->query( $query );
370// attach another image to the item370// attach another image to the item
371$edit_File = new File( 'collection', 4, 'morning-glory-pool.jpg' );371$edit_File = new File( 'blog', 4, 'morning-glory-pool.jpg' );
372$edit_File->link_to_Item( $edited_Item );372$edit_File->link_to_Item( $edited_Item );
373// add meta data for this image (only once per image!)373// add meta data for this image (only once per image!)
374$query = "UPDATE T_files SET file_title = 'Morning Glory Pool', file_alt = 'Morning Glory Pool', file_desc = 'Morning Glory Pool.' WHERE file_ID = {$edit_File->ID}";374$query = "UPDATE T_files SET file_title = 'Morning Glory Pool', file_alt = 'Morning Glory Pool', file_desc = 'Morning Glory Pool.' WHERE file_ID = {$edit_File->ID}";
@@ -551,7 +551,7 @@
551551
552Image used compliments of <a href="http://www.flickr.com/photos/leeturner/sets/72157622986782395/with/4278672768/" title="inserted image sample" target="_blank">Lee Turner</a>'), $now, $cat_appname );552Image used compliments of <a href="http://www.flickr.com/photos/leeturner/sets/72157622986782395/with/4278672768/" title="inserted image sample" target="_blank">Lee Turner</a>'), $now, $cat_appname );
553// attach an image to the item553// attach an image to the item
554$edit_File = new File( 'collection', 2, 'waterfall.jpg' );554$edit_File = new File( 'blog', 2, 'waterfall.jpg' );
555$edit_File->link_to_Item( $edited_Item );555$edit_File->link_to_Item( $edited_Item );
556// add meta data for this image (only once per image!)556// add meta data for this image (only once per image!)
557$query = "UPDATE T_files SET file_title = 'waterfall', file_alt = 'waterfall', file_desc = 'waterfall' WHERE file_ID = {$edit_File->ID}";557$query = "UPDATE T_files SET file_title = 'waterfall', file_alt = 'waterfall', file_desc = 'waterfall' WHERE file_ID = {$edit_File->ID}";
@@ -573,7 +573,7 @@
573573
574Image used compliments of <a href="http://innervisions.org.uk/bimble/2008/08/sunshine-and-showers" title="attached image sample" target="_blank">Yabs</a>'), $now, $cat_appname );574Image used compliments of <a href="http://innervisions.org.uk/bimble/2008/08/sunshine-and-showers" title="attached image sample" target="_blank">Yabs</a>'), $now, $cat_appname );
575// attach an image to the item575// attach an image to the item
576$edit_File = new File( 'collection', 2, 'sunshine_and_flowers.jpeg' );576$edit_File = new File( 'blog', 2, 'sunshine_and_flowers.jpeg' );
577$edit_File->link_to_Item( $edited_Item );577$edit_File->link_to_Item( $edited_Item );
578// add meta data for this image (do once per default image!)578// add meta data for this image (do once per default image!)
579$query = "UPDATE T_files SET file_title = 'Coral Jupiter', file_alt = 'home grown flowers', file_desc = 'Coral Jupiter - home grown flowers (caption/description field)' WHERE file_ID = {$edit_File->ID}";579$query = "UPDATE T_files SET file_title = 'Coral Jupiter', file_alt = 'home grown flowers', file_desc = 'Coral Jupiter - home grown flowers (caption/description field)' WHERE file_ID = {$edit_File->ID}";
580580
=== modified file 'qp_install/_functions_dbupgrade.php'
--- qp_install/_functions_dbupgrade.php 2013-03-22 21:28:25 +0000
+++ qp_install/_functions_dbupgrade.php 2013-04-18 18:37:26 +0000
@@ -873,6 +873,303 @@
873 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );873 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
874 }874 }
875875
876 if( $cur_db_version < 44 )
877 {
878 $cur_db_version++;
879 echo 'Renaming the bloggroups table to blog_groups ... ';
880 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."bloggroups RENAME TO ".$app_db_tableprefix."blog_groups" ) !== false )
881 {
882 set_upgrade_checkpoint( $cur_db_version );
883 }
884 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
885 }
886
887 if( $cur_db_version < 45 )
888 {
889 $cur_db_version++;
890 echo 'Renaming the coll_settings table to blog_settings ... ';
891 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."coll_settings RENAME TO ".$app_db_tableprefix."blog_settings" ) !== false )
892 {
893 set_upgrade_checkpoint( $cur_db_version );
894 }
895 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
896 }
897
898 if( $cur_db_version < 46 )
899 {
900 $cur_db_version++;
901 echo 'Renaming the blogusers table to blog_users ... ';
902 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."blogusers RENAME TO ".$app_db_tableprefix."blog_users" ) !== false )
903 {
904 set_upgrade_checkpoint( $cur_db_version );
905 }
906 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
907 }
908
909 if( $cur_db_version < 47 )
910 {
911 $cur_db_version++;
912 echo 'Renaming the cron__log table to cron_log ... ';
913 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."cron__log RENAME TO ".$app_db_tableprefix."cron_log" ) !== false )
914 {
915 set_upgrade_checkpoint( $cur_db_version );
916 }
917 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
918 }
919
920 if( $cur_db_version < 48 )
921 {
922 $cur_db_version++;
923 echo 'Renaming the cron__task table to cron_task ... ';
924 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."cron__task RENAME TO ".$app_db_tableprefix."cron_task" ) !== false )
925 {
926 set_upgrade_checkpoint( $cur_db_version );
927 }
928 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
929 }
930
931 if( $cur_db_version < 49 )
932 {
933 $cur_db_version++;
934 echo 'Renaming the items__item table to items ... ';
935 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."items__item RENAME TO ".$app_db_tableprefix."items" ) !== false )
936 {
937 set_upgrade_checkpoint( $cur_db_version );
938 }
939 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
940 }
941
942 if( $cur_db_version < 50 )
943 {
944 $cur_db_version++;
945 echo 'Renaming the postcats table to item_cats ... ';
946 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."postcats RENAME TO ".$app_db_tableprefix."item_cats" ) !== false )
947 {
948 set_upgrade_checkpoint( $cur_db_version );
949 }
950 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
951 }
952
953 if( $cur_db_version < 51 )
954 {
955 $cur_db_version++;
956 echo 'Renaming the items__prerendering table to item_prerendering ... ';
957 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."items__prerendering RENAME TO ".$app_db_tableprefix."item_prerendering" ) !== false )
958 {
959 set_upgrade_checkpoint( $cur_db_version );
960 }
961 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
962 }
963
964 if( $cur_db_version < 52 )
965 {
966 $cur_db_version++;
967 echo 'Renaming the items__status table to item_status ... ';
968 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."items__status RENAME TO ".$app_db_tableprefix."item_status" ) !== false )
969 {
970 set_upgrade_checkpoint( $cur_db_version );
971 }
972 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
973 }
974
975 if( $cur_db_version < 53 )
976 {
977 $cur_db_version++;
978 echo 'Renaming the items__itemtag table to item_tags ... ';
979 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."items__itemtag RENAME TO ".$app_db_tableprefix."item_tags" ) !== false )
980 {
981 set_upgrade_checkpoint( $cur_db_version );
982 }
983 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
984 }
985
986 if( $cur_db_version < 54 )
987 {
988 $cur_db_version++;
989 echo 'Renaming the items__type table to item_types ... ';
990 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."items__type RENAME TO ".$app_db_tableprefix."item_types" ) !== false )
991 {
992 set_upgrade_checkpoint( $cur_db_version );
993 }
994 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
995 }
996
997 if( $cur_db_version < 55 )
998 {
999 $cur_db_version++;
1000 echo 'Renaming the items__version table to item_versions ... ';
1001 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."items__version RENAME TO ".$app_db_tableprefix."item_versions" ) !== false )
1002 {
1003 set_upgrade_checkpoint( $cur_db_version );
1004 }
1005 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
1006 }
1007
1008 if( $cur_db_version < 56 )
1009 {
1010 $cur_db_version++;
1011 echo 'Renaming the pluginevents table to plugin_events ... ';
1012 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."pluginevents RENAME TO ".$app_db_tableprefix."plugin_events" ) !== false )
1013 {
1014 set_upgrade_checkpoint( $cur_db_version );
1015 }
1016 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
1017 }
1018
1019 if( $cur_db_version < 57 )
1020 {
1021 $cur_db_version++;
1022 echo 'Renaming the pluginsettings table to plugin_settings ... ';
1023 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."pluginsettings RENAME TO ".$app_db_tableprefix."plugin_settings" ) !== false )
1024 {
1025 set_upgrade_checkpoint( $cur_db_version );
1026 }
1027 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
1028 }
1029
1030 if( $cur_db_version < 58 )
1031 {
1032 $cur_db_version++;
1033 echo 'Renaming the pluginusersettings table to plugin_usersettings ... ';
1034 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."pluginusersettings RENAME TO ".$app_db_tableprefix."plugin_usersettings" ) !== false )
1035 {
1036 set_upgrade_checkpoint( $cur_db_version );
1037 }
1038 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
1039 }
1040
1041 if( $cur_db_version < 59 )
1042 {
1043 $cur_db_version++;
1044 echo 'Renaming the items__tag table to tags ... ';
1045 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."items__tag RENAME TO ".$app_db_tableprefix."tags" ) !== false )
1046 {
1047 set_upgrade_checkpoint( $cur_db_version );
1048 }
1049 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
1050 }
1051
1052 if( $cur_db_version < 60 )
1053 {
1054 $cur_db_version++;
1055 echo 'Renaming the templates__template table to templates ... ';
1056 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."templates__template RENAME TO ".$app_db_tableprefix."templates" ) !== false )
1057 {
1058 set_upgrade_checkpoint( $cur_db_version );
1059 }
1060 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
1061 }
1062
1063 if( $cur_db_version < 61 )
1064 {
1065 $cur_db_version++;
1066 echo 'Renaming the templates__container table to template_containers ... ';
1067 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."templates__container RENAME TO ".$app_db_tableprefix."template_containers" ) !== false )
1068 {
1069 set_upgrade_checkpoint( $cur_db_version );
1070 }
1071 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
1072 }
1073
1074 if( $cur_db_version < 62 )
1075 {
1076 $cur_db_version++;
1077 echo 'Renaming the usersettings table to user_settings ... ';
1078 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."usersettings RENAME TO ".$app_db_tableprefix."user_settings" ) !== false )
1079 {
1080 set_upgrade_checkpoint( $cur_db_version );
1081 }
1082 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
1083 }
1084
1085 if( $cur_db_version < 63 )
1086 {
1087 $cur_db_version++;
1088 echo 'Renaming the widget table to widgets ... ';
1089 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."widget RENAME TO ".$app_db_tableprefix."widgets" ) !== false )
1090 {
1091 set_upgrade_checkpoint( $cur_db_version );
1092 }
1093 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
1094 }
1095
1096 if( $cur_db_version < 64 )
1097 {
1098 $cur_db_version++;
1099 echo 'Renaming the track__keyphrase table to keyphrases ... ';
1100 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."track__keyphrase RENAME TO ".$app_db_tableprefix."keyphrases" ) !== false )
1101 {
1102 set_upgrade_checkpoint( $cur_db_version );
1103 }
1104 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
1105 }
1106
1107 if( $cur_db_version < 65 )
1108 {
1109 $cur_db_version++;
1110 echo 'Renaming the track__goal table to goals ... ';
1111 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."track__goal RENAME TO ".$app_db_tableprefix."goals" ) !== false )
1112 {
1113 set_upgrade_checkpoint( $cur_db_version );
1114 }
1115 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
1116 }
1117
1118 if( $cur_db_version < 66 )
1119 {
1120 $cur_db_version++;
1121 echo 'Renaming the track__goalhit table to goal_hits ... ';
1122 if( $DB->query( "ALTER TABLE ".$app_db_tableprefix."track__goalhit RENAME TO ".$app_db_tableprefix."goal_hits" ) !== false )
1123 {
1124 set_upgrade_checkpoint( $cur_db_version );
1125 }
1126 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
1127 }
1128
1129 if( $cur_db_version < 67 )
1130 {
1131 $cur_db_version++;
1132 echo 'Removing ptyp_ID = 1600 from item_types table ... ';
1133 if( $DB->query( "DELETE FROM ".$app_db_tableprefix."item_types WHERE ptyp_ID = 1600" ) !== false )
1134 {
1135 set_upgrade_checkpoint( $cur_db_version );
1136 }
1137 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
1138 }
1139
1140 if( $cur_db_version < 68 )
1141 {
1142 $cur_db_version++;
1143 echo 'Modifying file_root_type in the files table ... ';
1144 if( db_mod_col( $app_db_tableprefix."files", "file_root_type", "ENUM('absolute','user','blog','shared','templates','collection') NOT NULL DEFAULT 'absolute'" ) !== false )
1145 {
1146 set_upgrade_checkpoint( $cur_db_version );
1147 }
1148 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
1149 }
1150
1151 if( $cur_db_version < 69 )
1152 {
1153 $cur_db_version++;
1154 echo 'Updating file_root_type in the files table ... ';
1155 if( $DB->query( "UPDATE ".$app_db_tableprefix."files SET template_type = REPLACE( file_root_type, 'collection', 'blog' )" ) !== false )
1156 {
1157 set_upgrade_checkpoint( $cur_db_version );
1158 }
1159 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
1160 }
1161
1162 if( $cur_db_version < 70 )
1163 {
1164 $cur_db_version++;
1165 echo 'Modifying file_root_type in the files table ... ';
1166 if( db_mod_col( $app_db_tableprefix."files", "file_root_type", "ENUM('absolute','user','blog','shared','templates') NOT NULL DEFAULT 'absolute'" ) !== false )
1167 {
1168 set_upgrade_checkpoint( $cur_db_version );
1169 }
1170 else debug_die( T_('Upgrader crashed doing step# ').$cur_db_version );
1171 }
1172
876// -----------------------------------------------------------------------------------------1173// -----------------------------------------------------------------------------------------
877// Remember changing the DB schema, too! Check out these files:1174// Remember changing the DB schema, too! Check out these files:
878// - qp_inc/_core/model/__core.install.php1175// - qp_inc/_core/model/__core.install.php
8791176
=== modified file 'qp_plugins/smilies_plugin/_smilies.plugin.php'
--- qp_plugins/smilies_plugin/_smilies.plugin.php 2013-03-22 21:28:25 +0000
+++ qp_plugins/smilies_plugin/_smilies.plugin.php 2013-04-18 18:37:26 +0000
@@ -172,7 +172,12 @@
172 */172 */
173 function DisplayCommentToolbar( & $params )173 function DisplayCommentToolbar( & $params )
174 {174 {
175 if( ( $this->Settings->get( 'render_comments' ) ) || ( is_logged_in() && $this->UserSettings->get( 'use_toolbar' ) ) )175 $user_wants_toolbar = false;
176 if( is_logged_in() && ! is_null( $this->UserSettings ) )
177 {
178 $user_wants_toolbar = $this->UserSettings->get( 'use_toolbar' );
179 }
180 if( ( $this->Settings->get( 'render_comments' ) ) || $user_wants_toolbar )
176 {181 {
177 return $this->make_the_toolbar( $params );182 return $this->make_the_toolbar( $params );
178 }183 }
179184
=== modified file 'qp_srvc/profile_update.php'
--- qp_srvc/profile_update.php 2013-03-22 21:28:25 +0000
+++ qp_srvc/profile_update.php 2013-04-18 18:37:26 +0000
@@ -88,7 +88,10 @@
8888
89$current_User->set( 'firstname', $newuser_firstname );89$current_User->set( 'firstname', $newuser_firstname );
90$current_User->set( 'lastname', $newuser_lastname );90$current_User->set( 'lastname', $newuser_lastname );
91$current_User->set( 'nickname', $newuser_nickname );91if( ! $lock_id_and_nick )
92{
93 $current_User->set( 'nickname', $newuser_nickname );
94}
92$current_User->set_email( $newuser_email );95$current_User->set_email( $newuser_email );
93$current_User->set( 'url', $newuser_url );96$current_User->set( 'url', $newuser_url );
94$current_User->set( 'idmode', $newuser_idmode );97$current_User->set( 'idmode', $newuser_idmode );
9598
=== modified file 'qp_srvc/register.php'
--- qp_srvc/register.php 2013-03-22 21:28:25 +0000
+++ qp_srvc/register.php 2013-04-18 18:37:26 +0000
@@ -67,6 +67,7 @@
67 ) );67 ) );
6868
69 // all logins to be lowercase to guarantee uniqueness regardless of the database case handling for UNIQUE indexes69 // all logins to be lowercase to guarantee uniqueness regardless of the database case handling for UNIQUE indexes
70 $login_raw = $login;
70 $login = strtolower( $login );71 $login = strtolower( $login );
7172
72 $UserCache = & get_Cache( 'UserCache' );73 $UserCache = & get_Cache( 'UserCache' );
@@ -86,7 +87,7 @@
86 $new_User = new User();87 $new_User = new User();
87 $new_User->set( 'login', $login );88 $new_User->set( 'login', $login );
88 $new_User->set( 'pass', md5( $pass1 ) ); // encrypted89 $new_User->set( 'pass', md5( $pass1 ) ); // encrypted
89 $new_User->set( 'nickname', $login );90 $new_User->set( 'nickname', $login_raw );
90 $new_User->set_email( $email );91 $new_User->set_email( $email );
91 $new_User->set( 'ip', $Hit->IP );92 $new_User->set( 'ip', $Hit->IP );
92 $new_User->set( 'domain', $Hit->get_remote_host( true ) );93 $new_User->set( 'domain', $Hit->get_remote_host( true ) );

Subscribers

People subscribed via source and target branches