Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dic-global-dev
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Manzar Hussain
dic-global-dev
Commits
b8f1f2e8
Commit
b8f1f2e8
authored
Jan 18, 2021
by
Manzar Hussain
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-theme' into 'develop'
field change See merge request manzarH/dic-global-dev!439
parents
05a5166f
86f5011f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
dicindialtd.module
modules/custom/dicindialtd/dicindialtd.module
+5
-12
No files found.
modules/custom/dicindialtd/dicindialtd.module
View file @
b8f1f2e8
...
@@ -167,11 +167,11 @@ function _block_corporate_news_and_announcements_view_callback_pdfs($cyear = 0,$
...
@@ -167,11 +167,11 @@ function _block_corporate_news_and_announcements_view_callback_pdfs($cyear = 0,$
if
(
isset
(
$cyear
)
&&
intval
(
$cyear
)){
if
(
isset
(
$cyear
)
&&
intval
(
$cyear
)){
$queryNids
=
db_select
(
'node'
,
'n'
)
$queryNids
=
db_select
(
'node'
,
'n'
)
->
distinct
();
->
distinct
();
$queryNids
->
join
(
'field_data_field_
uploaded_
year'
,
'y'
,
'y.entity_id = n.nid AND y.revision_id = n.vid'
);
$queryNids
->
join
(
'field_data_field_year'
,
'y'
,
'y.entity_id = n.nid AND y.revision_id = n.vid'
);
$queryNids
->
join
(
'field_data_field_category'
,
'c'
,
'c.entity_id = n.nid AND c.revision_id = n.vid'
);
$queryNids
->
join
(
'field_data_field_category'
,
'c'
,
'c.entity_id = n.nid AND c.revision_id = n.vid'
);
$queryNids
->
condition
(
'y.entity_type'
,
'node'
)
$queryNids
->
condition
(
'y.entity_type'
,
'node'
)
->
condition
(
'y.bundle'
,
'investors'
);
->
condition
(
'y.bundle'
,
'investors'
);
$queryNids
->
where
(
'EXTRACT(YEAR FROM y.field_
uploaded_
year_value) = :year'
,
array
(
'year'
=>
$cyear
))
$queryNids
->
where
(
'EXTRACT(YEAR FROM y.field_year_value) = :year'
,
array
(
'year'
=>
$cyear
))
//$queryNids ->where("FROM_UNIXTIME(y.field_uploaded_year_value, '%Y') = :date", array(':date' => $cyear))
//$queryNids ->where("FROM_UNIXTIME(y.field_uploaded_year_value, '%Y') = :date", array(':date' => $cyear))
//->condition('y.field_year_value', $cyear)
//->condition('y.field_year_value', $cyear)
->
condition
(
'c.field_category_tid'
,
$cnews
);
->
condition
(
'c.field_category_tid'
,
$cnews
);
...
@@ -188,14 +188,7 @@ function _block_corporate_news_and_announcements_view_callback_pdfs($cyear = 0,$
...
@@ -188,14 +188,7 @@ function _block_corporate_news_and_announcements_view_callback_pdfs($cyear = 0,$
$results
=
$queryNids
->
execute
()
$results
=
$queryNids
->
execute
()
->
fetchCol
();
->
fetchCol
();
/* while($record = $results->fetchAssoc()) {
print_r($record);
}*/
// print_r($results);
// echo count($results);
//
if
(
is_array
(
$results
)
&&
count
(
$results
)){
if
(
is_array
(
$results
)
&&
count
(
$results
)){
$nodes
=
node_load_multiple
(
$results
);
$nodes
=
node_load_multiple
(
$results
);
if
(
is_array
(
$nodes
)
&&
count
(
$nodes
)){
if
(
is_array
(
$nodes
)
&&
count
(
$nodes
)){
...
@@ -249,12 +242,12 @@ function _block_corporate_news_and_announcements_view_callback_monthly_pdfs($cye
...
@@ -249,12 +242,12 @@ function _block_corporate_news_and_announcements_view_callback_monthly_pdfs($cye
if
(
isset
(
$cyear
)
&&
intval
(
$cyear
)){
if
(
isset
(
$cyear
)
&&
intval
(
$cyear
)){
$queryNids
=
db_select
(
'node'
,
'n'
)
$queryNids
=
db_select
(
'node'
,
'n'
)
->
distinct
();
->
distinct
();
$queryNids
->
join
(
'field_data_field_
uploaded_
year'
,
'y'
,
'y.entity_id = n.nid AND y.revision_id = n.vid'
);
$queryNids
->
join
(
'field_data_field_year'
,
'y'
,
'y.entity_id = n.nid AND y.revision_id = n.vid'
);
$queryNids
->
join
(
'field_data_field_category'
,
'c'
,
'c.entity_id = n.nid AND c.revision_id = n.vid'
);
$queryNids
->
join
(
'field_data_field_category'
,
'c'
,
'c.entity_id = n.nid AND c.revision_id = n.vid'
);
$queryNids
->
condition
(
'y.entity_type'
,
'node'
)
$queryNids
->
condition
(
'y.entity_type'
,
'node'
)
->
condition
(
'y.bundle'
,
'investors'
);
->
condition
(
'y.bundle'
,
'investors'
);
$queryNids
->
where
(
'EXTRACT(YEAR FROM y.field_
uploaded_
year_value) = :year'
,
array
(
'year'
=>
$cyear
));
$queryNids
->
where
(
'EXTRACT(YEAR FROM y.field_year_value) = :year'
,
array
(
'year'
=>
$cyear
));
$queryNids
->
where
(
'EXTRACT(MONTH FROM y.field_
uploaded_
year_value) = :month'
,
array
(
'month'
=>
$cmonth
));
$queryNids
->
where
(
'EXTRACT(MONTH FROM y.field_year_value) = :month'
,
array
(
'month'
=>
$cmonth
));
$queryNids
->
condition
(
'c.field_category_tid'
,
$cnews
);
$queryNids
->
condition
(
'c.field_category_tid'
,
$cnews
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment