Author: frik85
Date: Thu Aug 30 12:06:42 2007
New Revision: 28666
URL:
http://svn.reactos.org/svn/reactos?rev=28666&view=rev
Log:
RosCMS update:
* "stable" button fixed, it generates now related pages
Modified:
trunk/web/reactos.org/htdocs/roscms/inc/data_edit.php
trunk/web/reactos.org/htdocs/roscms/inc/data_export_page.php
trunk/web/reactos.org/htdocs/roscms/inc/data_maintain_out.php
Modified:
trunk/web/reactos.org/htdocs/roscms/inc/data_edit.php
URL:
http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/inc/…
==============================================================================
---
trunk/web/reactos.org/htdocs/roscms/inc/data_edit.php (original)
+++
trunk/web/reactos.org/htdocs/roscms/inc/data_edit.php Thu Aug 30 12:06:42 2007
@@ -1214,6 +1214,7 @@
function changetags($entr_count, $entr_revid, $entr_flag) {
global $roscms_intern_account_id;
+ global $roscms_standard_language;
global $RosCMS_GET_debug;
global $h_a;
global $h_a2;
@@ -1251,8 +1252,9 @@
if ($RosCMS_GET_debug) echo "<li>".$entry_ids2[0]." ==
".$entry_ids2[1]."</li>";
$query_rev_data = mysql_query("SELECT *
- FROM data_revision
- WHERE rev_id =
'".mysql_real_escape_string($entry_ids2[1])."'
+ FROM data_revision r, data_ d
+ WHERE r.rev_id =
'".mysql_real_escape_string($entry_ids2[1])."'
+ AND r.data_id = d.data_id
LIMIT 1;");
$result_rev_data = mysql_fetch_array($query_rev_data);
@@ -1343,8 +1345,24 @@
// generate related pages
require("inc/data_export_page.php");
- log_event_generate_low("+++++
[generate_page_output_update(".$result_rev_data['data_id'].",
".$result_revision_stable['rev_language'].",
".$temp_dynamic.")]");
- generate_page_output_update($result_rev_data['data_id'],
$result_revision_stable['rev_language'], $temp_dynamic);
+
+ if ($result_revision_stable['rev_language'] == "") {
+ $tmp_lang = $roscms_standard_language;
+ }
+ else {
+ $tmp_lang = $result_revision_stable['rev_language'];
+ }
+
+ $query_entry = mysql_query("SELECT data_id
+ FROM data_
+ WHERE data_name =
'".mysql_real_escape_string($result_rev_data['data_name'])."'
+ AND data_type = 'page'
+ LIMIT 1;");
+ $result_entry = mysql_fetch_array($query_entry);
+
+ log_event_generate_low("+++++
[generate_page_output_update(".$result_rev_data['data_id'].",
".$tmp_lang.", ".$temp_dynamic.")]");
+ if ($RosCMS_GET_debug) echo "<p>!
generate_page_output_update(".$result_rev_data['data_id'].",
".$tmp_lang.", ".$temp_dynamic.")</p>";
+ echo generate_page_output_update($result_entry['data_id'], $tmp_lang,
$temp_dynamic);
}
else {
echo "Only 'new' entries can be made stable";
Modified:
trunk/web/reactos.org/htdocs/roscms/inc/data_export_page.php
URL:
http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/inc/…
==============================================================================
---
trunk/web/reactos.org/htdocs/roscms/inc/data_export_page.php (original)
+++
trunk/web/reactos.org/htdocs/roscms/inc/data_export_page.php Thu Aug 30 12:06:42 2007
@@ -31,6 +31,7 @@
function generate_page_output_update($g_data_id, $g_lang_id, $g_page_dynida) {
+ //echo "<p>!!generate_page_output_update(".$g_data_id.",
".$g_lang_id.", ".$g_page_dynida.")</p>";
global $roscms_standard_language;
$query_data = mysql_query("SELECT *
@@ -70,7 +71,7 @@
generate_page_output($result_data['data_name'], $tmp_lang, $g_page_dynida);
break;
case 'template':
- echo "<p>generate_update_helper(".$tmp_lang.",
".$result_data['data_type'].",
".$result_data['data_name'].")</p>";
+ echo "<p>(a) generate_update_helper(".$tmp_lang.",
".$result_data['data_type'].",
".$result_data['data_name'].")</p>";
generate_update_helper($tmp_lang, $result_data['data_type'],
$result_data['data_name']);
break;
case 'content':
@@ -82,12 +83,12 @@
generate_page_output($result_data['data_name'], $tmp_lang, $g_page_dynida);
}
else {
- echo "<p>generate_update_helper(".$tmp_lang.",
".$result_data['data_type'].",
".$result_data['data_name'].")</p>";
+ echo "<p>(b) generate_update_helper(".$tmp_lang.",
".$result_data['data_type'].",
".$result_data['data_name'].")</p>";
generate_update_helper($tmp_lang, $result_data['data_type'],
$result_data['data_name']);
}
break;
case 'script':
- echo "<p>generate_update_helper(".$tmp_lang.",
".$result_data['data_type'].",
".$result_data['data_name'].")</p>";
+ echo "<p>(c) generate_update_helper(".$tmp_lang.",
".$result_data['data_type'].",
".$result_data['data_name'].")</p>";
generate_update_helper($tmp_lang, $result_data['data_type'],
$result_data['data_name']);
break;
default:
Modified:
trunk/web/reactos.org/htdocs/roscms/inc/data_maintain_out.php
URL:
http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/inc/…
==============================================================================
---
trunk/web/reactos.org/htdocs/roscms/inc/data_maintain_out.php (original)
+++
trunk/web/reactos.org/htdocs/roscms/inc/data_maintain_out.php Thu Aug 30 12:06:42
2007
@@ -71,7 +71,8 @@
AND data_type =
'".mysql_real_escape_string($RosCMS_GET_d_value2)."'
LIMIT 1;");
$result_entry = mysql_fetch_array($query_entry);
-
+
+ //echo
"<p>generate_page_output_update(".$result_entry['data_id'].",
".$RosCMS_GET_d_value3.", ".$RosCMS_GET_d_value4.")</p>";
echo generate_page_output_update($result_entry['data_id'],
$RosCMS_GET_d_value3, $RosCMS_GET_d_value4);
}
?>