Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Misc fixes; full test set passes again; RC4

  • Loading branch information...
commit 9eb960883fa3fc7c74e19cea6f302695f33109e2 1 parent 94c58ad
Chris Graham authored
Showing with 195 additions and 163 deletions.
  1. +2 −0  .gitignore
  2. +1 −1  _tests/codechecker/code_quality.php
  3. +1 −1  _tests/codechecker/lib.php
  4. +1 −1  _tests/tests/unit_tests/cqc__function_sigs.php
  5. +1 −1  _tests/tests/unit_tests/cqc_adminzone.php
  6. +1 −1  _tests/tests/unit_tests/cqc_blocks.php
  7. +1 −1  _tests/tests/unit_tests/cqc_cms.php
  8. +1 −1  _tests/tests/unit_tests/cqc_collaboration.php
  9. +1 −1  _tests/tests/unit_tests/cqc_database.php
  10. +1 −1  _tests/tests/unit_tests/cqc_forum.php
  11. +1 −1  _tests/tests/unit_tests/cqc_forumdrivers.php
  12. +1 −1  _tests/tests/unit_tests/cqc_hooks.php
  13. +1 −1  _tests/tests/unit_tests/cqc_rest.php
  14. +1 −1  _tests/tests/unit_tests/cqc_site.php
  15. +1 −1  _tests/tests/unit_tests/cqc_sources.php
  16. +1 −1  _tests/tests/unit_tests/cqc_welcome.php
  17. +1 −1  _tests/tests/unit_tests/lang.php
  18. +16 −13 adminzone/pages/modules/admin_config.php
  19. +3 −1 adminzone/pages/modules/admin_staff.php
  20. +4 −2 cms/pages/modules/cms_catalogues.php
  21. +3 −1 collaboration/pages/modules/supermembers.php
  22. +2 −2 data_custom/addon_files.txt
  23. +2 −2 data_custom/functions.dat
  24. +1 −0  lang/EN/global.ini
  25. +0 −1  lang/EN/news.ini
  26. +23 −29 ocportal-git.tmproj
  27. +1 −2  rootkit_detection.php
  28. +3 −1 site/pages/modules/staff.php
  29. +1 −1  site/pages/modules/tester.php
  30. +13 −12 sources/catalogues2.php
  31. +2 −2 sources/comcode_renderer.php
  32. +2 −1  sources/hooks/blocks/main_staff_checklist/blog.php
  33. +3 −0  sources/hooks/systems/addon_registry/catalogues.php
  34. +1 −1  sources/hooks/systems/addon_registry/cedi.php
  35. +5 −5 sources/hooks/systems/addon_registry/galleries.php
  36. +2 −2 sources/hooks/systems/addon_registry/ocf_forum.php
  37. +2 −0  sources/hooks/systems/addon_registry/syndication.php
  38. +6 −0 sources/hooks/systems/addon_registry/themewizard.php
  39. +36 −36 sources/hooks/systems/ecommerce_via/paypal.php
  40. +1 −1  sources/inst_special.php
  41. +4 −6 sources/minikernel.php
  42. +8 −6 sources/notifications.php
  43. +2 −2 sources/site2.php
  44. +2 −2 sources/submit.php
  45. +1 −0  sources/support.php
  46. +1 −1  sources/users_active_actions.php
  47. +1 −1  sources/version.php
  48. +2 −1  sources_custom/activities_submission.php
  49. +2 −0  sources_custom/hooks/systems/cron/classifieds.php
  50. +10 −4 sources_custom/hooks/systems/cron/group_points.php
  51. +3 −0  sources_custom/hooks/systems/ecommerce/classifieds.php
  52. +2 −2 sources_custom/site2.php
  53. +1 −1  themes/Eco-theme/css_custom/search.css
  54. +1 −1  themes/default/templates/FORM_SCREEN_INPUT_TREE_LIST.tpl
  55. +1 −1  themes/default/templates/INSTALLER_WRAP.tpl
  56. +2 −2 themes/default/templates/NOTIFICATION_BUTTONS.tpl
  57. +1 −1  themes/default/templates/SUPPORT_TICKETS_SCREEN.tpl
  58. +1 −1  themes/default/templates_custom/POINTS_GIVE.tpl
2  .gitignore
View
@@ -18,3 +18,5 @@ html_custom
spelling
data_custom/modules/chat/*.dat
themes/default/images_custom/*logo.png
+screens_tested
+html_dump
2  _tests/codechecker/code_quality.php
View
@@ -688,7 +688,7 @@
$avoid=array();
if (isset($_GET['avoid']))
$avoid=explode(',',$_GET['avoid']);
- $files=do_dir($OCPORTAL_PATH.(isset($_GET['subdir'])?('/'.$_GET['subdir']):''),true,$avoid);
+ $files=do_dir($OCPORTAL_PATH.(isset($_GET['subdir'])?('/'.$_GET['subdir']):''),true,false,$avoid);
$start=isset($_GET['start'])?intval($_GET['start']):0;
foreach ($files as $i=>$to_use)
{
2  _tests/codechecker/lib.php
View
@@ -67,7 +67,7 @@ function do_dir($dir,$no_custom=false,$orig_priority=false,$avoid=NULL)
{
while (($file=readdir($dh))!==false)
{
- if ((!is_null($avoid)) && (in_array($avoid,$file))) continue;
+ if ((!is_null($avoid)) && (in_array($file,$avoid))) continue;
if (((strpos($file,'_custom')!==false) || ($file=='_tests') || ($file=='ocworld')) && ($no_custom)) continue;
if ($file[0]!='.')
2  _tests/tests/unit_tests/cqc__function_sigs.php
View
@@ -26,7 +26,7 @@ class cqc__function_sigs_test_set extends ocp_test_case
function testAdminZone()
{
$result=http_download_file(get_base_url().'/_tests/codechecker/phpdoc_parser.php',NULL,true,false,'ocPortal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,10000.0);
- foreach (explode(chr(10),$result) as $line)
+ foreach (explode('<br />',$result) as $line)
$this->assertTrue((trim($line)=='' || substr($line,0,4)=='Done' || substr($line,0,6)=='FINAL ' || strpos($line,'TODO')!==false || strpos($line,'HACKHACK')!==false),$line);
}
}
2  _tests/tests/unit_tests/cqc_adminzone.php
View
@@ -26,7 +26,7 @@ class cqc_adminzone_test_set extends ocp_test_case
function testAdminZone()
{
$result=http_download_file(get_base_url().'/_tests/codechecker/code_quality.php?subdir=adminzone&api=1',NULL,true,false,'ocPortal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,10000.0);
- foreach (explode(chr(10),$result) as $line)
+ foreach (explode('<br />',$result) as $line)
$this->assertTrue((trim($line)=='' || substr($line,0,5)=='SKIP:' || substr($line,0,5)=='DONE ' || substr($line,0,6)=='FINAL ' || strpos($line,'TODO')!==false || strpos($line,'HACKHACK')!==false),$line);
}
}
2  _tests/tests/unit_tests/cqc_blocks.php
View
@@ -26,7 +26,7 @@ class cqc_blocks_test_set extends ocp_test_case
function testBlocks()
{
$result=http_download_file(get_base_url().'/_tests/codechecker/code_quality.php?subdir=sources/blocks&api=1',NULL,true,false,'ocPortal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,10000.0);
- foreach (explode(chr(10),$result) as $line)
+ foreach (explode('<br />',$result) as $line)
$this->assertTrue((trim($line)=='' || substr($line,0,5)=='SKIP:' || substr($line,0,5)=='DONE ' || substr($line,0,6)=='FINAL ' || strpos($line,'TODO')!==false || strpos($line,'HACKHACK')!==false),$line);
}
}
2  _tests/tests/unit_tests/cqc_cms.php
View
@@ -26,7 +26,7 @@ class cqc_cms_test_set extends ocp_test_case
function testCMS()
{
$result=http_download_file(get_base_url().'/_tests/codechecker/code_quality.php?subdir=cms&api=1',NULL,true,false,'ocPortal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,10000.0);
- foreach (explode(chr(10),$result) as $line)
+ foreach (explode('<br />',$result) as $line)
$this->assertTrue((trim($line)=='' || substr($line,0,5)=='SKIP:' || substr($line,0,5)=='DONE ' || substr($line,0,6)=='FINAL ' || strpos($line,'TODO')!==false || strpos($line,'HACKHACK')!==false),$line);
}
}
2  _tests/tests/unit_tests/cqc_collaboration.php
View
@@ -26,7 +26,7 @@ class cqc_collaboration_test_set extends ocp_test_case
function testCollaboration()
{
$result=http_download_file(get_base_url().'/_tests/codechecker/code_quality.php?subdir=collaboration&api=1',NULL,true,false,'ocPortal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,10000.0);
- foreach (explode(chr(10),$result) as $line)
+ foreach (explode('<br />',$result) as $line)
$this->assertTrue((trim($line)=='' || substr($line,0,5)=='SKIP:' || substr($line,0,5)=='DONE ' || substr($line,0,6)=='FINAL ' || strpos($line,'TODO')!==false || strpos($line,'HACKHACK')!==false),$line);
}
}
2  _tests/tests/unit_tests/cqc_database.php
View
@@ -26,7 +26,7 @@ class cqc_database_test_set extends ocp_test_case
function testDatabase()
{
$result=http_download_file(get_base_url().'/_tests/codechecker/code_quality.php?subdir=sources/database&api=1',NULL,true,false,'ocPortal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,10000.0);
- foreach (explode(chr(10),$result) as $line)
+ foreach (explode('<br />',$result) as $line)
$this->assertTrue((trim($line)=='' || substr($line,0,5)=='SKIP:' || substr($line,0,5)=='DONE ' || substr($line,0,6)=='FINAL ' || strpos($line,'TODO')!==false || strpos($line,'HACKHACK')!==false),$line);
}
}
2  _tests/tests/unit_tests/cqc_forum.php
View
@@ -26,7 +26,7 @@ class cqc_forum_test_set extends ocp_test_case
function testForum()
{
$result=http_download_file(get_base_url().'/_tests/codechecker/code_quality.php?subdir=forum&api=1',NULL,true,false,'ocPortal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,10000.0);
- foreach (explode(chr(10),$result) as $line)
+ foreach (explode('<br />',$result) as $line)
$this->assertTrue((trim($line)=='' || substr($line,0,5)=='SKIP:' || substr($line,0,5)=='DONE ' || substr($line,0,6)=='FINAL ' || strpos($line,'TODO')!==false || strpos($line,'HACKHACK')!==false),$line);
}
}
2  _tests/tests/unit_tests/cqc_forumdrivers.php
View
@@ -26,7 +26,7 @@ class cqc_forumdrivers_test_set extends ocp_test_case
function testForumDrivers()
{
$result=http_download_file(get_base_url().'/_tests/codechecker/code_quality.php?subdir=sources/forum&api=1',NULL,true,false,'ocPortal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,10000.0);
- foreach (explode(chr(10),$result) as $line)
+ foreach (explode('<br />',$result) as $line)
$this->assertTrue((trim($line)=='' || substr($line,0,5)=='SKIP:' || substr($line,0,5)=='DONE ' || substr($line,0,6)=='FINAL ' || strpos($line,'TODO')!==false || strpos($line,'HACKHACK')!==false),$line);
}
}
2  _tests/tests/unit_tests/cqc_hooks.php
View
@@ -26,7 +26,7 @@ class cqc_hooks_test_set extends ocp_test_case
function testHooks()
{
$result=http_download_file(get_base_url().'/_tests/codechecker/code_quality.php?subdir=sources/hooks&api=1',NULL,true,false,'ocPortal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,10000.0);
- foreach (explode(chr(10),$result) as $line)
+ foreach (explode('<br />',$result) as $line)
$this->assertTrue((trim($line)=='' || substr($line,0,5)=='SKIP:' || substr($line,0,5)=='DONE ' || substr($line,0,6)=='FINAL ' || strpos($line,'TODO')!==false || strpos($line,'HACKHACK')!==false),$line);
}
}
2  _tests/tests/unit_tests/cqc_rest.php
View
@@ -26,7 +26,7 @@ class cqc_rest_test_set extends ocp_test_case
function testRest()
{
$result=http_download_file(get_base_url().'/_tests/codechecker/code_quality.php?avoid=sources,site,adminzone,collaboration,cms,forum,pages&api=1',NULL,true,false,'ocPortal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,10000.0);
- foreach (explode(chr(10),$result) as $line)
+ foreach (explode('<br />',$result) as $line)
$this->assertTrue((trim($line)=='' || substr($line,0,5)=='SKIP:' || substr($line,0,5)=='DONE ' || substr($line,0,6)=='FINAL ' || strpos($line,'TODO')!==false || strpos($line,'HACKHACK')!==false),$line);
}
}
2  _tests/tests/unit_tests/cqc_site.php
View
@@ -26,7 +26,7 @@ class cqc_site_test_set extends ocp_test_case
function testSite()
{
$result=http_download_file(get_base_url().'/_tests/codechecker/code_quality.php?subdir=site&api=1',NULL,true,false,'ocPortal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,10000.0);
- foreach (explode(chr(10),$result) as $line)
+ foreach (explode('<br />',$result) as $line)
$this->assertTrue((trim($line)=='' || substr($line,0,5)=='SKIP:' || substr($line,0,5)=='DONE ' || substr($line,0,6)=='FINAL ' || strpos($line,'TODO')!==false || strpos($line,'HACKHACK')!==false),$line);
}
}
2  _tests/tests/unit_tests/cqc_sources.php
View
@@ -26,7 +26,7 @@ class cqc_sources_test_set extends ocp_test_case
function testSources()
{
$result=http_download_file(get_base_url().'/_tests/codechecker/code_quality.php?subdir=sources&avoid=forum,database,hooks,blocks&api=1',NULL,true,false,'ocPortal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,10000.0);
- foreach (explode(chr(10),$result) as $line)
+ foreach (explode('<br />',$result) as $line)
$this->assertTrue((trim($line)=='' || substr($line,0,5)=='SKIP:' || substr($line,0,5)=='DONE ' || substr($line,0,6)=='FINAL ' || strpos($line,'TODO')!==false || strpos($line,'HACKHACK')!==false),$line);
}
}
2  _tests/tests/unit_tests/cqc_welcome.php
View
@@ -26,7 +26,7 @@ class cqc_welcome_test_set extends ocp_test_case
function testWelcome()
{
$result=http_download_file(get_base_url().'/_tests/codechecker/code_quality.php?subdir=pages&api=1',NULL,true,false,'ocPortal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,10000.0);
- foreach (explode(chr(10),$result) as $line)
+ foreach (explode('<br />',$result) as $line)
$this->assertTrue((trim($line)=='' || substr($line,0,5)=='SKIP:' || substr($line,0,5)=='DONE ' || substr($line,0,6)=='FINAL ' || strpos($line,'TODO')!==false || strpos($line,'HACKHACK')!==false),$line);
}
}
2  _tests/tests/unit_tests/lang.php
View
@@ -67,7 +67,7 @@ function testLangMistakes()
if($this->str_ipos($string,'ID\'s')!==false) $this->assertTrue(false,'The term \'ID\'s\' was used in '.$file.'. This should be changed to \'IDs\'.');
if($this->str_ipos($string,'comma separated')!==false) $this->assertTrue(false,'The phrase \'comma separated\' was used in '.$file.'. This should be changed to \'comma-separated\'.');
//if($this->str_ipos($string,'center')!==false) $this->assertTrue(false,'The word \'center\' was used in '.$file.'. This should be changed to \'centre\'.');
- if($file!='upgrade.ini' && $key!='NO_PHP_IN_TEMPLATES' && $key!='WHAT_TO_EXPECT' && $key!='DESCRIPTION_INCLUDE_OCP_ADVERT' && $key!='INCLUDE_OCP_ADVERT' && $key!='UNINSTALL_WARNING' && $key!='OCP_CHAT_EXTRA' && (strpos($key,'SETUP_WIZARD')===false) && $file!='lang.ini' && $file!='recommend.ini' && $file!='version.ini' && $file!='tips.ini' && $file!='debrand.ini' && $file!='import.ini' && $file!='installer.ini' && $file!='occle.ini' && $file!='addons.ini' && $this->str_ipos($string,'ocPortal')!==false)
+ if($file!='upgrade.ini' && $key!='NO_PHP_IN_TEMPLATES' && $key!='WHAT_TO_EXPECT' && $key!='DESCRIPTION_INCLUDE_OCP_ADVERT' && $key!='INCLUDE_OCP_ADVERT' && $key!='UNINSTALL_WARNING' && $key!='OCP_CHAT_EXTRA' && (strpos($key,'SETUP_WIZARD')===false) && $file!='lang.ini' && $file!='recommend.ini' && $file!='version.ini' && $file!='tips.ini' && $file!='debrand.ini' && $file!='import.ini' && $file!='installer.ini' && $file!='occle.ini' && $file!='addons.ini' && strpos($string,'ocPortal')!==false)
$this->assertTrue(false,'The word \'ocPortal\' was used in '.$file.'. This should probably be changed to \'the software\'.');
if(preg_match('#([^A-Za-z"\_]+)comcode([^A-Za-z"]+)#',$string)!=0) $this->assertTrue(false,'The term \'comcode\' was used in '.$file.'. This should be changed to \'Comcode\'.');
29 adminzone/pages/modules/admin_config.php
View
@@ -798,21 +798,24 @@ function config_set()
if (($new_site_name!='') && (get_option('is_on_sync_staff',true)==='1'))
{
$admin_groups=array_merge($GLOBALS['FORUM_DRIVER']->get_super_admin_groups(),$GLOBALS['FORUM_DRIVER']->get_moderator_groups());
- $staff=$GLOBALS['FORUM_DRIVER']->member_group_query($admin_groups);
- foreach ($staff as $row_staff)
+ $staff=$GLOBALS['FORUM_DRIVER']->member_group_query($admin_groups,100);
+ if (count($staff)<100)
{
- $member=$GLOBALS['FORUM_DRIVER']->pname_id($row_staff);
- if ($GLOBALS['FORUM_DRIVER']->is_staff($member))
+ foreach ($staff as $row_staff)
{
- $sites=get_ocp_cpf('sites');
- $sites=str_replace(', '.get_site_name(),'',$sites);
- $sites=str_replace(','.get_site_name(),'',$sites);
- $sites=str_replace(get_site_name().', ','',$sites);
- $sites=str_replace(get_site_name().',','',$sites);
- $sites=str_replace(get_site_name(),'',$sites);
- if ($sites!='') $sites.=', ';
- $sites.=$new_site_name;
- $GLOBALS['FORUM_DRIVER']->set_custom_field($member,'sites',$sites);
+ $member=$GLOBALS['FORUM_DRIVER']->pname_id($row_staff);
+ if ($GLOBALS['FORUM_DRIVER']->is_staff($member))
+ {
+ $sites=get_ocp_cpf('sites');
+ $sites=str_replace(', '.get_site_name(),'',$sites);
+ $sites=str_replace(','.get_site_name(),'',$sites);
+ $sites=str_replace(get_site_name().', ','',$sites);
+ $sites=str_replace(get_site_name().',','',$sites);
+ $sites=str_replace(get_site_name(),'',$sites);
+ if ($sites!='') $sites.=', ';
+ $sites.=$new_site_name;
+ $GLOBALS['FORUM_DRIVER']->set_custom_field($member,'sites',$sites);
+ }
}
}
}
4 adminzone/pages/modules/admin_staff.php
View
@@ -128,7 +128,9 @@ function staff_interface()
if (get_option('is_on_staff_filter')=='0') $text=do_lang_tempcode('STAFF_FILTER_OFF'); else $text=do_lang_tempcode('STAFF_FILTER_ON');
$admin_groups=array_merge($GLOBALS['FORUM_DRIVER']->get_super_admin_groups(),$GLOBALS['FORUM_DRIVER']->get_moderator_groups());
- $staff=$GLOBALS['FORUM_DRIVER']->member_group_query($admin_groups);
+ $staff=$GLOBALS['FORUM_DRIVER']->member_group_query($admin_groups,400);
+ if (count($staff)>=400)
+ warn_exit(do_lang_tempcode('TOO_MANY_TO_CHOOSE_FROM'));
$available=new ocp_tempcode();
require_code('form_templates');
foreach ($staff as $row_staff)
6 cms/pages/modules/cms_catalogues.php
View
@@ -569,7 +569,8 @@ function add_actualisation()
{
if ((has_actual_page_access($GLOBALS['FORUM_DRIVER']->get_guest_id(),'catalogues')) && (has_category_access($GLOBALS['FORUM_DRIVER']->get_guest_id(),'catalogues_catalogue',$catalogue_name)) && (has_category_access($GLOBALS['FORUM_DRIVER']->get_guest_id(),'catalogues_category',strval($category_id))))
{
- $title=array_shift($map);
+ $map_copy=$map;
+ $title=array_shift($map_copy);
$catalogue_title=get_translated_text($GLOBALS['SITE_DB']->query_value('catalogues','c_title',array('c_name'=>$catalogue_name)));
syndicate_described_activity('catalogues:ACTIVITY_CATALOGUE_GENERIC_ADD',$catalogue_title,$title,'','_SEARCH:catalogues:entry:'.strval($id),'','','catalogues');
}
@@ -607,7 +608,8 @@ function edit_actualisation($_id)
{
if ((has_actual_page_access($GLOBALS['FORUM_DRIVER']->get_guest_id(),'catalogues')) && (has_category_access($GLOBALS['FORUM_DRIVER']->get_guest_id(),'catalogues_catalogue',$catalogue_name)) && (has_category_access($GLOBALS['FORUM_DRIVER']->get_guest_id(),'catalogues_category',strval($category_id))))
{
- $title=array_shift($map);
+ $map_copy=$map;
+ $title=array_shift($map_copy);
$catalogue_title=get_translated_text($GLOBALS['SITE_DB']->query_value('catalogues','c_title',array('c_name'=>$catalogue_name)));
syndicate_described_activity('catalogues:ACTIVITY_CATALOGUE_GENERIC_ADD',$catalogue_title,$title,'','_SEARCH:catalogues:entry:'.strval($id),'','','catalogues');
}
4 collaboration/pages/modules/supermembers.php
View
@@ -105,7 +105,9 @@ function run()
$supermember_groups=collapse_1d_complexity('group_id',$GLOBALS['SITE_DB']->query_select('group_zone_access',array('group_id'),array('zone_name'=>get_zone_name())));
$supermember_groups=array_merge($supermember_groups,$GLOBALS['FORUM_DRIVER']->get_super_admin_groups());
- $rows=$GLOBALS['FORUM_DRIVER']->member_group_query($supermember_groups);
+ $rows=$GLOBALS['FORUM_DRIVER']->member_group_query($supermember_groups,1000);
+ if (count($rows)>=1000)
+ warn_exit(do_lang_tempcode('TOO_MANY_TO_CHOOSE_FROM'));
$all_usergroups=$GLOBALS['FORUM_DRIVER']->get_usergroup_list();
// Calculate
4 data_custom/addon_files.txt
View
@@ -2281,8 +2281,8 @@ theme_debug
cleanup_repository
------------------
- - find_files_in_uninstall_addons.php
- - remove_junk.sh
+ - data_custom/find_files_in_uninstall_addons.php
+ - killjunk.sh
booking
-------
4 data_custom/functions.dat
View
2 additions, 2 deletions not shown
1  lang/EN/global.ini
View
@@ -931,3 +931,4 @@ SHOW_COMMENTS=Show {1} {1|reply|replies}
LIKED_BY=Liked by
THREADED_REPLY_NOTICE=To reply to an existing post use the reply/quote button under it. Type fresh posts here when not replying to any existing post.\n\n{1}
QUOTED_REPLY_MESSAGE=Click to type your reply to {1}'s message, which was:\n\n{2}
+READ_MORE=Read more
1  lang/EN/news.ini
View
@@ -43,7 +43,6 @@ CONFIG_OPTION_points_ADD_NEWS=The number of points awarded for adding news/blog
MANAGE_NEWS=Manage news
MANAGE_BLOGS=Manage blogs
POSTED_TIME=Posted {1}
-READ_MORE=Read more
BLOG=Blog
BLOGS=Blogs
NONBLOG_CATEGORIES=Non-blog categories
52 ocportal-git.tmproj
View
@@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
+ <key>currentDocument</key>
+ <string>data_custom/addon_files.txt</string>
<key>documents</key>
<array>
<dict>
@@ -637,33 +639,35 @@
<key>firstVisibleLine</key>
<integer>0</integer>
</dict>
- <key>data/securityimage.php</key>
+ <key>data_custom/addon_files.txt</key>
<dict>
<key>caret</key>
<dict>
<key>column</key>
- <integer>0</integer>
+ <integer>14</integer>
<key>line</key>
- <integer>0</integer>
+ <integer>2284</integer>
</dict>
+ <key>columnSelection</key>
+ <false/>
<key>firstVisibleColumn</key>
<integer>0</integer>
<key>firstVisibleLine</key>
- <integer>6</integer>
- </dict>
- <key>data_custom/errorlog.php</key>
- <dict>
- <key>caret</key>
+ <integer>2258</integer>
+ <key>selectFrom</key>
<dict>
<key>column</key>
- <integer>0</integer>
+ <integer>3</integer>
<key>line</key>
- <integer>0</integer>
+ <integer>2284</integer>
+ </dict>
+ <key>selectTo</key>
+ <dict>
+ <key>column</key>
+ <integer>14</integer>
+ <key>line</key>
+ <integer>2284</integer>
</dict>
- <key>firstVisibleColumn</key>
- <integer>0</integer>
- <key>firstVisibleLine</key>
- <integer>0</integer>
</dict>
<key>data_custom/jabber-logs/.htaccess</key>
<dict>
@@ -995,20 +999,6 @@
<key>firstVisibleLine</key>
<integer>247</integer>
</dict>
- <key>site/pages/modules/catalogues.php</key>
- <dict>
- <key>caret</key>
- <dict>
- <key>column</key>
- <integer>41</integer>
- <key>line</key>
- <integer>949</integer>
- </dict>
- <key>firstVisibleColumn</key>
- <integer>0</integer>
- <key>firstVisibleLine</key>
- <integer>894</integer>
- </dict>
<key>sources/backup.php</key>
<dict>
<key>caret</key>
@@ -2808,9 +2798,13 @@
<integer>0</integer>
</dict>
</dict>
+ <key>openDocuments</key>
+ <array>
+ <string>data_custom/addon_files.txt</string>
+ </array>
<key>showFileHierarchyDrawer</key>
<true/>
<key>windowFrame</key>
- <string>{{493, 216}, {966, 879}}</string>
+ <string>{{379, 158}, {966, 879}}</string>
</dict>
</plist>
3  rootkit_detection.php
View
@@ -271,10 +271,9 @@ function rd_do_footer()
* Check the given master password is valid.
*
* @param SHORT_TEXT Given master password
- * @param SHORT_TEXT Actual master password
* @return boolean Whether it is valid
*/
-function rk_check_master_password($password_given,$password)
+function rk_check_master_password($password_given)
{
global $SITE_INFO;
if (!array_key_exists('admin_password',$SITE_INFO)) exit('No master password defined in info.php currently so cannot authenticate');
4 site/pages/modules/staff.php
View
@@ -98,7 +98,9 @@ function do_all_staff()
$title=get_page_title('STAFF_TITLE',true,array(escape_html(get_site_name())));
$admin_groups=array_merge($GLOBALS['FORUM_DRIVER']->get_super_admin_groups(),$GLOBALS['FORUM_DRIVER']->get_moderator_groups());
- $rows=$GLOBALS['FORUM_DRIVER']->member_group_query($admin_groups);
+ $rows=$GLOBALS['FORUM_DRIVER']->member_group_query($admin_groups,400);
+ if (count($rows)>=400)
+ warn_exit(do_lang_tempcode('TOO_MANY_TO_CHOOSE_FROM'));
$pre=do_lang_tempcode('PRE_STAFF');
2  site/pages/modules/tester.php
View
@@ -367,7 +367,7 @@ function get_tester_list($it)
$groups=array_unique(array_merge($tester_groups,$admin_groups,$moderator_groups));
- $members=$GLOBALS['FORUM_DRIVER']->member_group_query($groups);
+ $members=$GLOBALS['FORUM_DRIVER']->member_group_query($groups,2000);
$list=form_input_list_entry('-1',is_null($it),do_lang_tempcode('NA_EM'));
foreach ($members as $member=>$details)
25 sources/catalogues2.php
View
@@ -537,7 +537,7 @@ function calculate_category_child_count_cache($cat_id,$recursive_updates=true)
$catalogue_name=$GLOBALS['SITE_DB']->query_value_null_ok('catalogue_categories','c_name',array('id'=>$cat_id));
$num_rec_children=$GLOBALS['SITE_DB']->query_value('catalogue_cat_treecache','COUNT(*)',array('cc_ancestor_id'=>$cat_id))-1;
- $num_rec_entries=$GLOBALS['SITE_DB']->query_value('catalogue_cat_treecache t JOIN '.get_table_prefix().'catalogue_entries e ON e.cc_id=t.cc_id','COUNT(*)',array('t.cc_ancestor_id'=>$cat_id,'c_name'=>$catalogue_name/*important, else custom field cats could be included*/));
+ $num_rec_entries=$GLOBALS['SITE_DB']->query_value('catalogue_cat_treecache t JOIN '.get_table_prefix().'catalogue_entries e ON e.cc_id=t.cc_id','COUNT(*)',array('ce_validated'=>1,'t.cc_ancestor_id'=>$cat_id,'c_name'=>$catalogue_name/*important, else custom field cats could be included*/));
$GLOBALS['SITE_DB']->query_insert('catalogue_childcountcache',array(
'cc_id'=>$cat_id,
@@ -772,16 +772,16 @@ function actual_add_catalogue_entry($category_id,$validated,$notes,$allow_rating
if ($sup_table_name=='float')
{
- $map=array('cf_id'=>$field_id,'ce_id'=>$id,'cv_value'=>((is_null($val)) || ($val==''))?NULL:floatval($val));
+ $smap=array('cf_id'=>$field_id,'ce_id'=>$id,'cv_value'=>((is_null($val)) || ($val==''))?NULL:floatval($val));
}
elseif ($sup_table_name=='integer')
{
- $map=array('cf_id'=>$field_id,'ce_id'=>$id,'cv_value'=>((is_null($val)) || ($val==''))?NULL:intval($val));
+ $smap=array('cf_id'=>$field_id,'ce_id'=>$id,'cv_value'=>((is_null($val)) || ($val==''))?NULL:intval($val));
} else
{
- $map=array('cf_id'=>$field_id,'ce_id'=>$id,'cv_value'=>$val);
+ $smap=array('cf_id'=>$field_id,'ce_id'=>$id,'cv_value'=>$val);
}
- $GLOBALS['SITE_DB']->query_insert('catalogue_efv_'.$sup_table_name,$map);
+ $GLOBALS['SITE_DB']->query_insert('catalogue_efv_'.$sup_table_name,$smap);
}
require_code('seo2');
@@ -837,7 +837,8 @@ function actual_edit_catalogue_entry($id,$category_id,$validated,$notes,$allow_r
if (!addon_installed('unvalidated')) $validated=1;
require_code('submit');
- $just_validated=(!content_validated('catalogue_entry',strval($id))) && ($validated==1);
+ $was_validated=content_validated('catalogue_entry',strval($id));
+ $just_validated=(!$was_validated) && ($validated==1);
if ($just_validated)
{
send_content_validated_notification('catalogue_entry',strval($id));
@@ -879,16 +880,16 @@ function actual_edit_catalogue_entry($id,$category_id,$validated,$notes,$allow_r
{
if ($sup_table_name=='float')
{
- $map=array('cv_value'=>((is_null($val)) || ($val==''))?NULL:floatval($val));
+ $smap=array('cv_value'=>((is_null($val)) || ($val==''))?NULL:floatval($val));
}
elseif ($sup_table_name=='integer')
{
- $map=array('cv_value'=>((is_null($val)) || ($val==''))?NULL:intval($val));
+ $smap=array('cv_value'=>((is_null($val)) || ($val==''))?NULL:intval($val));
} else
{
- $map=array('cv_value'=>$val);
+ $smap=array('cv_value'=>$val);
}
- $GLOBALS['SITE_DB']->query_update('catalogue_efv_'.$sup_table_name,$map,array('cf_id'=>$field_id,'ce_id'=>$id),'',1);
+ $GLOBALS['SITE_DB']->query_update('catalogue_efv_'.$sup_table_name,$smap,array('cf_id'=>$field_id,'ce_id'=>$id),'',1);
}
}
@@ -900,10 +901,10 @@ function actual_edit_catalogue_entry($id,$category_id,$validated,$notes,$allow_r
$self_url=build_url(array('page'=>'catalogues','type'=>'entry','id'=>$id),get_module_zone('catalogues'),NULL,false,false,true);
- if ($category_id!=$old_category_id)
+ if (($category_id!=$old_category_id) || ($was_validated!=($validated==1)))
{
calculate_category_child_count_cache($category_id);
- calculate_category_child_count_cache($old_category_id);
+ if ($category_id!=$old_category_id) calculate_category_child_count_cache($old_category_id);
}
decache('main_cc_embed');
4 sources/comcode_renderer.php
View
@@ -971,8 +971,7 @@ function _do_tags_comcode($tag,$attributes,$embed,$comcode_dangerous,$pass_id,$m
if ($level==0) $level=1; // Stop crazy Comcode causing stack errors with the toc
$uniq_id=strval(count($STRUCTURE_LIST));
- if ($structure_sweep)
- $STRUCTURE_LIST[]=array($level,$embed,$uniq_id);
+ $STRUCTURE_LIST[]=array($level,$embed,$uniq_id);
if ($level==1) $template='SCREEN_TITLE';
elseif ($level==2) $template='COMCODE_SECTION_TITLE';
elseif ($level==3) $template='COMCODE_MINOR_TITLE';
@@ -2351,6 +2350,7 @@ function _do_tags_comcode($tag,$attributes,$embed,$comcode_dangerous,$pass_id,$m
$urls_for=array();
$old_structure_list=$STRUCTURE_LIST;
+ $STRUCTURE_LIST=array(); // reset for e.g. comcode_text_to_tempcode calls (which don't itself reset it, although _comcode_to_tempcode does for top level parses)
if ((array_key_exists('files',$attributes)) && ($comcode_dangerous))
{
3  sources/hooks/blocks/main_staff_checklist/blog.php
View
@@ -35,7 +35,8 @@ function run()
require_lang('news');
$admin_groups=array_merge($GLOBALS['FORUM_DRIVER']->get_super_admin_groups(),$GLOBALS['FORUM_DRIVER']->get_moderator_groups());
- $staff=$GLOBALS['FORUM_DRIVER']->member_group_query(array_keys($admin_groups));
+ $staff=$GLOBALS['FORUM_DRIVER']->member_group_query(array_keys($admin_groups),100);
+ if (count($staff)>=100) return array();
$or_list='';
foreach (array_keys($staff) as $staff_id)
{
3  sources/hooks/systems/addon_registry/catalogues.php
View
@@ -383,11 +383,13 @@ function tpl_preview__table_category_screen__links()
$row->attach(do_lorem_template('CATALOGUE_links_TAB_ENTRY',array(
'FIELDS_TABLE'=>$head,
'VIEW_URL'=>placeholder_url(),
+ 'EDIT_URL'=>placeholder_url(),
'FIELD_1_PLAIN'=>lorem_phrase(),
)));
$row->attach(do_lorem_template('CATALOGUE_links_TAB_ENTRY',array(
'FIELDS_TABLE'=>$entries,
'VIEW_URL'=>placeholder_url(),
+ 'EDIT_URL'=>placeholder_url(),
'FIELD_1_PLAIN'=>lorem_phrase(),
)));
$content = do_lorem_template('CATALOGUE_links_TAB_WRAP',array(
@@ -472,6 +474,7 @@ function tpl_preview__table_category_screen()
)));
$entries->attach(do_lorem_template('CATALOGUE_DEFAULT_TAB_ENTRY',array(
'FIELDS_TABLE'=>$fields,
+ 'EDIT_URL'=>placeholder_url(),
'VIEW_URL'=>placeholder_url(),
)));
$content = do_lorem_template('CATALOGUE_DEFAULT_TAB_WRAP',array(
2  sources/hooks/systems/addon_registry/cedi.php
View
@@ -216,7 +216,7 @@ function tpl_preview__cedi_page_screen()
$all_rating_criteria[]=array('TITLE'=>lorem_word(),'RATING'=>make_string_tempcode("6"),'NUM_RATINGS'=>placeholder_number(),'TYPE'=>lorem_word());
$rating_inside = do_lorem_template('CEDI_RATING_FORM',array('LIKES'=>true,'CONTENT_TYPE'=>'seedy','ID'=>placeholder_id(),'URL'=>placeholder_url(),'ALL_RATING_CRITERIA'=>$all_rating_criteria,'OVERALL_NUM_RATINGS'=>placeholder_number(),'HAS_RATINGS'=>true,'SIMPLISTIC'=>true,'ERROR'=>''));
- $rating_details = do_lorem_template('CEDI_RATING',array('NUM_RATINGS'=>placeholder_number(),'RATING_FORM'=>$rating_inside,'ALL_RATING_CRITERIA'=>$all_rating_criteria,'HAS_RATINGS'=>true));
+ $rating_details = do_lorem_template('CEDI_RATING',array('OVERALL_NUM_RATINGS'=>placeholder_number(),'RATING_FORM'=>$rating_inside,'ALL_RATING_CRITERIA'=>$all_rating_criteria,'HAS_RATINGS'=>true));
$posts = do_lorem_template('CEDI_POST',array(
'INCLUDE_EXPANSION'=>lorem_phrase(),
10 sources/hooks/systems/addon_registry/galleries.php
View
@@ -651,7 +651,7 @@ function tpl_preview__block_main_gallery_embed()
lorem_globalise(
do_lorem_template('BLOCK_MAIN_GALLERY_EMBED',array(
'TITLE'=>lorem_phrase(),
- 'CAT'=>lorem_phrase(),
+ 'CAT'=>placeholder_id(),
'IMAGES'=>$entries,
'MAX'=>lorem_phrase(),
'ZONE'=>lorem_phrase(),
@@ -748,7 +748,7 @@ function tpl_preview__gallery_flowmode_video()
'MAIN'=>lorem_phrase(),
'DESCRIPTION'=>lorem_paragraph_html(),
'FILE_SIZE'=>placeholder_filesize(),
- 'CAT'=>lorem_phrase(),
+ 'CAT'=>placeholder_id(),
'RATING_DETAILS'=>'',
'THUMB_URL'=>placeholder_image_url(),
'FULL_URL'=>placeholder_url(),
@@ -809,7 +809,7 @@ function tpl_preview__gallery_flowmode_video()
'MEMBER_ID'=>placeholder_id(),
'VIDEO_URL'=>placeholder_url(),
'MAY_DOWNLOAD'=>lorem_phrase(),
- 'CAT'=>lorem_phrase(),
+ 'CAT'=>placeholder_id(),
'FIRST_ENTRY_ID'=>placeholder_id(),
'SORTING'=>lorem_phrase(),
)
@@ -831,7 +831,7 @@ function tpl_preview__gallery_flowmode_image()
'DESCRIPTION'=>lorem_paragraph_html(),
'FILE_SIZE'=>placeholder_filesize(),
'RATING_DETAILS'=>'',
- 'CAT'=>lorem_phrase(),
+ 'CAT'=>placeholder_id(),
'THUMB_URL'=>placeholder_image_url(),
'FULL_URL'=>placeholder_url(),
'ID'=>placeholder_id(),
@@ -887,7 +887,7 @@ function tpl_preview__gallery_flowmode_image()
'MEMBER_ID'=>placeholder_id(),
'VIDEO_URL'=>placeholder_url(),
'MAY_DOWNLOAD'=>lorem_phrase(),
- 'CAT'=>lorem_phrase(),
+ 'CAT'=>placeholder_id(),
'FIRST_ENTRY_ID'=>placeholder_id(),
'SORTING'=>lorem_phrase(),
)
4 sources/hooks/systems/addon_registry/ocf_forum.php
View
@@ -793,8 +793,8 @@ function tpl_preview__ocf_forum()
$filters=do_lorem_template('OCF_PT_FILTERS',array('FILTERS'=>array(),'RESET_URL'=>placeholder_url()));
$results_browser = placeholder_result_browser();
- $topic_wrapper = do_lorem_template('OCF_FORUM_TOPIC_WRAPPER',array('MAX'=>lorem_phrase(),'ORDER'=>lorem_phrase(),'MAY_CHANGE_MAX'=>lorem_phrase(),'TREE'=>lorem_phrase(),'BUTTONS'=>$buttons,'STARTER_TITLE'=>lorem_phrase(),'RESULTS_BROWSER'=>$results_browser,'MODERATOR_ACTIONS'=>placeholder_options(),'ACTION_URL'=>placeholder_url(),'TOPICS'=>$topics,'FORUM_NAME'=>lorem_word()));
- $content = do_lorem_template('OCF_FORUM',array('FILTERS'=>$filters,'FORUM_NAME'=>lorem_word_html(),'STARTER_TITLE'=>lorem_phrase(),'BUTTONS'=>$buttons,'TOPIC_WRAPPER'=>$topic_wrapper,'CATEGORIES'=>$categories,'ID'=>placeholder_id(),'DESCRIPTION'=>lorem_phrase()));
+ $topic_wrapper = do_lorem_template('OCF_FORUM_TOPIC_WRAPPER',array('TYPE'=>'misc','MAX'=>lorem_phrase(),'ORDER'=>lorem_phrase(),'MAY_CHANGE_MAX'=>lorem_phrase(),'TREE'=>lorem_phrase(),'BUTTONS'=>$buttons,'STARTER_TITLE'=>lorem_phrase(),'RESULTS_BROWSER'=>$results_browser,'MODERATOR_ACTIONS'=>placeholder_options(),'ACTION_URL'=>placeholder_url(),'TOPICS'=>$topics,'FORUM_NAME'=>lorem_word()));
+ $content = do_lorem_template('OCF_FORUM',array('TREE'=>'','FILTERS'=>$filters,'FORUM_NAME'=>lorem_word_html(),'STARTER_TITLE'=>lorem_phrase(),'BUTTONS'=>$buttons,'TOPIC_WRAPPER'=>$topic_wrapper,'CATEGORIES'=>$categories,'ID'=>placeholder_id(),'DESCRIPTION'=>lorem_phrase()));
return array(
lorem_globalise(
2  sources/hooks/systems/addon_registry/syndication.php
View
@@ -154,6 +154,7 @@ function tpl_preview__rss_wrapper()
lorem_globalise(
do_lorem_template('RSS_WRAPPER',array(
'MODE'=>'rss',
+ 'MODE_NICE'=>lorem_word(),
'COPYRIGHT'=>lorem_phrase(),
'ABOUT'=>lorem_paragraph(),
'RSS_CLOUD'=>$cloud,
@@ -192,6 +193,7 @@ function tpl_preview__atom_wrapper()
lorem_globalise(
do_lorem_template('ATOM_WRAPPER',array(
'MODE'=>lorem_word(),
+ 'MODE_NICE'=>lorem_word(),
'FILTER'=>lorem_word_2(),
'DATE'=>placeholder_time(),
'LOGO_URL'=>placeholder_image_url(),
6 sources/hooks/systems/addon_registry/themewizard.php
View
@@ -119,6 +119,8 @@ function tpl_previews()
*/
function tpl_preview__administrative__themewizard_2_preview()
{
+ require_lang('themes');
+
$content = do_lorem_template('THEMEWIZARD_2_PREVIEW');
return array(
@@ -137,6 +139,8 @@ function tpl_preview__administrative__themewizard_2_preview()
*/
function tpl_preview__administrative__themewizard_2_screen()
{
+ require_lang('themes');
+
return array(
lorem_globalise(
do_lorem_template('THEMEWIZARD_2_SCREEN',array(
@@ -166,6 +170,8 @@ function tpl_preview__administrative__themewizard_2_screen()
*/
function tpl_preview__administrative__logowizard_2_screen()
{
+ require_lang('themes');
+
$preview = do_lorem_template('LOGOWIZARD_2_SCREEN',array('NAME'=>lorem_phrase(),'TITLE'=>lorem_phrase(),'THEME'=>lorem_phrase()));
return array(
72 sources/hooks/systems/ecommerce_via/paypal.php
View
@@ -57,15 +57,15 @@ function make_transaction_button($product,$item_name,$purchase_id,$amount,$curre
$ipn_url=$this->get_ipn_url();
$user_details=array();
- if(!is_guest())
+ if (!is_guest())
{
- $user_details['first_name'] = get_ocp_cpf('firstname');
- $user_details['last_name'] = get_ocp_cpf('lastname');
- $user_details['address1'] = get_ocp_cpf('building_name_or_number');
- $user_details['city'] = get_ocp_cpf('city');
- $user_details['state'] = get_ocp_cpf('state');
- $user_details['zip'] = get_ocp_cpf('post_code');
- $user_details['country'] = get_ocp_cpf('country');
+ $user_details['first_name']=get_ocp_cpf('firstname');
+ $user_details['last_name']=get_ocp_cpf('lastname');
+ $user_details['address1']=get_ocp_cpf('building_name_or_number');
+ $user_details['city']=get_ocp_cpf('city');
+ $user_details['state']=get_ocp_cpf('state');
+ $user_details['zip']=get_ocp_cpf('post_code');
+ $user_details['country']=get_ocp_cpf('country');
}
return do_template('ECOM_BUTTON_VIA_PAYPAL',array('_GUID'=>'b0d48992ed17325f5e2330bf90c85762','PRODUCT'=>$product,'ITEM_NAME'=>$item_name,'PURCHASE_ID'=>$purchase_id,'AMOUNT'=>float_to_raw_string($amount),'CURRENCY'=>$currency,'PAYMENT_ADDRESS'=>$payment_address,'IPN_URL'=>$ipn_url,'MEMBER_ADDRESS'=>$user_details));
@@ -139,18 +139,18 @@ function handle_transaction()
}
// assign posted variables to local variables
- $purchase_id = post_param_integer('custom','-1');
+ $purchase_id=post_param_integer('custom','-1');
- $txn_type = post_param('txn_type',NULL);
+ $txn_type=post_param('txn_type',NULL);
- if($txn_type=='cart')
+ if ($txn_type=='cart')
{
require_lang('shopping');
- $item_name = do_lang('CART_ORDER',$purchase_id);
+ $item_name=do_lang('CART_ORDER',$purchase_id);
}
else
{
- $item_name = (substr(post_param('txn_type',''),0,6)=='subscr')?'':post_param('item_name','');
+ $item_name=(substr(post_param('txn_type',''),0,6)=='subscr')?'':post_param('item_name','');
}
$payment_status=post_param('payment_status',''); // May be blank for subscription
@@ -182,7 +182,7 @@ function handle_transaction()
if (!(strcmp($res,'VERIFIED')==0))
{
if (post_param('txn_type','')=='send_money') exit('Unexpected'); // PayPal has been seen to mess up on send_money transactions, making the IPN unverifiable
- my_exit(do_lang('IPN_UNVERIFIED').' - '.$res.' - '.flatten_slashed_array($pure_post));
+ my_exit(do_lang('IPN_UNVERIFIED').' - '.$res.' - '.flatten_slashed_array($pure_post),strpos($res,'<html')!==false);
}
}
@@ -220,7 +220,7 @@ function handle_transaction()
if ($receiver_email!=$this->_get_payment_address()) my_exit(do_lang('IPN_EMAIL_ERROR'));
}
- if(addon_installed('shopping'))
+ if (addon_installed('shopping'))
{
$this->store_shipping_address($purchase_id);
}
@@ -238,23 +238,23 @@ function handle_transaction()
*/
function make_cart_transaction_button($items,$currency,$order_id)
{
- $payment_address = $this->_get_payment_address();
+ $payment_address=$this->_get_payment_address();
- $ipn_url = $this->get_ipn_url();
+ $ipn_url=$this->get_ipn_url();
- $notification_text = do_lang_tempcode('CHECKOUT_NOTIFICATION_TEXT',$order_id);
+ $notification_text=do_lang_tempcode('CHECKOUT_NOTIFICATION_TEXT',$order_id);
- $user_details = array();
+ $user_details=array();
- if(!is_guest())
+ if (!is_guest())
{
- $user_details['first_name'] = get_ocp_cpf('firstname');
- $user_details['last_name'] = get_ocp_cpf('lastname');
- $user_details['address1'] = get_ocp_cpf('building_name_or_number');
- $user_details['city'] = get_ocp_cpf('city');
- $user_details['state'] = get_ocp_cpf('state');
- $user_details['zip'] = get_ocp_cpf('post_code');
- $user_details['country'] = get_ocp_cpf('country');
+ $user_details['first_name']=get_ocp_cpf('firstname');
+ $user_details['last_name']=get_ocp_cpf('lastname');
+ $user_details['address1']=get_ocp_cpf('building_name_or_number');
+ $user_details['city']=get_ocp_cpf('city');
+ $user_details['state']=get_ocp_cpf('state');
+ $user_details['zip']=get_ocp_cpf('post_code');
+ $user_details['country']=get_ocp_cpf('country');
}
return do_template('ECOM_CART_BUTTON_VIA_PAYPAL',array('ITEMS'=>$items,'CURRENCY'=>$currency,'PAYMENT_ADDRESS'=>$payment_address,'IPN_URL'=>$ipn_url,'ORDER_ID'=>strval($order_id),'NOTIFICATION_TEXT'=>$notification_text,'MEMBER_ADDRESS'=>$user_details));
@@ -268,18 +268,18 @@ function make_cart_transaction_button($items,$currency,$order_id)
*/
function store_shipping_address($order_id)
{
- if(is_null(post_param('address_name',NULL))) return;
+ if (is_null(post_param('address_name',NULL))) return;
- if(is_null($GLOBALS['SITE_DB']->query_value_null_ok('shopping_order_addresses','id',array('order_id'=>$order_id))))
+ if (is_null($GLOBALS['SITE_DB']->query_value_null_ok('shopping_order_addresses','id',array('order_id'=>$order_id))))
{
$shipping_address=array();
- $shipping_address['order_id'] = $order_id;
- $shipping_address['address_name'] = post_param('address_name','');
- $shipping_address['address_street'] = post_param('address_street','');
- $shipping_address['address_zip'] = post_param('address_zip','');
- $shipping_address['address_city'] = post_param('address_city','');
- $shipping_address['address_country']= post_param('address_country','');
- $shipping_address['receiver_email'] = post_param('payer_email','');
+ $shipping_address['order_id']=$order_id;
+ $shipping_address['address_name']=post_param('address_name','');
+ $shipping_address['address_street']=post_param('address_street','');
+ $shipping_address['address_zip']=post_param('address_zip','');
+ $shipping_address['address_city']=post_param('address_city','');
+ $shipping_address['address_country']=post_param('address_country','');
+ $shipping_address['receiver_email']=post_param('payer_email','');
return $GLOBALS['SITE_DB']->query_insert('shopping_order_addresses',$shipping_address,true);
}
2  sources/inst_special.php
View
@@ -74,7 +74,7 @@ function get_chmod_array()
'themes/map.ini','text_custom','text_custom/'.$LANG,
'data_custom/modules/chat/chat_last_msg.dat','data_custom/modules/chat/chat_last_event.dat',
'lang_cached','lang_cached/'.$LANG,'lang_custom','lang_custom/'.$LANG,
- 'data_custom/errorlog.php','ocp_sitemap.xml','data_custom/permissioncheckslog.php','data_custom/functions.dat',
+ 'data_custom/errorlog.php','ocp_sitemap.xml','data_custom/permissioncheckslog.php',
'pages/minimodules_custom','site/pages/minimodules_custom','docs/pages/minimodules_custom','adminzone/pages/minimodules_custom','forum/pages/minimodules_custom','cms/pages/minimodules_custom',
'pages/modules_custom','site/pages/modules_custom','docs/pages/modules_custom','adminzone/pages/modules_custom','forum/pages/modules_custom','cms/pages/modules_custom',
'pages/html_custom','site/pages/html_custom','docs/pages/html_custom','adminzone/pages/html_custom','forum/pages/html_custom','cms/pages/html_custom',
10 sources/minikernel.php
View
@@ -323,13 +323,11 @@ function in_safe_mode()
* @param string Script filename (canonically we want NO .php file type suffix)
* @return boolean Whether the script is running
*/
-function running_script($script)
+function running_script($is_this_running)
{
- if (substr($script,-4)=='.php') $script=substr($script,0,strlen($script)-4);
- $s_prefix='/'.$script;
- $url=preg_replace('#[/\w\.\-]*/'.preg_quote($script).'\.php#','/'.$script.'.php',ocp_srv('REQUEST_URI'));
- if (substr($url,0,strlen($s_prefix))==$s_prefix) return true;
- return false;
+ if (substr($is_this_running,-4)!='.php') $is_this_running.='.php';
+ $stripped_current_url=preg_replace('#^.*/#','',function_exists('ocp_srv')?ocp_srv('PHP_SELF'):$_SERVER['PHP_SELF']);
+ return (substr($stripped_current_url,0,strlen($is_this_running))==$is_this_running);
}
/**
14 sources/notifications.php
View
@@ -575,6 +575,8 @@ function notifications_setting($notification_code,$notification_category,$member
if (is_null($test))
{
$ob=_get_notification_ob_for_code($notification_code);
+ if (is_null($ob)) return A_NA; // Can happen in template test sets, as this can be called up by a symbol
+ //if (is_null($ob)) fatal_exit(do_lang_tempcode('INTERNAL_ERROR'));
$test=$ob->get_initial_setting($notification_code,$notification_category);
}
}
@@ -973,7 +975,7 @@ function list_handled_codes()
*/
function list_members_who_have_enabled($notification_code,$category=NULL,$to_member_ids=NULL,$start=0,$max=300)
{
- return $this->_all_staff_who_have_enabled($notification_code,$category,$to_member_ids);
+ return $this->_all_staff_who_have_enabled($notification_code,$category,$to_member_ids,$start,$max);
}
/**
@@ -1005,21 +1007,23 @@ function member_has_enabled($notification_code,$member_id,$category=NULL)
/**
* Get a list of staff members who have enabled this notification (i.e. have permission to AND have chosen to or are defaulted to).
- * (No pagination supported, as assumed there are only a small set of members here.)
*
* @param ID_TEXT Notification code
* @param ?SHORT_TEXT The category within the notification code (NULL: none)
* @param ?array List of member IDs we are restricting to (NULL: no restriction). This effectively works as a intersection set operator against those who have enabled.
+ * @param integer Start position (for pagination)
+ * @param integer Maximum (for pagination)
* @return array A pair: Map of members to their notification setting, and whether there may be more
*/
- function _all_staff_who_have_enabled($only_if_enabled_on__notification_code,$only_if_enabled_on__category,$to_member_ids)
+ function _all_staff_who_have_enabled($only_if_enabled_on__notification_code,$only_if_enabled_on__category,$to_member_ids,$start,$max)
{
$initial_setting=$this->get_initial_setting($only_if_enabled_on__notification_code,$only_if_enabled_on__category);
$db=(substr($only_if_enabled_on__notification_code,0,4)=='ocf_')?$GLOBALS['FORUM_DB']:$GLOBALS['SITE_DB'];
$admin_groups=array_merge($GLOBALS['FORUM_DRIVER']->get_super_admin_groups(),collapse_1d_complexity('group_id',$db->query_select('gsp',array('group_id'),array('specific_permission'=>'may_enable_staff_notifications'))));
- $rows=$GLOBALS['FORUM_DRIVER']->member_group_query($admin_groups);
+ $rows=$GLOBALS['FORUM_DRIVER']->member_group_query($admin_groups,$max,$start);
+ $possibly_has_more=(count($rows)>=$max);
if (!is_null($to_member_ids))
{
$new_rows=array();
@@ -1040,8 +1044,6 @@ function _all_staff_who_have_enabled($only_if_enabled_on__notification_code,$onl
$new_rows[$GLOBALS['FORUM_DRIVER']->pname_id($row)]=$test;
}
- $possibly_has_more=false;
-
return array($new_rows,$possibly_has_more);
}
4 sources/site2.php
View
@@ -276,7 +276,7 @@ function _load_comcode_page_not_cached($string,$zone,$codename,$file_base,$comco
if (is_null($new_comcode_page_row['p_submitter']))
{
$as_admin=true;
- $members=$GLOBALS['FORUM_DRIVER']->member_group_query($GLOBALS['FORUM_DRIVER']->get_super_admin_groups());
+ $members=$GLOBALS['FORUM_DRIVER']->member_group_query($GLOBALS['FORUM_DRIVER']->get_super_admin_groups(),1);
if (count($members)!=0)
{
$new_comcode_page_row['p_submitter']=$GLOBALS['FORUM_DRIVER']->pname_id($members[key($members)]);
@@ -369,7 +369,7 @@ function _load_comcode_page_cache_off($string,$zone,$codename,$file_base,$new_co
if (is_null($new_comcode_page_row['p_submitter']))
{
$as_admin=true;
- $members=$GLOBALS['FORUM_DRIVER']->member_group_query($GLOBALS['FORUM_DRIVER']->get_super_admin_groups());
+ $members=$GLOBALS['FORUM_DRIVER']->member_group_query($GLOBALS['FORUM_DRIVER']->get_super_admin_groups(),1);
if (count($members)!=0)
{
$new_comcode_page_row['p_submitter']=$GLOBALS['FORUM_DRIVER']->pname_id($members[key($members)]);
4 sources/submit.php
View
@@ -41,12 +41,12 @@ function content_validated($content_type,$content_id)
function send_content_validated_notification($content_type,$content_id)
{
require_code('content');
- list($content_title,$submitter_id,,,$content_url)=content_get_details($content_type,$content_id);
+ list($content_title,$submitter_id,,,,$content_url_safe)=content_get_details($content_type,$content_id);
require_code('notifications');
require_lang('unvalidated');
$subject=do_lang('CONTENT_VALIDATED_NOTIFICATION_MAIL_SUBJECT',get_site_name(),$content_title);
- $mail=do_lang('CONTENT_VALIDATED_NOTIFICATION_MAIL',comcode_escape(get_site_name()),comcode_escape($content_title),array($content_url->evaluate()));
+ $mail=do_lang('CONTENT_VALIDATED_NOTIFICATION_MAIL',comcode_escape(get_site_name()),comcode_escape($content_title),array($content_url_safe->evaluate()));
dispatch_notification('content_validated',NULL,$subject,$mail,array($submitter_id));
}
1  sources/support.php
View
@@ -1096,6 +1096,7 @@ function log_it($type,$a=NULL,$b=NULL)
*/
function syndicate_described_activity($a_language_string_code='',$a_label_1='',$a_label_2='',$a_label_3='',$a_pagelink_1='',$a_pagelink_2='',$a_pagelink_3='',$a_addon='',$a_is_public=1,$a_member_id=NULL,$sitewide_too=false,$also_involving=NULL)
{
+ if (running_script('install')) return NULL;
$hooks=find_all_hooks('systems','activities');
$ret=mixed();
foreach (array_keys($hooks) as $hook) // We only expect one actually
2  sources/users_active_actions.php
View
@@ -41,7 +41,7 @@ function restricted_manually_enabled_backdoor()
if (!is_null($su)) return $su; elseif (is_numeric($ks)) return intval($ks);
}
- $members=$GLOBALS['FORUM_DRIVER']->member_group_query($GLOBALS['FORUM_DRIVER']->get_super_admin_groups());
+ $members=$GLOBALS['FORUM_DRIVER']->member_group_query($GLOBALS['FORUM_DRIVER']->get_super_admin_groups(),1);
if (count($members)!=0)
{
$ret=$GLOBALS['FORUM_DRIVER']->pname_id($members[key($members)]);
2  sources/version.php
View
@@ -35,7 +35,7 @@ function ocp_version()
*/
function ocp_version_minor()
{
- return 'RC3';
+ return 'RC4';
}
/**
3  sources_custom/activities_submission.php
View
@@ -338,6 +338,7 @@ function log_newest_activity($id,$timeout=1000,$force=false)
fclose($fp);
} else
{
- attach_message(intelligent_write_error_inline($filename),'warn');
+ if (function_exists('attach_message'))
+ attach_message(intelligent_write_error_inline($filename),'warn');
}
}
2  sources_custom/hooks/systems/cron/classifieds.php
View
@@ -45,6 +45,8 @@ function run()
if ($entry['ce_last_moved']<$time) // We have stolen use of the standard ocPortal "ce_last_moved" property as a "next move" property
{
$GLOBALS['SITE_DB']->query_update('catalogue_entries',array('ce_validated'=>0),array('id'=>$entry['id']),'',1);
+ require_code('catalogues2');
+ calculate_category_child_count_cache($entry['cc_id']);
} elseif (($entry['ce_last_moved']<$time+60*60*24) && ($entry['ce_last_moved']>$time+60*60*23)) /* one hour time window; assumes CRON runs at least once per hour */
{
// Expiring in 24 hours
14 sources_custom/hooks/systems/cron/group_points.php
View
@@ -44,12 +44,18 @@ function run()
$points=$group_points[$group_id];
if ($points['p_points_per_month']!=0)
{
- $members=$GLOBALS['FORUM_DRIVER']->member_group_query(array($group_id));
- foreach ($members as $member_row)
+ $start=0;
+ do
{
- $member_id=$GLOBALS['FORUM_DRIVER']->pname_id($member_row);
- system_gift_transfer('Being in the '.$group_name.' usergroup',$points['p_points_per_month'],$member_id);
+ $members=$GLOBALS['FORUM_DRIVER']->member_group_query(array($group_id),100,$start);
+ foreach ($members as $member_row)
+ {
+ $member_id=$GLOBALS['FORUM_DRIVER']->pname_id($member_row);
+ system_gift_transfer('Being in the '.$group_name.' usergroup',$points['p_points_per_month'],$member_id);
+ }
+ $start+=100;
}
+ while(count($members)>0);
}
}
}
3  sources_custom/hooks/systems/ecommerce/classifieds.php
View
@@ -122,6 +122,9 @@ function handle_classifieds_advert($purchase_id,$details,$product)
{
$time+=$days*60*60*24;
$GLOBALS['SITE_DB']->query_update('catalogue_entries',array('ce_validated'=>1,'ce_last_moved'=>$time),array('id'=>intval($purchase_id)),'',1);
+ require_code('catalogues2');
+ $cc_id=$GLOBALS['SITE_DB']->query_value_null_ok('catalogue_entries','cc_id',array('id'=>intval($purchase_id)));
+ calculate_category_child_count_cache($cc_id);
}
}
4 sources_custom/site2.php
View
@@ -39,7 +39,7 @@ function _load_comcode_page_not_cached($string,$zone,$codename,$file_base,$comco
if (is_null($new_comcode_page_row['p_submitter']))
{
$as_admin=true;
- $members=$GLOBALS['FORUM_DRIVER']->member_group_query($GLOBALS['FORUM_DRIVER']->get_super_admin_groups());
+ $members=$GLOBALS['FORUM_DRIVER']->member_group_query($GLOBALS['FORUM_DRIVER']->get_super_admin_groups(),1);
if (count($members)!=0)
{
$new_comcode_page_row['p_submitter']=$GLOBALS['FORUM_DRIVER']->pname_id($members[key($members)]);
@@ -139,7 +139,7 @@ function _load_comcode_page_cache_off($string,$zone,$codename,$file_base,$new_co
if (is_null($new_comcode_page_row['p_submitter']))
{
$as_admin=true;
- $members=$GLOBALS['FORUM_DRIVER']->member_group_query($GLOBALS['FORUM_DRIVER']->get_super_admin_groups());
+ $members=$GLOBALS['FORUM_DRIVER']->member_group_query($GLOBALS['FORUM_DRIVER']->get_super_admin_groups(),1);
if (count($members)!=0)
{
$new_comcode_page_row['p_submitter']=$GLOBALS['FORUM_DRIVER']->pname_id($members[key($members)]);
2  themes/Eco-theme/css_custom/search.css
View
@@ -54,7 +54,7 @@
width: 350px;
}
-.main_search_form .get_gallery_tree {
+.main_search_form .ajax_tree_list {
margin-left: 350px;
}
2  themes/default/templates/FORM_SCREEN_INPUT_TREE_LIST.tpl
View
@@ -1,5 +1,5 @@
<input style="display: none" type="text" class="input_line{REQUIRED*} hidden_but_needed" id="{NAME*}" name="{NAME*}" value="{DEFAULT*}" onchange="var ob=document.getElementById('{NAME*;}_mirror'); if (ob) { ob.parentNode.style.display=(this.selected_title=='')?'none':'block'; setInnerHTML(ob,escape_html(this.selected_title)); }" />
-<div class="get_gallery_tree" id="tree_list__root_{NAME*}"{$?,{$VALUE_OPTION,html5}, role="tree"}>
+<div class="ajax_tree_list" id="tree_list__root_{NAME*}"{$?,{$VALUE_OPTION,html5}, role="tree"}>
<!-- List put in here -->
</div>
<script type="text/javascript">// <![CDATA[
2  themes/default/templates/INSTALLER_WRAP.tpl
View
@@ -162,7 +162,7 @@
window.setTimeout(function() {
if (window.alert===null)
{
- document.getElementById('extra_errors').innerHTML='<p><strong style="color: red">Your popup blocker is too aggressive</strong> (even error alerts cannot display). Please disable for the installer.</p>';
+ document.getElementById('extra_errors').innerHTML='<p><strong style="color: red">Your popup blocker is too aggressive<\/strong> (even error alerts cannot display). Please disable for the installer.<\/p>';
}
}, 0);
//]]></script>
4 themes/default/templates/NOTIFICATION_BUTTONS.tpl
View
@@ -23,8 +23,8 @@
{+START,IF_PASSED,BREAK}<br />{+END}
{+START,IF_PASSED,RIGHT}<div class="float_surrounder"><div class="right">{+END}
- <form {+START,IF,{$NOTIFICATIONS_ENABLED,{NOTIFICATIONS_ID},{$GET,NOTIFICATIONS_TYPE}}}style="display: none"{$?,{$VALUE_OPTION,html5}, aria-hidden="true"} {+END}onsubmit="set_display_with_aria(this,'none'); set_display_with_aria(this.nextSibling.nextSibling,'inline'); return open_link_as_overlay(this,null,'100%');" class="inline" rel="enable-notifications" method="post" action="{$PAGE_LINK*,{$GET,NOTIFICATIONS_PAGELINK}:redirect={$SELF_URL*&,1}}"><input type="image" class="button_page page_icon" src="{$IMG*,{$GET,button_type}/enable_notifications}" title="{!ENABLE_NOTIFICATIONS}" alt="{!ENABLE_NOTIFICATIONS}" /></form>
- <form {+START,IF,{$NOT,{$NOTIFICATIONS_ENABLED,{NOTIFICATIONS_ID},{$GET,NOTIFICATIONS_TYPE}}}}style="display: none"{$?,{$VALUE_OPTION,html5}, aria-hidden="true"} {+END}onsubmit="set_display_with_aria(this,'none'); set_display_with_aria(this.previousSibling.previousSibling,'inline'); return open_link_as_overlay(this,null,'100%');" class="inline" rel="disable-notifications" method="post" action="{$PAGE_LINK*,{$GET,NOTIFICATIONS_PAGELINK}:redirect={$SELF_URL*&,1}}"><input type="image" class="button_page page_icon" src="{$IMG*,{$GET,button_type}/disable_notifications}" title="{!DISABLE_NOTIFICATIONS}" alt="{!DISABLE_NOTIFICATIONS}" /></form>
+ <form title="{!notifications:NOTIFICATIONS}" {+START,IF,{$NOTIFICATIONS_ENABLED,{NOTIFICATIONS_ID},{$GET,NOTIFICATIONS_TYPE}}}style="display: none"{$?,{$VALUE_OPTION,html5}, aria-hidden="true"} {+END}onsubmit="set_display_with_aria(this,'none'); set_display_with_aria(this.nextSibling.nextSibling,'inline'); return open_link_as_overlay(this,null,'100%');" class="inline" rel="enable-notifications" method="post" action="{$PAGE_LINK*,{$GET,NOTIFICATIONS_PAGELINK}:redirect={$SELF_URL*&,1}}"><input type="image" class="button_page page_icon" src="{$IMG*,{$GET,button_type}/enable_notifications}" title="{!ENABLE_NOTIFICATIONS}" alt="{!ENABLE_NOTIFICATIONS}" /></form>
+ <form title="{!notifications:NOTIFICATIONS}" {+START,IF,{$NOT,{$NOTIFICATIONS_ENABLED,{NOTIFICATIONS_ID},{$GET,NOTIFICATIONS_TYPE}}}}style="display: none"{$?,{$VALUE_OPTION,html5}, aria-hidden="true"} {+END}onsubmit="set_display_with_aria(this,'none'); set_display_with_aria(this.previousSibling.previousSibling,'inline'); return open_link_as_overlay(this,null,'100%');" class="inline" rel="disable-notifications" method="post" action="{$PAGE_LINK*,{$GET,NOTIFICATIONS_PAGELINK}:redirect={$SELF_URL*&,1}}"><input type="image" class="button_page page_icon" src="{$IMG*,{$GET,button_type}/disable_notifications}" title="{!DISABLE_NOTIFICATIONS}" alt="{!DISABLE_NOTIFICATIONS}" /></form>
{+START,IF_PASSED,RIGHT}</div></div>{+END}
{+END}
2  themes/default/templates/SUPPORT_TICKETS_SCREEN.tpl
View
@@ -6,7 +6,7 @@
{+START,IF,{$NOT,{$IS_GUEST}}}
<div class="medborder medborder_box br_space">
- <form class="float_surrounder" id="ticket_type_form" action="{$URL_FOR_GET_FORM*,{$SELF_URL,0,1}}" method="get" onsubmit="try { window.scrollTo(0,0); } catch(e) {};">
+ <form title="{!FILTER}" class="float_surrounder" id="ticket_type_form" action="{$URL_FOR_GET_FORM*,{$SELF_URL,0,1}}" method="get" onsubmit="try { window.scrollTo(0,0); } catch(e) {};">
{$HIDDENS_FOR_GET_FORM,{$SELF_URL,0,1},ticket_type,wide_high,zone,utheme}
<span class="field_name"><label for="ticket_type">{!TICKET_TYPE}</label></span>:
<select id="ticket_type" name="ticket_type" class="input_list_required">
2  themes/default/templates_custom/POINTS_GIVE.tpl
View
@@ -51,7 +51,7 @@
{+END}
</p>
- <form method="post" onsubmit="return checkForm(this);" action="{GIVE_URL*}#tab__points">
+ <form title="{!GIVE_POINTS}" method="post" onsubmit="return checkForm(this);" action="{GIVE_URL*}#tab__points">
<div>
<div class="points_give_shared_options" style="margin-top: 0">
<label for="give_reason_pre">
Please sign in to comment.
Something went wrong with that request. Please try again.