Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Various fixes (ran through test set) - this is 8.1 final

  • Loading branch information...
commit 90e8da23d0178b9a195a6286627742deef5feff6 1 parent 4a2f159
@chrisgraham authored
Showing with 242 additions and 75 deletions.
  1. +1 −1  .gitignore
  2. +3 −3 _tests/codechecker/checker.ini
  3. +14 −11 _tests/codechecker/phpdoc_parser.php
  4. +7 −1 _tests/codechecker/phpstub.php
  5. +1 −0  _tests/tests/unit_tests/bash_parser.php
  6. +1 −0  _tests/tests/unit_tests/cqc__function_sigs.php
  7. +1 −0  _tests/tests/unit_tests/cqc_adminzone.php
  8. +1 −0  _tests/tests/unit_tests/cqc_blocks.php
  9. +1 −0  _tests/tests/unit_tests/cqc_cms.php
  10. +1 −0  _tests/tests/unit_tests/cqc_collaboration.php
  11. +1 −0  _tests/tests/unit_tests/cqc_database.php
  12. +1 −0  _tests/tests/unit_tests/cqc_forum.php
  13. +1 −0  _tests/tests/unit_tests/cqc_forumdrivers.php
  14. +1 −0  _tests/tests/unit_tests/cqc_hooks.php
  15. +1 −0  _tests/tests/unit_tests/cqc_rest.php
  16. +1 −0  _tests/tests/unit_tests/cqc_site.php
  17. +1 −0  _tests/tests/unit_tests/cqc_sources.php
  18. +1 −0  _tests/tests/unit_tests/cqc_welcome.php
  19. +2 −0  _tests/tests/unit_tests/lang.php
  20. +1 −0  _tests/tests/unit_tests/standard_dir_files.php
  21. +1 −1  adminzone/pages/modules/admin_config.php
  22. +3 −1 adminzone/pages/modules/admin_themes.php
  23. +6 −1 adminzone/pages/modules/admin_version.php
  24. +1 −16 data_custom/execute_temp.php
  25. +5 −5 data_custom/functions.dat
  26. +2 −2 install.sql
  27. +1 −1  install2.sql
  28. +1 −1  install3.sql
  29. +1 −1  lang/EN/config.ini
  30. +1 −1  lang/EN/ocf_config.ini
  31. +1 −1  sources/addons.php
  32. +4 −2 sources/blocks/side_network.php
  33. +5 −4 sources/comcode_conversion.php
  34. +1 −0  sources/files.php
  35. +3 −2 sources/form_templates.php
  36. +5 −7 sources/hooks/systems/addon_registry/galleries.php
  37. +1 −0  sources/hooks/systems/addon_registry/occle.php
  38. +2 −2 sources/hooks/systems/ajax_tree/choose_catalogue_category.php
  39. +134 −0 sources/hooks/systems/profiles_tabs/blog.php
  40. +7 −1 sources/phpstub.php
  41. +2 −2 sources/support.php
  42. +1 −1  sources/themes2.php
  43. +1 −0  sources/transcoding.php
  44. +4 −0 themes/default/css/global.css
  45. +2 −4 themes/default/templates/FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_2.tpl
  46. +1 −1  themes/default/templates/FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_2_CAT_WRAP.tpl
  47. +1 −1  themes/default/templates/JAVASCRIPT_SWFUPLOAD.tpl
  48. +1 −1  themes/default/templates_custom/JAVASCRIPT_SWFUPLOAD.tpl
  49. +2 −0  transcoder/queue.php
  50. 0  uploads/galleries/pre_transcoding/index.html
View
2  .gitignore
@@ -23,4 +23,4 @@ html_dump
data_custom/modules/admin_stats/*
ocp_sitemap.xml
data_custom/latest_activity.txt
-
+_tests/codechecker/functions.dat
View
6 _tests/codechecker/checker.ini
@@ -1,11 +1,11 @@
-#Wed Mar 14 21:11:12 GMT 2012
+#Thu May 24 18:42:46 BST 2012
phpPath=php
relay__api=1
relay__pedantic=0
relay__spelling=0
relay__non_terse=0
relay__security=0
-textEditorPath=/usr/bin/mate
+textEditorPath=C\:\\Program Files (x86)\\ConTEXT\\ConTEXT.exe
relay__mixed=0
relay__checks=0
-projectPath=/Library/WebServer/Documents/git
+projectPath=C\:\\Progra~2\\Apache~1\\Apache2.2\\htdocs\\git
View
25 _tests/codechecker/phpdoc_parser.php
@@ -19,7 +19,7 @@
global $OCPORTAL_PATH;
-require('lib.php');
+require(dirname(__FILE__).'/lib.php');
if (isset($_SERVER['argv']))
{
@@ -39,10 +39,11 @@
if (array_key_exists('path',$_SERVER['argv'])) $GLOBALS['OCPORTAL_PATH']=$_SERVER['argv']['path'];
}
-require('php.php');
+require(dirname(__FILE__).'/php.php');
-$files=do_dir($OCPORTAL_PATH,false,true);
+$files=do_dir($OCPORTAL_PATH,true,true);
$files[]='phpstub.php';
+
$classes=array();
$global=array();
global $TO_USE;
@@ -62,14 +63,14 @@
if ($filename=='phpstub.php')
{
$_filename='phpstub.php';
- $TO_USE=getcwd().'/phpstub.php';
+ $TO_USE=getcwd().DIRECTORY_SEPARATOR.'phpstub.php';
} else
{
$_filename=($OCPORTAL_PATH=='')?$filename:substr($filename,strlen($OCPORTAL_PATH)+1);
}
- if ($_filename=='sources/minikernel.php') continue;
+ if ($_filename=='sources'.DIRECTORY_SEPARATOR.'minikernel.php') continue;
//echo 'SIGNATURES-DOING '.$_filename.cnl();
- if (strpos($_filename,'_tests/')===0)
+ if (strpos($_filename,'_tests'.DIRECTORY_SEPARATOR)===0)
{
$result=array();
} else
@@ -83,7 +84,7 @@
{
if ($r['name']=='__global')
{
- if (($_filename!='sources/global.php') && ($_filename!='phpstub.php') && ($_filename!='tempcode_compiler__runtime') && ($_filename!='tempcode_compiler'))
+ if (($_filename!='sources'.DIRECTORY_SEPARATOR.'global.php') && ($_filename!='phpstub.php') && ($_filename!='tempcode_compiler__runtime') && ($_filename!='tempcode_compiler'))
{
foreach (array_keys($r['functions']) as $f)
{
@@ -92,14 +93,16 @@
}
}
$global=array_merge($global,$r['functions']);
- unset($result[$i]);
}
}
foreach ($result as $in)
{
- $class=$in['name'];
- if (isset($classes[$class])) echo 'DUPLICATE_CLASS'.' '.$class.cnl();
- $classes[$class]=$in;
+ if ($in['name']!='__global')
+ {
+ $class=$in['name'];
+ if (isset($classes[$class])) echo 'DUPLICATE_CLASS'.' '.$class.cnl();
+ $classes[$class]=$in;
+ }
}
//echo 'SIGNATURES-DONE '.$_filename.cnl();
}
View
8 _tests/codechecker/phpstub.php
@@ -2907,8 +2907,14 @@ function realpath($path)
* @param ?mixed Parameter (NULL: not used).
* @param ?mixed Parameter (NULL: not used).
* @param ?mixed Parameter (NULL: not used).
+ * @param ?mixed Parameter (NULL: not used).
+ * @param ?mixed Parameter (NULL: not used).
+ * @param ?mixed Parameter (NULL: not used).
+ * @param ?mixed Parameter (NULL: not used).
+ * @param ?mixed Parameter (NULL: not used).
+ * @param ?mixed Parameter (NULL: not used).
*/
-function register_shutdown_function($callback,$parama=NULL,$paramb=NULL,$paramc=NULL,$paramd=NULL,$parame=NULL,$paramf=NULL,$paramg=NULL,$paramh=NULL,$parami=NULL,$paramj=NULL,$paramk=NULL)
+function register_shutdown_function($callback,$parama=NULL,$paramb=NULL,$paramc=NULL,$paramd=NULL,$parame=NULL,$paramf=NULL,$paramg=NULL,$paramh=NULL,$parami=NULL,$paramj=NULL,$paramk=NULL,$paraml=NULL,$paramm=NULL,$paramn=NULL,$paramo=NULL,$paramp=NULL,$paramq=NULL)
{
}
View
1  _tests/tests/unit_tests/bash_parser.php
@@ -25,6 +25,7 @@ class bash_parser_test_set extends ocp_test_case
{
function testValidCode()
{
+ if (function_exists('set_time_limit')) @set_time_limit(0);
require_code('files2');
$php_path=find_php_path();
$contents=get_directory_contents(get_file_base());
View
1  _tests/tests/unit_tests/cqc__function_sigs.php
@@ -25,6 +25,7 @@ class cqc__function_sigs_test_set extends ocp_test_case
{
function testAdminZone()
{
+ if (function_exists('set_time_limit')) @set_time_limit(0);
$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('<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);
View
1  _tests/tests/unit_tests/cqc_adminzone.php
@@ -25,6 +25,7 @@ class cqc_adminzone_test_set extends ocp_test_case
{
function testAdminZone()
{
+ if (function_exists('set_time_limit')) @set_time_limit(0);
$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('<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);
View
1  _tests/tests/unit_tests/cqc_blocks.php
@@ -25,6 +25,7 @@ class cqc_blocks_test_set extends ocp_test_case
{
function testBlocks()
{
+ if (function_exists('set_time_limit')) @set_time_limit(0);
$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('<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);
View
1  _tests/tests/unit_tests/cqc_cms.php
@@ -25,6 +25,7 @@ class cqc_cms_test_set extends ocp_test_case
{
function testCMS()
{
+ if (function_exists('set_time_limit')) @set_time_limit(0);
$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('<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);
View
1  _tests/tests/unit_tests/cqc_collaboration.php
@@ -25,6 +25,7 @@ class cqc_collaboration_test_set extends ocp_test_case
{
function testCollaboration()
{
+ if (function_exists('set_time_limit')) @set_time_limit(0);
$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('<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);
View
1  _tests/tests/unit_tests/cqc_database.php
@@ -25,6 +25,7 @@ class cqc_database_test_set extends ocp_test_case
{
function testDatabase()
{
+ if (function_exists('set_time_limit')) @set_time_limit(0);
$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('<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);
View
1  _tests/tests/unit_tests/cqc_forum.php
@@ -25,6 +25,7 @@ class cqc_forum_test_set extends ocp_test_case
{
function testForum()
{
+ if (function_exists('set_time_limit')) @set_time_limit(0);
$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('<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);
View
1  _tests/tests/unit_tests/cqc_forumdrivers.php
@@ -25,6 +25,7 @@ class cqc_forumdrivers_test_set extends ocp_test_case
{
function testForumDrivers()
{
+ if (function_exists('set_time_limit')) @set_time_limit(0);
$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('<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);
View
1  _tests/tests/unit_tests/cqc_hooks.php
@@ -25,6 +25,7 @@ class cqc_hooks_test_set extends ocp_test_case
{
function testHooks()
{
+ if (function_exists('set_time_limit')) @set_time_limit(0);
$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('<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);
View
1  _tests/tests/unit_tests/cqc_rest.php
@@ -25,6 +25,7 @@ class cqc_rest_test_set extends ocp_test_case
{
function testRest()
{
+ if (function_exists('set_time_limit')) @set_time_limit(0);
$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('<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);
View
1  _tests/tests/unit_tests/cqc_site.php
@@ -25,6 +25,7 @@ class cqc_site_test_set extends ocp_test_case
{
function testSite()
{
+ if (function_exists('set_time_limit')) @set_time_limit(0);
$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('<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);
View
1  _tests/tests/unit_tests/cqc_sources.php
@@ -25,6 +25,7 @@ class cqc_sources_test_set extends ocp_test_case
{
function testSources()
{
+ if (function_exists('set_time_limit')) @set_time_limit(0);
$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('<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);
View
1  _tests/tests/unit_tests/cqc_welcome.php
@@ -25,6 +25,7 @@ class cqc_welcome_test_set extends ocp_test_case
{
function testWelcome()
{
+ if (function_exists('set_time_limit')) @set_time_limit(0);
$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('<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);
View
2  _tests/tests/unit_tests/lang.php
@@ -43,6 +43,8 @@ function testLangMistakes()
while (($file=readdir($dh))!==false)
{
+ if ($file[0]=='.') continue;
+
$input=array();
_get_lang_file_map(get_file_base().'/lang/EN/'.$file,$input,NULL,false);
View
1  _tests/tests/unit_tests/standard_dir_files.php
@@ -45,6 +45,7 @@ function do_dir($dir)
while (($file=readdir($dh))!==false)
{
if ($file[0]=='.') continue;
+ if ($file=='_old') continue;
if (is_dir($dir.'/'.$file))
{
View
2  adminzone/pages/modules/admin_config.php
@@ -257,7 +257,7 @@ function install($upgrade_from=NULL,$upgrade_from_hack=NULL)
foreach (array('send_error_emails','ocf_show_personal_myhome_link','twitter_login','twitter_password','facebook_api','facebook_appid','facebook_secret_code','facebook_uid','facebook_target_ids') as $option_to_delete)
delete_config_option($option_to_delete);
}
- if ((!is_null($upgrade_from)) && ($upgrade_from<13))
+ if ((is_null($upgrade_from)) || ($upgrade_from<13))
{
add_config_option('COMPLEX_UPLOADER','complex_uploader','tick','return \'1\';','ACCESSIBILITY','GENERAL');
add_config_option('ENABLE_WYSIWYG','wysiwyg','tick','return \'1\';','ACCESSIBILITY','GENERAL');
View
4 adminzone/pages/modules/admin_themes.php
@@ -1732,6 +1732,8 @@ function manage_images()
{
$title=get_page_title('MANAGE_THEME_IMAGES');
+ if (function_exists('set_time_limit')) @set_time_limit(300);
+
$lang=choose_language($title,true,true);
if (is_object($lang)) return $lang;
@@ -1757,7 +1759,7 @@ function manage_images()
$fields=form_input_huge_list(do_lang_tempcode('CODENAME'),'','id',make_string_tempcode($list),NULL,true,true,725);*/
require_code('themes2');
$ids=get_all_image_ids_type('',true,$GLOBALS['SITE_DB'],$theme);
- $fields=form_input_picture_choose_specific(do_lang_tempcode('CODENAME'),'','id',$ids,NULL,NULL,NULL,false,NULL,$theme,$lang);
+ $fields=form_input_picture_choose_specific(do_lang_tempcode('IMAGE'),'','id',$ids,NULL,NULL,NULL,false,NULL,$theme,$lang,true);
$hidden=form_input_hidden('theme',$theme);
$post_url=build_url(array('page'=>'_SELF','type'=>'edit_image','lang'=>$lang),'_SELF');
$edit_form=do_template('FORM',array('_GUID'=>'48b3218750fcea21e0bf3be31ae58296','HIDDEN'=>$hidden,'TEXT'=>do_lang_tempcode('CHOOSE_EDIT_LIST'),'GET'=>true,'URL'=>$post_url,'FIELDS'=>$fields,'SUBMIT_NAME'=>do_lang_tempcode('CHOOSE')));
View
7 adminzone/pages/modules/admin_version.php
@@ -36,7 +36,7 @@ function info()
$info['organisation']='ocProducts';
$info['hacked_by']=NULL;
$info['hack_version']=NULL;
- $info['version']=14;
+ $info['version']=15;
$info['locked']=true;
$info['update_require_upgrade']=1;
return $info;
@@ -542,6 +542,11 @@ function install($upgrade_from=NULL,$upgrade_from_hack=NULL)
$GLOBALS['SITE_DB']->add_table_field('logged_mail_messages','m_template','ID_TEXT');
}
+ if ((!is_null($upgrade_from)) && ($upgrade_from<15))
+ {
+ $GLOBALS['SITE_DB']->alter_table_field('digestives_tin','d_from_member_id','?USER');
+ }
+
if ((is_null($upgrade_from)) || ($upgrade_from<14))
{
$GLOBALS['SITE_DB']->create_table('temp_block_permissions',array(
View
17 data_custom/execute_temp.php
@@ -67,20 +67,5 @@
*/
function execute_temp()
{
- $p=get_file_base().'/themes/default/templates/';
- $dh=opendir($p);
- while (($f=readdir($dh))!==false)
- {
- if (substr($f,-4)!='.tpl') continue;
- $c=file_get_contents($p.$f);
- $n=preg_match_all('# on\w+="([^"]*)"#',$c,$matches);
- for ($i=0;$i<$n;$i++)
- {
- if (substr_count($matches[1][$i],'(')==substr_count($matches[1][$i],')'))
- {
- echo $f.substr_count($matches[1][$i],'(');
- }
- }
- }
- closedir($dh);
+ $GLOBALS['SITE_DB']->alter_table_field('digestives_tin','d_from_member_id','?USER');
}
View
10 data_custom/functions.dat
5 additions, 5 deletions not shown
View
4 install.sql
@@ -1836,7 +1836,7 @@ insert into `ocp_db_meta` values('translate','id','*AUTO'),
('digestives_tin','id','*AUTO'),
('digestives_tin','d_subject','LONG_TEXT'),
('digestives_tin','d_message','LONG_TEXT'),
- ('digestives_tin','d_from_member_id','INTEGER'),
+ ('digestives_tin','d_from_member_id','?USER'),
('digestives_tin','d_to_member_id','USER'),
('digestives_tin','d_priority','SHORT_INTEGER'),
('digestives_tin','d_no_cc','BINARY'),
@@ -3079,7 +3079,7 @@ CREATE TABLE `ocp_digestives_tin` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`d_subject` longtext NOT NULL,
`d_message` longtext NOT NULL,
- `d_from_member_id` int(11) NOT NULL,
+ `d_from_member_id` int(11) DEFAULT NULL,
`d_to_member_id` int(11) NOT NULL,
`d_priority` tinyint(4) NOT NULL,
`d_no_cc` tinyint(1) NOT NULL,
View
2  install2.sql
@@ -514,7 +514,7 @@ insert into `ocp_db_meta` values('translate','id','*AUTO'),
('digestives_tin','id','*AUTO'),
('digestives_tin','d_subject','LONG_TEXT'),
('digestives_tin','d_message','LONG_TEXT'),
- ('digestives_tin','d_from_member_id','INTEGER'),
+ ('digestives_tin','d_from_member_id','?USER'),
('digestives_tin','d_to_member_id','USER'),
('digestives_tin','d_priority','SHORT_INTEGER'),
('digestives_tin','d_no_cc','BINARY'),
View
2  install3.sql
@@ -14,7 +14,7 @@ CREATE TABLE `ocp_digestives_tin` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`d_subject` longtext NOT NULL,
`d_message` longtext NOT NULL,
- `d_from_member_id` int(11) NOT NULL,
+ `d_from_member_id` int(11) DEFAULT NULL,
`d_to_member_id` int(11) NOT NULL,
`d_priority` tinyint(4) NOT NULL,
`d_no_cc` tinyint(1) NOT NULL,
View
2  lang/EN/config.ini
@@ -328,7 +328,7 @@ CONFIG_OPTION_complex_uploader=If you want Javascript/Flash/Java&amp;FTP functio
CONFIG_OPTION_wysiwyg=If you don't want the WYSIWYG editor.
CONFIG_OPTION_editarea=If you want to disable the fancy HTML/CSS editor.
CONFIG_OPTION_autoban=If you want detected hackers to be automatically banned. You may wish to disable this if there is some kind of false-positive being triggered (there shouldn't be though!). Potentially hackers could use the hackattack system to get innocent people banned by directing them to malicious-appearing URLs, so if this ever happens, disabling this option could be necessary.
-CONFIG_OPTION_js_overlays=If you want to Javascript overlays to be used instead of browser-based windowing. ocPortal overlays are good if you're using a full-screen browser, a tablet or mobile device, don't like 'ugly' default dialogues, have concerns with popup blockers that you can't easily train your staff to disable (common), or generally prefer to keep webpages intrinsic. However overlays can cause big problems for some screen-readers.
+CONFIG_OPTION_js_overlays=If you want to Javascript overlays to be used instead of browser-based windowing. The Javascript overlays are good if you're using a full-screen browser, a tablet or mobile device, don't like 'ugly' default dialogues, have concerns with popup blockers that you can't easily train your staff to disable (common), or generally prefer to keep webpages intrinsic. However overlays can cause big problems for some screen-readers.
CONFIG_OPTION_likes=If you want to have simple like/dislike buttons instead of asking users to use a ratings scale.
CONFIG_OPTION_tree_lists=If you want to have Javascript/AJAX-powered category selection lists. This is more user-friendly to sighted users who are adding content and essential if you have hundreds of categories, however is not so easy to understand with a screen-reader and keyboard navigation.
COMPLEX_UPLOADER=Enable complex uploader
View
2  lang/EN/ocf_config.ini
@@ -60,7 +60,7 @@ REPORTED_POSTS_FORUM=Reported posts forum
MINIMUM_PASSWORD_LENGTH=Minimum password length
MAXIMUM_PASSWORD_LENGTH=Maximum password length
CONFIG_OPTION_allow_international=Whether regional member settings should be enabled. If this is not enabled then features such as timezones and language selection will not be available. Be aware that disabling this option will disable choices but will not un-set current choices. If you are deploying a single language pack and want people to use that, make sure they choose it before you turn this option off.
-CONFIG_OPTION_no_dob_ask=Whether to remove the date-of-birth field from member accounts. Enable this if you do not think it appropriate to collect this information.
+CONFIG_OPTION_no_dob_ask=Whether to include the date-of-birth field for member accounts. It may be inappropriate to ask for a date of birth, or it may be vital for your market research, or you may want to provide a choice so that birthdays on your community may be celebrated.
CONFIG_OPTION_no_dob_ask_VALUE_0=Yes
CONFIG_OPTION_no_dob_ask_VALUE_1=No date of births
CONFIG_OPTION_no_dob_ask_VALUE_2=Optional
View
2  sources/addons.php
@@ -152,7 +152,7 @@ function find_available_addons()
closedir($dh);
global $M_SORT_KEY;
- $M_SORT_KEY=1;
+ $M_SORT_KEY='1';
usort($files,'multi_sort');
foreach ($files as $_file)
View
6 sources/blocks/side_network.php
@@ -91,9 +91,11 @@ function run($map)
$data=http_download_file($netlinks,NULL,false);
if (is_null($data))
{
- $data=do_lang_tempcode('HTTP_DOWNLOAD_NO_SERVER',escape_html($netlinks));
+ $if_network=do_lang_tempcode('HTTP_DOWNLOAD_NO_SERVER',escape_html($netlinks));
+ } else
+ {
+ $if_network=make_string_tempcode(convert_to_internal_encoding($data));
}
- $if_network=convert_to_internal_encoding($data);
return do_template('BLOCK_SIDE_NETWORK',array('_GUID'=>'5fe8867b9f69670ad61e6c78b956fab2','CONTENT'=>$if_network));
}
return new ocp_tempcode();
View
9 sources/comcode_conversion.php
@@ -64,6 +64,7 @@ function comcode_text__to__comcode_xml($comcode,$skip_wrapper=false)
if ((function_exists('set_time_limit')) && (ini_get('max_execution_time')!='0')) @set_time_limit(300);
$comcode_dangerous=true;
+ $comcode_dangerous_html=true;
// Tag level
$current_tag='';
@@ -929,7 +930,7 @@ function comcode_text__to__comcode_xml($comcode,$skip_wrapper=false)
{
array_push($tag_stack,array($current_tag,$attribute_map,$xml,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area));
- list(,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag(false,false,get_member(),$attribute_map,$current_tag,$pos,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);
+ list(,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag(false,false,get_member(),$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);
$xml='';
}
}
@@ -953,7 +954,7 @@ function comcode_text__to__comcode_xml($comcode,$skip_wrapper=false)
{
array_push($tag_stack,array($current_tag,$attribute_map,$xml,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area));
- list(,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag(false,false,get_member(),$attribute_map,$current_tag,$pos,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);
+ list(,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag(false,false,get_member(),$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);
$xml='';
}
elseif ($next=='[')
@@ -976,7 +977,7 @@ function comcode_text__to__comcode_xml($comcode,$skip_wrapper=false)
array_push($tag_stack,array($current_tag,$attribute_map,$xml,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area));
- list(,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag(false,false,get_member(),$attribute_map,$current_tag,$pos,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);
+ list(,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag(false,false,get_member(),$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);
$xml='';
}
elseif ($next=='=') $status=CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_RIGHT;
@@ -1016,7 +1017,7 @@ function comcode_text__to__comcode_xml($comcode,$skip_wrapper=false)
array_push($tag_stack,array($current_tag,$attribute_map,$xml,$white_space_area,$in_separate_parse_section,$formatting_allowed,$textual_area));
- list(,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag(false,false,get_member(),$attribute_map,$current_tag,$pos,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);
+ list(,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag)=_opened_tag(false,false,get_member(),$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,$len,$comcode);
$xml='';
}
else
View
1  sources/files.php
@@ -203,6 +203,7 @@ function should_ignore_file($filepath,$bitmask=0,$bitmask_defaults=1536)
'thumbs.db:encryptable'=>'.*',
'thumbs.db'=>'.*',
'.ds_store'=>'.*',
+ '_old'=>'.*',
'.svn'=>'.*',
'.git'=>'.*',
'cvs'=>'.*',
View
5 sources/form_templates.php
@@ -1151,9 +1151,10 @@ function form_input_radio($pretty_name,$description,$content,$required=false,$pi
* @param ?object The database connection to the OCF install we are choosing images from (NULL: site db)
* @param ?ID_TEXT Theme to use (NULL: current theme)
* @param ?ID_TEXT Language to use (NULL: current language)
+ * @param boolean Whether to show direct codenames, rather than trying to prettify them into titles
* @return tempcode The input field
*/
-function form_input_picture_choose_specific($pretty_name,$description,$name,$ids,$selected_url=NULL,$selected_code=NULL,$tabindex=NULL,$allow_none=false,$db=NULL,$theme=NULL,$lang=NULL)
+function form_input_picture_choose_specific($pretty_name,$description,$name,$ids,$selected_url=NULL,$selected_code=NULL,$tabindex=NULL,$allow_none=false,$db=NULL,$theme=NULL,$lang=NULL,$direct_titles=false)
{
if (is_null($db)) $db=$GLOBALS['SITE_DB'];
@@ -1252,7 +1253,7 @@ function form_input_picture_choose_specific($pretty_name,$description,$name,$ids
$url=find_theme_image($id,$theme!='default',false,$theme,$lang,$db);
if ($url=='')
$url=find_theme_image($id,false,false,'default',$lang,$db);
- $pretty=make_string_tempcode(ucfirst((strrpos($id,'/')===false)?$id:substr($id,strrpos($id,'/')+1)));
+ $pretty=$direct_titles?make_string_tempcode($id):make_string_tempcode(ucfirst((strrpos($id,'/')===false)?$id:substr($id,strrpos($id,'/')+1)));
}
if ($url=='') continue;
View
12 sources/hooks/systems/addon_registry/galleries.php
@@ -269,7 +269,6 @@ function tpl_previews()
function tpl_preview__gallery_image_box()
{
$tab_content=do_lorem_template('GALLERY_IMAGE_BOX',array(
- 'TITLE'=>lorem_phrase(),
'THUMB'=>placeholder_image(),
'TREE'=>lorem_phrase(),
'ADD_DATE_RAW'=>placeholder_date_raw(),
@@ -298,7 +297,6 @@ function tpl_preview__gallery_image_box()
function tpl_preview__gallery_video_box()
{
$tab_content=do_lorem_template('GALLERY_VIDEO_BOX',array(
- 'TITLE'=>lorem_phrase(),
'THUMB'=>placeholder_image(),
'TREE'=>lorem_phrase(),
'ADD_DATE_RAW'=>placeholder_date_raw(),
@@ -515,7 +513,7 @@ function tpl_preview__administrative__gallery_import_screen()
$input = do_lorem_template('FORM_SCREEN_INPUT_LIST',array('TABINDEX'=>placeholder_id(),'REQUIRED'=>'_required','NAME'=>'files','CONTENT'=>$orphaned_content,'INLINE_LIST'=>true));
$fields->attach(do_lorem_template('FORM_SCREEN_FIELD',array('REQUIRED'=>true,'SKIP_LABEL'=>false,'BORING_NAME'=>'files','NAME'=>lorem_phrase(),'DESCRIPTION'=>lorem_paragraph_html(),'DESCRIPTION_SIDE'=>'','INPUT'=>$input,'COMCODE'=>new ocp_tempcode())));
- $form = do_lorem_template('FORM',array('TABINDEX'=>placeholder_number(),'FIELDS'=>$fields,'SUBMIT_NAME'=>lorem_word(),'URL'=>placeholder_url(),'TEXT'=>lorem_phrase(),'HIDDEN'=>'','BATCH_IMPORT_ARCHIVE_CONTENTS'=>lorem_phrase()));
+ $form = do_lorem_template('FORM',array('TABINDEX'=>placeholder_number(),'FIELDS'=>$fields,'SUBMIT_NAME'=>lorem_word(),'URL'=>placeholder_url(),'HIDDEN'=>'','BATCH_IMPORT_ARCHIVE_CONTENTS'=>lorem_phrase()));
return array(
lorem_globalise(
@@ -617,7 +615,7 @@ function tpl_preview__gallery_image()
do_lorem_template('GALLERY_IMAGE',array(
'VIEW_URL'=>placeholder_url(),
'THUMB'=>placeholder_image(),
- 'TEXT'=>lorem_phrase(),
+ 'TITLE'=>lorem_phrase(),
'DESCRIPTION'=>lorem_phrase(),
'ADD_DATE_RAW'=>placeholder_time(),
'EDIT_DATE_RAW'=>placeholder_time(),
@@ -642,7 +640,7 @@ function tpl_preview__block_main_gallery_embed()
$entries=new ocp_tempcode();
foreach (placeholder_array() as $k=>$v)
{
- $map=array('TEXT'=>lorem_phrase(),'DESCRIPTION'=>lorem_paragraph(),'TYPE'=>'image','ID'=>placeholder_id(),'FILE_SIZE'=>lorem_word(),'SUBMITTER'=>lorem_word(),'FULL_URL'=>placeholder_url(),'THUMB_URL'=>placeholder_url(),'CAT'=>lorem_word(),'THUMB'=>placeholder_image(),'VIEW_URL'=>placeholder_url(),'ADD_DATE_RAW'=>lorem_word(),'EDIT_DATE_RAW'=>placeholder_time(),'VIEWS'=>placeholder_id());
+ $map=array('TITLE'=>lorem_phrase(),'DESCRIPTION'=>lorem_paragraph(),'TYPE'=>'image','ID'=>placeholder_id(),'FILE_SIZE'=>lorem_word(),'SUBMITTER'=>lorem_word(),'FULL_URL'=>placeholder_url(),'THUMB_URL'=>placeholder_url(),'CAT'=>lorem_word(),'THUMB'=>placeholder_image(),'VIEW_URL'=>placeholder_url(),'ADD_DATE_RAW'=>lorem_word(),'EDIT_DATE_RAW'=>placeholder_time(),'VIEWS'=>placeholder_id());
$entry=do_lorem_template('GALLERY_IMAGE',$map);
$entries->attach(do_lorem_template('GALLERY_ENTRY_WRAP',array('ENTRY'=>$entry)+$map));
}
@@ -910,13 +908,13 @@ function tpl_preview__gallery_regular_mode_screen()
$results_browser = placeholder_result_browser();
$entry=new ocp_tempcode();
- $map=array('TEXT'=>lorem_phrase(),'DESCRIPTION'=>lorem_paragraph(),'TYPE'=>'image','ID'=>placeholder_id(),'FILE_SIZE'=>lorem_word(),'SUBMITTER'=>lorem_word(),'FULL_URL'=>placeholder_url(),'THUMB_URL'=>placeholder_url(),'CAT'=>lorem_word(),'THUMB'=>placeholder_image(),'VIEW_URL'=>placeholder_url(),'EDIT_DATE_RAW'=>placeholder_time(),'ADD_DATE_RAW'=>placeholder_time(),'VIEWS'=>placeholder_number());
+ $map=array('TITLE'=>lorem_phrase(),'DESCRIPTION'=>lorem_paragraph(),'TYPE'=>'image','ID'=>placeholder_id(),'FILE_SIZE'=>lorem_word(),'SUBMITTER'=>lorem_word(),'FULL_URL'=>placeholder_url(),'THUMB_URL'=>placeholder_url(),'CAT'=>lorem_word(),'THUMB'=>placeholder_image(),'VIEW_URL'=>placeholder_url(),'EDIT_DATE_RAW'=>placeholder_time(),'ADD_DATE_RAW'=>placeholder_time(),'VIEWS'=>placeholder_number());
$entry=do_lorem_template('GALLERY_IMAGE',$map);
$entries=new ocp_tempcode();
$entries->attach(do_lorem_template('GALLERY_ENTRY_WRAP',array('ENTRY'=>$entry)+$map));
$video_details = do_lorem_template('GALLERY_VIDEO_INFO',array('HEIGHT'=>placeholder_number(),'WIDTH'=>placeholder_number(),'LENGTH'=>placeholder_number()));
- $map=array('VIDEO_DETAILS'=>$video_details,'TEXT'=>lorem_phrase(),'DESCRIPTION'=>lorem_phrase(),'ADD_DATE_RAW'=>placeholder_time(),'EDIT_DATE_RAW'=>placeholder_time(),'VIEWS'=>placeholder_number(),'VIEW_URL'=>placeholder_url(),'SUBMITTER'=>placeholder_id(),'ID'=>placeholder_id(),'THUMB'=>placeholder_image());
+ $map=array('VIDEO_DETAILS'=>$video_details,'TITLE'=>lorem_phrase(),'DESCRIPTION'=>lorem_phrase(),'ADD_DATE_RAW'=>placeholder_time(),'EDIT_DATE_RAW'=>placeholder_time(),'VIEWS'=>placeholder_number(),'VIEW_URL'=>placeholder_url(),'SUBMITTER'=>placeholder_id(),'ID'=>placeholder_id(),'THUMB'=>placeholder_image());
$entry=do_lorem_template('GALLERY_VIDEO',$map);
$entries->attach(do_lorem_template('GALLERY_ENTRY_WRAP',array('ENTRY'=>$entry)+$map));
View
1  sources/hooks/systems/addon_registry/occle.php
@@ -116,6 +116,7 @@ function get_file_list()
'data/occle.php',
'lang/EN/occle.ini',
'sources/hooks/modules/admin_occle_commands/.htaccess',
+ 'sources/hooks/modules/admin_occle_commands/alien_check.php',
'sources/hooks/modules/admin_occle_commands/append.php',
'sources/hooks/modules/admin_occle_commands/ban_ip.php',
'sources/hooks/modules/admin_occle_commands/ban_member.php',
View
4 sources/hooks/systems/ajax_tree/choose_catalogue_category.php
@@ -113,9 +113,9 @@ function simple($id,$options,$it=NULL)
$catalogues=$GLOBALS['SITE_DB']->query_select('catalogues',array('c_name'));
foreach ($catalogues as $catalogue)
{
- $out.=nice_get_catalogue_category_tree($catalogue['c_name'],is_null($it)?NULL:intval($it),$addable_filter,$compound_list);
+ $out.=static_evaluate_tempcode(nice_get_catalogue_category_tree($catalogue['c_name'],is_null($it)?NULL:intval($it),$addable_filter,$compound_list));
}
- return $out;
+ return make_string_tempcode($out);
} else
{
return nice_get_catalogue_category_tree($catalogue_name,is_null($it)?NULL:intval($it),$addable_filter,$compound_list);
View
134 sources/hooks/systems/profiles_tabs/blog.php
@@ -0,0 +1,134 @@
+<?php /*
+
+ ocPortal
+ Copyright (c) ocProducts, 2004-2012
+
+ See text/EN/licence.txt for full licencing information.
+
+
+ NOTE TO PROGRAMMERS:
+ Do not edit this file. If you need to make changes, save your changed file to the appropriate *_custom folder
+ **** If you ignore this advice, then your website upgrades (e.g. for bug fixes) will likely kill your changes ****
+
+*/
+
+/**
+ * @license http://opensource.org/licenses/cpal_1.0 Common Public Attribution License
+ * @copyright ocProducts Ltd
+ * @package news
+ */
+
+class Hook_Profiles_Tabs_blog
+{
+
+ /**
+ * Find whether this hook is active.
+ *
+ * @param MEMBER The ID of the member who is being viewed
+ * @param MEMBER The ID of the member who is doing the viewing
+ * @return boolean Whether this hook is active
+ */
+ function is_active($member_id_of,$member_id_viewing)
+ {
+ return has_specific_permission($member_id_of,'have_personal_category','cms_news');
+ }
+
+ /**
+ * Standard modular render function for profile tab hooks.
+ *
+ * @param MEMBER The ID of the member who is being viewed
+ * @param MEMBER The ID of the member who is doing the viewing
+ * @return array A triple: The tab title, the tab contents, the suggested tab order
+ */
+ function render_tab($member_id_of,$member_id_viewing)
+ {
+ require_lang('news');
+ require_css('news');
+
+ $title=do_lang_tempcode('BLOG');
+
+ $order=50;
+
+ $max_rows=0;
+
+ $max=get_param_integer('blogs_max',5);
+ $start=get_param_integer('blogs_start',0);
+
+ // Show recent blog posts
+ $recent_blog_posts=new ocp_tempcode();
+ $rss_url=new ocp_tempcode();
+ $news_cat=$GLOBALS['SITE_DB']->query_select('news_categories',array('*'),array('nc_owner'=>$member_id_of),'',1);
+ if ((array_key_exists(0,$news_cat)) && (has_category_access($member_id_viewing,'news',strval($news_cat[0]['id']))))
+ {
+ $rss_url=make_string_tempcode(find_script('backend').'?type=rss2&mode=news&filter='.strval($news_cat[0]['id']));
+
+ // How many results? (not 100% accurate, if a news item is in a primary cat and same secondary cat)
+ $max_rows+=$GLOBALS['SITE_DB']->query_value('news','COUNT(*)',array('news_category'=>$news_cat[0]['id']));
+ $max_rows+=$GLOBALS['SITE_DB']->query_value('news n LEFT JOIN '.$GLOBALS['SITE_DB']->get_table_prefix().'news_category_entries c ON n.id=c.news_entry','COUNT(*)',array('news_category'=>$news_cat[0]['id']));
+
+ // Fetch and sort
+ $news1=$GLOBALS['SITE_DB']->query_select('news',array('*'),array('news_category'=>$news_cat[0]['id']),'ORDER BY date_and_time DESC',$max+$start);
+ $news2=$GLOBALS['SITE_DB']->query_select('news n LEFT JOIN '.$GLOBALS['SITE_DB']->get_table_prefix().'news_category_entries c ON n.id=c.news_entry',array('n.*'),array('news_category'=>$news_cat[0]['id']),'ORDER BY date_and_time DESC',$max+$start);
+ $news=array();
+ foreach ($news1 as $row) $news[$row['id']]=$row;
+ foreach ($news2 as $row) $news[$row['id']]=$row;
+ unset($news1);
+ unset($news2);
+ global $M_SORT_KEY;
+ $M_SORT_KEY='date_and_time';
+ usort($news,'multi_sort');
+ $news=array_reverse($news);
+
+ // Output
+ $done=0;
+ foreach ($news as $i=>$myrow)
+ {
+ if ($i<$start) continue;
+ if ($done==$max) break;
+
+ $news_id=$myrow['id'];
+ $news_date=get_timezoned_date($myrow['date_and_time']);
+ $author_url='';
+ $author=$myrow['author'];
+ $news_title=get_translated_tempcode($myrow['title']);
+ $news_summary=get_translated_tempcode($myrow['news']);
+ if ($news_summary->is_empty())
+ {
+ $news_summary=get_translated_tempcode($myrow['news_article']);
+ $truncate=true;
+ } else $truncate=false;
+ $news_full_url=build_url(array('page'=>'news','type'=>'view','id'=>$news_id,'filter'=>$news_cat[0]['id']),get_module_zone('news'));
+ $news_img=find_theme_image($news_cat[0]['nc_img']);
+ if (is_null($news_img)) $news_img='';
+ if ($myrow['news_image']!='')
+ {
+ $news_img=$myrow['news_image'];
+ if (url_is_local($news_img)) $news_img=get_base_url().'/'.$news_img;
+ }
+ $news_category=get_translated_text($news_cat[0]['nc_title']);
+ $seo_bits=seo_meta_get_for('news',strval($news_id));
+ $map2=array('TAGS'=>get_loaded_tags('news',explode(',',$seo_bits[0])),'TRUNCATE'=>$truncate,'BLOG'=>false,'ID'=>strval($news_id),'SUBMITTER'=>strval($myrow['submitter']),'CATEGORY'=>$news_category,'IMG'=>$news_img,'DATE'=>$news_date,'DATE_RAW'=>strval($myrow['date_and_time']),'NEWS_TITLE'=>$news_title,'AUTHOR'=>$author,'AUTHOR_URL'=>$author_url,'NEWS'=>$news_summary,'FULL_URL'=>$news_full_url);
+ if ((get_option('is_on_comments')=='1') && (!has_no_forum()) && ($myrow['allow_comments']>=1)) $map2['COMMENT_COUNT']='1';
+ $recent_blog_posts->attach(do_template('NEWS_PIECE_SUMMARY',$map2));
+
+ $done++;
+ }
+ }
+
+ // Add link
+ if ($member_id_of==$member_id_viewing)
+ $add_blog_post_url=build_url(array('page'=>'cms_blogs','type'=>'ad'),get_module_zone('cms_blogs'));
+ else
+ $add_blog_post_url=new ocp_tempcode();
+
+ // Pagination
+ require_code('templates_results_browser');
+ $results_browser=results_browser(do_lang_tempcode('BLOGS_POSTS'),NULL,$start,'blogs_start',$max,'blogs_max',$max_rows,NULL,'view',true,false,7,NULL,'tab__blog');
+
+ // Wrap it all up
+ $content=do_template('OCF_MEMBER_PROFILE_BLOG',array('RESULTS_BROWSER'=>$results_browser,'RSS_URL'=>$rss_url,'ADD_BLOG_POST_URL'=>$add_blog_post_url,'MEMBER_ID'=>strval($member_id_of),'RECENT_BLOG_POSTS'=>$recent_blog_posts));
+
+ return array($title,$content,$order);
+ }
+
+}
View
8 sources/phpstub.php
@@ -2907,8 +2907,14 @@ function realpath($path)
* @param ?mixed Parameter (NULL: not used).
* @param ?mixed Parameter (NULL: not used).
* @param ?mixed Parameter (NULL: not used).
+ * @param ?mixed Parameter (NULL: not used).
+ * @param ?mixed Parameter (NULL: not used).
+ * @param ?mixed Parameter (NULL: not used).
+ * @param ?mixed Parameter (NULL: not used).
+ * @param ?mixed Parameter (NULL: not used).
+ * @param ?mixed Parameter (NULL: not used).
*/
-function register_shutdown_function($callback,$parama=NULL,$paramb=NULL,$paramc=NULL,$paramd=NULL,$parame=NULL,$paramf=NULL,$paramg=NULL,$paramh=NULL,$parami=NULL,$paramj=NULL,$paramk=NULL)
+function register_shutdown_function($callback,$parama=NULL,$paramb=NULL,$paramc=NULL,$paramd=NULL,$parame=NULL,$paramf=NULL,$paramg=NULL,$paramh=NULL,$parami=NULL,$paramj=NULL,$paramk=NULL,$paraml=NULL,$paramm=NULL,$paramn=NULL,$paramo=NULL,$paramp=NULL,$paramq=NULL)
{
}
View
4 sources/support.php
@@ -37,8 +37,8 @@ function init__support()
// Heavily optimised! Ended up with preg_replace after trying lots of things
global $HTML_ESCAPE_1,$HTML_ESCAPE_1_STRREP,$HTML_ESCAPE_2;
- $HTML_ESCAPE_1=array('/&/'/*,'/,'/*/,'/"/','/\'/','/</','/>/'/*,'//'*/);
- $HTML_ESCAPE_1_STRREP=array('&'/*,'짬'/,'"','\'','<','>'/*,'�'*/);
+ $HTML_ESCAPE_1=array('/&/'/*,'/'.chr(195).'/','/'.chr(195).'/'*/,'/"/','/\'/','/</','/>/'/*,'/'.chr(194).'/'*/);
+ $HTML_ESCAPE_1_STRREP=array('&'/*,chr(195),chr(195)*/,'"','\'','<','>'/*,chr(194)*/);
$HTML_ESCAPE_2=array('&amp;'/*,'&quot;','&quot;'*/,'&quot;','&#039;','&lt;','&gt;'/*,'&pound;'*/);
global $BOT_MAP,$CACHE_BOT_TYPE;
View
2  sources/themes2.php
@@ -190,7 +190,7 @@ function actual_add_theme_image($theme,$lang,$id,$path,$fail_ok=false)
* @param boolean Allow no code to be given
* @param ID_TEXT Form field for uploading
* @param ID_TEXT Form field for choosing
- * @param object Database connection
+ * @param ?object Database connection (NULL: site database)
* @return ID_TEXT The (possibly randomised) theme image code
*/
function get_theme_img_code($type,$allow_skip=false,$field_file='file',$field_choose='theme_img_code',$db=NULL)
View
1  sources/transcoding.php
@@ -6,6 +6,7 @@
See text/EN/licence.txt for full licencing information.
*/
+/*EXTRA FUNCTIONS: shell_exec*/
/**
* @license http://opensource.org/licenses/cpal_1.0 Common Public Attribution License
View
4 themes/default/css/global.css
@@ -2453,6 +2453,10 @@ th.meta_data_title {
margin-left: 20px;
}
+.radio_list_picture_cat .hide_button img {
+ vertical-align: bottom;
+}
+
.radio_list_picture {
float: {!en_left};
white-space: nowrap;
View
6 themes/default/templates/FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_2.tpl
@@ -1,13 +1,11 @@
<div class="radio_list_picture" onclick="this.getElementsByTagName('img')[0].onclick(event);">
<img style="padding: 3px; margin: 1px" onkeypress="this.onclick(event);" id="{$FIX_ID*,j_{NAME}_{CODE}}_img" onclick="var form=document.getElementById('{$FIX_ID*,j_{NAME}_{CODE}}').form; var ob=document.getElementById('{$FIX_ID*,j_{NAME}_{CODE}}_img'); choose_picture('{$FIX_ID*;,j_{NAME}_{CODE}}',ob,'{NAME*}',event); if (typeof window.main_form_very_simple!='undefined') form.submit(); cancelBubbling(event);" src="{URL*}" title="" alt="{!SELECT_IMAGE}: {$STRIP_TAGS,{PRETTY*}}" /><br />
- <div{+START,IF,{$AND,{$JS_ON},{$MATCH_KEY_MATCH,adminzone:admin_themes,_WILD:members}}} class="accessibility_hidden"{+END}>
{+START,IF,{$NOT,{CHECKED}}}
- <label for="{$FIX_ID*,j_{NAME}_{CODE}}"><input onclick="if (typeof window.deselectAltURL!='undefined') deselectAltURL(this.form); if (typeof window.main_form_very_simple!='undefined') this.form.submit(); cancelBubbling(event);" class="input_radio" type="radio" id="{$FIX_ID*,j_{NAME}_{CODE}}" name="{NAME*}" value="{CODE*}" /> {PRETTY*}</label>
+ <label{+START,IF,{$AND,{$JS_ON},{$MATCH_KEY_MATCH,adminzone:admin_themes,_WILD:members}}} class="accessibility_hidden"{+END} for="{$FIX_ID*,j_{NAME}_{CODE}}"><input onclick="if (typeof window.deselectAltURL!='undefined') deselectAltURL(this.form); if (typeof window.main_form_very_simple!='undefined') this.form.submit(); cancelBubbling(event);" class="input_radio" type="radio" id="{$FIX_ID*,j_{NAME}_{CODE}}" name="{NAME*}" value="{CODE*}" /></label> {PRETTY*}
{+END}
{+START,IF,{CHECKED}}
- <label for="{$FIX_ID*,j_{NAME}_{CODE}}"><input onclick="if (typeof window.deselectAltURL!='undefined') deselectAltURL(this.form); if (typeof window.main_form_very_simple!='undefined') this.form.submit(); cancelBubbling(event);" class="input_radio" type="radio" id="{$FIX_ID*,j_{NAME}_{CODE}}" name="{NAME*}" value="{CODE*}" checked="checked" /> {PRETTY*}</label>
+ <label{+START,IF,{$AND,{$JS_ON},{$MATCH_KEY_MATCH,adminzone:admin_themes,_WILD:members}}} class="accessibility_hidden"{+END} for="{$FIX_ID*,j_{NAME}_{CODE}}"><input onclick="if (typeof window.deselectAltURL!='undefined') deselectAltURL(this.form); if (typeof window.main_form_very_simple!='undefined') this.form.submit(); cancelBubbling(event);" class="input_radio" type="radio" id="{$FIX_ID*,j_{NAME}_{CODE}}" name="{NAME*}" value="{CODE*}" checked="checked" /></label> {PRETTY*}
{+END}
- </div>
</div>
View
2  themes/default/templates/FORM_SCREEN_INPUT_RADIO_LIST_ENTRY_PICTURE_2_CAT_WRAP.tpl
@@ -1,6 +1,6 @@
<br />
-<div>
+<div class="radio_list_picture_cat">
<a class="hide_button" href="#" onclick="event.returnValue=false; hideTag(this.parentNode); return false;"><img alt="{!EXPAND}: {CATEGORY_NAME*}" title="{!EXPAND}" src="{$IMG*,expand}" /></a>
<a class="hide_button" href="#" onclick="event.returnValue=false; hideTag(this.parentNode); return false;">{CATEGORY_NAME*}</a>
<div class="hide_tag hide_button_spacing" style="display: {$JS_ON,{DISPLAY*},block}">
View
2  themes/default/templates/JAVASCRIPT_SWFUPLOAD.tpl
@@ -5,7 +5,7 @@
*
* mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/
*
- * SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilz�n and Mammon Media and is released under the MIT License:
+ * SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzen and Mammon Media and is released under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
* SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
View
2  themes/default/templates_custom/JAVASCRIPT_SWFUPLOAD.tpl
@@ -5,7 +5,7 @@
*
* mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/
*
- * SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilz鮠and Mammon Media and is released under the MIT License:
+ * SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzen and Mammon Media and is released under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
* SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
View
2  transcoder/queue.php
@@ -1,5 +1,7 @@
<?php
+/*EXTRA FUNCTIONS: shell_exec*/
+
if (function_exists('set_time_limit')) @set_time_limit(0);
ini_set('allow_url_fopen','1');
ini_set('display_errors','1');
View
0  uploads/galleries/pre_transcoding/index.html
No changes.
Please sign in to comment.
Something went wrong with that request. Please try again.